pub struct TagKeys { /* private fields */ }Expand description
Implements a client for the Cloud Resource Manager API.
§Example
let client = TagKeys::builder().build().await?;
// use `client` to make requests to the Cloud Resource Manager API.§Service Description
Allow users to create and manage tag keys.
§Configuration
To configure TagKeys use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://cloudresourcemanager.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
TagKeys holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap TagKeys in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl TagKeys
impl TagKeys
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for TagKeys.
let client = TagKeys::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: TagKeys + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: TagKeys + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn list_tag_keys(&self) -> ListTagKeys
pub fn list_tag_keys(&self) -> ListTagKeys
Lists all TagKeys for a parent resource.
Sourcepub fn get_tag_key(&self) -> GetTagKey
pub fn get_tag_key(&self) -> GetTagKey
Retrieves a TagKey. This method will return PERMISSION_DENIED if the
key does not exist or the user does not have permission to view it.
Sourcepub fn get_namespaced_tag_key(&self) -> GetNamespacedTagKey
pub fn get_namespaced_tag_key(&self) -> GetNamespacedTagKey
Retrieves a TagKey by its namespaced name.
This method will return PERMISSION_DENIED if the key does not exist
or the user does not have permission to view it.
Sourcepub fn create_tag_key(&self) -> CreateTagKey
pub fn create_tag_key(&self) -> CreateTagKey
Creates a new TagKey. If another request with the same parameters is sent while the original request is in process, the second request will receive an error. A maximum of 1000 TagKeys can exist under a parent at any given time.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn update_tag_key(&self) -> UpdateTagKey
pub fn update_tag_key(&self) -> UpdateTagKey
Updates the attributes of the TagKey resource.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn delete_tag_key(&self) -> DeleteTagKey
pub fn delete_tag_key(&self) -> DeleteTagKey
Deletes a TagKey. The TagKey cannot be deleted if it has any child TagValues.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn get_iam_policy(&self) -> GetIamPolicy
pub fn get_iam_policy(&self) -> GetIamPolicy
Gets the access control policy for a TagKey. The returned policy may be
empty if no such policy or resource exists. The resource field should
be the TagKey’s resource name. For example, “tagKeys/1234”.
The caller must have
cloudresourcemanager.googleapis.com/tagKeys.getIamPolicy permission on
the specified TagKey.
Sourcepub fn set_iam_policy(&self) -> SetIamPolicy
pub fn set_iam_policy(&self) -> SetIamPolicy
Sets the access control policy on a TagKey, replacing any existing
policy. The resource field should be the TagKey’s resource name.
For example, “tagKeys/1234”.
The caller must have resourcemanager.tagKeys.setIamPolicy permission
on the identified tagValue.
Sourcepub fn test_iam_permissions(&self) -> TestIamPermissions
pub fn test_iam_permissions(&self) -> TestIamPermissions
Returns permissions that a caller has on the specified TagKey.
The resource field should be the TagKey’s resource name.
For example, “tagKeys/1234”.
There are no permissions required for making this API call.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.