Skip to content

Commit 73a6573

Browse files
author
awstools
committed
feat(client-resource-groups): Added a new QueryErrorCode RESOURCE_TYPE_NOT_SUPPORTED that is returned by the ListGroupResources operation if the group query contains unsupported resource types.
1 parent a837f79 commit 73a6573

File tree

4 files changed

+55
-32
lines changed

4 files changed

+55
-32
lines changed

clients/client-resource-groups/src/commands/ListGroupResourcesCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export interface ListGroupResourcesCommandOutput extends ListGroupResourcesOutpu
9898
* // NextToken: "STRING_VALUE",
9999
* // QueryErrors: [ // QueryErrorList
100100
* // { // QueryError
101-
* // ErrorCode: "CLOUDFORMATION_STACK_INACTIVE" || "CLOUDFORMATION_STACK_NOT_EXISTING" || "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE",
101+
* // ErrorCode: "CLOUDFORMATION_STACK_INACTIVE" || "CLOUDFORMATION_STACK_NOT_EXISTING" || "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE" || "RESOURCE_TYPE_NOT_SUPPORTED",
102102
* // Message: "STRING_VALUE",
103103
* // },
104104
* // ],

clients/client-resource-groups/src/commands/SearchResourcesCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export interface SearchResourcesCommandOutput extends SearchResourcesOutput, __M
8282
* // NextToken: "STRING_VALUE",
8383
* // QueryErrors: [ // QueryErrorList
8484
* // { // QueryError
85-
* // ErrorCode: "CLOUDFORMATION_STACK_INACTIVE" || "CLOUDFORMATION_STACK_NOT_EXISTING" || "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE",
85+
* // ErrorCode: "CLOUDFORMATION_STACK_INACTIVE" || "CLOUDFORMATION_STACK_NOT_EXISTING" || "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE" || "RESOURCE_TYPE_NOT_SUPPORTED",
8686
* // Message: "STRING_VALUE",
8787
* // },
8888
* // ],

clients/client-resource-groups/src/models/models_0.ts

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,9 @@ export interface CreateGroupInput {
307307
* <p>The name of the group, which is the identifier of the group in other operations. You
308308
* can't change the name of a resource group after you create it. A resource group name can
309309
* consist of letters, numbers, hyphens, periods, and underscores. The name cannot start
310-
* with <code>AWS</code> or <code>aws</code>; these are reserved. A resource group name
311-
* must be unique within each Amazon Web Services Region in your Amazon Web Services account.</p>
310+
* with <code>AWS</code>, <code>aws</code>, or any other possible capitalization; these are
311+
* reserved. A resource group name must be unique within each Amazon Web Services Region in your Amazon Web Services
312+
* account.</p>
312313
* @public
313314
*/
314315
Name: string | undefined;
@@ -973,6 +974,7 @@ export const QueryErrorCode = {
973974
CLOUDFORMATION_STACK_INACTIVE: "CLOUDFORMATION_STACK_INACTIVE",
974975
CLOUDFORMATION_STACK_NOT_EXISTING: "CLOUDFORMATION_STACK_NOT_EXISTING",
975976
CLOUDFORMATION_STACK_UNASSUMABLE_ROLE: "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE",
977+
RESOURCE_TYPE_NOT_SUPPORTED: "RESOURCE_TYPE_NOT_SUPPORTED",
976978
} as const;
977979

978980
/**
@@ -982,11 +984,7 @@ export type QueryErrorCode = (typeof QueryErrorCode)[keyof typeof QueryErrorCode
982984

983985
/**
984986
* <p>A two-part error structure that can occur in <code>ListGroupResources</code> or
985-
* <code>SearchResources</code> operations on CloudFront stack-based queries. The error
986-
* occurs if the CloudFront stack on which the query is based either does not exist, or has a
987-
* status that renders the stack inactive. A <code>QueryError</code> occurrence does not
988-
* necessarily mean that Resource Groups could not complete the operation, but the resulting
989-
* group might have no member resources.</p>
987+
* <code>SearchResources</code>. </p>
990988
* @public
991989
*/
992990
export interface QueryError {
@@ -997,11 +995,7 @@ export interface QueryError {
997995
ErrorCode?: QueryErrorCode;
998996

999997
/**
1000-
* <p>A message that explains the <code>ErrorCode</code> value. Messages might state that
1001-
* the specified CloudFront stack does not exist (or no longer exists). For
1002-
* <code>CLOUDFORMATION_STACK_INACTIVE</code>, the message typically states that the
1003-
* CloudFront stack has a status that is not (or no longer) active, such as
1004-
* <code>CREATE_FAILED</code>.</p>
998+
* <p>A message that explains the <code>ErrorCode</code>. </p>
1005999
* @public
10061000
*/
10071001
Message?: string;
@@ -1115,10 +1109,10 @@ export interface ListGroupResourcesOutput {
11151109
NextToken?: string;
11161110

11171111
/**
1118-
* <p>A list of <code>QueryError</code> objects. Each error is an object that contains
1119-
* <code>ErrorCode</code> and <code>Message</code> structures. Possible values for
1120-
* <code>ErrorCode</code> are <code>CLOUDFORMATION_STACK_INACTIVE</code> and
1121-
* <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>.</p>
1112+
* <p>A list of <code>QueryError</code> objects. Each error contains an
1113+
* <code>ErrorCode</code> and <code>Message</code>. Possible values for
1114+
* ErrorCode are <code>CLOUDFORMATION_STACK_INACTIVE</code>, <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>,
1115+
* <code>CLOUDFORMATION_STACK_UNASSUMABLE_ROLE</code> and <code>RESOURCE_TYPE_NOT_SUPPORTED</code>. </p>
11221116
* @public
11231117
*/
11241118
QueryErrors?: QueryError[];
@@ -1191,12 +1185,10 @@ export interface ListGroupsInput {
11911185
* <ul>
11921186
* <li>
11931187
* <p>
1194-
* <code>resource-type</code> - Filter the results to include only those of the
1195-
* specified resource types. Specify up to five resource types in the format
1196-
* <code>AWS::<i>ServiceCode</i>::<i>ResourceType</i>
1197-
* </code>.
1198-
* For example, <code>AWS::EC2::Instance</code>, or
1199-
* <code>AWS::S3::Bucket</code>.</p>
1188+
* <code>resource-type</code> - Filter the results to include only those resource groups that have the specified
1189+
* resource type in their <code>ResourceTypeFilter</code>. For example, <code>AWS::EC2::Instance</code> would
1190+
* return any resource group with a <code>ResourceTypeFilter</code> that includes
1191+
* <code>AWS::EC2::Instance</code>.</p>
12001192
* </li>
12011193
* <li>
12021194
* <p>
@@ -1206,6 +1198,21 @@ export interface ListGroupsInput {
12061198
* <ul>
12071199
* <li>
12081200
* <p>
1201+
* <code>AWS::AppRegistry::Application</code>
1202+
* </p>
1203+
* </li>
1204+
* <li>
1205+
* <p>
1206+
* <code>AWS::AppRegistry::ApplicationResourceGroups</code>
1207+
* </p>
1208+
* </li>
1209+
* <li>
1210+
* <p>
1211+
* <code>AWS::CloudFormation::Stack</code>
1212+
* </p>
1213+
* </li>
1214+
* <li>
1215+
* <p>
12091216
* <code>AWS::EC2::CapacityReservationPool</code>
12101217
* </p>
12111218
* </li>
@@ -1214,6 +1221,11 @@ export interface ListGroupsInput {
12141221
* <code>AWS::EC2::HostManagement</code>
12151222
* </p>
12161223
* </li>
1224+
* <li>
1225+
* <p>
1226+
* <code>AWS::NetworkFirewall::RuleGroup</code>
1227+
* </p>
1228+
* </li>
12171229
* </ul>
12181230
* </li>
12191231
* </ul>
@@ -1385,8 +1397,8 @@ export interface SearchResourcesOutput {
13851397
NextToken?: string;
13861398

13871399
/**
1388-
* <p>A list of <code>QueryError</code> objects. Each error is an object that contains
1389-
* <code>ErrorCode</code> and <code>Message</code> structures.</p>
1400+
* <p>A list of <code>QueryError</code> objects. Each error contains an
1401+
* <code>ErrorCode</code> and <code>Message</code>.</p>
13901402
* <p>Possible values for <code>ErrorCode</code>:</p>
13911403
* <ul>
13921404
* <li>
@@ -1399,6 +1411,11 @@ export interface SearchResourcesOutput {
13991411
* <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>
14001412
* </p>
14011413
* </li>
1414+
* <li>
1415+
* <p>
1416+
* <code>CLOUDFORMATION_STACK_UNASSUMABLE_ROLE </code>
1417+
* </p>
1418+
* </li>
14021419
* </ul>
14031420
* @public
14041421
*/

codegen/sdk-codegen/aws-models/resource-groups.json

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@
11871187
"Name": {
11881188
"target": "com.amazonaws.resourcegroups#GroupName",
11891189
"traits": {
1190-
"smithy.api#documentation": "<p>The name of the group, which is the identifier of the group in other operations. You\n can't change the name of a resource group after you create it. A resource group name can\n consist of letters, numbers, hyphens, periods, and underscores. The name cannot start\n with <code>AWS</code> or <code>aws</code>; these are reserved. A resource group name\n must be unique within each Amazon Web Services Region in your Amazon Web Services account.</p>",
1190+
"smithy.api#documentation": "<p>The name of the group, which is the identifier of the group in other operations. You\n can't change the name of a resource group after you create it. A resource group name can\n consist of letters, numbers, hyphens, periods, and underscores. The name cannot start\n with <code>AWS</code>, <code>aws</code>, or any other possible capitalization; these are\n reserved. A resource group name must be unique within each Amazon Web Services Region in your Amazon Web Services\n account.</p>",
11911191
"smithy.api#required": {}
11921192
}
11931193
},
@@ -2356,7 +2356,7 @@
23562356
"QueryErrors": {
23572357
"target": "com.amazonaws.resourcegroups#QueryErrorList",
23582358
"traits": {
2359-
"smithy.api#documentation": "<p>A list of <code>QueryError</code> objects. Each error is an object that contains\n <code>ErrorCode</code> and <code>Message</code> structures. Possible values for\n <code>ErrorCode</code> are <code>CLOUDFORMATION_STACK_INACTIVE</code> and\n <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>.</p>"
2359+
"smithy.api#documentation": "<p>A list of <code>QueryError</code> objects. Each error contains an\n <code>ErrorCode</code> and <code>Message</code>. Possible values for \n ErrorCode are <code>CLOUDFORMATION_STACK_INACTIVE</code>, <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>, \n <code>CLOUDFORMATION_STACK_UNASSUMABLE_ROLE</code> and <code>RESOURCE_TYPE_NOT_SUPPORTED</code>. </p>"
23602360
}
23612361
}
23622362
},
@@ -2410,7 +2410,7 @@
24102410
"Filters": {
24112411
"target": "com.amazonaws.resourcegroups#GroupFilterList",
24122412
"traits": {
2413-
"smithy.api#documentation": "<p>Filters, formatted as <a>GroupFilter</a> objects, that you want to apply to\n a <code>ListGroups</code> operation.</p>\n <ul>\n <li>\n <p>\n <code>resource-type</code> - Filter the results to include only those of the\n specified resource types. Specify up to five resource types in the format\n <code>AWS::<i>ServiceCode</i>::<i>ResourceType</i>\n </code>.\n For example, <code>AWS::EC2::Instance</code>, or\n <code>AWS::S3::Bucket</code>.</p>\n </li>\n <li>\n <p>\n <code>configuration-type</code> - Filter the results to include only those\n groups that have the specified configuration types attached. The current\n supported values are:</p>\n <ul>\n <li>\n <p>\n <code>AWS::EC2::CapacityReservationPool</code>\n </p>\n </li>\n <li>\n <p>\n <code>AWS::EC2::HostManagement</code>\n </p>\n </li>\n </ul>\n </li>\n </ul>"
2413+
"smithy.api#documentation": "<p>Filters, formatted as <a>GroupFilter</a> objects, that you want to apply to\n a <code>ListGroups</code> operation.</p>\n <ul>\n <li>\n <p>\n <code>resource-type</code> - Filter the results to include only those resource groups that have the specified\n resource type in their <code>ResourceTypeFilter</code>. For example, <code>AWS::EC2::Instance</code> would\n return any resource group with a <code>ResourceTypeFilter</code> that includes\n <code>AWS::EC2::Instance</code>.</p>\n </li>\n <li>\n <p>\n <code>configuration-type</code> - Filter the results to include only those\n groups that have the specified configuration types attached. The current\n supported values are:</p>\n <ul>\n <li>\n <p>\n <code>AWS::AppRegistry::Application</code>\n </p>\n </li>\n <li>\n <p>\n <code>AWS::AppRegistry::ApplicationResourceGroups</code>\n </p>\n </li>\n <li>\n <p>\n <code>AWS::CloudFormation::Stack</code>\n </p>\n </li>\n <li>\n <p>\n <code>AWS::EC2::CapacityReservationPool</code>\n </p>\n </li>\n <li>\n <p>\n <code>AWS::EC2::HostManagement</code>\n </p>\n </li>\n <li>\n <p>\n <code>AWS::NetworkFirewall::RuleGroup</code>\n </p>\n </li>\n </ul>\n </li>\n </ul>"
24142414
}
24152415
},
24162416
"MaxResults": {
@@ -2612,12 +2612,12 @@
26122612
"Message": {
26132613
"target": "com.amazonaws.resourcegroups#QueryErrorMessage",
26142614
"traits": {
2615-
"smithy.api#documentation": "<p>A message that explains the <code>ErrorCode</code> value. Messages might state that\n the specified CloudFront stack does not exist (or no longer exists). For\n <code>CLOUDFORMATION_STACK_INACTIVE</code>, the message typically states that the\n CloudFront stack has a status that is not (or no longer) active, such as\n <code>CREATE_FAILED</code>.</p>"
2615+
"smithy.api#documentation": "<p>A message that explains the <code>ErrorCode</code>. </p>"
26162616
}
26172617
}
26182618
},
26192619
"traits": {
2620-
"smithy.api#documentation": "<p>A two-part error structure that can occur in <code>ListGroupResources</code> or\n <code>SearchResources</code> operations on CloudFront stack-based queries. The error\n occurs if the CloudFront stack on which the query is based either does not exist, or has a\n status that renders the stack inactive. A <code>QueryError</code> occurrence does not\n necessarily mean that Resource Groups could not complete the operation, but the resulting\n group might have no member resources.</p>"
2620+
"smithy.api#documentation": "<p>A two-part error structure that can occur in <code>ListGroupResources</code> or\n <code>SearchResources</code>. </p>"
26212621
}
26222622
},
26232623
"com.amazonaws.resourcegroups#QueryErrorCode": {
@@ -2640,6 +2640,12 @@
26402640
"traits": {
26412641
"smithy.api#enumValue": "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE"
26422642
}
2643+
},
2644+
"RESOURCE_TYPE_NOT_SUPPORTED": {
2645+
"target": "smithy.api#Unit",
2646+
"traits": {
2647+
"smithy.api#enumValue": "RESOURCE_TYPE_NOT_SUPPORTED"
2648+
}
26432649
}
26442650
}
26452651
},
@@ -2922,7 +2928,7 @@
29222928
"QueryErrors": {
29232929
"target": "com.amazonaws.resourcegroups#QueryErrorList",
29242930
"traits": {
2925-
"smithy.api#documentation": "<p>A list of <code>QueryError</code> objects. Each error is an object that contains\n <code>ErrorCode</code> and <code>Message</code> structures.</p>\n <p>Possible values for <code>ErrorCode</code>:</p>\n <ul>\n <li>\n <p>\n <code>CLOUDFORMATION_STACK_INACTIVE</code>\n </p>\n </li>\n <li>\n <p>\n <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>\n </p>\n </li>\n </ul>"
2931+
"smithy.api#documentation": "<p>A list of <code>QueryError</code> objects. Each error contains an \n <code>ErrorCode</code> and <code>Message</code>.</p>\n <p>Possible values for <code>ErrorCode</code>:</p>\n <ul>\n <li>\n <p>\n <code>CLOUDFORMATION_STACK_INACTIVE</code>\n </p>\n </li>\n <li>\n <p>\n <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>\n </p>\n </li>\n <li>\n <p>\n <code>CLOUDFORMATION_STACK_UNASSUMABLE_ROLE </code>\n </p>\n </li>\n </ul>"
29262932
}
29272933
}
29282934
},

0 commit comments

Comments
 (0)