Skip to content

Commit

Permalink
Automatically generated by magic modules for service: bigtableadmin_v…
Browse files Browse the repository at this point in the history
…2 and resource: Projects__instances__appProfile.

This commit includes the following changes:
- Singular Resource
- Plural Resource
- Documentation updates
- Terraform configuration
- Integration tests

Signed-off-by: Samir <[email protected]>
  • Loading branch information
sa-progress committed Jul 25, 2024
1 parent d53de35 commit e990814
Show file tree
Hide file tree
Showing 10 changed files with 531 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
+++

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


[menu.inspec]

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

Use the `google_bigtableadmin_project_instance_app_profile` InSpec audit resource to test the properties of a test a Google ProjectInstanceAppProfile.

## Installation
{{% inspec_gcp_install %}}

## Syntax
A `google_bigtableadmin_project_instance_app_profile` is used to test a Google ProjectInstanceAppProfile resource

## Examples
```
describe google_bigtableadmin_project_instance_app_profile(name: ' value_name') do
it { should exist }
its('name') { should cmp 'value_name' }
its('etag') { should cmp 'value_etag' }
its('description') { should cmp 'value_description' }
its('priority') { should cmp 'value_priority' }
end
describe google_bigtableadmin_project_instance_app_profile(name: "does_not_exit") do
it { should_not exist }
end
```

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

## Properties
Properties that can be accessed from the `google_bigtableadmin_project_instance_app_profile` resource:


* `name`: The unique name of the app profile. Values are of the form `projects/{project}/instances/{instance}/appProfiles/_a-zA-Z0-9*`.

* `etag`: Strongly validated etag for optimistic concurrency control. Preserve the value returned from `GetAppProfile` when calling `UpdateAppProfile` to fail the request if there has been a modification in the mean time. The `update_mask` of the request need not include `etag` for this protection to apply. See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more details.

* `description`: Long form description of the use case for this AppProfile.

* `multi_cluster_routing_use_any`: Read/write requests are routed to the nearest cluster in the instance, and will fail over to the nearest cluster that is available in the event of transient errors or delays. Clusters in a region are considered equidistant. Choosing this option sacrifices read-your-writes consistency to improve availability.

* `cluster_ids`: The set of clusters to route to. The order is ignored; clusters will be tried in order of distance. If left empty, all clusters are eligible.

* `single_cluster_routing`: Unconditionally routes all read/write requests to a specific cluster. This option preserves read-your-writes consistency but does not improve availability.

* `cluster_id`: The cluster to which read/write requests should be routed.

* `allow_transactional_writes`: Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are allowed by this app profile. It is unsafe to send these requests to the same table/row/column in multiple clusters.

* `priority`: This field has been deprecated in favor of `standard_isolation.priority`. If you set this field, `standard_isolation.priority` will be set instead. The priority of requests sent using this app profile.
Possible values:
* PRIORITY_UNSPECIFIED
* PRIORITY_LOW
* PRIORITY_MEDIUM
* PRIORITY_HIGH

* `standard_isolation`: Standard options for isolating this app profile's traffic from other use cases.

* `priority`: The priority of requests sent using this app profile.
Possible values:
* PRIORITY_UNSPECIFIED
* PRIORITY_LOW
* PRIORITY_MEDIUM
* PRIORITY_HIGH

* `data_boost_isolation_read_only`: Data Boost is a serverless compute capability that lets you run high-throughput read jobs and queries on your Bigtable data, without impacting the performance of the clusters that handle your application traffic. Data Boost supports read-only use cases with single-cluster routing.

* `compute_billing_owner`: The Compute Billing Owner for this Data Boost App Profile.
Possible values:
* COMPUTE_BILLING_OWNER_UNSPECIFIED
* HOST_PAYS


## GCP Permissions

Ensure the [https://bigtableadmin.googleapis.com/](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com/) is enabled for the current project.
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
+++

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


[menu.inspec]

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

Use the `google_bigtableadmin_project_instance_app_profiles` InSpec audit resource to test the properties of a test a Google ProjectInstanceAppProfile.

## Installation
{{% inspec_gcp_install %}}

## Syntax
A `google_bigtableadmin_project_instance_app_profiles` is used to test a Google ProjectInstanceAppProfile resource

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

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

See [google_bigtableadmin_project_instance_app_profile.md](google_bigtableadmin_project_instance_app_profile.md) for more detailed information
* `names`: an array of `google_bigtableadmin_project_instance_app_profile` name
* `etags`: an array of `google_bigtableadmin_project_instance_app_profile` etag
* `descriptions`: an array of `google_bigtableadmin_project_instance_app_profile` description
* `multi_cluster_routing_use_anies`: an array of `google_bigtableadmin_project_instance_app_profile` multi_cluster_routing_use_any
* `single_cluster_routings`: an array of `google_bigtableadmin_project_instance_app_profile` single_cluster_routing
* `priorities`: an array of `google_bigtableadmin_project_instance_app_profile` priority
* `standard_isolations`: an array of `google_bigtableadmin_project_instance_app_profile` standard_isolation
* `data_boost_isolation_read_onlies`: an array of `google_bigtableadmin_project_instance_app_profile` data_boost_isolation_read_only
## Properties
Properties that can be accessed from the `google_bigtableadmin_project_instance_app_profiles` resource:

See [google_bigtableadmin_project_instance_app_profile.md](google_bigtableadmin_project_instance_app_profile.md) for more detailed information
* `names`: an array of `google_bigtableadmin_project_instance_app_profile` name
* `etags`: an array of `google_bigtableadmin_project_instance_app_profile` etag
* `descriptions`: an array of `google_bigtableadmin_project_instance_app_profile` description
* `multi_cluster_routing_use_anies`: an array of `google_bigtableadmin_project_instance_app_profile` multi_cluster_routing_use_any
* `single_cluster_routings`: an array of `google_bigtableadmin_project_instance_app_profile` single_cluster_routing
* `priorities`: an array of `google_bigtableadmin_project_instance_app_profile` priority
* `standard_isolations`: an array of `google_bigtableadmin_project_instance_app_profile` standard_isolation
* `data_boost_isolation_read_onlies`: an array of `google_bigtableadmin_project_instance_app_profile` data_boost_isolation_read_only

## 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 [https://bigtableadmin.googleapis.com/](https://console.cloud.google.com/apis/library/bigtableadmin.googleapis.com/) is enabled for the current project.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module Bigtableadmin
module Property
class ProjectInstanceAppProfileDataBoostIsolationReadOnly
attr_reader :compute_billing_owner

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@compute_billing_owner = args['computeBillingOwner']
end

def to_s
"#{@parent_identifier} ProjectInstanceAppProfileDataBoostIsolationReadOnly"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module Bigtableadmin
module Property
class ProjectInstanceAppProfileMultiClusterRoutingUseAny
attr_reader :cluster_ids

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@cluster_ids = args['clusterIds']
end

def to_s
"#{@parent_identifier} ProjectInstanceAppProfileMultiClusterRoutingUseAny"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module Bigtableadmin
module Property
class ProjectInstanceAppProfileSingleClusterRouting
attr_reader :cluster_id

attr_reader :allow_transactional_writes

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@cluster_id = args['clusterId']
@allow_transactional_writes = args['allowTransactionalWrites']
end

def to_s
"#{@parent_identifier} ProjectInstanceAppProfileSingleClusterRouting"
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
module GoogleInSpec
module Bigtableadmin
module Property
class ProjectInstanceAppProfileStandardIsolation
attr_reader :priority

def initialize(args = nil, parent_identifier = nil)
return if args.nil?
@parent_identifier = parent_identifier
@priority = args['priority']
end

def to_s
"#{@parent_identifier} ProjectInstanceAppProfileStandardIsolation"
end
end
end
end
end
73 changes: 73 additions & 0 deletions libraries/google_bigtableadmin_project_instance_app_profile.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# frozen_string_literal: false

# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in README.md and
# CONTRIBUTING.md located at the root of this package.
#
# ----------------------------------------------------------------------------
require 'gcp_backend'
require 'google/bigtableadmin/property/projectinstanceappprofile_data_boost_isolation_read_only'
require 'google/bigtableadmin/property/projectinstanceappprofile_multi_cluster_routing_use_any'
require 'google/bigtableadmin/property/projectinstanceappprofile_single_cluster_routing'
require 'google/bigtableadmin/property/projectinstanceappprofile_standard_isolation'

# A provider to manage bigtableadmin resources.
class BigtableadminProjectInstanceAppProfile < GcpResourceBase
name 'google_bigtableadmin_project_instance_app_profile'
desc 'ProjectInstanceAppProfile'
supports platform: 'gcp'

attr_reader :params
attr_reader :name
attr_reader :etag
attr_reader :description
attr_reader :multi_cluster_routing_use_any
attr_reader :single_cluster_routing
attr_reader :priority
attr_reader :standard_isolation
attr_reader :data_boost_isolation_read_only

def initialize(params)
super(params.merge({ use_http_transport: true }))
@params = params
@fetched = @connection.fetch(product_url(params[:beta]), resource_base_url, params, 'Get')
parse unless @fetched.nil?
end

def parse
@name = @fetched['name']
@etag = @fetched['etag']
@description = @fetched['description']
@multi_cluster_routing_use_any = GoogleInSpec::Bigtableadmin::Property::ProjectInstanceAppProfileMultiClusterRoutingUseAny.new(@fetched['multiClusterRoutingUseAny'], to_s)
@single_cluster_routing = GoogleInSpec::Bigtableadmin::Property::ProjectInstanceAppProfileSingleClusterRouting.new(@fetched['singleClusterRouting'], to_s)
@priority = @fetched['priority']
@standard_isolation = GoogleInSpec::Bigtableadmin::Property::ProjectInstanceAppProfileStandardIsolation.new(@fetched['standardIsolation'], to_s)
@data_boost_isolation_read_only = GoogleInSpec::Bigtableadmin::Property::ProjectInstanceAppProfileDataBoostIsolationReadOnly.new(@fetched['dataBoostIsolationReadOnly'], to_s)
end

def exists?
!@fetched.nil?
end

def to_s
"ProjectInstanceAppProfile #{@params[:]}"
end

private

def product_url(_ = nil)
'https://bigtableadmin.googleapis.com//v2/'
end

def resource_base_url
'{{+name}}'
end
end
Loading

0 comments on commit e990814

Please sign in to comment.