{ "version":"2.0", "metadata":{ "apiVersion":"2017-11-27", "endpointPrefix":"resource-groups", "protocol":"rest-json", "serviceAbbreviation":"Resource Groups", "serviceFullName":"AWS Resource Groups", "serviceId":"Resource Groups", "signatureVersion":"v4", "signingName":"resource-groups", "uid":"resource-groups-2017-11-27" }, "operations":{ "CreateGroup":{ "name":"CreateGroup", "http":{ "method":"POST", "requestUri":"/groups" }, "input":{"shape":"CreateGroupInput"}, "output":{"shape":"CreateGroupOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Creates a resource group with the specified name and description. You can optionally include a resource query, or a service configuration. For more information about constructing a resource query, see Create a tag-based group in Resource Groups. For more information about service configurations, see Service configurations for resource groups.

Minimum permissions

To run this command, you must have the following permissions:

" }, "DeleteGroup":{ "name":"DeleteGroup", "http":{ "method":"POST", "requestUri":"/delete-group" }, "input":{"shape":"DeleteGroupInput"}, "output":{"shape":"DeleteGroupOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

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:

" }, "GetGroup":{ "name":"GetGroup", "http":{ "method":"POST", "requestUri":"/get-group" }, "input":{"shape":"GetGroupInput"}, "output":{"shape":"GetGroupOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Returns information about a specified resource group.

Minimum permissions

To run this command, you must have the following permissions:

" }, "GetGroupConfiguration":{ "name":"GetGroupConfiguration", "http":{ "method":"POST", "requestUri":"/get-group-configuration" }, "input":{"shape":"GetGroupConfigurationInput"}, "output":{"shape":"GetGroupConfigurationOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Returns 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:

" }, "GetGroupQuery":{ "name":"GetGroupQuery", "http":{ "method":"POST", "requestUri":"/get-group-query" }, "input":{"shape":"GetGroupQueryInput"}, "output":{"shape":"GetGroupQueryOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

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:

" }, "GetTags":{ "name":"GetTags", "http":{ "method":"GET", "requestUri":"/resources/{Arn}/tags" }, "input":{"shape":"GetTagsInput"}, "output":{"shape":"GetTagsOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Returns a list of tags that are associated with a resource group, specified by an ARN.

Minimum permissions

To run this command, you must have the following permissions:

" }, "GroupResources":{ "name":"GroupResources", "http":{ "method":"POST", "requestUri":"/group-resources" }, "input":{"shape":"GroupResourcesInput"}, "output":{"shape":"GroupResourcesOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Adds the specified resources to the specified group.

Minimum permissions

To run this command, you must have the following permissions:

" }, "ListGroupResources":{ "name":"ListGroupResources", "http":{ "method":"POST", "requestUri":"/list-group-resources" }, "input":{"shape":"ListGroupResourcesInput"}, "output":{"shape":"ListGroupResourcesOutput"}, "errors":[ {"shape":"UnauthorizedException"}, {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Returns a list of ARNs of the resources that are members of a specified resource group.

Minimum permissions

To run this command, you must have the following permissions:

" }, "ListGroups":{ "name":"ListGroups", "http":{ "method":"POST", "requestUri":"/groups-list" }, "input":{"shape":"ListGroupsInput"}, "output":{"shape":"ListGroupsOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Returns a list of existing resource groups in your account.

Minimum permissions

To run this command, you must have the following permissions:

" }, "PutGroupConfiguration":{ "name":"PutGroupConfiguration", "http":{ "method":"POST", "requestUri":"/put-group-configuration", "responseCode":202 }, "input":{"shape":"PutGroupConfigurationInput"}, "output":{"shape":"PutGroupConfigurationOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

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:

" }, "SearchResources":{ "name":"SearchResources", "http":{ "method":"POST", "requestUri":"/resources/search" }, "input":{"shape":"SearchResourcesInput"}, "output":{"shape":"SearchResourcesOutput"}, "errors":[ {"shape":"UnauthorizedException"}, {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Returns a list of AWS 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:

" }, "Tag":{ "name":"Tag", "http":{ "method":"PUT", "requestUri":"/resources/{Arn}/tags" }, "input":{"shape":"TagInput"}, "output":{"shape":"TagOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Adds tags to a resource group with the specified 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:

" }, "UngroupResources":{ "name":"UngroupResources", "http":{ "method":"POST", "requestUri":"/ungroup-resources" }, "input":{"shape":"UngroupResourcesInput"}, "output":{"shape":"UngroupResourcesOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Removes the specified resources from the specified group.

Minimum permissions

To run this command, you must have the following permissions:

" }, "Untag":{ "name":"Untag", "http":{ "method":"PATCH", "requestUri":"/resources/{Arn}/tags" }, "input":{"shape":"UntagInput"}, "output":{"shape":"UntagOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

Deletes tags from a specified resource group.

Minimum permissions

To run this command, you must have the following permissions:

" }, "UpdateGroup":{ "name":"UpdateGroup", "http":{ "method":"POST", "requestUri":"/update-group" }, "input":{"shape":"UpdateGroupInput"}, "output":{"shape":"UpdateGroupOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

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:

" }, "UpdateGroupQuery":{ "name":"UpdateGroupQuery", "http":{ "method":"POST", "requestUri":"/update-group-query" }, "input":{"shape":"UpdateGroupQueryInput"}, "output":{"shape":"UpdateGroupQueryOutput"}, "errors":[ {"shape":"BadRequestException"}, {"shape":"ForbiddenException"}, {"shape":"NotFoundException"}, {"shape":"MethodNotAllowedException"}, {"shape":"TooManyRequestsException"}, {"shape":"InternalServerErrorException"} ], "documentation":"

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:

" } }, "shapes":{ "BadRequestException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

The request includes one or more parameters that violate validation rules.

", "error":{"httpStatusCode":400}, "exception":true }, "CreateGroupInput":{ "type":"structure", "required":["Name"], "members":{ "Name":{ "shape":"GroupName", "documentation":"

The name of the group, which is the identifier of the group in other operations. You can't change the name of a resource group after you create it. A resource group name can consist of letters, numbers, hyphens, periods, and underscores. The name cannot start with AWS or aws; these are reserved. A resource group name must be unique within each AWS Region in your AWS account.

" }, "Description":{ "shape":"Description", "documentation":"

The description of the resource group. Descriptions can consist of letters, numbers, hyphens, underscores, periods, and spaces.

" }, "ResourceQuery":{ "shape":"ResourceQuery", "documentation":"

The resource query that determines which AWS resources are members of this group. For more information about resource queries, see Create a tag-based group in Resource Groups.

A resource group can contain either a ResourceQuery or a Configuration, but not both.

" }, "Tags":{ "shape":"Tags", "documentation":"

The tags to add to the group. A tag is key-value pair string.

" }, "Configuration":{ "shape":"GroupConfigurationList", "documentation":"

A configuration associates the resource group with an AWS service and specifies how the service can interact with the resources in the group. A configuration is an array of GroupConfigurationItem elements. For details about the syntax of service configurations, see Service configurations for resource groups.

A resource group can contain either a Configuration or a ResourceQuery, but not both.

" } } }, "CreateGroupOutput":{ "type":"structure", "members":{ "Group":{ "shape":"Group", "documentation":"

The description of the resource group.

" }, "ResourceQuery":{ "shape":"ResourceQuery", "documentation":"

The resource query associated with the group. For more information about resource queries, see Create a tag-based group in Resource Groups.

" }, "Tags":{ "shape":"Tags", "documentation":"

The tags associated with the group.

" }, "GroupConfiguration":{ "shape":"GroupConfiguration", "documentation":"

The service configuration associated with the resource group. For details about the syntax of a service configuration, see Service configurations for resource groups.

" } } }, "DeleteGroupInput":{ "type":"structure", "members":{ "GroupName":{ "shape":"GroupName", "documentation":"

Deprecated - don't use this parameter. Use Group instead.

", "deprecated":true, "deprecatedMessage":"This field is deprecated, use Group instead." }, "Group":{ "shape":"GroupString", "documentation":"

The name or the ARN of the resource group to delete.

" } } }, "DeleteGroupOutput":{ "type":"structure", "members":{ "Group":{ "shape":"Group", "documentation":"

A full description of the deleted resource group.

" } } }, "Description":{ "type":"string", "max":512, "pattern":"[\\sa-zA-Z0-9_\\.-]*" }, "ErrorCode":{ "type":"string", "max":128, "min":1 }, "ErrorMessage":{ "type":"string", "max":1024, "min":1 }, "FailedResource":{ "type":"structure", "members":{ "ResourceArn":{ "shape":"ResourceArn", "documentation":"

The ARN of the resource that failed to be added or removed.

" }, "ErrorMessage":{ "shape":"ErrorMessage", "documentation":"

The error message text associated with the failure.

" }, "ErrorCode":{ "shape":"ErrorCode", "documentation":"

The error code associated with the failure.

" } }, "documentation":"

A resource that failed to be added to or removed from a group.

" }, "FailedResourceList":{ "type":"list", "member":{"shape":"FailedResource"} }, "ForbiddenException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

The caller isn't authorized to make the request. Check permissions.

", "error":{"httpStatusCode":403}, "exception":true }, "GetGroupConfigurationInput":{ "type":"structure", "members":{ "Group":{ "shape":"GroupString", "documentation":"

The name or the ARN of the resource group.

" } } }, "GetGroupConfigurationOutput":{ "type":"structure", "members":{ "GroupConfiguration":{ "shape":"GroupConfiguration", "documentation":"

The service configuration associated with the specified group. For details about the service configuration syntax, see Service configurations for resource groups.

" } } }, "GetGroupInput":{ "type":"structure", "members":{ "GroupName":{ "shape":"GroupName", "documentation":"

Deprecated - don't use this parameter. Use Group instead.

", "deprecated":true, "deprecatedMessage":"This field is deprecated, use Group instead." }, "Group":{ "shape":"GroupString", "documentation":"

The name or the ARN of the resource group to retrieve.

" } } }, "GetGroupOutput":{ "type":"structure", "members":{ "Group":{ "shape":"Group", "documentation":"

A full description of the resource group.

" } } }, "GetGroupQueryInput":{ "type":"structure", "members":{ "GroupName":{ "shape":"GroupName", "documentation":"

Don't use this parameter. Use Group instead.

", "deprecated":true, "deprecatedMessage":"This field is deprecated, use Group instead." }, "Group":{ "shape":"GroupString", "documentation":"

The name or the ARN of the resource group to query.

" } } }, "GetGroupQueryOutput":{ "type":"structure", "members":{ "GroupQuery":{ "shape":"GroupQuery", "documentation":"

The resource query associated with the specified group. For more information about resource queries, see Create a tag-based group in Resource Groups.

" } } }, "GetTagsInput":{ "type":"structure", "required":["Arn"], "members":{ "Arn":{ "shape":"GroupArn", "documentation":"

The ARN of the resource group whose tags you want to retrieve.

", "location":"uri", "locationName":"Arn" } } }, "GetTagsOutput":{ "type":"structure", "members":{ "Arn":{ "shape":"GroupArn", "documentation":"

The ARN of the tagged resource group.

" }, "Tags":{ "shape":"Tags", "documentation":"

The tags associated with the specified resource group.

" } } }, "Group":{ "type":"structure", "required":[ "GroupArn", "Name" ], "members":{ "GroupArn":{ "shape":"GroupArn", "documentation":"

The ARN of the resource group.

" }, "Name":{ "shape":"GroupName", "documentation":"

The name of the resource group.

" }, "Description":{ "shape":"Description", "documentation":"

The description of the resource group.

" } }, "documentation":"

A resource group that contains AWS resources. You can assign resources to the group by associating either of the following elements with the group:

" }, "GroupArn":{ "type":"string", "max":1600, "min":12, "pattern":"arn:aws(-[a-z]+)*:resource-groups:[a-z]{2}(-[a-z]+)+-\\d{1}:[0-9]{12}:group/[a-zA-Z0-9_\\.-]{1,128}" }, "GroupConfiguration":{ "type":"structure", "members":{ "Configuration":{ "shape":"GroupConfigurationList", "documentation":"

The configuration currently associated with the group and in effect.

" }, "ProposedConfiguration":{ "shape":"GroupConfigurationList", "documentation":"

If present, the new configuration that is in the process of being applied to the group.

" }, "Status":{ "shape":"GroupConfigurationStatus", "documentation":"

The current status of an attempt to update the group configuration.

" }, "FailureReason":{ "shape":"GroupConfigurationFailureReason", "documentation":"

If present, the reason why a request to update the group configuration failed.

" } }, "documentation":"

A service configuration associated with a resource group. The configuration options are determined by the AWS service that defines the Type, and specifies which resources can be included in the group. You can add a service configuration when you create the group by using CreateGroup, or later by using the PutGroupConfiguration operation. For details about group service configuration syntax, see Service configurations for resource groups.

" }, "GroupConfigurationFailureReason":{"type":"string"}, "GroupConfigurationItem":{ "type":"structure", "required":["Type"], "members":{ "Type":{ "shape":"GroupConfigurationType", "documentation":"

Specifies the type of group configuration item. Each item must have a unique value for type. For the list of types that you can specify for a configuration item, see Supported resource types and parameters.

" }, "Parameters":{ "shape":"GroupParameterList", "documentation":"

A collection of parameters for this group configuration item. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters.

" } }, "documentation":"

An item in a group configuration. A group service configuration can have one or more items. For details about group service configuration syntax, see Service configurations for resource groups.

" }, "GroupConfigurationList":{ "type":"list", "member":{"shape":"GroupConfigurationItem"}, "max":2 }, "GroupConfigurationParameter":{ "type":"structure", "required":["Name"], "members":{ "Name":{ "shape":"GroupConfigurationParameterName", "documentation":"

The name of the group configuration parameter. For the list of parameters that you can use with each configuration item type, see Supported resource types and parameters.

" }, "Values":{ "shape":"GroupConfigurationParameterValueList", "documentation":"

The value or values to be used for the specified parameter. For the list of values you can use with each parameter, see Supported resource types and parameters.

" } }, "documentation":"

A parameter for a group configuration item. For details about group service configuration syntax, see Service configurations for resource groups.

" }, "GroupConfigurationParameterName":{ "type":"string", "max":80, "min":1, "pattern":"[a-z-]+" }, "GroupConfigurationParameterValue":{ "type":"string", "max":256, "min":1, "pattern":"[a-zA-Z0-9:_-]+" }, "GroupConfigurationParameterValueList":{ "type":"list", "member":{"shape":"GroupConfigurationParameterValue"} }, "GroupConfigurationStatus":{ "type":"string", "enum":[ "UPDATING", "UPDATE_COMPLETE", "UPDATE_FAILED" ] }, "GroupConfigurationType":{ "type":"string", "max":40, "pattern":"AWS::[a-zA-Z0-9]+::[a-zA-Z0-9]+" }, "GroupFilter":{ "type":"structure", "required":[ "Name", "Values" ], "members":{ "Name":{ "shape":"GroupFilterName", "documentation":"

The name of the filter. Filter names are case-sensitive.

" }, "Values":{ "shape":"GroupFilterValues", "documentation":"

One or more filter values. Allowed filter values vary by group filter name, and are case-sensitive.

" } }, "documentation":"

A filter collection that you can use to restrict the results from a List operation to only those you want to include.

" }, "GroupFilterList":{ "type":"list", "member":{"shape":"GroupFilter"} }, "GroupFilterName":{ "type":"string", "enum":[ "resource-type", "configuration-type" ] }, "GroupFilterValue":{ "type":"string", "max":128, "min":1, "pattern":"AWS::(AllSupported|[a-zA-Z0-9]+::[a-zA-Z0-9]+)" }, "GroupFilterValues":{ "type":"list", "member":{"shape":"GroupFilterValue"}, "max":5, "min":1 }, "GroupIdentifier":{ "type":"structure", "members":{ "GroupName":{ "shape":"GroupName", "documentation":"

The name of the resource group.

" }, "GroupArn":{ "shape":"GroupArn", "documentation":"

The ARN of the resource group.

" } }, "documentation":"

The unique identifiers for a resource group.

" }, "GroupIdentifierList":{ "type":"list", "member":{"shape":"GroupIdentifier"} }, "GroupList":{ "type":"list", "member":{"shape":"Group"} }, "GroupName":{ "type":"string", "max":128, "min":1, "pattern":"[a-zA-Z0-9_\\.-]+" }, "GroupParameterList":{ "type":"list", "member":{"shape":"GroupConfigurationParameter"} }, "GroupQuery":{ "type":"structure", "required":[ "GroupName", "ResourceQuery" ], "members":{ "GroupName":{ "shape":"GroupName", "documentation":"

The name of the resource group that is associated with the specified resource query.

" }, "ResourceQuery":{ "shape":"ResourceQuery", "documentation":"

The resource query that determines which AWS resources are members of the associated resource group.

" } }, "documentation":"

A mapping of a query attached to a resource group that determines the AWS resources that are members of the group.

" }, "GroupResourcesInput":{ "type":"structure", "required":[ "Group", "ResourceArns" ], "members":{ "Group":{ "shape":"GroupString", "documentation":"

The name or the ARN of the resource group to add resources to.

" }, "ResourceArns":{ "shape":"ResourceArnList", "documentation":"

The list of ARNs for resources to be added to the group.

" } } }, "GroupResourcesOutput":{ "type":"structure", "members":{ "Succeeded":{ "shape":"ResourceArnList", "documentation":"

A list of ARNs of resources that were successfully added to the group by this operation.

" }, "Failed":{ "shape":"FailedResourceList", "documentation":"

A list of ARNs of any resources that failed to be added to the group by this operation.

" }, "Pending":{ "shape":"PendingResourceList", "documentation":"

A list of ARNs of any resources that are still in the process of being added to the group by this operation. These pending additions continue asynchronously. You can check the status of pending additions by using the ListGroupResources operation, and checking the Resources array in the response and the Status field of each object in that array.

" } } }, "GroupString":{ "type":"string", "max":1600, "min":1, "pattern":"(arn:aws(-[a-z]+)*:resource-groups:[a-z]{2}(-[a-z]+)+-\\d{1}:[0-9]{12}:group/)?[a-zA-Z0-9_\\.-]{1,128}" }, "InternalServerErrorException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

An internal error occurred while processing the request. Try again later.

", "error":{"httpStatusCode":500}, "exception":true }, "ListGroupResourcesInput":{ "type":"structure", "members":{ "GroupName":{ "shape":"GroupName", "documentation":"

Deprecated - don't use this parameter. Use the Group request field instead.

", "deprecated":true, "deprecatedMessage":"This field is deprecated, use Group instead." }, "Group":{ "shape":"GroupString", "documentation":"

The name or the ARN of the resource group

" }, "Filters":{ "shape":"ResourceFilterList", "documentation":"

Filters, formatted as ResourceFilter objects, that you want to apply to a ListGroupResources operation. Filters the results to include only those of the specified resource types.

When you specify a resource-type filter for ListGroupResources, AWS Resource Groups validates your filter resource types against the types that are defined in the query associated with the group. For example, if a group contains only S3 buckets because its query specifies only that resource type, but your resource-type filter includes EC2 instances, AWS Resource Groups does not filter for EC2 instances. In this case, a ListGroupResources request returns a BadRequestException error with a message similar to the following:

The resource types specified as filters in the request are not valid.

The error includes a list of resource types that failed the validation because they are not part of the query associated with the group. This validation doesn't occur when the group query specifies AWS::AllSupported, because a group based on such a query can contain any of the allowed resource types for the query type (tag-based or AWS CloudFormation stack-based queries).

" }, "MaxResults":{ "shape":"MaxResults", "documentation":"

The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

" }, "NextToken":{ "shape":"NextToken", "documentation":"

The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value provided by a previous call's NextToken response to indicate where the output should continue from.

" } } }, "ListGroupResourcesItem":{ "type":"structure", "members":{ "Identifier":{"shape":"ResourceIdentifier"}, "Status":{ "shape":"ResourceStatus", "documentation":"

A structure that contains the status of this resource's membership in the group.

This field is present in the response only if the group is of type AWS::EC2::HostManagement.

" } }, "documentation":"

A structure returned by the ListGroupResources operation that contains identity and group membership status information for one of the resources in the group.

" }, "ListGroupResourcesItemList":{ "type":"list", "member":{"shape":"ListGroupResourcesItem"} }, "ListGroupResourcesOutput":{ "type":"structure", "members":{ "Resources":{ "shape":"ListGroupResourcesItemList", "documentation":"

An array of resources from which you can determine each resource's identity, type, and group membership status.

" }, "ResourceIdentifiers":{ "shape":"ResourceIdentifierList", "documentation":"

Deprecated - don't use this parameter. Use the Resources response field instead.

", "deprecated":true, "deprecatedMessage":"This field is deprecated, use Resources instead." }, "NextToken":{ "shape":"NextToken", "documentation":"

If present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null.

" }, "QueryErrors":{ "shape":"QueryErrorList", "documentation":"

A list of QueryError objects. Each error is an object that contains ErrorCode and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING.

" } } }, "ListGroupsInput":{ "type":"structure", "members":{ "Filters":{ "shape":"GroupFilterList", "documentation":"

Filters, formatted as GroupFilter objects, that you want to apply to a ListGroups operation.

" }, "MaxResults":{ "shape":"MaxResults", "documentation":"

The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

", "location":"querystring", "locationName":"maxResults" }, "NextToken":{ "shape":"NextToken", "documentation":"

The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value provided by a previous call's NextToken response to indicate where the output should continue from.

", "location":"querystring", "locationName":"nextToken" } } }, "ListGroupsOutput":{ "type":"structure", "members":{ "GroupIdentifiers":{ "shape":"GroupIdentifierList", "documentation":"

A list of GroupIdentifier objects. Each identifier is an object that contains both the Name and the GroupArn.

" }, "Groups":{ "shape":"GroupList", "documentation":"

Deprecated - don't use this field. Use the GroupIdentifiers response field instead.

", "deprecated":true, "deprecatedMessage":"This field is deprecated, use GroupIdentifiers instead." }, "NextToken":{ "shape":"NextToken", "documentation":"

If present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null.

" } } }, "MaxResults":{ "type":"integer", "max":50, "min":1 }, "MethodNotAllowedException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

The request uses an HTTP method that isn't allowed for the specified resource.

", "error":{"httpStatusCode":405}, "exception":true }, "NextToken":{ "type":"string", "max":8192, "min":0, "pattern":"^[a-zA-Z0-9+/]*={0,2}$" }, "NotFoundException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

One or more of the specified resources don't exist.

", "error":{"httpStatusCode":404}, "exception":true }, "PendingResource":{ "type":"structure", "members":{ "ResourceArn":{ "shape":"ResourceArn", "documentation":"

The Amazon resource name (ARN) of the resource that's in a pending state.

" } }, "documentation":"

A structure that identifies a resource that is currently pending addition to the group as a member. Adding a resource to a resource group happens asynchronously as a background task and this one isn't completed yet.

" }, "PendingResourceList":{ "type":"list", "member":{"shape":"PendingResource"} }, "PutGroupConfigurationInput":{ "type":"structure", "members":{ "Group":{ "shape":"GroupString", "documentation":"

The name or ARN of the resource group with the configuration that you want to update.

" }, "Configuration":{ "shape":"GroupConfigurationList", "documentation":"

The new configuration to associate with the specified group. A configuration associates the resource group with an AWS service and specifies how the service can interact with the resources in the group. A configuration is an array of GroupConfigurationItem elements.

For information about the syntax of a service configuration, see Service configurations for resource groups.

A resource group can contain either a Configuration or a ResourceQuery, but not both.

" } } }, "PutGroupConfigurationOutput":{ "type":"structure", "members":{ } }, "Query":{ "type":"string", "max":4096, "pattern":"[\\s\\S]*" }, "QueryError":{ "type":"structure", "members":{ "ErrorCode":{ "shape":"QueryErrorCode", "documentation":"

Possible values are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING.

" }, "Message":{ "shape":"QueryErrorMessage", "documentation":"

A message that explains the ErrorCode value. Messages might state that the specified CloudFormation stack does not exist (or no longer exists). For CLOUDFORMATION_STACK_INACTIVE, the message typically states that the CloudFormation stack has a status that is not (or no longer) active, such as CREATE_FAILED.

" } }, "documentation":"

A two-part error structure that can occur in ListGroupResources or SearchResources operations on CloudFormation stack-based queries. The error occurs if the CloudFormation stack on which the query is based either does not exist, or has a status that renders the stack inactive. A QueryError occurrence does not necessarily mean that AWS Resource Groups could not complete the operation, but the resulting group might have no member resources.

" }, "QueryErrorCode":{ "type":"string", "enum":[ "CLOUDFORMATION_STACK_INACTIVE", "CLOUDFORMATION_STACK_NOT_EXISTING" ] }, "QueryErrorList":{ "type":"list", "member":{"shape":"QueryError"} }, "QueryErrorMessage":{"type":"string"}, "QueryType":{ "type":"string", "enum":[ "TAG_FILTERS_1_0", "CLOUDFORMATION_STACK_1_0" ], "max":128, "min":1, "pattern":"^\\w+$" }, "ResourceArn":{ "type":"string", "pattern":"arn:aws(-[a-z]+)*:[a-z0-9\\-]*:([a-z]{2}(-[a-z]+)+-\\d{1})?:([0-9]{12})?:.+" }, "ResourceArnList":{ "type":"list", "member":{"shape":"ResourceArn"}, "max":10, "min":1 }, "ResourceFilter":{ "type":"structure", "required":[ "Name", "Values" ], "members":{ "Name":{ "shape":"ResourceFilterName", "documentation":"

The name of the filter. Filter names are case-sensitive.

" }, "Values":{ "shape":"ResourceFilterValues", "documentation":"

One or more filter values. Allowed filter values vary by resource filter name, and are case-sensitive.

" } }, "documentation":"

A filter name and value pair that is used to obtain more specific results from a list of resources.

" }, "ResourceFilterList":{ "type":"list", "member":{"shape":"ResourceFilter"} }, "ResourceFilterName":{ "type":"string", "enum":["resource-type"] }, "ResourceFilterValue":{ "type":"string", "max":128, "min":1, "pattern":"AWS::[a-zA-Z0-9]+::[a-zA-Z0-9]+" }, "ResourceFilterValues":{ "type":"list", "member":{"shape":"ResourceFilterValue"}, "max":5, "min":1 }, "ResourceIdentifier":{ "type":"structure", "members":{ "ResourceArn":{ "shape":"ResourceArn", "documentation":"

The ARN of a resource.

" }, "ResourceType":{ "shape":"ResourceType", "documentation":"

The resource type of a resource, such as AWS::EC2::Instance.

" } }, "documentation":"

A structure that contains the ARN of a resource and its resource type.

" }, "ResourceIdentifierList":{ "type":"list", "member":{"shape":"ResourceIdentifier"} }, "ResourceQuery":{ "type":"structure", "required":[ "Type", "Query" ], "members":{ "Type":{ "shape":"QueryType", "documentation":"

The type of the query. You can use the following values:

" }, "Query":{ "shape":"Query", "documentation":"

The query that defines a group or a search.

" } }, "documentation":"

The query that is used to define a resource group or a search for resources. A query specifies both a query type and a query string as a JSON object. See the examples section for example JSON strings.

The examples that follow are shown as standard JSON strings. If you include such a string as a parameter to the AWS CLI or an SDK API, you might need to 'escape' the string into a single line. For example, see the Quoting strings in the AWS CLI User Guide.

Example 1

The following generic example shows a resource query JSON string that includes only resources that meet the following criteria:

{ \"Type\": \"TAG_FILTERS_1_0\", \"Query\": { \"ResourceTypeFilters\": [ \"resource_type1\", \"resource_type2\"], \"TagFilters\": [ { \"Key\": \"Key1\", \"Values\": [\"ValueA\",\"ValueB\"] }, { \"Key\":\"Key2\", \"Values\":[\"ValueC\",\"ValueD\"] } ] } }

This has the equivalent \"shortcut\" syntax of the following:

{ \"Type\": \"TAG_FILTERS_1_0\", \"Query\": { \"ResourceTypeFilters\": [ \"resource_type1\", \"resource_type2\"], \"TagFilters\": [ { \"Key1\": [\"ValueA\",\"ValueB\"] }, { \"Key2\": [\"ValueC\",\"ValueD\"] } ] } }

Example 2

The following example shows a resource query JSON string that includes only Amazon EC2 instances that are tagged Stage with a value of Test.

{ \"Type\": \"TAG_FILTERS_1_0\", \"Query\": \"{ \"ResourceTypeFilters\": \"AWS::EC2::Instance\", \"TagFilters\": { \"Stage\": \"Test\" } } }

Example 3

The following example shows a resource query JSON string that includes resource of any supported type as long as it is tagged Stage with a value of Prod.

{ \"Type\": \"TAG_FILTERS_1_0\", \"Query\": { \"ResourceTypeFilters\": \"AWS::AllSupported\", \"TagFilters\": { \"Stage\": \"Prod\" } } }

Example 4

The following example shows a resource query JSON string that includes only Amazon EC2 instances and Amazon S3 buckets that are part of the specified AWS CloudFormation stack.

{ \"Type\": \"CLOUDFORMATION_STACK_1_0\", \"Query\": { \"ResourceTypeFilters\": [ \"AWS::EC2::Instance\", \"AWS::S3::Bucket\" ], \"StackIdentifier\": \"arn:aws:cloudformation:us-west-2:123456789012:stack/AWStestuseraccount/fb0d5000-aba8-00e8-aa9e-50d5cEXAMPLE\" } }

" }, "ResourceStatus":{ "type":"structure", "members":{ "Name":{ "shape":"ResourceStatusValue", "documentation":"

The current status.

" } }, "documentation":"

A structure that identifies the current group membership status for a resource. Adding a resource to a resource group is performed asynchronously as a background task. A PENDING status indicates, for this resource, that the process isn't completed yet.

" }, "ResourceStatusValue":{ "type":"string", "enum":["PENDING"] }, "ResourceType":{ "type":"string", "pattern":"AWS::[a-zA-Z0-9]+::\\w+" }, "SearchResourcesInput":{ "type":"structure", "required":["ResourceQuery"], "members":{ "ResourceQuery":{ "shape":"ResourceQuery", "documentation":"

The search query, using the same formats that are supported for resource group definition. For more information, see CreateGroup.

" }, "MaxResults":{ "shape":"MaxResults", "documentation":"

The total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the maximum you specify, the NextToken response element is present and has a value (is not null). Include that value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

" }, "NextToken":{ "shape":"NextToken", "documentation":"

The parameter for receiving additional results if you receive a NextToken response in a previous request. A NextToken response indicates that more output is available. Set this parameter to the value provided by a previous call's NextToken response to indicate where the output should continue from.

" } } }, "SearchResourcesOutput":{ "type":"structure", "members":{ "ResourceIdentifiers":{ "shape":"ResourceIdentifierList", "documentation":"

The ARNs and resource types of resources that are members of the group that you specified.

" }, "NextToken":{ "shape":"NextToken", "documentation":"

If present, indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null.

" }, "QueryErrors":{ "shape":"QueryErrorList", "documentation":"

A list of QueryError objects. Each error is an object that contains ErrorCode and Message structures. Possible values for ErrorCode are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING.

" } } }, "TagInput":{ "type":"structure", "required":[ "Arn", "Tags" ], "members":{ "Arn":{ "shape":"GroupArn", "documentation":"

The ARN of the resource group to which to add tags.

", "location":"uri", "locationName":"Arn" }, "Tags":{ "shape":"Tags", "documentation":"

The tags to add to the specified resource group. A tag is a string-to-string map of key-value pairs.

" } } }, "TagKey":{ "type":"string", "max":128, "min":1, "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" }, "TagKeyList":{ "type":"list", "member":{"shape":"TagKey"} }, "TagOutput":{ "type":"structure", "members":{ "Arn":{ "shape":"GroupArn", "documentation":"

The ARN of the tagged resource.

" }, "Tags":{ "shape":"Tags", "documentation":"

The tags that have been added to the specified resource group.

" } } }, "TagValue":{ "type":"string", "max":256, "min":0, "pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" }, "Tags":{ "type":"map", "key":{"shape":"TagKey"}, "value":{"shape":"TagValue"} }, "TooManyRequestsException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

You've exceeded throttling limits by making too many requests in a period of time.

", "error":{"httpStatusCode":429}, "exception":true }, "UnauthorizedException":{ "type":"structure", "members":{ "Message":{"shape":"ErrorMessage"} }, "documentation":"

The request was rejected because it doesn't have valid credentials for the target resource.

", "error":{"httpStatusCode":401}, "exception":true }, "UngroupResourcesInput":{ "type":"structure", "required":[ "Group", "ResourceArns" ], "members":{ "Group":{ "shape":"GroupString", "documentation":"

The name or the ARN of the resource group from which to remove the resources.

" }, "ResourceArns":{ "shape":"ResourceArnList", "documentation":"

The ARNs of the resources to be removed from the group.

" } } }, "UngroupResourcesOutput":{ "type":"structure", "members":{ "Succeeded":{ "shape":"ResourceArnList", "documentation":"

A list of resources that were successfully removed from the group by this operation.

" }, "Failed":{ "shape":"FailedResourceList", "documentation":"

A list of any resources that failed to be removed from the group by this operation.

" }, "Pending":{ "shape":"PendingResourceList", "documentation":"

A list of any resources that are still in the process of being removed from the group by this operation. These pending removals continue asynchronously. You can check the status of pending removals by using the ListGroupResources operation. After the resource is successfully removed, it no longer appears in the response.

" } } }, "UntagInput":{ "type":"structure", "required":[ "Arn", "Keys" ], "members":{ "Arn":{ "shape":"GroupArn", "documentation":"

The ARN of the resource group from which to remove tags. The command removed both the specified keys and any values associated with those keys.

", "location":"uri", "locationName":"Arn" }, "Keys":{ "shape":"TagKeyList", "documentation":"

The keys of the tags to be removed.

" } } }, "UntagOutput":{ "type":"structure", "members":{ "Arn":{ "shape":"GroupArn", "documentation":"

The ARN of the resource group from which tags have been removed.

" }, "Keys":{ "shape":"TagKeyList", "documentation":"

The keys of the tags that were removed.

" } } }, "UpdateGroupInput":{ "type":"structure", "members":{ "GroupName":{ "shape":"GroupName", "documentation":"

Don't use this parameter. Use Group instead.

", "deprecated":true, "deprecatedMessage":"This field is deprecated, use Group instead." }, "Group":{ "shape":"GroupString", "documentation":"

The name or the ARN of the resource group to modify.

" }, "Description":{ "shape":"Description", "documentation":"

The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces.

" } } }, "UpdateGroupOutput":{ "type":"structure", "members":{ "Group":{ "shape":"Group", "documentation":"

The update description of the resource group.

" } } }, "UpdateGroupQueryInput":{ "type":"structure", "required":["ResourceQuery"], "members":{ "GroupName":{ "shape":"GroupName", "documentation":"

Don't use this parameter. Use Group instead.

", "deprecated":true, "deprecatedMessage":"This field is deprecated, use Group instead." }, "Group":{ "shape":"GroupString", "documentation":"

The name or the ARN of the resource group to query.

" }, "ResourceQuery":{ "shape":"ResourceQuery", "documentation":"

The resource query to determine which AWS resources are members of this resource group.

A resource group can contain either a Configuration or a ResourceQuery, but not both.

" } } }, "UpdateGroupQueryOutput":{ "type":"structure", "members":{ "GroupQuery":{ "shape":"GroupQuery", "documentation":"

The updated resource query associated with the resource group after the update.

" } } } }, "documentation":"AWS Resource Groups

AWS Resource Groups lets you organize AWS resources such as Amazon EC2 instances, Amazon Relational Database Service databases, and Amazon S3 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 AWS Systems Manager Automation documents, on tag-related resources in AWS Systems Manager. Groups of tagged resources also let you quickly view a custom console in AWS Systems Manager that shows AWS 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 AWS Resource Groups User Guide.

AWS Resource Groups uses a REST-compliant API that you can use to perform the following types of operations.

" }