@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api AWS Resource Groups
@version 2017-11-27
@auth AWS SigV4
@endpoints 18
@toc groups(1), delete-group(1), get-account-settings(1), get-group(1), get-group-configuration(1), get-group-query(1), resources(4), group-resources(1), list-group-resources(1), groups-list(1), put-group-configuration(1), ungroup-resources(1), update-account-settings(1), update-group(1), update-group-query(1)

@group groups
@endpoint POST /groups
@desc 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
@required {Name: str}
@optional {Description: str, ResourceQuery: ResourceQuery, Tags: map<str,str>, Configuration: [GroupConfigurationItem]}
@returns(200) {Group: Group?{GroupArn: str, Name: str, Description: str?}, ResourceQuery: ResourceQuery?{Type: str, Query: str}, Tags: map<str,str>?, GroupConfiguration: GroupConfiguration?{Configuration: [GroupConfigurationItem]?, ProposedConfiguration: [GroupConfigurationItem]?, Status: str?, FailureReason: str?}}

@endgroup

@group delete-group
@endpoint POST /delete-group
@desc 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
@optional {GroupName: str, Group: str}
@returns(200) {Group: Group?{GroupArn: str, Name: str, Description: str?}}

@endgroup

@group get-account-settings
@endpoint POST /get-account-settings
@desc Retrieves the current status of optional features in Resource Groups.
@returns(200) {AccountSettings: AccountSettings?{GroupLifecycleEventsDesiredStatus: str?, GroupLifecycleEventsStatus: str?, GroupLifecycleEventsStatusMessage: str?}}

@endgroup

@group get-group
@endpoint POST /get-group
@desc Returns information about a specified resource group.  Minimum permissions  To run this command, you must have the following permissions:    resource-groups:GetGroup
@optional {GroupName: str, Group: str}
@returns(200) {Group: Group?{GroupArn: str, Name: str, Description: str?}}

@endgroup

@group get-group-configuration
@endpoint POST /get-group-configuration
@desc 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
@optional {Group: str}
@returns(200) {GroupConfiguration: GroupConfiguration?{Configuration: [GroupConfigurationItem]?, ProposedConfiguration: [GroupConfigurationItem]?, Status: str?, FailureReason: str?}}

@endgroup

@group get-group-query
@endpoint POST /get-group-query
@desc 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
@optional {GroupName: str, Group: str}
@returns(200) {GroupQuery: GroupQuery?{GroupName: str, ResourceQuery: ResourceQuery{Type: str, Query: str}}}

@endgroup

@group resources
@endpoint GET /resources/{Arn}/tags
@desc 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:    resource-groups:GetTags
@required {Arn: str}
@returns(200) {Arn: str?, Tags: map<str,str>?}

@endgroup

@group group-resources
@endpoint POST /group-resources
@desc Adds the specified resources to the specified group.  You can use this operation with only resource groups that are configured with the following types:    AWS::EC2::HostManagement     AWS::EC2::CapacityReservationPool    Other resource group type and resource types aren't currently supported by this operation.   Minimum permissions  To run this command, you must have the following permissions:    resource-groups:GroupResources
@required {Group: str, ResourceArns: [str]}
@returns(200) {Succeeded: [str]?, Failed: [FailedResource]?, Pending: [PendingResource]?}

@endgroup

@group list-group-resources
@endpoint POST /list-group-resources
@desc 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:    resource-groups:ListGroupResources     cloudformation:DescribeStacks     cloudformation:ListStackResources     tag:GetResources
@optional {GroupName: str, Group: str, Filters: [ResourceFilter], MaxResults: int, NextToken: str}
@returns(200) {Resources: [ListGroupResourcesItem]?, ResourceIdentifiers: [ResourceIdentifier]?, NextToken: str?, QueryErrors: [QueryError]?}

@endgroup

@group groups-list
@endpoint POST /groups-list
@desc 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
@optional {maxResults: int, nextToken: str, Filters: [GroupFilter]}
@returns(200) {GroupIdentifiers: [GroupIdentifier]?, Groups: [Group]?, NextToken: str?}

@endgroup

@group put-group-configuration
@endpoint POST /put-group-configuration
@desc 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
@optional {Group: str, Configuration: [GroupConfigurationItem]}

@endgroup

@group resources
@endpoint POST /resources/search
@desc 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
@required {ResourceQuery: ResourceQuery}
@optional {MaxResults: int, NextToken: str}
@returns(200) {ResourceIdentifiers: [ResourceIdentifier]?, NextToken: str?, QueryErrors: [QueryError]?}

@endpoint PUT /resources/{Arn}/tags
@desc 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:    resource-groups:Tag
@required {Arn: str, Tags: map<str,str>}
@returns(200) {Arn: str?, Tags: map<str,str>?}

@endgroup

@group ungroup-resources
@endpoint POST /ungroup-resources
@desc 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
@required {Group: str, ResourceArns: [str]}
@returns(200) {Succeeded: [str]?, Failed: [FailedResource]?, Pending: [PendingResource]?}

@endgroup

@group resources
@endpoint PATCH /resources/{Arn}/tags
@desc Deletes tags from a specified resource group.  Minimum permissions  To run this command, you must have the following permissions:    resource-groups:Untag
@required {Arn: str, Keys: [str]}
@returns(200) {Arn: str?, Keys: [str]?}

@endgroup

@group update-account-settings
@endpoint POST /update-account-settings
@desc 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 for GroupLifecycleEventsStatus to change to ACTIVE.
@optional {GroupLifecycleEventsDesiredStatus: str}
@returns(200) {AccountSettings: AccountSettings?{GroupLifecycleEventsDesiredStatus: str?, GroupLifecycleEventsStatus: str?, GroupLifecycleEventsStatusMessage: str?}}

@endgroup

@group update-group
@endpoint POST /update-group
@desc 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
@optional {GroupName: str, Group: str, Description: str}
@returns(200) {Group: Group?{GroupArn: str, Name: str, Description: str?}}

@endgroup

@group update-group-query
@endpoint POST /update-group-query
@desc 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
@required {ResourceQuery: ResourceQuery}
@optional {GroupName: str, Group: str}
@returns(200) {GroupQuery: GroupQuery?{GroupName: str, ResourceQuery: ResourceQuery{Type: str, Query: str}}}

@endgroup

@end
