Reference documentation and code samples for the Cloud Key Management Service (KMS) V1 API class Google::Cloud::Kms::V1::AutokeyAdmin::Client.
Client for the AutokeyAdmin service.
Provides interfaces for managing Cloud KMS Autokey folder-level configurations. A configuration is inherited by all descendent projects. A configuration at one folder overrides any other configurations in its ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS Autokey, so that users working in a descendant project can request provisioned CryptoKeys, ready for Customer Managed Encryption Key (CMEK) use, on-demand.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::Configuration
Configure the AutokeyAdmin Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all AutokeyAdmin clients ::Google::Cloud::Kms::V1::AutokeyAdmin::Client.configure do |config| config.timeout = 10.0 end
#configure
def configure() { |config| ... } -> Client::Configuration
Configure the AutokeyAdmin Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#get_autokey_config
def get_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
def get_autokey_config(name: nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
Returns the AutokeyConfig for a folder.
def get_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
get_autokey_config
via a request object, either of type
GetAutokeyConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Kms::V1::GetAutokeyConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_autokey_config(name: nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
get_autokey_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
-
name (::String) — Required. Name of the AutokeyConfig
resource, e.g.
folders/{FOLDER_NUMBER}/autokeyConfig
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Kms::V1::AutokeyConfig)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::AutokeyAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::GetAutokeyConfigRequest.new # Call the get_autokey_config method. result = client.get_autokey_config request # The returned object is of type Google::Cloud::Kms::V1::AutokeyConfig. p result
#iam_policy_client
def iam_policy_client() -> Google::Iam::V1::IAMPolicy::Client
Get the associated client for mix-in of the IAMPolicy.
- (Google::Iam::V1::IAMPolicy::Client)
#initialize
def initialize() { |config| ... } -> Client
Create a new AutokeyAdmin client object.
- (config) — Configure the AutokeyAdmin client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Kms::V1::AutokeyAdmin::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Kms::V1::AutokeyAdmin::Client.new do |config| config.timeout = 10.0 end
#location_client
def location_client() -> Google::Cloud::Location::Locations::Client
Get the associated client for mix-in of the Locations.
- (Google::Cloud::Location::Locations::Client)
#logger
def logger() -> Logger
The logger used for request/response debug logging.
- (Logger)
#show_effective_autokey_config
def show_effective_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse
def show_effective_autokey_config(parent: nil) -> ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse
Returns the effective Cloud KMS Autokey configuration for a given project.
def show_effective_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse
show_effective_autokey_config
via a request object, either of type
ShowEffectiveAutokeyConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def show_effective_autokey_config(parent: nil) -> ::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse
show_effective_autokey_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- parent (::String) — Required. Name of the resource project to the show effective Cloud KMS Autokey configuration for. This may be helpful for interrogating the effect of nested folder configurations on a given resource project.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::AutokeyAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigRequest.new # Call the show_effective_autokey_config method. result = client.show_effective_autokey_config request # The returned object is of type Google::Cloud::Kms::V1::ShowEffectiveAutokeyConfigResponse. p result
#universe_domain
def universe_domain() -> String
The effective universe domain
- (String)
#update_autokey_config
def update_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
def update_autokey_config(autokey_config: nil, update_mask: nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
Updates the AutokeyConfig for a
folder. The caller must have both cloudkms.autokeyConfigs.update
permission on the parent folder and cloudkms.cryptoKeys.setIamPolicy
permission on the provided key project. A
KeyHandle creation in the folder's
descendant projects will use this configuration to determine where to
create the resulting CryptoKey.
def update_autokey_config(request, options = nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
update_autokey_config
via a request object, either of type
UpdateAutokeyConfigRequest or an equivalent Hash.
- request (::Google::Cloud::Kms::V1::UpdateAutokeyConfigRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_autokey_config(autokey_config: nil, update_mask: nil) -> ::Google::Cloud::Kms::V1::AutokeyConfig
update_autokey_config
via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- autokey_config (::Google::Cloud::Kms::V1::AutokeyConfig, ::Hash) — Required. AutokeyConfig with values to update.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Masks which fields of the
AutokeyConfig to update, e.g.
keyProject
.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Kms::V1::AutokeyConfig)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
Basic example
require "google/cloud/kms/v1" # Create a client object. The client can be reused for multiple calls. client = Google::Cloud::Kms::V1::AutokeyAdmin::Client.new # Create a request. To set request fields, pass in keyword arguments. request = Google::Cloud::Kms::V1::UpdateAutokeyConfigRequest.new # Call the update_autokey_config method. result = client.update_autokey_config request # The returned object is of type Google::Cloud::Kms::V1::AutokeyConfig. p result