Skip to content

Commit

Permalink
rename resource name
Browse files Browse the repository at this point in the history
Signed-off-by: balasubramanian-s <[email protected]>
  • Loading branch information
balasubramanian-s committed Aug 19, 2024
1 parent 5ea37a6 commit b7ad025
Show file tree
Hide file tree
Showing 26 changed files with 342 additions and 337 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ The following resources are available in the InSpec GCP Profile
| [google_dlp_job_trigger](docs/resources/google_dlp_job_trigger.md) | [google_dlp_job_triggers](docs/resources/google_dlp_job_triggers.md) |
| [google_dlp_job](docs/resources/google_dlp_job.md) | [google_dlp_jobs](docs/resources/google_dlp_jobs.md) |
| [google_dataproc_metastore_service](docs/resources/google_dataproc_metastore_service.md) | [google_dataproc_metastore_services](docs/resources/google_dataproc_metastore_services.md) |
| [google_dataproc_session](docs/resources/google_dataproc_session.md) | [google_dataproc_sessions](docs/resources/google_dataproc_sessions.md) |
| [google_dlp_stored_info_type](docs/resources/google_dlp_stored_info_types.md) | [google_dlp_stored_info_types](docs/resources/google_dlp_stored_info_types.md) |
| [google_filestore_instance](docs/resources/google_filestore_instance.md) | [google_filestore_instances](docs/resources/google_filestore_instances.md) |
| [google_iam_organization_custom_role](docs/resources/google_iam_organization_custom_role.md) | [google_iam_organization_custom_roles](docs/resources/google_iam_organization_custom_roles.md) |
Expand Down
76 changes: 0 additions & 76 deletions docs/resources/google_dataproc_project_location_sessions.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
+++

title = "google_dataproc_project_location_session Resource"
title = "google_dataproc_session Resource"
platform = "gcp"
draft = false
gh_repo = "inspec-gcp"


[menu.inspec]

title = "google_dataproc_project_location_session"
identifier = "inspec/resources/gcp/google_dataproc_project_location_session Resource"
title = "google_dataproc_session"
identifier = "inspec/resources/gcp/google_dataproc_session Resource"
parent = "inspec/resources/gcp"
+++

Use the `google_dataproc_project_location_session` InSpec audit resource to test the properties of a test a Google ProjectLocationSession.
Use the `google_dataproc_session` InSpec audit resource to test the properties of a test a Google Session.

## Installation
{{% inspec_gcp_install %}}

## Syntax
A `google_dataproc_project_location_session` is used to test a Google ProjectLocationSession resource
A `google_dataproc_session` is used to test a Google Session resource

## Examples
```
describe google_dataproc_project_location_session(name: ' value_name') do
describe google_dataproc_session(name: ' value_name') do
it { should exist }
its('name') { should cmp 'value_name' }
its('uuid') { should cmp 'value_uuid' }
Expand All @@ -37,16 +37,16 @@ describe google_dataproc_project_location_session(name: ' value_name') do
end
describe google_dataproc_project_location_session(name: "does_not_exit") do
describe google_dataproc_session(name: "does_not_exit") do
it { should_not exist }
end
```

## Parameters
Properties that can be accessed from the `google_dataproc_project_location_session` resource:
Properties that can be accessed from the `google_dataproc_session` resource:

## Properties
Properties that can be accessed from the `google_dataproc_project_location_session` resource:
Properties that can be accessed from the `google_dataproc_session` resource:


* `name`: Required. The resource name of the session.
Expand Down
76 changes: 76 additions & 0 deletions docs/resources/google_dataproc_sessions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
+++

title = "google_dataproc_sessions Resource"
platform = "gcp"
draft = false
gh_repo = "inspec-gcp"


[menu.inspec]

title = "google_dataproc_sessions"
identifier = "inspec/resources/gcp/google_dataproc_sessions Resource"
parent = "inspec/resources/gcp"
+++

Use the `google_dataproc_sessions` InSpec audit resource to test the properties of a test a Google Session.

## Installation
{{% inspec_gcp_install %}}

## Syntax
A `google_dataproc_sessions` is used to test a Google Session resource

## Examples
```
describe google_dataproc_sessions(parent: ' value_parent') do
it { should exist }
end
```

## Parameters
Properties that can be accessed from the `google_dataproc_sessions` resource:

See [google_dataproc_session.md](google_dataproc_session.md) for more detailed information
* `names`: an array of `google_dataproc_session` name
* `uuids`: an array of `google_dataproc_session` uuid
* `create_times`: an array of `google_dataproc_session` create_time
* `jupyter_sessions`: an array of `google_dataproc_session` jupyter_session
* `runtime_infos`: an array of `google_dataproc_session` runtime_info
* `states`: an array of `google_dataproc_session` state
* `state_messages`: an array of `google_dataproc_session` state_message
* `state_times`: an array of `google_dataproc_session` state_time
* `creators`: an array of `google_dataproc_session` creator
* `labels`: an array of `google_dataproc_session` labels
* `runtime_configs`: an array of `google_dataproc_session` runtime_config
* `environment_configs`: an array of `google_dataproc_session` environment_config
* `users`: an array of `google_dataproc_session` user
* `state_histories`: an array of `google_dataproc_session` state_history
* `session_templates`: an array of `google_dataproc_session` session_template
## Properties
Properties that can be accessed from the `google_dataproc_sessions` resource:

See [google_dataproc_session.md](google_dataproc_session.md) for more detailed information
* `names`: an array of `google_dataproc_session` name
* `uuids`: an array of `google_dataproc_session` uuid
* `create_times`: an array of `google_dataproc_session` create_time
* `jupyter_sessions`: an array of `google_dataproc_session` jupyter_session
* `runtime_infos`: an array of `google_dataproc_session` runtime_info
* `states`: an array of `google_dataproc_session` state
* `state_messages`: an array of `google_dataproc_session` state_message
* `state_times`: an array of `google_dataproc_session` state_time
* `creators`: an array of `google_dataproc_session` creator
* `labels`: an array of `google_dataproc_session` labels
* `runtime_configs`: an array of `google_dataproc_session` runtime_config
* `environment_configs`: an array of `google_dataproc_session` environment_config
* `users`: an array of `google_dataproc_session` user
* `state_histories`: an array of `google_dataproc_session` state_history
* `session_templates`: an array of `google_dataproc_session` session_template

## Filter Criteria
This resource supports all of the above properties as filter criteria, which can be used
with `where` as a block or a method.

## GCP Permissions

Ensure the [Cloud Dataproc API](https://console.cloud.google.com/apis/library/dataproc.googleapis.com) is enabled for the current project.
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'google/dataproc/property/projectlocationsession_environment_config_execution_config'
require 'google/dataproc/property/projectlocationsession_environment_config_peripherals_config'
require 'google/dataproc/property/projectlocationsession_environment_config_peripherals_config_spark_history_server_config'
require 'google/dataproc/property/session_environment_config_execution_config'
require 'google/dataproc/property/session_environment_config_peripherals_config'
require 'google/dataproc/property/session_environment_config_peripherals_config_spark_history_server_config'
module GoogleInSpec
module Dataproc
module Property
class ProjectLocationSessionEnvironmentConfig
class SessionEnvironmentConfig
attr_reader :execution_config

attr_reader :peripherals_config

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@execution_config = GoogleInSpec::Dataproc::Property::ProjectLocationSessionEnvironmentConfigExecutionConfig.new(args['executionConfig'], to_s)
@peripherals_config = GoogleInSpec::Dataproc::Property::ProjectLocationSessionEnvironmentConfigPeripheralsConfig.new(args['peripheralsConfig'], to_s)
@execution_config = GoogleInSpec::Dataproc::Property::SessionEnvironmentConfigExecutionConfig.new(args['executionConfig'], to_s)
@peripherals_config = GoogleInSpec::Dataproc::Property::SessionEnvironmentConfigPeripheralsConfig.new(args['peripheralsConfig'], to_s)
end

def to_s
"#{@parent_identifier} ProjectLocationSessionEnvironmentConfig"
"#{@parent_identifier} SessionEnvironmentConfig"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
module GoogleInSpec
module Dataproc
module Property
class ProjectLocationSessionEnvironmentConfigExecutionConfig
class SessionEnvironmentConfigExecutionConfig
attr_reader :service_account

attr_reader :network_uri
Expand Down Expand Up @@ -47,7 +47,7 @@ def initialize(args = nil, parent_identifier = nil)
end

def to_s
"#{@parent_identifier} ProjectLocationSessionEnvironmentConfigExecutionConfig"
"#{@parent_identifier} SessionEnvironmentConfigExecutionConfig"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'google/dataproc/property/projectlocationsession_environment_config_peripherals_config_spark_history_server_config'
require 'google/dataproc/property/session_environment_config_peripherals_config_spark_history_server_config'
module GoogleInSpec
module Dataproc
module Property
class ProjectLocationSessionEnvironmentConfigPeripheralsConfig
class SessionEnvironmentConfigPeripheralsConfig
attr_reader :metastore_service

attr_reader :spark_history_server_config
Expand All @@ -26,11 +26,11 @@ def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@metastore_service = args['metastoreService']
@spark_history_server_config = GoogleInSpec::Dataproc::Property::ProjectLocationSessionEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig.new(args['sparkHistoryServerConfig'], to_s)
@spark_history_server_config = GoogleInSpec::Dataproc::Property::SessionEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig.new(args['sparkHistoryServerConfig'], to_s)
end

def to_s
"#{@parent_identifier} ProjectLocationSessionEnvironmentConfigPeripheralsConfig"
"#{@parent_identifier} SessionEnvironmentConfigPeripheralsConfig"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
module GoogleInSpec
module Dataproc
module Property
class ProjectLocationSessionEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig
class SessionEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig
attr_reader :dataproc_cluster

def initialize(args = nil, parent_identifier = nil)
Expand All @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil)
end

def to_s
"#{@parent_identifier} ProjectLocationSessionEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig"
"#{@parent_identifier} SessionEnvironmentConfigPeripheralsConfigSparkHistoryServerConfig"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
module GoogleInSpec
module Dataproc
module Property
class ProjectLocationSessionJupyterSession
class SessionJupyterSession
attr_reader :kernel

attr_reader :display_name
Expand All @@ -29,7 +29,7 @@ def initialize(args = nil, parent_identifier = nil)
end

def to_s
"#{@parent_identifier} ProjectLocationSessionJupyterSession"
"#{@parent_identifier} SessionJupyterSession"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
module GoogleInSpec
module Dataproc
module Property
class ProjectLocationSessionLabels
class SessionLabels
attr_reader :additional_properties

def initialize(args = nil, parent_identifier = nil)
Expand All @@ -26,7 +26,7 @@ def initialize(args = nil, parent_identifier = nil)
end

def to_s
"#{@parent_identifier} ProjectLocationSessionLabels"
"#{@parent_identifier} SessionLabels"
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'google/dataproc/property/projectlocationsession_runtime_config_properties'
require 'google/dataproc/property/projectlocationsession_runtime_config_repository_config'
require 'google/dataproc/property/projectlocationsession_runtime_config_repository_config_pypi_repository_config'
require 'google/dataproc/property/session_runtime_config_properties'
require 'google/dataproc/property/session_runtime_config_repository_config'
require 'google/dataproc/property/session_runtime_config_repository_config_pypi_repository_config'
module GoogleInSpec
module Dataproc
module Property
class ProjectLocationSessionRuntimeConfig
class SessionRuntimeConfig
attr_reader :version

attr_reader :container_image
Expand All @@ -33,12 +33,12 @@ def initialize(args = nil, parent_identifier = nil)
@parent_identifier = parent_identifier
@version = args['version']
@container_image = args['containerImage']
@properties = GoogleInSpec::Dataproc::Property::ProjectLocationSessionRuntimeConfigProperties.new(args['properties'], to_s)
@repository_config = GoogleInSpec::Dataproc::Property::ProjectLocationSessionRuntimeConfigRepositoryConfig.new(args['repositoryConfig'], to_s)
@properties = GoogleInSpec::Dataproc::Property::SessionRuntimeConfigProperties.new(args['properties'], to_s)
@repository_config = GoogleInSpec::Dataproc::Property::SessionRuntimeConfigRepositoryConfig.new(args['repositoryConfig'], to_s)
end

def to_s
"#{@parent_identifier} ProjectLocationSessionRuntimeConfig"
"#{@parent_identifier} SessionRuntimeConfig"
end
end
end
Expand Down
Loading

0 comments on commit b7ad025

Please sign in to comment.