Skip to content

Commit

Permalink
feat(client-resource-groups): Added a new QueryErrorCode RESOURCE_TYP…
Browse files Browse the repository at this point in the history
…E_NOT_SUPPORTED that is returned by the ListGroupResources operation if the group query contains unsupported resource types.
  • Loading branch information
awstools committed Apr 5, 2024
1 parent a837f79 commit 73a6573
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 32 deletions.
Expand Up @@ -98,7 +98,7 @@ export interface ListGroupResourcesCommandOutput extends ListGroupResourcesOutpu
* // NextToken: "STRING_VALUE",
* // QueryErrors: [ // QueryErrorList
* // { // QueryError
* // ErrorCode: "CLOUDFORMATION_STACK_INACTIVE" || "CLOUDFORMATION_STACK_NOT_EXISTING" || "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE",
* // ErrorCode: "CLOUDFORMATION_STACK_INACTIVE" || "CLOUDFORMATION_STACK_NOT_EXISTING" || "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE" || "RESOURCE_TYPE_NOT_SUPPORTED",
* // Message: "STRING_VALUE",
* // },
* // ],
Expand Down
Expand Up @@ -82,7 +82,7 @@ export interface SearchResourcesCommandOutput extends SearchResourcesOutput, __M
* // NextToken: "STRING_VALUE",
* // QueryErrors: [ // QueryErrorList
* // { // QueryError
* // ErrorCode: "CLOUDFORMATION_STACK_INACTIVE" || "CLOUDFORMATION_STACK_NOT_EXISTING" || "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE",
* // ErrorCode: "CLOUDFORMATION_STACK_INACTIVE" || "CLOUDFORMATION_STACK_NOT_EXISTING" || "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE" || "RESOURCE_TYPE_NOT_SUPPORTED",
* // Message: "STRING_VALUE",
* // },
* // ],
Expand Down
65 changes: 41 additions & 24 deletions clients/client-resource-groups/src/models/models_0.ts
Expand Up @@ -307,8 +307,9 @@ export interface CreateGroupInput {
* <p>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 <code>AWS</code> or <code>aws</code>; these are reserved. A resource group name
* must be unique within each Amazon Web Services Region in your Amazon Web Services account.</p>
* with <code>AWS</code>, <code>aws</code>, or any other possible capitalization; these are
* reserved. A resource group name must be unique within each Amazon Web Services Region in your Amazon Web Services
* account.</p>
* @public
*/
Name: string | undefined;
Expand Down Expand Up @@ -973,6 +974,7 @@ export const QueryErrorCode = {
CLOUDFORMATION_STACK_INACTIVE: "CLOUDFORMATION_STACK_INACTIVE",
CLOUDFORMATION_STACK_NOT_EXISTING: "CLOUDFORMATION_STACK_NOT_EXISTING",
CLOUDFORMATION_STACK_UNASSUMABLE_ROLE: "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE",
RESOURCE_TYPE_NOT_SUPPORTED: "RESOURCE_TYPE_NOT_SUPPORTED",
} as const;

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

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

/**
* <p>A message that explains the <code>ErrorCode</code> value. Messages might state that
* the specified CloudFront stack does not exist (or no longer exists). For
* <code>CLOUDFORMATION_STACK_INACTIVE</code>, the message typically states that the
* CloudFront stack has a status that is not (or no longer) active, such as
* <code>CREATE_FAILED</code>.</p>
* <p>A message that explains the <code>ErrorCode</code>. </p>
* @public
*/
Message?: string;
Expand Down Expand Up @@ -1115,10 +1109,10 @@ export interface ListGroupResourcesOutput {
NextToken?: string;

/**
* <p>A list of <code>QueryError</code> objects. Each error is an object that contains
* <code>ErrorCode</code> and <code>Message</code> structures. Possible values for
* <code>ErrorCode</code> are <code>CLOUDFORMATION_STACK_INACTIVE</code> and
* <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>.</p>
* <p>A list of <code>QueryError</code> objects. Each error contains an
* <code>ErrorCode</code> and <code>Message</code>. Possible values for
* ErrorCode are <code>CLOUDFORMATION_STACK_INACTIVE</code>, <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>,
* <code>CLOUDFORMATION_STACK_UNASSUMABLE_ROLE</code> and <code>RESOURCE_TYPE_NOT_SUPPORTED</code>. </p>
* @public
*/
QueryErrors?: QueryError[];
Expand Down Expand Up @@ -1191,12 +1185,10 @@ export interface ListGroupsInput {
* <ul>
* <li>
* <p>
* <code>resource-type</code> - Filter the results to include only those of the
* specified resource types. Specify up to five resource types in the format
* <code>AWS::<i>ServiceCode</i>::<i>ResourceType</i>
* </code>.
* For example, <code>AWS::EC2::Instance</code>, or
* <code>AWS::S3::Bucket</code>.</p>
* <code>resource-type</code> - Filter the results to include only those resource groups that have the specified
* resource type in their <code>ResourceTypeFilter</code>. For example, <code>AWS::EC2::Instance</code> would
* return any resource group with a <code>ResourceTypeFilter</code> that includes
* <code>AWS::EC2::Instance</code>.</p>
* </li>
* <li>
* <p>
Expand All @@ -1206,6 +1198,21 @@ export interface ListGroupsInput {
* <ul>
* <li>
* <p>
* <code>AWS::AppRegistry::Application</code>
* </p>
* </li>
* <li>
* <p>
* <code>AWS::AppRegistry::ApplicationResourceGroups</code>
* </p>
* </li>
* <li>
* <p>
* <code>AWS::CloudFormation::Stack</code>
* </p>
* </li>
* <li>
* <p>
* <code>AWS::EC2::CapacityReservationPool</code>
* </p>
* </li>
Expand All @@ -1214,6 +1221,11 @@ export interface ListGroupsInput {
* <code>AWS::EC2::HostManagement</code>
* </p>
* </li>
* <li>
* <p>
* <code>AWS::NetworkFirewall::RuleGroup</code>
* </p>
* </li>
* </ul>
* </li>
* </ul>
Expand Down Expand Up @@ -1385,8 +1397,8 @@ export interface SearchResourcesOutput {
NextToken?: string;

/**
* <p>A list of <code>QueryError</code> objects. Each error is an object that contains
* <code>ErrorCode</code> and <code>Message</code> structures.</p>
* <p>A list of <code>QueryError</code> objects. Each error contains an
* <code>ErrorCode</code> and <code>Message</code>.</p>
* <p>Possible values for <code>ErrorCode</code>:</p>
* <ul>
* <li>
Expand All @@ -1399,6 +1411,11 @@ export interface SearchResourcesOutput {
* <code>CLOUDFORMATION_STACK_NOT_EXISTING</code>
* </p>
* </li>
* <li>
* <p>
* <code>CLOUDFORMATION_STACK_UNASSUMABLE_ROLE </code>
* </p>
* </li>
* </ul>
* @public
*/
Expand Down
18 changes: 12 additions & 6 deletions codegen/sdk-codegen/aws-models/resource-groups.json
Expand Up @@ -1187,7 +1187,7 @@
"Name": {
"target": "com.amazonaws.resourcegroups#GroupName",
"traits": {
"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>",
"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>",
"smithy.api#required": {}
}
},
Expand Down Expand Up @@ -2356,7 +2356,7 @@
"QueryErrors": {
"target": "com.amazonaws.resourcegroups#QueryErrorList",
"traits": {
"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>"
"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>"
}
}
},
Expand Down Expand Up @@ -2410,7 +2410,7 @@
"Filters": {
"target": "com.amazonaws.resourcegroups#GroupFilterList",
"traits": {
"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>"
"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>"
}
},
"MaxResults": {
Expand Down Expand Up @@ -2612,12 +2612,12 @@
"Message": {
"target": "com.amazonaws.resourcegroups#QueryErrorMessage",
"traits": {
"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>"
"smithy.api#documentation": "<p>A message that explains the <code>ErrorCode</code>. </p>"
}
}
},
"traits": {
"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>"
"smithy.api#documentation": "<p>A two-part error structure that can occur in <code>ListGroupResources</code> or\n <code>SearchResources</code>. </p>"
}
},
"com.amazonaws.resourcegroups#QueryErrorCode": {
Expand All @@ -2640,6 +2640,12 @@
"traits": {
"smithy.api#enumValue": "CLOUDFORMATION_STACK_UNASSUMABLE_ROLE"
}
},
"RESOURCE_TYPE_NOT_SUPPORTED": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "RESOURCE_TYPE_NOT_SUPPORTED"
}
}
}
},
Expand Down Expand Up @@ -2922,7 +2928,7 @@
"QueryErrors": {
"target": "com.amazonaws.resourcegroups#QueryErrorList",
"traits": {
"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>"
"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>"
}
}
},
Expand Down

0 comments on commit 73a6573

Please sign in to comment.