libZSservicesZSamazonka-resourcegroupsZSamazonka-resourcegroups
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.ResourceGroups.Lens

Description

 
Synopsis

Operations

SearchResources

searchResources_nextToken :: Lens' SearchResources (Maybe Text) Source #

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.

searchResources_maxResults :: Lens' SearchResources (Maybe Natural) Source #

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.

searchResources_resourceQuery :: Lens' SearchResources ResourceQuery Source #

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

searchResourcesResponse_queryErrors :: Lens' SearchResourcesResponse (Maybe [QueryError]) Source #

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.

searchResourcesResponse_nextToken :: Lens' SearchResourcesResponse (Maybe Text) Source #

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.

searchResourcesResponse_resourceIdentifiers :: Lens' SearchResourcesResponse (Maybe [ResourceIdentifier]) Source #

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

GetTags

getTags_arn :: Lens' GetTags Text Source #

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

getTagsResponse_arn :: Lens' GetTagsResponse (Maybe Text) Source #

The ARN of the tagged resource group.

getTagsResponse_tags :: Lens' GetTagsResponse (Maybe (HashMap Text Text)) Source #

The tags associated with the specified resource group.

getTagsResponse_httpStatus :: Lens' GetTagsResponse Int Source #

The response's http status code.

Tag

tag_arn :: Lens' Tag Text Source #

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

tag_tags :: Lens' Tag (HashMap Text Text) Source #

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

tagResponse_arn :: Lens' TagResponse (Maybe Text) Source #

The ARN of the tagged resource.

tagResponse_tags :: Lens' TagResponse (Maybe (HashMap Text Text)) Source #

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

tagResponse_httpStatus :: Lens' TagResponse Int Source #

The response's http status code.

UngroupResources

ungroupResources_group :: Lens' UngroupResources Text Source #

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

ungroupResources_resourceArns :: Lens' UngroupResources (NonEmpty Text) Source #

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

ungroupResourcesResponse_pending :: Lens' UngroupResourcesResponse (Maybe [PendingResource]) Source #

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.

ungroupResourcesResponse_succeeded :: Lens' UngroupResourcesResponse (Maybe (NonEmpty Text)) Source #

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

ungroupResourcesResponse_failed :: Lens' UngroupResourcesResponse (Maybe [FailedResource]) Source #

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

GroupResources

groupResources_group :: Lens' GroupResources Text Source #

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

groupResources_resourceArns :: Lens' GroupResources (NonEmpty Text) Source #

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

groupResourcesResponse_pending :: Lens' GroupResourcesResponse (Maybe [PendingResource]) Source #

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.

groupResourcesResponse_succeeded :: Lens' GroupResourcesResponse (Maybe (NonEmpty Text)) Source #

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

groupResourcesResponse_failed :: Lens' GroupResourcesResponse (Maybe [FailedResource]) Source #

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

PutGroupConfiguration

putGroupConfiguration_group :: Lens' PutGroupConfiguration (Maybe Text) Source #

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

putGroupConfiguration_configuration :: Lens' PutGroupConfiguration (Maybe [GroupConfigurationItem]) Source #

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.

Untag

untag_arn :: Lens' Untag Text Source #

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.

untag_keys :: Lens' Untag [Text] Source #

The keys of the tags to be removed.

untagResponse_arn :: Lens' UntagResponse (Maybe Text) Source #

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

untagResponse_keys :: Lens' UntagResponse (Maybe [Text]) Source #

The keys of the tags that were removed.

untagResponse_httpStatus :: Lens' UntagResponse Int Source #

The response's http status code.

UpdateGroupQuery

updateGroupQuery_group :: Lens' UpdateGroupQuery (Maybe Text) Source #

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

updateGroupQuery_groupName :: Lens' UpdateGroupQuery (Maybe Text) Source #

Don't use this parameter. Use Group instead.

updateGroupQuery_resourceQuery :: Lens' UpdateGroupQuery ResourceQuery Source #

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.

updateGroupQueryResponse_groupQuery :: Lens' UpdateGroupQueryResponse (Maybe GroupQuery) Source #

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

ListGroupResources

listGroupResources_group :: Lens' ListGroupResources (Maybe Text) Source #

The name or the ARN of the resource group

listGroupResources_filters :: Lens' ListGroupResources (Maybe [ResourceFilter]) Source #

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.

  • resource-type - Filter resources by their type. Specify up to five resource types in the format AWS::ServiceCode::ResourceType. For example, AWS::EC2::Instance, or AWS::S3::Bucket.

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).

listGroupResources_nextToken :: Lens' ListGroupResources (Maybe Text) Source #

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.

listGroupResources_groupName :: Lens' ListGroupResources (Maybe Text) Source #

/__Deprecated - don't use this parameter. Use the Group request field instead.__/

listGroupResources_maxResults :: Lens' ListGroupResources (Maybe Natural) Source #

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.

listGroupResourcesResponse_resources :: Lens' ListGroupResourcesResponse (Maybe [ListGroupResourcesItem]) Source #

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

listGroupResourcesResponse_queryErrors :: Lens' ListGroupResourcesResponse (Maybe [QueryError]) Source #

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.

listGroupResourcesResponse_nextToken :: Lens' ListGroupResourcesResponse (Maybe Text) Source #

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.

listGroupResourcesResponse_resourceIdentifiers :: Lens' ListGroupResourcesResponse (Maybe [ResourceIdentifier]) Source #

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

GetGroupQuery

getGroupQuery_group :: Lens' GetGroupQuery (Maybe Text) Source #

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

getGroupQuery_groupName :: Lens' GetGroupQuery (Maybe Text) Source #

Don't use this parameter. Use Group instead.

getGroupQueryResponse_groupQuery :: Lens' GetGroupQueryResponse (Maybe GroupQuery) Source #

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

CreateGroup

createGroup_resourceQuery :: Lens' CreateGroup (Maybe ResourceQuery) Source #

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.

createGroup_configuration :: Lens' CreateGroup (Maybe [GroupConfigurationItem]) Source #

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.

createGroup_description :: Lens' CreateGroup (Maybe Text) Source #

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

createGroup_tags :: Lens' CreateGroup (Maybe (HashMap Text Text)) Source #

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

createGroup_name :: Lens' CreateGroup Text Source #

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.

createGroupResponse_group :: Lens' CreateGroupResponse (Maybe Group) Source #

The description of the resource group.

createGroupResponse_groupConfiguration :: Lens' CreateGroupResponse (Maybe GroupConfiguration) Source #

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

createGroupResponse_resourceQuery :: Lens' CreateGroupResponse (Maybe ResourceQuery) Source #

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

createGroupResponse_tags :: Lens' CreateGroupResponse (Maybe (HashMap Text Text)) Source #

The tags associated with the group.

DeleteGroup

deleteGroup_group :: Lens' DeleteGroup (Maybe Text) Source #

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

deleteGroup_groupName :: Lens' DeleteGroup (Maybe Text) Source #

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

deleteGroupResponse_group :: Lens' DeleteGroupResponse (Maybe Group) Source #

A full description of the deleted resource group.

UpdateGroup

updateGroup_group :: Lens' UpdateGroup (Maybe Text) Source #

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

updateGroup_groupName :: Lens' UpdateGroup (Maybe Text) Source #

Don't use this parameter. Use Group instead.

updateGroup_description :: Lens' UpdateGroup (Maybe Text) Source #

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

updateGroupResponse_group :: Lens' UpdateGroupResponse (Maybe Group) Source #

The update description of the resource group.

ListGroups

listGroups_filters :: Lens' ListGroups (Maybe [GroupFilter]) Source #

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

  • resource-type - Filter the results to include only those of the specified resource types. Specify up to five resource types in the format AWS::ServiceCode::ResourceType . For example, AWS::EC2::Instance, or AWS::S3::Bucket.
  • configuration-type - Filter the results to include only those groups that have the specified configuration types attached. The current supported values are:

    • AWS:EC2::CapacityReservationPool
    • AWS:EC2::HostManagement

listGroups_nextToken :: Lens' ListGroups (Maybe Text) Source #

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.

listGroups_maxResults :: Lens' ListGroups (Maybe Natural) Source #

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.

listGroupsResponse_groups :: Lens' ListGroupsResponse (Maybe [Group]) Source #

/__Deprecated - don't use this field. Use the GroupIdentifiers response field instead.__/

listGroupsResponse_nextToken :: Lens' ListGroupsResponse (Maybe Text) Source #

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.

listGroupsResponse_groupIdentifiers :: Lens' ListGroupsResponse (Maybe [GroupIdentifier]) Source #

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

GetGroup

getGroup_group :: Lens' GetGroup (Maybe Text) Source #

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

getGroup_groupName :: Lens' GetGroup (Maybe Text) Source #

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

getGroupResponse_group :: Lens' GetGroupResponse (Maybe Group) Source #

A full description of the resource group.

getGroupResponse_httpStatus :: Lens' GetGroupResponse Int Source #

The response's http status code.

GetGroupConfiguration

getGroupConfiguration_group :: Lens' GetGroupConfiguration (Maybe Text) Source #

The name or the ARN of the resource group.

getGroupConfigurationResponse_groupConfiguration :: Lens' GetGroupConfigurationResponse (Maybe GroupConfiguration) Source #

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

Types

FailedResource

failedResource_resourceArn :: Lens' FailedResource (Maybe Text) Source #

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

failedResource_errorCode :: Lens' FailedResource (Maybe Text) Source #

The error code associated with the failure.

failedResource_errorMessage :: Lens' FailedResource (Maybe Text) Source #

The error message text associated with the failure.

Group

group_description :: Lens' Group (Maybe Text) Source #

The description of the resource group.

group_groupArn :: Lens' Group Text Source #

The ARN of the resource group.

group_name :: Lens' Group Text Source #

The name of the resource group.

GroupConfiguration

groupConfiguration_status :: Lens' GroupConfiguration (Maybe GroupConfigurationStatus) Source #

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

groupConfiguration_failureReason :: Lens' GroupConfiguration (Maybe Text) Source #

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

groupConfiguration_proposedConfiguration :: Lens' GroupConfiguration (Maybe [GroupConfigurationItem]) Source #

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

groupConfiguration_configuration :: Lens' GroupConfiguration (Maybe [GroupConfigurationItem]) Source #

The configuration currently associated with the group and in effect.

GroupConfigurationItem

groupConfigurationItem_parameters :: Lens' GroupConfigurationItem (Maybe [GroupConfigurationParameter]) Source #

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.

groupConfigurationItem_type :: Lens' GroupConfigurationItem Text Source #

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.

GroupConfigurationParameter

groupConfigurationParameter_values :: Lens' GroupConfigurationParameter (Maybe [Text]) Source #

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.

groupConfigurationParameter_name :: Lens' GroupConfigurationParameter Text Source #

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.

GroupFilter

groupFilter_name :: Lens' GroupFilter GroupFilterName Source #

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

groupFilter_values :: Lens' GroupFilter (NonEmpty Text) Source #

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

GroupIdentifier

groupIdentifier_groupArn :: Lens' GroupIdentifier (Maybe Text) Source #

The ARN of the resource group.

groupIdentifier_groupName :: Lens' GroupIdentifier (Maybe Text) Source #

The name of the resource group.

GroupQuery

groupQuery_groupName :: Lens' GroupQuery Text Source #

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

groupQuery_resourceQuery :: Lens' GroupQuery ResourceQuery Source #

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

ListGroupResourcesItem

listGroupResourcesItem_status :: Lens' ListGroupResourcesItem (Maybe ResourceStatus) Source #

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.

PendingResource

pendingResource_resourceArn :: Lens' PendingResource (Maybe Text) Source #

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

QueryError

queryError_errorCode :: Lens' QueryError (Maybe QueryErrorCode) Source #

Possible values are CLOUDFORMATION_STACK_INACTIVE and CLOUDFORMATION_STACK_NOT_EXISTING.

queryError_message :: Lens' QueryError (Maybe Text) Source #

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.

ResourceFilter

resourceFilter_name :: Lens' ResourceFilter ResourceFilterName Source #

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

resourceFilter_values :: Lens' ResourceFilter (NonEmpty Text) Source #

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

ResourceIdentifier

resourceIdentifier_resourceType :: Lens' ResourceIdentifier (Maybe Text) Source #

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

ResourceQuery

resourceQuery_type :: Lens' ResourceQuery QueryType Source #

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

  • CLOUDFORMATION_STACK_1_0: Specifies that the Query contains an ARN for a CloudFormation stack.
  • TAG_FILTERS_1_0: Specifies that the Query parameter contains a JSON string that represents a collection of simple tag filters for resource types and tags. The JSON string uses a syntax similar to the GetResources operation, but uses only the ResourceTypeFilters and TagFilters fields. If you specify more than one tag key, only resources that match all tag keys, and at least one value of each specified tag key, are returned in your query. If you specify more than one value for a tag key, a resource matches the filter if it has a tag key value that matches any of the specified values.

    For example, consider the following sample query for resources that have two tags, Stage and Version, with two values each:

    [{"Stage":["Test","Deploy"]},{"Version":["1","2"]}]

    The results of this query could include the following.

    • An EC2 instance that has the following two tags: {"Stage":"Deploy"}, and {"Version":"2"}
    • An S3 bucket that has the following two tags: {"Stage":"Test"}, and {"Version":"1"}

    The query would not include the following items in the results, however.

    • An EC2 instance that has only the following tag: {"Stage":"Deploy"}.

      The instance does not have all of the tag keys specified in the filter, so it is excluded from the results.

    • An RDS database that has the following two tags: {"Stage":"Archived"} and {"Version":"4"}

      The database has all of the tag keys, but none of those keys has an associated value that matches at least one of the specified values in the filter.

resourceQuery_searchQuery :: Lens' ResourceQuery Text Source #

The query that defines a group or a search.

ResourceStatus