Skip to content

Commit dc13e07

Browse files
author
awstools
committed
feat(client-inspector2): Extend inspector2 service model to include ServiceQuotaExceededException.
1 parent 48054dc commit dc13e07

File tree

4 files changed

+46
-33
lines changed

4 files changed

+46
-33
lines changed

clients/client-inspector2/src/commands/AssociateMemberCommand.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ export interface AssociateMemberCommandInput extends AssociateMemberRequest {}
2828
export interface AssociateMemberCommandOutput extends AssociateMemberResponse, __MetadataBearer {}
2929

3030
/**
31-
* <p>Associates an Amazon Web Services account with an Amazon Inspector delegated administrator. An HTTP 200 response indicates the association was successfully started, but doesn’t indicate whether it was completed. You can check if the association completed by using <a href="https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListMembers.html">ListMembers</a> for multiple accounts or <a href="https://docs.aws.amazon.com/inspector/v2/APIReference/API_GetMember.html">GetMembers</a> for a single account.</p>
31+
* <p>
32+
* Associates an Amazon Web Services account with an Amazon Inspector delegated administrator.
33+
* An HTTP 200 response indicates the association was started but doesn’t indicate whether it completed.
34+
* You can check if the association completed using <a href="https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListMembers.html">ListMembers</a> for multiple accounts or <a href="https://docs.aws.amazon.com/inspector/v2/APIReference/API_GetMember.html">GetMembers</a> for a single account.
35+
* An HTTP 402 response indicates the association failed because the organization size exceeded its limit.
36+
* For information on limits, see <a href="https://docs.aws.amazon.com/inspector/latest/user/quotas.html">Amazon Inspector quotas</a>.
37+
* </p>
3238
* @example
3339
* Use a bare-bones client and the command you need to make an API call.
3440
* ```javascript
@@ -58,6 +64,10 @@ export interface AssociateMemberCommandOutput extends AssociateMemberResponse, _
5864
* @throws {@link InternalServerException} (server fault)
5965
* <p>The request has failed due to an internal failure of the Amazon Inspector service.</p>
6066
*
67+
* @throws {@link ServiceQuotaExceededException} (client fault)
68+
* <p>You have exceeded your service quota. To perform the requested action, remove some of
69+
* the relevant resources, or use Service Quotas to request a service quota increase.</p>
70+
*
6171
* @throws {@link ThrottlingException} (client fault)
6272
* <p>The limit on the number of requests per second was exceeded.</p>
6373
*

clients/client-inspector2/src/models/models_0.ts

+28-28
Original file line numberDiff line numberDiff line change
@@ -1990,6 +1990,34 @@ export class InternalServerException extends __BaseException {
19901990
}
19911991
}
19921992

1993+
/**
1994+
* <p>You have exceeded your service quota. To perform the requested action, remove some of
1995+
* the relevant resources, or use Service Quotas to request a service quota increase.</p>
1996+
* @public
1997+
*/
1998+
export class ServiceQuotaExceededException extends __BaseException {
1999+
readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException";
2000+
readonly $fault: "client" = "client";
2001+
/**
2002+
* <p>The ID of the resource that exceeds a service quota.</p>
2003+
* @public
2004+
*/
2005+
resourceId: string | undefined;
2006+
2007+
/**
2008+
* @internal
2009+
*/
2010+
constructor(opts: __ExceptionOptionType<ServiceQuotaExceededException, __BaseException>) {
2011+
super({
2012+
name: "ServiceQuotaExceededException",
2013+
$fault: "client",
2014+
...opts,
2015+
});
2016+
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
2017+
this.resourceId = opts.resourceId;
2018+
}
2019+
}
2020+
19932021
/**
19942022
* <p>The limit on the number of requests per second was exceeded.</p>
19952023
* @public
@@ -5584,34 +5612,6 @@ export interface CreateFilterResponse {
55845612
arn: string | undefined;
55855613
}
55865614

5587-
/**
5588-
* <p>You have exceeded your service quota. To perform the requested action, remove some of
5589-
* the relevant resources, or use Service Quotas to request a service quota increase.</p>
5590-
* @public
5591-
*/
5592-
export class ServiceQuotaExceededException extends __BaseException {
5593-
readonly name: "ServiceQuotaExceededException" = "ServiceQuotaExceededException";
5594-
readonly $fault: "client" = "client";
5595-
/**
5596-
* <p>The ID of the resource that exceeds a service quota.</p>
5597-
* @public
5598-
*/
5599-
resourceId: string | undefined;
5600-
5601-
/**
5602-
* @internal
5603-
*/
5604-
constructor(opts: __ExceptionOptionType<ServiceQuotaExceededException, __BaseException>) {
5605-
super({
5606-
name: "ServiceQuotaExceededException",
5607-
$fault: "client",
5608-
...opts,
5609-
});
5610-
Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
5611-
this.resourceId = opts.resourceId;
5612-
}
5613-
}
5614-
56155615
/**
56165616
* @public
56175617
* @enum

clients/client-inspector2/src/protocols/Aws_restJson1.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2910,6 +2910,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
29102910
case "InternalServerException":
29112911
case "com.amazonaws.inspector2#InternalServerException":
29122912
throw await de_InternalServerExceptionRes(parsedOutput, context);
2913+
case "ServiceQuotaExceededException":
2914+
case "com.amazonaws.inspector2#ServiceQuotaExceededException":
2915+
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
29132916
case "ThrottlingException":
29142917
case "com.amazonaws.inspector2#ThrottlingException":
29152918
throw await de_ThrottlingExceptionRes(parsedOutput, context);
@@ -2922,9 +2925,6 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext):
29222925
case "BadRequestException":
29232926
case "com.amazonaws.inspector2#BadRequestException":
29242927
throw await de_BadRequestExceptionRes(parsedOutput, context);
2925-
case "ServiceQuotaExceededException":
2926-
case "com.amazonaws.inspector2#ServiceQuotaExceededException":
2927-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
29282928
case "ConflictException":
29292929
case "com.amazonaws.inspector2#ConflictException":
29302930
throw await de_ConflictExceptionRes(parsedOutput, context);

codegen/sdk-codegen/aws-models/inspector2.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,9 @@
599599
{
600600
"target": "com.amazonaws.inspector2#InternalServerException"
601601
},
602+
{
603+
"target": "com.amazonaws.inspector2#ServiceQuotaExceededException"
604+
},
602605
{
603606
"target": "com.amazonaws.inspector2#ThrottlingException"
604607
},
@@ -607,7 +610,7 @@
607610
}
608611
],
609612
"traits": {
610-
"smithy.api#documentation": "<p>Associates an Amazon Web Services account with an Amazon Inspector delegated administrator. An HTTP 200 response indicates the association was successfully started, but doesn’t indicate whether it was completed. You can check if the association completed by using <a href=\"https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListMembers.html\">ListMembers</a> for multiple accounts or <a href=\"https://docs.aws.amazon.com/inspector/v2/APIReference/API_GetMember.html\">GetMembers</a> for a single account.</p>",
613+
"smithy.api#documentation": "<p>\n Associates an Amazon Web Services account with an Amazon Inspector delegated administrator. \n An HTTP 200 response indicates the association was started but doesn’t indicate whether it completed. \n You can check if the association completed using <a href=\"https://docs.aws.amazon.com/inspector/v2/APIReference/API_ListMembers.html\">ListMembers</a> for multiple accounts or <a href=\"https://docs.aws.amazon.com/inspector/v2/APIReference/API_GetMember.html\">GetMembers</a> for a single account. \n An HTTP 402 response indicates the association failed because the organization size exceeded its limit. \n For information on limits, see <a href=\"https://docs.aws.amazon.com/inspector/latest/user/quotas.html\">Amazon Inspector quotas</a>.\n </p>",
611614
"smithy.api#http": {
612615
"code": 200,
613616
"method": "POST",

0 commit comments

Comments
 (0)