Interface ResourceGroupsTaggingApiClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that can be used to configure and create aResourceGroupsTaggingApiClient
.create()
Create aResourceGroupsTaggingApiClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default DescribeReportCreationResponse
describeReportCreation
(Consumer<DescribeReportCreationRequest.Builder> describeReportCreationRequest) Describes the status of theStartReportCreation
operation.default DescribeReportCreationResponse
describeReportCreation
(DescribeReportCreationRequest describeReportCreationRequest) Describes the status of theStartReportCreation
operation.default GetComplianceSummaryResponse
getComplianceSummary
(Consumer<GetComplianceSummaryRequest.Builder> getComplianceSummaryRequest) Returns a table that shows counts of resources that are noncompliant with their tag policies.default GetComplianceSummaryResponse
getComplianceSummary
(GetComplianceSummaryRequest getComplianceSummaryRequest) Returns a table that shows counts of resources that are noncompliant with their tag policies.default GetComplianceSummaryIterable
getComplianceSummaryPaginator
(Consumer<GetComplianceSummaryRequest.Builder> getComplianceSummaryRequest) This is a variant ofgetComplianceSummary(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetComplianceSummaryRequest)
operation.default GetComplianceSummaryIterable
getComplianceSummaryPaginator
(GetComplianceSummaryRequest getComplianceSummaryRequest) This is a variant ofgetComplianceSummary(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetComplianceSummaryRequest)
operation.default GetResourcesResponse
Returns all the tagged or previously tagged resources that are located in the specified Amazon Web Services Region for the account.default GetResourcesResponse
getResources
(Consumer<GetResourcesRequest.Builder> getResourcesRequest) Returns all the tagged or previously tagged resources that are located in the specified Amazon Web Services Region for the account.default GetResourcesResponse
getResources
(GetResourcesRequest getResourcesRequest) Returns all the tagged or previously tagged resources that are located in the specified Amazon Web Services Region for the account.default GetResourcesIterable
This is a variant ofgetResources(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesRequest)
operation.default GetResourcesIterable
getResourcesPaginator
(Consumer<GetResourcesRequest.Builder> getResourcesRequest) This is a variant ofgetResources(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesRequest)
operation.default GetResourcesIterable
getResourcesPaginator
(GetResourcesRequest getResourcesRequest) This is a variant ofgetResources(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesRequest)
operation.default GetTagKeysResponse
Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling account.default GetTagKeysResponse
getTagKeys
(Consumer<GetTagKeysRequest.Builder> getTagKeysRequest) Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling account.default GetTagKeysResponse
getTagKeys
(GetTagKeysRequest getTagKeysRequest) Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling account.default GetTagKeysIterable
This is a variant ofgetTagKeys(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysRequest)
operation.default GetTagKeysIterable
getTagKeysPaginator
(Consumer<GetTagKeysRequest.Builder> getTagKeysRequest) This is a variant ofgetTagKeys(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysRequest)
operation.default GetTagKeysIterable
getTagKeysPaginator
(GetTagKeysRequest getTagKeysRequest) This is a variant ofgetTagKeys(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysRequest)
operation.default GetTagValuesResponse
getTagValues
(Consumer<GetTagValuesRequest.Builder> getTagValuesRequest) Returns all tag values for the specified key that are used in the specified Amazon Web Services Region for the calling account.default GetTagValuesResponse
getTagValues
(GetTagValuesRequest getTagValuesRequest) Returns all tag values for the specified key that are used in the specified Amazon Web Services Region for the calling account.default GetTagValuesIterable
getTagValuesPaginator
(Consumer<GetTagValuesRequest.Builder> getTagValuesRequest) This is a variant ofgetTagValues(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagValuesRequest)
operation.default GetTagValuesIterable
getTagValuesPaginator
(GetTagValuesRequest getTagValuesRequest) This is a variant ofgetTagValues(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagValuesRequest)
operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadata
default StartReportCreationResponse
startReportCreation
(Consumer<StartReportCreationRequest.Builder> startReportCreationRequest) Generates a report that lists all tagged resources in the accounts across your organization and tells whether each resource is compliant with the effective tag policy.default StartReportCreationResponse
startReportCreation
(StartReportCreationRequest startReportCreationRequest) Generates a report that lists all tagged resources in the accounts across your organization and tells whether each resource is compliant with the effective tag policy.default TagResourcesResponse
tagResources
(Consumer<TagResourcesRequest.Builder> tagResourcesRequest) Applies one or more tags to the specified resources.default TagResourcesResponse
tagResources
(TagResourcesRequest tagResourcesRequest) Applies one or more tags to the specified resources.default UntagResourcesResponse
untagResources
(Consumer<UntagResourcesRequest.Builder> untagResourcesRequest) Removes the specified tags from the specified resources.default UntagResourcesResponse
untagResources
(UntagResourcesRequest untagResourcesRequest) Removes the specified tags from the specified resources.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
describeReportCreation
default DescribeReportCreationResponse describeReportCreation(DescribeReportCreationRequest describeReportCreationRequest) throws ConstraintViolationException, InternalServiceException, InvalidParameterException, ThrottledException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Describes the status of the
StartReportCreation
operation.You can call this operation only from the organization's management account and from the us-east-1 Region.
- Parameters:
describeReportCreationRequest
-- Returns:
- Result of the DescribeReportCreation operation returned by the service.
- See Also:
-
describeReportCreation
default DescribeReportCreationResponse describeReportCreation(Consumer<DescribeReportCreationRequest.Builder> describeReportCreationRequest) throws ConstraintViolationException, InternalServiceException, InvalidParameterException, ThrottledException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Describes the status of the
StartReportCreation
operation.You can call this operation only from the organization's management account and from the us-east-1 Region.
This is a convenience which creates an instance of the
DescribeReportCreationRequest.Builder
avoiding the need to create one manually viaDescribeReportCreationRequest.builder()
- Parameters:
describeReportCreationRequest
- AConsumer
that will call methods onDescribeReportCreationRequest.Builder
to create a request.- Returns:
- Result of the DescribeReportCreation operation returned by the service.
- See Also:
-
getComplianceSummary
default GetComplianceSummaryResponse getComplianceSummary(GetComplianceSummaryRequest getComplianceSummaryRequest) throws ConstraintViolationException, InternalServiceException, InvalidParameterException, ThrottledException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Returns a table that shows counts of resources that are noncompliant with their tag policies.
For more information on tag policies, see Tag Policies in the Organizations User Guide.
You can call this operation only from the organization's management account and from the us-east-1 Region.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.- Parameters:
getComplianceSummaryRequest
-- Returns:
- Result of the GetComplianceSummary operation returned by the service.
- See Also:
-
getComplianceSummary
default GetComplianceSummaryResponse getComplianceSummary(Consumer<GetComplianceSummaryRequest.Builder> getComplianceSummaryRequest) throws ConstraintViolationException, InternalServiceException, InvalidParameterException, ThrottledException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Returns a table that shows counts of resources that are noncompliant with their tag policies.
For more information on tag policies, see Tag Policies in the Organizations User Guide.
You can call this operation only from the organization's management account and from the us-east-1 Region.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.
This is a convenience which creates an instance of the
GetComplianceSummaryRequest.Builder
avoiding the need to create one manually viaGetComplianceSummaryRequest.builder()
- Parameters:
getComplianceSummaryRequest
- AConsumer
that will call methods onGetComplianceSummaryRequest.Builder
to create a request.- Returns:
- Result of the GetComplianceSummary operation returned by the service.
- See Also:
-
getComplianceSummaryPaginator
default GetComplianceSummaryIterable getComplianceSummaryPaginator(GetComplianceSummaryRequest getComplianceSummaryRequest) throws ConstraintViolationException, InternalServiceException, InvalidParameterException, ThrottledException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException This is a variant of
getComplianceSummary(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetComplianceSummaryRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetComplianceSummaryIterable responses = client.getComplianceSummaryPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetComplianceSummaryIterable responses = client .getComplianceSummaryPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetComplianceSummaryResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetComplianceSummaryIterable responses = client.getComplianceSummaryPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getComplianceSummary(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetComplianceSummaryRequest)
operation.- Parameters:
getComplianceSummaryRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getComplianceSummaryPaginator
default GetComplianceSummaryIterable getComplianceSummaryPaginator(Consumer<GetComplianceSummaryRequest.Builder> getComplianceSummaryRequest) throws ConstraintViolationException, InternalServiceException, InvalidParameterException, ThrottledException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException This is a variant of
getComplianceSummary(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetComplianceSummaryRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetComplianceSummaryIterable responses = client.getComplianceSummaryPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetComplianceSummaryIterable responses = client .getComplianceSummaryPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetComplianceSummaryResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetComplianceSummaryIterable responses = client.getComplianceSummaryPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getComplianceSummary(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetComplianceSummaryRequest)
operation.
This is a convenience which creates an instance of the
GetComplianceSummaryRequest.Builder
avoiding the need to create one manually viaGetComplianceSummaryRequest.builder()
- Parameters:
getComplianceSummaryRequest
- AConsumer
that will call methods onGetComplianceSummaryRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getResources
default GetResourcesResponse getResources(GetResourcesRequest getResourcesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Returns all the tagged or previously tagged resources that are located in the specified Amazon Web Services Region for the account.
Depending on what information you want returned, you can also specify the following:
-
Filters that specify what tags and resource types you want returned. The response includes all tags that are associated with the requested resources.
-
Information about compliance with the account's effective tag policy. For more information on tag policies, see Tag Policies in the Organizations User Guide.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.- Parameters:
getResourcesRequest
-- Returns:
- Result of the GetResources operation returned by the service.
- See Also:
-
-
getResources
default GetResourcesResponse getResources(Consumer<GetResourcesRequest.Builder> getResourcesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Returns all the tagged or previously tagged resources that are located in the specified Amazon Web Services Region for the account.
Depending on what information you want returned, you can also specify the following:
-
Filters that specify what tags and resource types you want returned. The response includes all tags that are associated with the requested resources.
-
Information about compliance with the account's effective tag policy. For more information on tag policies, see Tag Policies in the Organizations User Guide.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.
This is a convenience which creates an instance of the
GetResourcesRequest.Builder
avoiding the need to create one manually viaGetResourcesRequest.builder()
- Parameters:
getResourcesRequest
- AConsumer
that will call methods onGetResourcesRequest.Builder
to create a request.- Returns:
- Result of the GetResources operation returned by the service.
- See Also:
-
-
getResources
default GetResourcesResponse getResources() throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiExceptionReturns all the tagged or previously tagged resources that are located in the specified Amazon Web Services Region for the account.
Depending on what information you want returned, you can also specify the following:
-
Filters that specify what tags and resource types you want returned. The response includes all tags that are associated with the requested resources.
-
Information about compliance with the account's effective tag policy. For more information on tag policies, see Tag Policies in the Organizations User Guide.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.- Returns:
- Result of the GetResources operation returned by the service.
- See Also:
-
-
getResourcesPaginator
default GetResourcesIterable getResourcesPaginator() throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiExceptionThis is a variant of
getResources(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetResourcesIterable responses = client.getResourcesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetResourcesIterable responses = client .getResourcesPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetResourcesIterable responses = client.getResourcesPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of ResourcesPerPage won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getResources(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesRequest)
operation.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getResourcesPaginator
default GetResourcesIterable getResourcesPaginator(GetResourcesRequest getResourcesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException This is a variant of
getResources(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetResourcesIterable responses = client.getResourcesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetResourcesIterable responses = client .getResourcesPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetResourcesIterable responses = client.getResourcesPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of ResourcesPerPage won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getResources(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesRequest)
operation.- Parameters:
getResourcesRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getResourcesPaginator
default GetResourcesIterable getResourcesPaginator(Consumer<GetResourcesRequest.Builder> getResourcesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException This is a variant of
getResources(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetResourcesIterable responses = client.getResourcesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetResourcesIterable responses = client .getResourcesPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetResourcesIterable responses = client.getResourcesPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of ResourcesPerPage won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getResources(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetResourcesRequest)
operation.
This is a convenience which creates an instance of the
GetResourcesRequest.Builder
avoiding the need to create one manually viaGetResourcesRequest.builder()
- Parameters:
getResourcesRequest
- AConsumer
that will call methods onGetResourcesRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getTagKeys
default GetTagKeysResponse getTagKeys(GetTagKeysRequest getTagKeysRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling account.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.- Parameters:
getTagKeysRequest
-- Returns:
- Result of the GetTagKeys operation returned by the service.
- See Also:
-
getTagKeys
default GetTagKeysResponse getTagKeys(Consumer<GetTagKeysRequest.Builder> getTagKeysRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Returns all tag keys currently in use in the specified Amazon Web Services Region for the calling account.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.
This is a convenience which creates an instance of the
GetTagKeysRequest.Builder
avoiding the need to create one manually viaGetTagKeysRequest.builder()
- Parameters:
getTagKeysRequest
- AConsumer
that will call methods onGetTagKeysRequest.Builder
to create a request.- Returns:
- Result of the GetTagKeys operation returned by the service.
- See Also:
-
getTagKeys
default GetTagKeysResponse getTagKeys() throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiExceptionReturns all tag keys currently in use in the specified Amazon Web Services Region for the calling account.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.- Returns:
- Result of the GetTagKeys operation returned by the service.
- See Also:
-
getTagKeysPaginator
default GetTagKeysIterable getTagKeysPaginator() throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiExceptionThis is a variant of
getTagKeys(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagKeysIterable responses = client.getTagKeysPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagKeysIterable responses = client .getTagKeysPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagKeysIterable responses = client.getTagKeysPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getTagKeys(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysRequest)
operation.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getTagKeysPaginator
default GetTagKeysIterable getTagKeysPaginator(GetTagKeysRequest getTagKeysRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException This is a variant of
getTagKeys(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagKeysIterable responses = client.getTagKeysPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagKeysIterable responses = client .getTagKeysPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagKeysIterable responses = client.getTagKeysPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getTagKeys(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysRequest)
operation.- Parameters:
getTagKeysRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getTagKeysPaginator
default GetTagKeysIterable getTagKeysPaginator(Consumer<GetTagKeysRequest.Builder> getTagKeysRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException This is a variant of
getTagKeys(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagKeysIterable responses = client.getTagKeysPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagKeysIterable responses = client .getTagKeysPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagKeysIterable responses = client.getTagKeysPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getTagKeys(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagKeysRequest)
operation.
This is a convenience which creates an instance of the
GetTagKeysRequest.Builder
avoiding the need to create one manually viaGetTagKeysRequest.builder()
- Parameters:
getTagKeysRequest
- AConsumer
that will call methods onGetTagKeysRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getTagValues
default GetTagValuesResponse getTagValues(GetTagValuesRequest getTagValuesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Returns all tag values for the specified key that are used in the specified Amazon Web Services Region for the calling account.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.- Parameters:
getTagValuesRequest
-- Returns:
- Result of the GetTagValues operation returned by the service.
- See Also:
-
getTagValues
default GetTagValuesResponse getTagValues(Consumer<GetTagValuesRequest.Builder> getTagValuesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Returns all tag values for the specified key that are used in the specified Amazon Web Services Region for the calling account.
This operation supports pagination, where the response can be sent in multiple pages. You should check the
PaginationToken
response parameter to determine if there are additional results available to return. Repeat the query, passing thePaginationToken
response parameter value as an input to the next request until you recieve anull
value. A null value forPaginationToken
indicates that there are no more results waiting to be returned.
This is a convenience which creates an instance of the
GetTagValuesRequest.Builder
avoiding the need to create one manually viaGetTagValuesRequest.builder()
- Parameters:
getTagValuesRequest
- AConsumer
that will call methods onGetTagValuesRequest.Builder
to create a request.- Returns:
- Result of the GetTagValues operation returned by the service.
- See Also:
-
getTagValuesPaginator
default GetTagValuesIterable getTagValuesPaginator(GetTagValuesRequest getTagValuesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException This is a variant of
getTagValues(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagValuesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagValuesIterable responses = client.getTagValuesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagValuesIterable responses = client .getTagValuesPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagValuesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagValuesIterable responses = client.getTagValuesPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getTagValues(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagValuesRequest)
operation.- Parameters:
getTagValuesRequest
-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
getTagValuesPaginator
default GetTagValuesIterable getTagValuesPaginator(Consumer<GetTagValuesRequest.Builder> getTagValuesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, PaginationTokenExpiredException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException This is a variant of
getTagValues(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagValuesRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagValuesIterable responses = client.getTagValuesPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagValuesIterable responses = client .getTagValuesPaginator(request); for (software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagValuesResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroupstaggingapi.paginators.GetTagValuesIterable responses = client.getTagValuesPaginator(request); responses.iterator().forEachRemaining(....);
Please notice that the configuration of null won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
getTagValues(software.amazon.awssdk.services.resourcegroupstaggingapi.model.GetTagValuesRequest)
operation.
This is a convenience which creates an instance of the
GetTagValuesRequest.Builder
avoiding the need to create one manually viaGetTagValuesRequest.builder()
- Parameters:
getTagValuesRequest
- AConsumer
that will call methods onGetTagValuesRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
startReportCreation
default StartReportCreationResponse startReportCreation(StartReportCreationRequest startReportCreationRequest) throws ConcurrentModificationException, ConstraintViolationException, InternalServiceException, InvalidParameterException, ThrottledException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Generates a report that lists all tagged resources in the accounts across your organization and tells whether each resource is compliant with the effective tag policy. Compliance data is refreshed daily. The report is generated asynchronously.
The generated report is saved to the following location:
s3://example-bucket/AwsTagPolicies/o-exampleorgid/YYYY-MM-ddTHH:mm:ssZ/report.csv
You can call this operation only from the organization's management account and from the us-east-1 Region.
- Parameters:
startReportCreationRequest
-- Returns:
- Result of the StartReportCreation operation returned by the service.
- See Also:
-
startReportCreation
default StartReportCreationResponse startReportCreation(Consumer<StartReportCreationRequest.Builder> startReportCreationRequest) throws ConcurrentModificationException, ConstraintViolationException, InternalServiceException, InvalidParameterException, ThrottledException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Generates a report that lists all tagged resources in the accounts across your organization and tells whether each resource is compliant with the effective tag policy. Compliance data is refreshed daily. The report is generated asynchronously.
The generated report is saved to the following location:
s3://example-bucket/AwsTagPolicies/o-exampleorgid/YYYY-MM-ddTHH:mm:ssZ/report.csv
You can call this operation only from the organization's management account and from the us-east-1 Region.
This is a convenience which creates an instance of the
StartReportCreationRequest.Builder
avoiding the need to create one manually viaStartReportCreationRequest.builder()
- Parameters:
startReportCreationRequest
- AConsumer
that will call methods onStartReportCreationRequest.Builder
to create a request.- Returns:
- Result of the StartReportCreation operation returned by the service.
- See Also:
-
tagResources
default TagResourcesResponse tagResources(TagResourcesRequest tagResourcesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Applies one or more tags to the specified resources. Note the following:
-
Not all resources can have tags. For a list of services with resources that support tagging using this operation, see Services that support the Resource Groups Tagging API. If the resource doesn't yet support this operation, the resource's service might support tagging using its own API operations. For more information, refer to the documentation for that service.
-
Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the Amazon Web Services General Reference.
-
You can only tag resources that are located in the specified Amazon Web Services Region for the Amazon Web Services account.
-
To add tags to a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for adding tags. For more information, see the documentation for each service.
Do not store personally identifiable information (PII) or other confidential or sensitive information in tags. We use tags to provide you with billing and administration services. Tags are not intended to be used for private or sensitive data.
Minimum permissions
In addition to the
tag:TagResources
permission required by this operation, you must also have the tagging permission defined by the service that created the resource. For example, to tag an Amazon EC2 instance using theTagResources
operation, you must have both of the following permissions:-
tag:TagResource
-
ec2:CreateTags
- Parameters:
tagResourcesRequest
-- Returns:
- Result of the TagResources operation returned by the service.
- See Also:
-
-
tagResources
default TagResourcesResponse tagResources(Consumer<TagResourcesRequest.Builder> tagResourcesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException Applies one or more tags to the specified resources. Note the following:
-
Not all resources can have tags. For a list of services with resources that support tagging using this operation, see Services that support the Resource Groups Tagging API. If the resource doesn't yet support this operation, the resource's service might support tagging using its own API operations. For more information, refer to the documentation for that service.
-
Each resource can have up to 50 tags. For other limits, see Tag Naming and Usage Conventions in the Amazon Web Services General Reference.
-
You can only tag resources that are located in the specified Amazon Web Services Region for the Amazon Web Services account.
-
To add tags to a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for adding tags. For more information, see the documentation for each service.
Do not store personally identifiable information (PII) or other confidential or sensitive information in tags. We use tags to provide you with billing and administration services. Tags are not intended to be used for private or sensitive data.
Minimum permissions
In addition to the
tag:TagResources
permission required by this operation, you must also have the tagging permission defined by the service that created the resource. For example, to tag an Amazon EC2 instance using theTagResources
operation, you must have both of the following permissions:-
tag:TagResource
-
ec2:CreateTags
This is a convenience which creates an instance of the
TagResourcesRequest.Builder
avoiding the need to create one manually viaTagResourcesRequest.builder()
- Parameters:
tagResourcesRequest
- AConsumer
that will call methods onTagResourcesRequest.Builder
to create a request.- Returns:
- Result of the TagResources operation returned by the service.
- See Also:
-
-
untagResources
default UntagResourcesResponse untagResources(UntagResourcesRequest untagResourcesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException 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:
-
To remove tags from a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for removing tags. For more information, see the documentation for the service whose resource you want to untag.
-
You can only tag resources that are located in the specified Amazon Web Services Region for the calling Amazon Web Services account.
Minimum permissions
In addition to the
tag:UntagResources
permission required by this operation, you must also have the remove tags permission defined by the service that created the resource. For example, to remove the tags from an Amazon EC2 instance using theUntagResources
operation, you must have both of the following permissions:-
tag:UntagResource
-
ec2:DeleteTags
- Parameters:
untagResourcesRequest
-- Returns:
- Result of the UntagResources operation returned by the service.
- See Also:
-
-
untagResources
default UntagResourcesResponse untagResources(Consumer<UntagResourcesRequest.Builder> untagResourcesRequest) throws InvalidParameterException, ThrottledException, InternalServiceException, AwsServiceException, SdkClientException, ResourceGroupsTaggingApiException 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:
-
To remove tags from a resource, you need the necessary permissions for the service that the resource belongs to as well as permissions for removing tags. For more information, see the documentation for the service whose resource you want to untag.
-
You can only tag resources that are located in the specified Amazon Web Services Region for the calling Amazon Web Services account.
Minimum permissions
In addition to the
tag:UntagResources
permission required by this operation, you must also have the remove tags permission defined by the service that created the resource. For example, to remove the tags from an Amazon EC2 instance using theUntagResources
operation, you must have both of the following permissions:-
tag:UntagResource
-
ec2:DeleteTags
This is a convenience which creates an instance of the
UntagResourcesRequest.Builder
avoiding the need to create one manually viaUntagResourcesRequest.builder()
- Parameters:
untagResourcesRequest
- AConsumer
that will call methods onUntagResourcesRequest.Builder
to create a request.- Returns:
- Result of the UntagResources operation returned by the service.
- See Also:
-
-
create
Create aResourceGroupsTaggingApiClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aResourceGroupsTaggingApiClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-