Interface ResourceGroupsClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder() method.
Resource Groups lets you organize Amazon Web Services resources such as Amazon Elastic Compute Cloud instances, Amazon Relational Database Service databases, and Amazon Simple Storage Service buckets into groups using criteria that you define as tags. A resource group is a collection of resources that match the resource types specified in a query, and share one or more tags or portions of tags. You can create a group of resources based on their roles in your cloud infrastructure, lifecycle stages, regions, application layers, or virtually any criteria. Resource Groups enable you to automate management tasks, such as those in Amazon Web Services Systems Manager Automation documents, on tag-related resources in Amazon Web Services Systems Manager. Groups of tagged resources also let you quickly view a custom console in Amazon Web Services Systems Manager that shows Config compliance and other monitoring data about member resources.
To create a resource group, build a resource query, and specify tags that identify the criteria that members of the group have in common. Tags are key-value pairs.
For more information about Resource Groups, see the Resource Groups User Guide.
Resource Groups uses a REST-compliant API that you can use to perform the following types of operations.
-
Create, Read, Update, and Delete (CRUD) operations on resource groups and resource query entities
-
Applying, editing, and removing tags from resource groups
-
Resolving resource group member Amazon resource names (ARN)s so they can be returned as search results
-
Getting data about resources that are members of a group
-
Searching Amazon Web Services resources based on a resource query
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic ResourceGroupsClientBuilderbuilder()Create a builder that can be used to configure and create aResourceGroupsClient.default CancelTagSyncTaskResponsecancelTagSyncTask(Consumer<CancelTagSyncTaskRequest.Builder> cancelTagSyncTaskRequest) Cancels the specified tag-sync task.default CancelTagSyncTaskResponsecancelTagSyncTask(CancelTagSyncTaskRequest cancelTagSyncTaskRequest) Cancels the specified tag-sync task.static ResourceGroupsClientcreate()Create aResourceGroupsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateGroupResponsecreateGroup(Consumer<CreateGroupRequest.Builder> createGroupRequest) Creates a resource group with the specified name and description.default CreateGroupResponsecreateGroup(CreateGroupRequest createGroupRequest) Creates a resource group with the specified name and description.default DeleteGroupResponsedeleteGroup(Consumer<DeleteGroupRequest.Builder> deleteGroupRequest) Deletes the specified resource group.default DeleteGroupResponsedeleteGroup(DeleteGroupRequest deleteGroupRequest) Deletes the specified resource group.default GetAccountSettingsResponsegetAccountSettings(Consumer<GetAccountSettingsRequest.Builder> getAccountSettingsRequest) Retrieves the current status of optional features in Resource Groups.default GetAccountSettingsResponsegetAccountSettings(GetAccountSettingsRequest getAccountSettingsRequest) Retrieves the current status of optional features in Resource Groups.default GetGroupResponsegetGroup(Consumer<GetGroupRequest.Builder> getGroupRequest) Returns information about a specified resource group.default GetGroupResponsegetGroup(GetGroupRequest getGroupRequest) Returns information about a specified resource group.default GetGroupConfigurationResponsegetGroupConfiguration(Consumer<GetGroupConfigurationRequest.Builder> getGroupConfigurationRequest) Retrieves the service configuration associated with the specified resource group.default GetGroupConfigurationResponsegetGroupConfiguration(GetGroupConfigurationRequest getGroupConfigurationRequest) Retrieves the service configuration associated with the specified resource group.default GetGroupQueryResponsegetGroupQuery(Consumer<GetGroupQueryRequest.Builder> getGroupQueryRequest) Retrieves the resource query associated with the specified resource group.default GetGroupQueryResponsegetGroupQuery(GetGroupQueryRequest getGroupQueryRequest) Retrieves the resource query associated with the specified resource group.default GetTagsResponsegetTags(Consumer<GetTagsRequest.Builder> getTagsRequest) Returns a list of tags that are associated with a resource group, specified by an Amazon resource name (ARN).default GetTagsResponsegetTags(GetTagsRequest getTagsRequest) Returns a list of tags that are associated with a resource group, specified by an Amazon resource name (ARN).default GetTagSyncTaskResponsegetTagSyncTask(Consumer<GetTagSyncTaskRequest.Builder> getTagSyncTaskRequest) Returns information about a specified tag-sync task.default GetTagSyncTaskResponsegetTagSyncTask(GetTagSyncTaskRequest getTagSyncTaskRequest) Returns information about a specified tag-sync task.default GroupResourcesResponsegroupResources(Consumer<GroupResourcesRequest.Builder> groupResourcesRequest) Adds the specified resources to the specified group.default GroupResourcesResponsegroupResources(GroupResourcesRequest groupResourcesRequest) Adds the specified resources to the specified group.default ListGroupingStatusesResponselistGroupingStatuses(Consumer<ListGroupingStatusesRequest.Builder> listGroupingStatusesRequest) Returns the status of the last grouping or ungrouping action for each resource in the specified application group.default ListGroupingStatusesResponselistGroupingStatuses(ListGroupingStatusesRequest listGroupingStatusesRequest) Returns the status of the last grouping or ungrouping action for each resource in the specified application group.default ListGroupingStatusesIterablelistGroupingStatusesPaginator(Consumer<ListGroupingStatusesRequest.Builder> listGroupingStatusesRequest) This is a variant oflistGroupingStatuses(software.amazon.awssdk.services.resourcegroups.model.ListGroupingStatusesRequest)operation.default ListGroupingStatusesIterablelistGroupingStatusesPaginator(ListGroupingStatusesRequest listGroupingStatusesRequest) This is a variant oflistGroupingStatuses(software.amazon.awssdk.services.resourcegroups.model.ListGroupingStatusesRequest)operation.default ListGroupResourcesResponselistGroupResources(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest) Returns a list of Amazon resource names (ARNs) of the resources that are members of a specified resource group.default ListGroupResourcesResponselistGroupResources(ListGroupResourcesRequest listGroupResourcesRequest) Returns a list of Amazon resource names (ARNs) of the resources that are members of a specified resource group.default ListGroupResourcesIterablelistGroupResourcesPaginator(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest) This is a variant oflistGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)operation.default ListGroupResourcesIterablelistGroupResourcesPaginator(ListGroupResourcesRequest listGroupResourcesRequest) This is a variant oflistGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)operation.default ListGroupsResponseReturns a list of existing Resource Groups in your account.default ListGroupsResponselistGroups(Consumer<ListGroupsRequest.Builder> listGroupsRequest) Returns a list of existing Resource Groups in your account.default ListGroupsResponselistGroups(ListGroupsRequest listGroupsRequest) Returns a list of existing Resource Groups in your account.default ListGroupsIterableThis is a variant oflistGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)operation.default ListGroupsIterablelistGroupsPaginator(Consumer<ListGroupsRequest.Builder> listGroupsRequest) This is a variant oflistGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)operation.default ListGroupsIterablelistGroupsPaginator(ListGroupsRequest listGroupsRequest) This is a variant oflistGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)operation.default ListTagSyncTasksResponselistTagSyncTasks(Consumer<ListTagSyncTasksRequest.Builder> listTagSyncTasksRequest) Returns a list of tag-sync tasks.default ListTagSyncTasksResponselistTagSyncTasks(ListTagSyncTasksRequest listTagSyncTasksRequest) Returns a list of tag-sync tasks.default ListTagSyncTasksIterablelistTagSyncTasksPaginator(Consumer<ListTagSyncTasksRequest.Builder> listTagSyncTasksRequest) This is a variant oflistTagSyncTasks(software.amazon.awssdk.services.resourcegroups.model.ListTagSyncTasksRequest)operation.default ListTagSyncTasksIterablelistTagSyncTasksPaginator(ListTagSyncTasksRequest listTagSyncTasksRequest) This is a variant oflistTagSyncTasks(software.amazon.awssdk.services.resourcegroups.model.ListTagSyncTasksRequest)operation.default PutGroupConfigurationResponseputGroupConfiguration(Consumer<PutGroupConfigurationRequest.Builder> putGroupConfigurationRequest) Attaches a service configuration to the specified group.default PutGroupConfigurationResponseputGroupConfiguration(PutGroupConfigurationRequest putGroupConfigurationRequest) Attaches a service configuration to the specified group.default SearchResourcesResponsesearchResources(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest) Returns a list of Amazon Web Services resource identifiers that matches the specified query.default SearchResourcesResponsesearchResources(SearchResourcesRequest searchResourcesRequest) Returns a list of Amazon Web Services resource identifiers that matches the specified query.default SearchResourcesIterablesearchResourcesPaginator(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest) This is a variant ofsearchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)operation.default SearchResourcesIterablesearchResourcesPaginator(SearchResourcesRequest searchResourcesRequest) This is a variant ofsearchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)operation.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadatadefault StartTagSyncTaskResponsestartTagSyncTask(Consumer<StartTagSyncTaskRequest.Builder> startTagSyncTaskRequest) Creates a new tag-sync task to onboard and sync resources tagged with a specific tag key-value pair to an application.default StartTagSyncTaskResponsestartTagSyncTask(StartTagSyncTaskRequest startTagSyncTaskRequest) Creates a new tag-sync task to onboard and sync resources tagged with a specific tag key-value pair to an application.default TagResponsetag(Consumer<TagRequest.Builder> tagRequest) Adds tags to a resource group with the specified Amazon resource name (ARN).default TagResponsetag(TagRequest tagRequest) Adds tags to a resource group with the specified Amazon resource name (ARN).default UngroupResourcesResponseungroupResources(Consumer<UngroupResourcesRequest.Builder> ungroupResourcesRequest) Removes the specified resources from the specified group.default UngroupResourcesResponseungroupResources(UngroupResourcesRequest ungroupResourcesRequest) Removes the specified resources from the specified group.default UntagResponseuntag(Consumer<UntagRequest.Builder> untagRequest) Deletes tags from a specified resource group.default UntagResponseuntag(UntagRequest untagRequest) Deletes tags from a specified resource group.default UpdateAccountSettingsResponseupdateAccountSettings(Consumer<UpdateAccountSettingsRequest.Builder> updateAccountSettingsRequest) Turns on or turns off optional features in Resource Groups.default UpdateAccountSettingsResponseupdateAccountSettings(UpdateAccountSettingsRequest updateAccountSettingsRequest) Turns on or turns off optional features in Resource Groups.default UpdateGroupResponseupdateGroup(Consumer<UpdateGroupRequest.Builder> updateGroupRequest) Updates the description for an existing group.default UpdateGroupResponseupdateGroup(UpdateGroupRequest updateGroupRequest) Updates the description for an existing group.default UpdateGroupQueryResponseupdateGroupQuery(Consumer<UpdateGroupQueryRequest.Builder> updateGroupQueryRequest) Updates the resource query of a group.default UpdateGroupQueryResponseupdateGroupQuery(UpdateGroupQueryRequest updateGroupQueryRequest) Updates the resource query of a group.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods 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
-
cancelTagSyncTask
default CancelTagSyncTaskResponse cancelTagSyncTask(CancelTagSyncTaskRequest cancelTagSyncTaskRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Cancels the specified tag-sync task.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:CancelTagSyncTaskon the application group -
resource-groups:DeleteGroup
- Parameters:
cancelTagSyncTaskRequest-- Returns:
- Result of the CancelTagSyncTask operation returned by the service.
- See Also:
-
-
cancelTagSyncTask
default CancelTagSyncTaskResponse cancelTagSyncTask(Consumer<CancelTagSyncTaskRequest.Builder> cancelTagSyncTaskRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Cancels the specified tag-sync task.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:CancelTagSyncTaskon the application group -
resource-groups:DeleteGroup
This is a convenience which creates an instance of the
CancelTagSyncTaskRequest.Builderavoiding the need to create one manually viaCancelTagSyncTaskRequest.builder()- Parameters:
cancelTagSyncTaskRequest- AConsumerthat will call methods onCancelTagSyncTaskRequest.Builderto create a request.- Returns:
- Result of the CancelTagSyncTask operation returned by the service.
- See Also:
-
-
createGroup
default CreateGroupResponse createGroup(CreateGroupRequest createGroupRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Creates a resource group with the specified name and description. You can optionally include either a resource query or a service configuration. For more information about constructing a resource query, see Build queries and groups in Resource Groups in the Resource Groups User Guide. For more information about service-linked groups and service configurations, see Service configurations for Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:CreateGroup
- Parameters:
createGroupRequest-- Returns:
- Result of the CreateGroup operation returned by the service.
- See Also:
-
-
createGroup
default CreateGroupResponse createGroup(Consumer<CreateGroupRequest.Builder> createGroupRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Creates a resource group with the specified name and description. You can optionally include either a resource query or a service configuration. For more information about constructing a resource query, see Build queries and groups in Resource Groups in the Resource Groups User Guide. For more information about service-linked groups and service configurations, see Service configurations for Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:CreateGroup
This is a convenience which creates an instance of the
CreateGroupRequest.Builderavoiding the need to create one manually viaCreateGroupRequest.builder()- Parameters:
createGroupRequest- AConsumerthat will call methods onCreateGroupRequest.Builderto create a request.- Returns:
- Result of the CreateGroup operation returned by the service.
- See Also:
-
-
deleteGroup
default DeleteGroupResponse deleteGroup(DeleteGroupRequest deleteGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Deletes the specified resource group. Deleting a resource group does not delete any resources that are members of the group; it only deletes the group structure.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:DeleteGroup
- Parameters:
deleteGroupRequest-- Returns:
- Result of the DeleteGroup operation returned by the service.
- See Also:
-
-
deleteGroup
default DeleteGroupResponse deleteGroup(Consumer<DeleteGroupRequest.Builder> deleteGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Deletes the specified resource group. Deleting a resource group does not delete any resources that are members of the group; it only deletes the group structure.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:DeleteGroup
This is a convenience which creates an instance of the
DeleteGroupRequest.Builderavoiding the need to create one manually viaDeleteGroupRequest.builder()- Parameters:
deleteGroupRequest- AConsumerthat will call methods onDeleteGroupRequest.Builderto create a request.- Returns:
- Result of the DeleteGroup operation returned by the service.
- See Also:
-
-
getAccountSettings
default GetAccountSettingsResponse getAccountSettings(GetAccountSettingsRequest getAccountSettingsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Retrieves the current status of optional features in Resource Groups.
- Parameters:
getAccountSettingsRequest-- Returns:
- Result of the GetAccountSettings operation returned by the service.
- See Also:
-
getAccountSettings
default GetAccountSettingsResponse getAccountSettings(Consumer<GetAccountSettingsRequest.Builder> getAccountSettingsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Retrieves the current status of optional features in Resource Groups.
This is a convenience which creates an instance of the
GetAccountSettingsRequest.Builderavoiding the need to create one manually viaGetAccountSettingsRequest.builder()- Parameters:
getAccountSettingsRequest- AConsumerthat will call methods onGetAccountSettingsRequest.Builderto create a request.- Returns:
- Result of the GetAccountSettings operation returned by the service.
- See Also:
-
getGroup
default GetGroupResponse getGroup(GetGroupRequest getGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns information about a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetGroup
- Parameters:
getGroupRequest-- Returns:
- Result of the GetGroup operation returned by the service.
- See Also:
-
-
getGroup
default GetGroupResponse getGroup(Consumer<GetGroupRequest.Builder> getGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns information about a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetGroup
This is a convenience which creates an instance of the
GetGroupRequest.Builderavoiding the need to create one manually viaGetGroupRequest.builder()- Parameters:
getGroupRequest- AConsumerthat will call methods onGetGroupRequest.Builderto create a request.- Returns:
- Result of the GetGroup operation returned by the service.
- See Also:
-
-
getGroupConfiguration
default GetGroupConfigurationResponse getGroupConfiguration(GetGroupConfigurationRequest getGroupConfigurationRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Retrieves the service configuration associated with the specified resource group. For details about the service configuration syntax, see Service configurations for Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetGroupConfiguration
- Parameters:
getGroupConfigurationRequest-- Returns:
- Result of the GetGroupConfiguration operation returned by the service.
- See Also:
-
-
getGroupConfiguration
default GetGroupConfigurationResponse getGroupConfiguration(Consumer<GetGroupConfigurationRequest.Builder> getGroupConfigurationRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Retrieves the service configuration associated with the specified resource group. For details about the service configuration syntax, see Service configurations for Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetGroupConfiguration
This is a convenience which creates an instance of the
GetGroupConfigurationRequest.Builderavoiding the need to create one manually viaGetGroupConfigurationRequest.builder()- Parameters:
getGroupConfigurationRequest- AConsumerthat will call methods onGetGroupConfigurationRequest.Builderto create a request.- Returns:
- Result of the GetGroupConfiguration operation returned by the service.
- See Also:
-
-
getGroupQuery
default GetGroupQueryResponse getGroupQuery(GetGroupQueryRequest getGroupQueryRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Retrieves the resource query associated with the specified resource group. For more information about resource queries, see Create a tag-based group in Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetGroupQuery
- Parameters:
getGroupQueryRequest-- Returns:
- Result of the GetGroupQuery operation returned by the service.
- See Also:
-
-
getGroupQuery
default GetGroupQueryResponse getGroupQuery(Consumer<GetGroupQueryRequest.Builder> getGroupQueryRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Retrieves the resource query associated with the specified resource group. For more information about resource queries, see Create a tag-based group in Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetGroupQuery
This is a convenience which creates an instance of the
GetGroupQueryRequest.Builderavoiding the need to create one manually viaGetGroupQueryRequest.builder()- Parameters:
getGroupQueryRequest- AConsumerthat will call methods onGetGroupQueryRequest.Builderto create a request.- Returns:
- Result of the GetGroupQuery operation returned by the service.
- See Also:
-
-
getTagSyncTask
default GetTagSyncTaskResponse getTagSyncTask(GetTagSyncTaskRequest getTagSyncTaskRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns information about a specified tag-sync task.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetTagSyncTaskon the application group
- Parameters:
getTagSyncTaskRequest-- Returns:
- Result of the GetTagSyncTask operation returned by the service.
- See Also:
-
-
getTagSyncTask
default GetTagSyncTaskResponse getTagSyncTask(Consumer<GetTagSyncTaskRequest.Builder> getTagSyncTaskRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns information about a specified tag-sync task.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetTagSyncTaskon the application group
This is a convenience which creates an instance of the
GetTagSyncTaskRequest.Builderavoiding the need to create one manually viaGetTagSyncTaskRequest.builder()- Parameters:
getTagSyncTaskRequest- AConsumerthat will call methods onGetTagSyncTaskRequest.Builderto create a request.- Returns:
- Result of the GetTagSyncTask operation returned by the service.
- See Also:
-
-
getTags
default GetTagsResponse getTags(GetTagsRequest getTagsRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of tags that are associated with a resource group, specified by an Amazon resource name (ARN).
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetTags
- Parameters:
getTagsRequest-- Returns:
- Result of the GetTags operation returned by the service.
- See Also:
-
-
getTags
default GetTagsResponse getTags(Consumer<GetTagsRequest.Builder> getTagsRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of tags that are associated with a resource group, specified by an Amazon resource name (ARN).
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GetTags
This is a convenience which creates an instance of the
GetTagsRequest.Builderavoiding the need to create one manually viaGetTagsRequest.builder()- Parameters:
getTagsRequest- AConsumerthat will call methods onGetTagsRequest.Builderto create a request.- Returns:
- Result of the GetTags operation returned by the service.
- See Also:
-
-
groupResources
default GroupResourcesResponse groupResources(GroupResourcesRequest groupResourcesRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Adds the specified resources to the specified group.
You can only use this operation with the following groups:
-
AWS::EC2::HostManagement -
AWS::EC2::CapacityReservationPool -
AWS::ResourceGroups::ApplicationGroup
Other resource group types and resource types are not currently supported by this operation.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GroupResources
- Parameters:
groupResourcesRequest-- Returns:
- Result of the GroupResources operation returned by the service.
- See Also:
-
-
groupResources
default GroupResourcesResponse groupResources(Consumer<GroupResourcesRequest.Builder> groupResourcesRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Adds the specified resources to the specified group.
You can only use this operation with the following groups:
-
AWS::EC2::HostManagement -
AWS::EC2::CapacityReservationPool -
AWS::ResourceGroups::ApplicationGroup
Other resource group types and resource types are not currently supported by this operation.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:GroupResources
This is a convenience which creates an instance of the
GroupResourcesRequest.Builderavoiding the need to create one manually viaGroupResourcesRequest.builder()- Parameters:
groupResourcesRequest- AConsumerthat will call methods onGroupResourcesRequest.Builderto create a request.- Returns:
- Result of the GroupResources operation returned by the service.
- See Also:
-
-
listGroupResources
default ListGroupResourcesResponse listGroupResources(ListGroupResourcesRequest listGroupResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of Amazon resource names (ARNs) of the resources that are members of a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:ListGroupResources -
cloudformation:DescribeStacks -
cloudformation:ListStackResources -
tag:GetResources
- Parameters:
listGroupResourcesRequest-- Returns:
- Result of the ListGroupResources operation returned by the service.
- See Also:
-
-
listGroupResources
default ListGroupResourcesResponse listGroupResources(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of Amazon resource names (ARNs) of the resources that are members of a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:ListGroupResources -
cloudformation:DescribeStacks -
cloudformation:ListStackResources -
tag:GetResources
This is a convenience which creates an instance of the
ListGroupResourcesRequest.Builderavoiding the need to create one manually viaListGroupResourcesRequest.builder()- Parameters:
listGroupResourcesRequest- AConsumerthat will call methods onListGroupResourcesRequest.Builderto create a request.- Returns:
- Result of the ListGroupResources operation returned by the service.
- See Also:
-
-
listGroupResourcesPaginator
default ListGroupResourcesIterable listGroupResourcesPaginator(ListGroupResourcesRequest listGroupResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client.listGroupResourcesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client .listGroupResourcesPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client.listGroupResourcesPaginator(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
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)operation.- Parameters:
listGroupResourcesRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listGroupResourcesPaginator
default ListGroupResourcesIterable listGroupResourcesPaginator(Consumer<ListGroupResourcesRequest.Builder> listGroupResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client.listGroupResourcesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client .listGroupResourcesPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupResourcesIterable responses = client.listGroupResourcesPaginator(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
listGroupResources(software.amazon.awssdk.services.resourcegroups.model.ListGroupResourcesRequest)operation.
This is a convenience which creates an instance of the
ListGroupResourcesRequest.Builderavoiding the need to create one manually viaListGroupResourcesRequest.builder()- Parameters:
listGroupResourcesRequest- AConsumerthat will call methods onListGroupResourcesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listGroupingStatuses
default ListGroupingStatusesResponse listGroupingStatuses(ListGroupingStatusesRequest listGroupingStatusesRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns the status of the last grouping or ungrouping action for each resource in the specified application group.
- Parameters:
listGroupingStatusesRequest-- Returns:
- Result of the ListGroupingStatuses operation returned by the service.
- See Also:
-
listGroupingStatuses
default ListGroupingStatusesResponse listGroupingStatuses(Consumer<ListGroupingStatusesRequest.Builder> listGroupingStatusesRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns the status of the last grouping or ungrouping action for each resource in the specified application group.
This is a convenience which creates an instance of the
ListGroupingStatusesRequest.Builderavoiding the need to create one manually viaListGroupingStatusesRequest.builder()- Parameters:
listGroupingStatusesRequest- AConsumerthat will call methods onListGroupingStatusesRequest.Builderto create a request.- Returns:
- Result of the ListGroupingStatuses operation returned by the service.
- See Also:
-
listGroupingStatusesPaginator
default ListGroupingStatusesIterable listGroupingStatusesPaginator(ListGroupingStatusesRequest listGroupingStatusesRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
listGroupingStatuses(software.amazon.awssdk.services.resourcegroups.model.ListGroupingStatusesRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupingStatusesIterable responses = client.listGroupingStatusesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.ListGroupingStatusesIterable responses = client .listGroupingStatusesPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.ListGroupingStatusesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupingStatusesIterable responses = client.listGroupingStatusesPaginator(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
listGroupingStatuses(software.amazon.awssdk.services.resourcegroups.model.ListGroupingStatusesRequest)operation.- Parameters:
listGroupingStatusesRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listGroupingStatusesPaginator
default ListGroupingStatusesIterable listGroupingStatusesPaginator(Consumer<ListGroupingStatusesRequest.Builder> listGroupingStatusesRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
listGroupingStatuses(software.amazon.awssdk.services.resourcegroups.model.ListGroupingStatusesRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupingStatusesIterable responses = client.listGroupingStatusesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.ListGroupingStatusesIterable responses = client .listGroupingStatusesPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.ListGroupingStatusesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupingStatusesIterable responses = client.listGroupingStatusesPaginator(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
listGroupingStatuses(software.amazon.awssdk.services.resourcegroups.model.ListGroupingStatusesRequest)operation.
This is a convenience which creates an instance of the
ListGroupingStatusesRequest.Builderavoiding the need to create one manually viaListGroupingStatusesRequest.builder()- Parameters:
listGroupingStatusesRequest- AConsumerthat will call methods onListGroupingStatusesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listGroups
default ListGroupsResponse listGroups(ListGroupsRequest listGroupsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of existing Resource Groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:ListGroups
- Parameters:
listGroupsRequest-- Returns:
- Result of the ListGroups operation returned by the service.
- See Also:
-
-
listGroups
default ListGroupsResponse listGroups(Consumer<ListGroupsRequest.Builder> listGroupsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of existing Resource Groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:ListGroups
This is a convenience which creates an instance of the
ListGroupsRequest.Builderavoiding the need to create one manually viaListGroupsRequest.builder()- Parameters:
listGroupsRequest- AConsumerthat will call methods onListGroupsRequest.Builderto create a request.- Returns:
- Result of the ListGroups operation returned by the service.
- See Also:
-
-
listGroups
default ListGroupsResponse listGroups() throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsExceptionReturns a list of existing Resource Groups in your account.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:ListGroups
- Returns:
- Result of the ListGroups operation returned by the service.
- See Also:
-
-
listGroupsPaginator
default ListGroupsIterable listGroupsPaginator() throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsExceptionThis is a variant of
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(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
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)operation.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listGroupsPaginator
default ListGroupsIterable listGroupsPaginator(ListGroupsRequest listGroupsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(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
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)operation.- Parameters:
listGroupsRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listGroupsPaginator
default ListGroupsIterable listGroupsPaginator(Consumer<ListGroupsRequest.Builder> listGroupsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.ListGroupsResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.ListGroupsIterable responses = client.listGroupsPaginator(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
listGroups(software.amazon.awssdk.services.resourcegroups.model.ListGroupsRequest)operation.
This is a convenience which creates an instance of the
ListGroupsRequest.Builderavoiding the need to create one manually viaListGroupsRequest.builder()- Parameters:
listGroupsRequest- AConsumerthat will call methods onListGroupsRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTagSyncTasks
default ListTagSyncTasksResponse listTagSyncTasks(ListTagSyncTasksRequest listTagSyncTasksRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of tag-sync tasks.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:ListTagSyncTaskswith the group passed in the filters as the resource or * if using no filters
- Parameters:
listTagSyncTasksRequest-- Returns:
- Result of the ListTagSyncTasks operation returned by the service.
- See Also:
-
-
listTagSyncTasks
default ListTagSyncTasksResponse listTagSyncTasks(Consumer<ListTagSyncTasksRequest.Builder> listTagSyncTasksRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of tag-sync tasks.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:ListTagSyncTaskswith the group passed in the filters as the resource or * if using no filters
This is a convenience which creates an instance of the
ListTagSyncTasksRequest.Builderavoiding the need to create one manually viaListTagSyncTasksRequest.builder()- Parameters:
listTagSyncTasksRequest- AConsumerthat will call methods onListTagSyncTasksRequest.Builderto create a request.- Returns:
- Result of the ListTagSyncTasks operation returned by the service.
- See Also:
-
-
listTagSyncTasksPaginator
default ListTagSyncTasksIterable listTagSyncTasksPaginator(ListTagSyncTasksRequest listTagSyncTasksRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
listTagSyncTasks(software.amazon.awssdk.services.resourcegroups.model.ListTagSyncTasksRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.ListTagSyncTasksIterable responses = client.listTagSyncTasksPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.ListTagSyncTasksIterable responses = client .listTagSyncTasksPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.ListTagSyncTasksResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.ListTagSyncTasksIterable responses = client.listTagSyncTasksPaginator(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
listTagSyncTasks(software.amazon.awssdk.services.resourcegroups.model.ListTagSyncTasksRequest)operation.- Parameters:
listTagSyncTasksRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTagSyncTasksPaginator
default ListTagSyncTasksIterable listTagSyncTasksPaginator(Consumer<ListTagSyncTasksRequest.Builder> listTagSyncTasksRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
listTagSyncTasks(software.amazon.awssdk.services.resourcegroups.model.ListTagSyncTasksRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.ListTagSyncTasksIterable responses = client.listTagSyncTasksPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.ListTagSyncTasksIterable responses = client .listTagSyncTasksPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.ListTagSyncTasksResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.ListTagSyncTasksIterable responses = client.listTagSyncTasksPaginator(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
listTagSyncTasks(software.amazon.awssdk.services.resourcegroups.model.ListTagSyncTasksRequest)operation.
This is a convenience which creates an instance of the
ListTagSyncTasksRequest.Builderavoiding the need to create one manually viaListTagSyncTasksRequest.builder()- Parameters:
listTagSyncTasksRequest- AConsumerthat will call methods onListTagSyncTasksRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
putGroupConfiguration
default PutGroupConfigurationResponse putGroupConfiguration(PutGroupConfigurationRequest putGroupConfigurationRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Attaches a service configuration to the specified group. This occurs asynchronously, and can take time to complete. You can use GetGroupConfiguration to check the status of the update.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:PutGroupConfiguration
- Parameters:
putGroupConfigurationRequest-- Returns:
- Result of the PutGroupConfiguration operation returned by the service.
- See Also:
-
-
putGroupConfiguration
default PutGroupConfigurationResponse putGroupConfiguration(Consumer<PutGroupConfigurationRequest.Builder> putGroupConfigurationRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Attaches a service configuration to the specified group. This occurs asynchronously, and can take time to complete. You can use GetGroupConfiguration to check the status of the update.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:PutGroupConfiguration
This is a convenience which creates an instance of the
PutGroupConfigurationRequest.Builderavoiding the need to create one manually viaPutGroupConfigurationRequest.builder()- Parameters:
putGroupConfigurationRequest- AConsumerthat will call methods onPutGroupConfigurationRequest.Builderto create a request.- Returns:
- Result of the PutGroupConfiguration operation returned by the service.
- See Also:
-
-
searchResources
default SearchResourcesResponse searchResources(SearchResourcesRequest searchResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of Amazon Web Services resource identifiers that matches the specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:SearchResources -
cloudformation:DescribeStacks -
cloudformation:ListStackResources -
tag:GetResources
- Parameters:
searchResourcesRequest-- Returns:
- Result of the SearchResources operation returned by the service.
- See Also:
-
-
searchResources
default SearchResourcesResponse searchResources(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Returns a list of Amazon Web Services resource identifiers that matches the specified query. The query uses the same format as a resource query in a CreateGroup or UpdateGroupQuery operation.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:SearchResources -
cloudformation:DescribeStacks -
cloudformation:ListStackResources -
tag:GetResources
This is a convenience which creates an instance of the
SearchResourcesRequest.Builderavoiding the need to create one manually viaSearchResourcesRequest.builder()- Parameters:
searchResourcesRequest- AConsumerthat will call methods onSearchResourcesRequest.Builderto create a request.- Returns:
- Result of the SearchResources operation returned by the service.
- See Also:
-
-
searchResourcesPaginator
default SearchResourcesIterable searchResourcesPaginator(SearchResourcesRequest searchResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client.searchResourcesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client .searchResourcesPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.SearchResourcesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client.searchResourcesPaginator(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
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)operation.- Parameters:
searchResourcesRequest-- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
searchResourcesPaginator
default SearchResourcesIterable searchResourcesPaginator(Consumer<SearchResourcesRequest.Builder> searchResourcesRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException This is a variant of
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)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 Stream
2) Using For loopsoftware.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client.searchResourcesPaginator(request); responses.stream().forEach(....);{ @code software.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client .searchResourcesPaginator(request); for (software.amazon.awssdk.services.resourcegroups.model.SearchResourcesResponse response : responses) { // do something; } }3) Use iterator directlysoftware.amazon.awssdk.services.resourcegroups.paginators.SearchResourcesIterable responses = client.searchResourcesPaginator(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
searchResources(software.amazon.awssdk.services.resourcegroups.model.SearchResourcesRequest)operation.
This is a convenience which creates an instance of the
SearchResourcesRequest.Builderavoiding the need to create one manually viaSearchResourcesRequest.builder()- Parameters:
searchResourcesRequest- AConsumerthat will call methods onSearchResourcesRequest.Builderto create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
startTagSyncTask
default StartTagSyncTaskResponse startTagSyncTask(StartTagSyncTaskRequest startTagSyncTaskRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Creates a new tag-sync task to onboard and sync resources tagged with a specific tag key-value pair to an application.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:StartTagSyncTaskon the application group -
resource-groups:CreateGroup -
iam:PassRoleon the role provided in the request
- Parameters:
startTagSyncTaskRequest-- Returns:
- Result of the StartTagSyncTask operation returned by the service.
- See Also:
-
-
startTagSyncTask
default StartTagSyncTaskResponse startTagSyncTask(Consumer<StartTagSyncTaskRequest.Builder> startTagSyncTaskRequest) throws UnauthorizedException, BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Creates a new tag-sync task to onboard and sync resources tagged with a specific tag key-value pair to an application.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:StartTagSyncTaskon the application group -
resource-groups:CreateGroup -
iam:PassRoleon the role provided in the request
This is a convenience which creates an instance of the
StartTagSyncTaskRequest.Builderavoiding the need to create one manually viaStartTagSyncTaskRequest.builder()- Parameters:
startTagSyncTaskRequest- AConsumerthat will call methods onStartTagSyncTaskRequest.Builderto create a request.- Returns:
- Result of the StartTagSyncTask operation returned by the service.
- See Also:
-
-
tag
default TagResponse tag(TagRequest tagRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Adds tags to a resource group with the specified Amazon resource name (ARN). Existing tags on a resource group are not changed if they are not specified in the request parameters.
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
To run this command, you must have the following permissions:
-
resource-groups:Tag
- Parameters:
tagRequest-- Returns:
- Result of the Tag operation returned by the service.
- See Also:
-
-
tag
default TagResponse tag(Consumer<TagRequest.Builder> tagRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Adds tags to a resource group with the specified Amazon resource name (ARN). Existing tags on a resource group are not changed if they are not specified in the request parameters.
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
To run this command, you must have the following permissions:
-
resource-groups:Tag
This is a convenience which creates an instance of the
TagRequest.Builderavoiding the need to create one manually viaTagRequest.builder()- Parameters:
tagRequest- AConsumerthat will call methods onTagRequest.Builderto create a request.- Returns:
- Result of the Tag operation returned by the service.
- See Also:
-
-
ungroupResources
default UngroupResourcesResponse ungroupResources(UngroupResourcesRequest ungroupResourcesRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Removes the specified resources from the specified group. This operation works only with static groups that you populated using the GroupResources operation. It doesn't work with any resource groups that are automatically populated by tag-based or CloudFormation stack-based queries.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:UngroupResources
- Parameters:
ungroupResourcesRequest-- Returns:
- Result of the UngroupResources operation returned by the service.
- See Also:
-
-
ungroupResources
default UngroupResourcesResponse ungroupResources(Consumer<UngroupResourcesRequest.Builder> ungroupResourcesRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Removes the specified resources from the specified group. This operation works only with static groups that you populated using the GroupResources operation. It doesn't work with any resource groups that are automatically populated by tag-based or CloudFormation stack-based queries.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:UngroupResources
This is a convenience which creates an instance of the
UngroupResourcesRequest.Builderavoiding the need to create one manually viaUngroupResourcesRequest.builder()- Parameters:
ungroupResourcesRequest- AConsumerthat will call methods onUngroupResourcesRequest.Builderto create a request.- Returns:
- Result of the UngroupResources operation returned by the service.
- See Also:
-
-
untag
default UntagResponse untag(UntagRequest untagRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Deletes tags from a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:Untag
- Parameters:
untagRequest-- Returns:
- Result of the Untag operation returned by the service.
- See Also:
-
-
untag
default UntagResponse untag(Consumer<UntagRequest.Builder> untagRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Deletes tags from a specified resource group.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:Untag
This is a convenience which creates an instance of the
UntagRequest.Builderavoiding the need to create one manually viaUntagRequest.builder()- Parameters:
untagRequest- AConsumerthat will call methods onUntagRequest.Builderto create a request.- Returns:
- Result of the Untag operation returned by the service.
- See Also:
-
-
updateAccountSettings
default UpdateAccountSettingsResponse updateAccountSettings(UpdateAccountSettingsRequest updateAccountSettingsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Turns on or turns off optional features in Resource Groups.
The preceding example shows that the request to turn on group lifecycle events is
IN_PROGRESS. You can call the GetAccountSettings operation to check for completion by looking forGroupLifecycleEventsStatusto change toACTIVE.- Parameters:
updateAccountSettingsRequest-- Returns:
- Result of the UpdateAccountSettings operation returned by the service.
- See Also:
-
updateAccountSettings
default UpdateAccountSettingsResponse updateAccountSettings(Consumer<UpdateAccountSettingsRequest.Builder> updateAccountSettingsRequest) throws BadRequestException, ForbiddenException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Turns on or turns off optional features in Resource Groups.
The preceding example shows that the request to turn on group lifecycle events is
IN_PROGRESS. You can call the GetAccountSettings operation to check for completion by looking forGroupLifecycleEventsStatusto change toACTIVE.
This is a convenience which creates an instance of the
UpdateAccountSettingsRequest.Builderavoiding the need to create one manually viaUpdateAccountSettingsRequest.builder()- Parameters:
updateAccountSettingsRequest- AConsumerthat will call methods onUpdateAccountSettingsRequest.Builderto create a request.- Returns:
- Result of the UpdateAccountSettings operation returned by the service.
- See Also:
-
updateGroup
default UpdateGroupResponse updateGroup(UpdateGroupRequest updateGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Updates the description for an existing group. You cannot update the name of a resource group.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:UpdateGroup
- Parameters:
updateGroupRequest-- Returns:
- Result of the UpdateGroup operation returned by the service.
- See Also:
-
-
updateGroup
default UpdateGroupResponse updateGroup(Consumer<UpdateGroupRequest.Builder> updateGroupRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Updates the description for an existing group. You cannot update the name of a resource group.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:UpdateGroup
This is a convenience which creates an instance of the
UpdateGroupRequest.Builderavoiding the need to create one manually viaUpdateGroupRequest.builder()- Parameters:
updateGroupRequest- AConsumerthat will call methods onUpdateGroupRequest.Builderto create a request.- Returns:
- Result of the UpdateGroup operation returned by the service.
- See Also:
-
-
updateGroupQuery
default UpdateGroupQueryResponse updateGroupQuery(UpdateGroupQueryRequest updateGroupQueryRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Updates the resource query of a group. For more information about resource queries, see Create a tag-based group in Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:UpdateGroupQuery
- Parameters:
updateGroupQueryRequest-- Returns:
- Result of the UpdateGroupQuery operation returned by the service.
- See Also:
-
-
updateGroupQuery
default UpdateGroupQueryResponse updateGroupQuery(Consumer<UpdateGroupQueryRequest.Builder> updateGroupQueryRequest) throws BadRequestException, ForbiddenException, NotFoundException, MethodNotAllowedException, TooManyRequestsException, InternalServerErrorException, AwsServiceException, SdkClientException, ResourceGroupsException Updates the resource query of a group. For more information about resource queries, see Create a tag-based group in Resource Groups.
Minimum permissions
To run this command, you must have the following permissions:
-
resource-groups:UpdateGroupQuery
This is a convenience which creates an instance of the
UpdateGroupQueryRequest.Builderavoiding the need to create one manually viaUpdateGroupQueryRequest.builder()- Parameters:
updateGroupQueryRequest- AConsumerthat will call methods onUpdateGroupQueryRequest.Builderto create a request.- Returns:
- Result of the UpdateGroupQuery operation returned by the service.
- See Also:
-
-
create
Create aResourceGroupsClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aResourceGroupsClient. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-