1// Code generated by smithy-go-codegen DO NOT EDIT.
2
3package types
4
5// A resource that failed to be added to or removed from a group.
6type FailedResource struct {
7
8	// The error code associated with the failure.
9	ErrorCode *string
10
11	// The error message text associated with the failure.
12	ErrorMessage *string
13
14	// The ARN of the resource that failed to be added or removed.
15	ResourceArn *string
16}
17
18// A resource group that contains AWS resources. You can assign resources to the
19// group by associating either of the following elements with the group:
20//
21// *
22// ResourceQuery - Use a resource query to specify a set of tag keys and values.
23// All resources in the same AWS Region and AWS account that have those keys with
24// the same values are included in the group. You can add a resource query when you
25// create the group, or later by using the PutGroupConfiguration operation.
26//
27// *
28// GroupConfiguration - Use a service configuration to associate the group with an
29// AWS service. The configuration specifies which resource types can be included in
30// the group.
31type Group struct {
32
33	// The ARN of the resource group.
34	//
35	// This member is required.
36	GroupArn *string
37
38	// The name of the resource group.
39	//
40	// This member is required.
41	Name *string
42
43	// The description of the resource group.
44	Description *string
45}
46
47// A service configuration associated with a resource group. The configuration
48// options are determined by the AWS service that defines the Type, and specifies
49// which resources can be included in the group. You can add a service
50// configuration when you create the group by using CreateGroup, or later by using
51// the PutGroupConfiguration operation. For details about group service
52// configuration syntax, see Service configurations for resource groups
53// (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html).
54type GroupConfiguration struct {
55
56	// The configuration currently associated with the group and in effect.
57	Configuration []GroupConfigurationItem
58
59	// If present, the reason why a request to update the group configuration failed.
60	FailureReason *string
61
62	// If present, the new configuration that is in the process of being applied to the
63	// group.
64	ProposedConfiguration []GroupConfigurationItem
65
66	// The current status of an attempt to update the group configuration.
67	Status GroupConfigurationStatus
68}
69
70// An item in a group configuration. A group service configuration can have one or
71// more items. For details about group service configuration syntax, see Service
72// configurations for resource groups
73// (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html).
74type GroupConfigurationItem struct {
75
76	// Specifies the type of group configuration item. Each item must have a unique
77	// value for type. For the list of types that you can specify for a configuration
78	// item, see Supported resource types and parameters
79	// (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html#about-slg-types).
80	//
81	// This member is required.
82	Type *string
83
84	// A collection of parameters for this group configuration item. For the list of
85	// parameters that you can use with each configuration item type, see Supported
86	// resource types and parameters
87	// (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html#about-slg-types).
88	Parameters []GroupConfigurationParameter
89}
90
91// A parameter for a group configuration item. For details about group service
92// configuration syntax, see Service configurations for resource groups
93// (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html).
94type GroupConfigurationParameter struct {
95
96	// The name of the group configuration parameter. For the list of parameters that
97	// you can use with each configuration item type, see Supported resource types and
98	// parameters
99	// (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html#about-slg-types).
100	//
101	// This member is required.
102	Name *string
103
104	// The value or values to be used for the specified parameter. For the list of
105	// values you can use with each parameter, see Supported resource types and
106	// parameters
107	// (https://docs.aws.amazon.com/ARG/latest/APIReference/about-slg.html#about-slg-types).
108	Values []string
109}
110
111// A filter collection that you can use to restrict the results from a List
112// operation to only those you want to include.
113type GroupFilter struct {
114
115	// The name of the filter. Filter names are case-sensitive.
116	//
117	// This member is required.
118	Name GroupFilterName
119
120	// One or more filter values. Allowed filter values vary by group filter name, and
121	// are case-sensitive.
122	//
123	// This member is required.
124	Values []string
125}
126
127// The unique identifiers for a resource group.
128type GroupIdentifier struct {
129
130	// The ARN of the resource group.
131	GroupArn *string
132
133	// The name of the resource group.
134	GroupName *string
135}
136
137// A mapping of a query attached to a resource group that determines the AWS
138// resources that are members of the group.
139type GroupQuery struct {
140
141	// The name of the resource group that is associated with the specified resource
142	// query.
143	//
144	// This member is required.
145	GroupName *string
146
147	// The resource query that determines which AWS resources are members of the
148	// associated resource group.
149	//
150	// This member is required.
151	ResourceQuery *ResourceQuery
152}
153
154// A structure returned by the ListGroupResources operation that contains identity
155// and group membership status information for one of the resources in the group.
156type ListGroupResourcesItem struct {
157
158	// A structure that contains the ARN of a resource and its resource type.
159	Identifier *ResourceIdentifier
160
161	// A structure that contains the status of this resource's membership in the group.
162	// This field is present in the response only if the group is of type
163	// AWS::EC2::HostManagement.
164	Status *ResourceStatus
165}
166
167// A structure that identifies a resource that is currently pending addition to the
168// group as a member. Adding a resource to a resource group happens asynchronously
169// as a background task and this one isn't completed yet.
170type PendingResource struct {
171
172	// The Amazon resource name (ARN) of the resource that's in a pending state.
173	ResourceArn *string
174}
175
176// A two-part error structure that can occur in ListGroupResources or
177// SearchResources operations on CloudFormation stack-based queries. The error
178// occurs if the CloudFormation stack on which the query is based either does not
179// exist, or has a status that renders the stack inactive. A QueryError occurrence
180// does not necessarily mean that AWS Resource Groups could not complete the
181// operation, but the resulting group might have no member resources.
182type QueryError struct {
183
184	// Possible values are CLOUDFORMATION_STACK_INACTIVE and
185	// CLOUDFORMATION_STACK_NOT_EXISTING.
186	ErrorCode QueryErrorCode
187
188	// A message that explains the ErrorCode value. Messages might state that the
189	// specified CloudFormation stack does not exist (or no longer exists). For
190	// CLOUDFORMATION_STACK_INACTIVE, the message typically states that the
191	// CloudFormation stack has a status that is not (or no longer) active, such as
192	// CREATE_FAILED.
193	Message *string
194}
195
196// A filter name and value pair that is used to obtain more specific results from a
197// list of resources.
198type ResourceFilter struct {
199
200	// The name of the filter. Filter names are case-sensitive.
201	//
202	// This member is required.
203	Name ResourceFilterName
204
205	// One or more filter values. Allowed filter values vary by resource filter name,
206	// and are case-sensitive.
207	//
208	// This member is required.
209	Values []string
210}
211
212// A structure that contains the ARN of a resource and its resource type.
213type ResourceIdentifier struct {
214
215	// The ARN of a resource.
216	ResourceArn *string
217
218	// The resource type of a resource, such as AWS::EC2::Instance.
219	ResourceType *string
220}
221
222// The query that is used to define a resource group or a search for resources. A
223// query specifies both a query type and a query string as a JSON object. See the
224// examples section for example JSON strings. The examples that follow are shown as
225// standard JSON strings. If you include such a string as a parameter to the AWS
226// CLI or an SDK API, you might need to 'escape' the string into a single line. For
227// example, see the Quoting strings
228// (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters-quoting-strings.html)
229// in the AWS CLI User Guide. Example 1 The following generic example shows a
230// resource query JSON string that includes only resources that meet the following
231// criteria:
232//
233// * The resource type must be either resource_type1 or
234// resource_type2.
235//
236// * The resource must have a tag Key1 with a value of either
237// ValueA or ValueB.
238//
239// * The resource must have a tag Key2 with a value of either
240// ValueC or ValueD.
241//
242// { "Type": "TAG_FILTERS_1_0", "Query": {
243// "ResourceTypeFilters": [ "resource_type1", "resource_type2"], "TagFilters": [ {
244// "Key": "Key1", "Values": ["ValueA","ValueB"] }, { "Key":"Key2",
245// "Values":["ValueC","ValueD"] } ] } } This has the equivalent "shortcut" syntax
246// of the following: { "Type": "TAG_FILTERS_1_0", "Query": { "ResourceTypeFilters":
247// [ "resource_type1", "resource_type2"], "TagFilters": [ { "Key1":
248// ["ValueA","ValueB"] }, { "Key2": ["ValueC","ValueD"] } ] } } Example 2 The
249// following example shows a resource query JSON string that includes only Amazon
250// EC2 instances that are tagged Stage with a value of Test. { "Type":
251// "TAG_FILTERS_1_0", "Query": "{ "ResourceTypeFilters": "AWS::EC2::Instance",
252// "TagFilters": { "Stage": "Test" } } } Example 3 The following example shows a
253// resource query JSON string that includes resource of any supported type as long
254// as it is tagged Stage with a value of Prod. { "Type": "TAG_FILTERS_1_0",
255// "Query": { "ResourceTypeFilters": "AWS::AllSupported", "TagFilters": { "Stage":
256// "Prod" } } } Example 4 The following example shows a resource query JSON string
257// that includes only Amazon EC2 instances and Amazon S3 buckets that are part of
258// the specified AWS CloudFormation stack. { "Type": "CLOUDFORMATION_STACK_1_0",
259// "Query": { "ResourceTypeFilters": [ "AWS::EC2::Instance", "AWS::S3::Bucket" ],
260// "StackIdentifier":
261// "arn:aws:cloudformation:us-west-2:123456789012:stack/AWStestuseraccount/fb0d5000-aba8-00e8-aa9e-50d5cEXAMPLE"
262// } }
263type ResourceQuery struct {
264
265	// The query that defines a group or a search.
266	//
267	// This member is required.
268	Query *string
269
270	// The type of the query. You can use the following values:
271	//
272	// *
273	// CLOUDFORMATION_STACK_1_0: Specifies that the Query contains an ARN for a
274	// CloudFormation stack.
275	//
276	// * TAG_FILTERS_1_0: Specifies that the Query parameter
277	// contains a JSON string that represents a collection of simple tag filters for
278	// resource types and tags. The JSON string uses a syntax similar to the
279	// GetResources
280	// (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html)
281	// operation, but uses only the  ResourceTypeFilters
282	// (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html#resourcegrouptagging-GetResources-request-ResourceTypeFilters)
283	// and TagFilters
284	// (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html#resourcegrouptagging-GetResources-request-TagFiltersTagFilters)
285	// fields. If you specify more than one tag key, only resources that match all tag
286	// keys, and at least one value of each specified tag key, are returned in your
287	// query. If you specify more than one value for a tag key, a resource matches the
288	// filter if it has a tag key value that matches any of the specified values. For
289	// example, consider the following sample query for resources that have two tags,
290	// Stage and Version, with two values each:
291	// [{"Stage":["Test","Deploy"]},{"Version":["1","2"]}] The results of this query
292	// could include the following.
293	//
294	// * An EC2 instance that has the following two tags:
295	// {"Stage":"Deploy"}, and {"Version":"2"}
296	//
297	// * An S3 bucket that has the following
298	// two tags: {"Stage":"Test"}, and {"Version":"1"}
299	//
300	// The query would not include the
301	// following items in the results, however.
302	//
303	// * An EC2 instance that has only the
304	// following tag: {"Stage":"Deploy"}. The instance does not have all of the tag
305	// keys specified in the filter, so it is excluded from the results.
306	//
307	// * An RDS
308	// database that has the following two tags: {"Stage":"Archived"} and
309	// {"Version":"4"} The database has all of the tag keys, but none of those keys has
310	// an associated value that matches at least one of the specified values in the
311	// filter.
312	//
313	// This member is required.
314	Type QueryType
315}
316
317// A structure that identifies the current group membership status for a resource.
318// Adding a resource to a resource group is performed asynchronously as a
319// background task. A PENDING status indicates, for this resource, that the process
320// isn't completed yet.
321type ResourceStatus struct {
322
323	// The current status.
324	Name ResourceStatusValue
325}
326