Class AutokeyAdminClient (2.29.0-rc)

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][google.cloud.kms.v1.CryptoKey], ready for Customer Managed Encryption Key (CMEK) use, on-demand.

Equality

Instances of this class created via copy-construction or copy-assignment always compare equal. Instances created with equal std::shared_ptr<*Connection> objects compare equal. Objects that compare equal share the same underlying resources.

Performance

Creating a new instance of this class is a relatively expensive operation, new objects establish new connections to the service. In contrast, copy-construction, move-construction, and the corresponding assignment operations are relatively efficient as the copies share all underlying resources.

Thread Safety

Concurrent access to different instances of this class, even if they compare equal, is guaranteed to work. Two or more threads operating on the same instance of this class is not guaranteed to work. Since copy-construction and move-construction is a relatively efficient operation, consider using such a copy when using this class from multiple threads.

Constructors

AutokeyAdminClient(AutokeyAdminClient const &)

Copy and move support

Parameter
Name Description
AutokeyAdminClient const &

AutokeyAdminClient(AutokeyAdminClient &&)

Copy and move support

Parameter
Name Description
AutokeyAdminClient &&

AutokeyAdminClient(std::shared_ptr< AutokeyAdminConnection >, Options)

Parameters
Name Description
connection std::shared_ptr< AutokeyAdminConnection >
opts Options

Operators

operator=(AutokeyAdminClient const &)

Copy and move support

Parameter
Name Description
AutokeyAdminClient const &
Returns
Type Description
AutokeyAdminClient &

operator=(AutokeyAdminClient &&)

Copy and move support

Parameter
Name Description
AutokeyAdminClient &&
Returns
Type Description
AutokeyAdminClient &

Functions

UpdateAutokeyConfig(google::cloud::kms::v1::AutokeyConfig const &, google::protobuf::FieldMask const &, Options)

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][google.cloud.kms.v1.KeyHandle] creation in the folder's descendant projects will use this configuration to determine where to create the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey].

Parameters
Name Description
autokey_config google::cloud::kms::v1::AutokeyConfig const &

Required. AutokeyConfig with values to update.

update_mask google::protobuf::FieldMask const &

Required. Masks which fields of the AutokeyConfig to update, e.g. keyProject.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::kms::v1::AutokeyConfig >

the result of the RPC. The response message type (google.cloud.kms.v1.AutokeyConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

UpdateAutokeyConfig(google::cloud::kms::v1::UpdateAutokeyConfigRequest const &, Options)

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][google.cloud.kms.v1.KeyHandle] creation in the folder's descendant projects will use this configuration to determine where to create the resulting [CryptoKey][google.cloud.kms.v1.CryptoKey].

Parameters
Name Description
request google::cloud::kms::v1::UpdateAutokeyConfigRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.kms.v1.UpdateAutokeyConfigRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::kms::v1::AutokeyConfig >

the result of the RPC. The response message type (google.cloud.kms.v1.AutokeyConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetAutokeyConfig(std::string const &, Options)

Returns the AutokeyConfig for a folder.

Parameters
Name Description
name std::string const &

Required. Name of the AutokeyConfig resource, e.g. folders/{FOLDER_NUMBER}/autokeyConfig.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::kms::v1::AutokeyConfig >

the result of the RPC. The response message type (google.cloud.kms.v1.AutokeyConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

GetAutokeyConfig(google::cloud::kms::v1::GetAutokeyConfigRequest const &, Options)

Returns the AutokeyConfig for a folder.

Parameters
Name Description
request google::cloud::kms::v1::GetAutokeyConfigRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.kms.v1.GetAutokeyConfigRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::kms::v1::AutokeyConfig >

the result of the RPC. The response message type (google.cloud.kms.v1.AutokeyConfig) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ShowEffectiveAutokeyConfig(std::string const &, Options)

Returns the effective Cloud KMS Autokey configuration for a given project.

Parameters
Name Description
parent std::string const &

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.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::kms::v1::ShowEffectiveAutokeyConfigResponse >

the result of the RPC. The response message type (google.cloud.kms.v1.ShowEffectiveAutokeyConfigResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.

ShowEffectiveAutokeyConfig(google::cloud::kms::v1::ShowEffectiveAutokeyConfigRequest const &, Options)

Returns the effective Cloud KMS Autokey configuration for a given project.

Parameters
Name Description
request google::cloud::kms::v1::ShowEffectiveAutokeyConfigRequest const &

Unary RPCs, such as the one wrapped by this function, receive a single request proto message which includes all the inputs for the RPC. In this case, the proto message is a google.cloud.kms.v1.ShowEffectiveAutokeyConfigRequest. Proto messages are converted to C++ classes by Protobuf, using the Protobuf mapping rules.

opts Options

Optional. Override the class-level options, such as retry and backoff policies.

Returns
Type Description
StatusOr< google::cloud::kms::v1::ShowEffectiveAutokeyConfigResponse >

the result of the RPC. The response message type (google.cloud.kms.v1.ShowEffectiveAutokeyConfigResponse) is mapped to a C++ class using the Protobuf mapping rules. If the request fails, the StatusOr contains the error details.