Table of Contents
ResourceGroupsTaggingAPI.Client¶A low-level client representing AWS Resource Groups Tagging API:
client = session.create_client('resourcegroupstaggingapi')
These are the available methods:
can_paginate()generate_presigned_url()get_paginator()get_resources()get_tag_keys()get_tag_values()get_waiter()tag_resources()untag_resources()can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_resources(**kwargs)¶Returns all the tagged resources that are associated with the specified tags (keys and values) located in the specified region for the AWS account. The tags and the resource types that you specify in the request are known as filters . The response includes all tags that are associated with the requested resources. If no filter is provided, this action returns a paginated resource list with the associated tags.
See also: AWS API Documentation
Request Syntax
response = client.get_resources(
PaginationToken='string',
TagFilters=[
{
'Key': 'string',
'Values': [
'string',
]
},
],
ResourcesPerPage=123,
TagsPerPage=123,
ResourceTypeFilters=[
'string',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'PaginationToken': 'string',
'ResourceTagMappingList': [
{
'ResourceARN': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
]
}
Response Structure
|
get_tag_keys(**kwargs)¶Returns all tag keys in the specified region for the AWS account.
See also: AWS API Documentation
Request Syntax
response = client.get_tag_keys(
PaginationToken='string'
)
| Parameters: | PaginationToken (string) – A string that indicates that additional data is available. Leave this value empty for your initial request. If the response includes a PaginationToken, use that string for this value to request an additional page of data. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'PaginationToken': 'string',
'TagKeys': [
'string',
]
}
Response Structure
|
get_tag_values(**kwargs)¶Returns all tag values for the specified key in the specified region for the AWS account.
See also: AWS API Documentation
Request Syntax
response = client.get_tag_values(
PaginationToken='string',
Key='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'PaginationToken': 'string',
'TagValues': [
'string',
]
}
Response Structure
|
get_waiter(waiter_name)¶tag_resources(**kwargs)¶Applies one or more tags to the specified resources. Note the following:
See also: AWS API Documentation
Request Syntax
response = client.tag_resources(
ResourceARNList=[
'string',
],
Tags={
'string': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'FailedResourcesMap': {
'string': {
'StatusCode': 123,
'ErrorCode': 'InternalServiceException'|'InvalidParameterException',
'ErrorMessage': 'string'
}
}
}
Response Structure
|
untag_resources(**kwargs)¶Removes the specified tags from the specified resources. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from a resource that were already removed. Note the following:
See also: AWS API Documentation
Request Syntax
response = client.untag_resources(
ResourceARNList=[
'string',
],
TagKeys=[
'string',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'FailedResourcesMap': {
'string': {
'StatusCode': 123,
'ErrorCode': 'InternalServiceException'|'InvalidParameterException',
'ErrorMessage': 'string'
}
}
}
Response Structure
|
The available paginators are:
ResourceGroupsTaggingAPI.Paginator.GetResourcesResourceGroupsTaggingAPI.Paginator.GetTagKeysResourceGroupsTaggingAPI.Paginator.GetTagValuesResourceGroupsTaggingAPI.Paginator.GetResources¶paginator = client.get_paginator('get_resources')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from ResourceGroupsTaggingAPI.Client.get_resources().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
TagFilters=[
{
'Key': 'string',
'Values': [
'string',
]
},
],
TagsPerPage=123,
ResourceTypeFilters=[
'string',
],
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ResourceTagMappingList': [
{
'ResourceARN': 'string',
'Tags': [
{
'Key': 'string',
'Value': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
|
ResourceGroupsTaggingAPI.Paginator.GetTagKeys¶paginator = client.get_paginator('get_tag_keys')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from ResourceGroupsTaggingAPI.Client.get_tag_keys().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: | PaginationConfig (dict) – A dictionary that provides parameters to control pagination.
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'TagKeys': [
'string',
],
'NextToken': 'string'
}
Response Structure
|
ResourceGroupsTaggingAPI.Paginator.GetTagValues¶paginator = client.get_paginator('get_tag_values')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from ResourceGroupsTaggingAPI.Client.get_tag_values().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
Key='string',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'TagValues': [
'string',
],
'NextToken': 'string'
}
Response Structure
|