describe_tags
async
¶
describe_tags(
*,
config_overrides: Optional[AsyncRedshiftClientConfig] = None,
resource_name: Optional[String] = None,
resource_type: Optional[String] = None,
max_records: Optional[IntegerOptional] = None,
marker: Optional[String] = None,
tag_keys: Optional[TagKeyList] = None,
tag_values: Optional[TagValueList] = None,
) -> TaggedResourceListMessage
Returns a list of tags. You can return tags from a specific resource by specifying an ARN, or you can return all tags for a given type of resource, such as clusters, snapshots, and so on.
The following are limitations for DescribeTags:
-
You cannot specify an ARN and a resource-type value together in the same request.
-
You cannot use the
MaxRecordsandMarkerparameters together with the ARN parameter. -
The
MaxRecordsparameter can be a range from 10 to 50 results to return in a request.
If you specify both tag keys and tag values in the same request, Amazon Redshift returns all resources that match any combination of the specified keys and values. For example, if you have owner and environment for tag keys, and admin and test for tag values, all resources that have any combination of those values are returned.
If both tag keys and values are omitted from the request, resources are returned regardless of whether they have tag keys or values associated with them.
Parameters:
-
resource_name(Optional[String], default:None) –The Amazon Resource Name (ARN) for which you want to describe the tag or tags. For example,
arn:aws:redshift:us-east-2:123456789:cluster:t1. -
resource_type(Optional[String], default:None) –The type of resource with which you want to view tags. Valid resource types are:
-
Cluster
-
CIDR/IP
-
EC2 security group
-
Snapshot
-
Cluster security group
-
Subnet group
-
HSM connection
-
HSM certificate
-
Parameter group
-
Snapshot copy grant
-
Integration (zero-ETL integration or S3 event integration)
To describe the tags associated with an
integration, don't specifyResourceType, instead specify theResourceNameof the integration.
For more information about Amazon Redshift resource types and constructing ARNs, go to Specifying Policy Elements: Actions, Effects, Resources, and Principals in the Amazon Redshift Cluster Management Guide.
-
-
max_records(Optional[IntegerOptional], default:None) –The maximum number or response records to return in each call. If the number of remaining response records exceeds the specified
MaxRecordsvalue, a value is returned in amarkerfield of the response. You can retrieve the next set of records by retrying the command with the returnedmarkervalue. -
marker(Optional[String], default:None) –A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned marker value in the
markerparameter and retrying the command. If themarkerfield is empty, all response records have been retrieved for the request. -
tag_keys(Optional[TagKeyList], default:None) –A tag key or keys for which you want to return all matching resources that are associated with the specified key or keys. For example, suppose that you have resources tagged with keys called
ownerandenvironment. If you specify both of these tag keys in the request, Amazon Redshift returns a response with all resources that have either or both of these tag keys associated with them. -
tag_values(Optional[TagValueList], default:None) –A tag value or values for which you want to return all matching resources that are associated with the specified value or values. For example, suppose that you have resources tagged with values called
adminandtest. If you specify both of these tag values in the request, Amazon Redshift returns a response with all resources that have either or both of these tag values associated with them.
Raises:
-
InvalidTagFault–The tag is invalid.
-
ResourceNotFoundFault–The resource could not be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_redshift/_services/async_redshift.py
7404 7405 7406 7407 7408 7409 7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 7422 7423 7424 7425 7426 7427 7428 7429 7430 7431 7432 7433 7434 7435 7436 7437 7438 7439 7440 7441 7442 7443 7444 7445 7446 7447 7448 7449 7450 7451 7452 7453 7454 7455 7456 7457 7458 7459 7460 7461 7462 7463 7464 7465 7466 7467 7468 7469 7470 7471 | |