Skip to content

Commit

Permalink
feat(client-rbin): Added resource identifier in the output and update…
Browse files Browse the repository at this point in the history
…d error handling.
  • Loading branch information
awstools committed Dec 1, 2023
1 parent 9e3bde9 commit b960b65
Show file tree
Hide file tree
Showing 13 changed files with 97 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clients/client-rbin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ expires. After you restore a resource from the Recycle Bin, the resource is remo
Recycle Bin, and you can then use it in the same way you use any other resource of that type
in your account. If the retention period expires and the resource is not restored, the resource
is permanently deleted from the Recycle Bin and is no longer available for recovery. For more
information about Recycle Bin, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-recycle-bin.html">
information about Recycle Bin, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">
Recycle Bin</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>

## Installing
Expand Down
2 changes: 1 addition & 1 deletion clients/client-rbin/src/Rbin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export interface Rbin {
* Recycle Bin, and you can then use it in the same way you use any other resource of that type
* in your account. If the retention period expires and the resource is not restored, the resource
* is permanently deleted from the Recycle Bin and is no longer available for recovery. For more
* information about Recycle Bin, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-recycle-bin.html">
* information about Recycle Bin, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">
* Recycle Bin</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
*/
export class Rbin extends RbinClient implements Rbin {}
Expand Down
2 changes: 1 addition & 1 deletion clients/client-rbin/src/RbinClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export interface RbinClientResolvedConfig extends RbinClientResolvedConfigType {
* Recycle Bin, and you can then use it in the same way you use any other resource of that type
* in your account. If the retention period expires and the resource is not restored, the resource
* is permanently deleted from the Recycle Bin and is no longer available for recovery. For more
* information about Recycle Bin, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-recycle-bin.html">
* information about Recycle Bin, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">
* Recycle Bin</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
*/
export class RbinClient extends __Client<
Expand Down
1 change: 1 addition & 0 deletions clients/client-rbin/src/commands/CreateRuleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export interface CreateRuleCommandOutput extends CreateRuleResponse, __MetadataB
* // },
* // },
* // LockState: "locked" || "pending_unlock" || "unlocked",
* // RuleArn: "STRING_VALUE",
* // };
*
* ```
Expand Down
1 change: 1 addition & 0 deletions clients/client-rbin/src/commands/GetRuleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export interface GetRuleCommandOutput extends GetRuleResponse, __MetadataBearer
* // },
* // LockState: "locked" || "pending_unlock" || "unlocked",
* // LockEndTime: new Date("TIMESTAMP"),
* // RuleArn: "STRING_VALUE",
* // };
*
* ```
Expand Down
1 change: 1 addition & 0 deletions clients/client-rbin/src/commands/ListRulesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export interface ListRulesCommandOutput extends ListRulesResponse, __MetadataBea
* // RetentionPeriodUnit: "DAYS", // required
* // },
* // LockState: "locked" || "pending_unlock" || "unlocked",
* // RuleArn: "STRING_VALUE",
* // },
* // ],
* // NextToken: "STRING_VALUE",
Expand Down
1 change: 1 addition & 0 deletions clients/client-rbin/src/commands/LockRuleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export interface LockRuleCommandOutput extends LockRuleResponse, __MetadataBeare
* // },
* // },
* // LockState: "locked" || "pending_unlock" || "unlocked",
* // RuleArn: "STRING_VALUE",
* // };
*
* ```
Expand Down
1 change: 1 addition & 0 deletions clients/client-rbin/src/commands/UnlockRuleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface UnlockRuleCommandOutput extends UnlockRuleResponse, __MetadataB
* // },
* // LockState: "locked" || "pending_unlock" || "unlocked",
* // LockEndTime: new Date("TIMESTAMP"),
* // RuleArn: "STRING_VALUE",
* // };
*
* ```
Expand Down
4 changes: 4 additions & 0 deletions clients/client-rbin/src/commands/UpdateRuleCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export interface UpdateRuleCommandOutput extends UpdateRuleResponse, __MetadataB
* // Status: "pending" || "available",
* // LockState: "locked" || "pending_unlock" || "unlocked",
* // LockEndTime: new Date("TIMESTAMP"),
* // RuleArn: "STRING_VALUE",
* // };
*
* ```
Expand All @@ -100,6 +101,9 @@ export interface UpdateRuleCommandOutput extends UpdateRuleResponse, __MetadataB
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource was not found.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* <p>The request would cause a service quota for the number of tags per resource to be exceeded.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>One or more of the parameters in the request is not valid.</p>
*
Expand Down
2 changes: 1 addition & 1 deletion clients/client-rbin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Recycle Bin, and you can then use it in the same way you use any other resource of that type
* in your account. If the retention period expires and the resource is not restored, the resource
* is permanently deleted from the Recycle Bin and is no longer available for recovery. For more
* information about Recycle Bin, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-recycle-bin.html">
* information about Recycle Bin, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html">
* Recycle Bin</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>
*
* @packageDocumentation
Expand Down
36 changes: 36 additions & 0 deletions clients/client-rbin/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ export interface CreateRuleResponse {
* </ul>
*/
LockState?: LockState;

/**
* @public
* <p>The Amazon Resource Name (ARN) of the retention rule.</p>
*/
RuleArn?: string;
}

/**
Expand Down Expand Up @@ -597,6 +603,12 @@ export interface GetRuleResponse {
* delay period.</p>
*/
LockEndTime?: Date;

/**
* @public
* <p>The Amazon Resource Name (ARN) of the retention rule.</p>
*/
RuleArn?: string;
}

/**
Expand Down Expand Up @@ -692,6 +704,12 @@ export interface RuleSummary {
* </ul>
*/
LockState?: LockState;

/**
* @public
* <p>The Amazon Resource Name (ARN) of the retention rule.</p>
*/
RuleArn?: string;
}

/**
Expand Down Expand Up @@ -826,6 +844,12 @@ export interface LockRuleResponse {
* </ul>
*/
LockState?: LockState;

/**
* @public
* <p>The Amazon Resource Name (ARN) of the retention rule.</p>
*/
RuleArn?: string;
}

/**
Expand Down Expand Up @@ -945,6 +969,12 @@ export interface UnlockRuleResponse {
* delay period.</p>
*/
LockEndTime?: Date;

/**
* @public
* <p>The Amazon Resource Name (ARN) of the retention rule.</p>
*/
RuleArn?: string;
}

/**
Expand Down Expand Up @@ -1092,4 +1122,10 @@ export interface UpdateRuleResponse {
* delay period.</p>
*/
LockEndTime?: Date;

/**
* @public
* <p>The Amazon Resource Name (ARN) of the retention rule.</p>
*/
RuleArn?: string;
}
8 changes: 8 additions & 0 deletions clients/client-rbin/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ export const de_CreateRuleCommand = async (
ResourceTags: _json,
ResourceType: __expectString,
RetentionPeriod: _json,
RuleArn: __expectString,
Status: __expectString,
Tags: _json,
});
Expand Down Expand Up @@ -467,6 +468,7 @@ export const de_GetRuleCommand = async (
ResourceTags: _json,
ResourceType: __expectString,
RetentionPeriod: _json,
RuleArn: __expectString,
Status: __expectString,
});
Object.assign(contents, doc);
Expand Down Expand Up @@ -631,6 +633,7 @@ export const de_LockRuleCommand = async (
ResourceTags: _json,
ResourceType: __expectString,
RetentionPeriod: _json,
RuleArn: __expectString,
Status: __expectString,
});
Object.assign(contents, doc);
Expand Down Expand Up @@ -747,6 +750,7 @@ export const de_UnlockRuleCommand = async (
ResourceTags: _json,
ResourceType: __expectString,
RetentionPeriod: _json,
RuleArn: __expectString,
Status: __expectString,
});
Object.assign(contents, doc);
Expand Down Expand Up @@ -859,6 +863,7 @@ export const de_UpdateRuleCommand = async (
ResourceTags: _json,
ResourceType: __expectString,
RetentionPeriod: _json,
RuleArn: __expectString,
Status: __expectString,
});
Object.assign(contents, doc);
Expand Down Expand Up @@ -887,6 +892,9 @@ const de_UpdateRuleCommandError = async (
case "ResourceNotFoundException":
case "com.amazonaws.rbin#ResourceNotFoundException":
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
case "ServiceQuotaExceededException":
case "com.amazonaws.rbin#ServiceQuotaExceededException":
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
case "ValidationException":
case "com.amazonaws.rbin#ValidationException":
throw await de_ValidationExceptionRes(parsedOutput, context);
Expand Down
41 changes: 40 additions & 1 deletion codegen/sdk-codegen/aws-models/rbin.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"name": "rbin"
},
"aws.protocols#restJson1": {},
"smithy.api#documentation": "<p>This is the <i>Recycle Bin API Reference</i>. This documentation provides \n descriptions and syntax for each of the actions and data types in Recycle Bin.</p>\n <p>Recycle Bin is a resource recovery feature that enables you to restore accidentally \n deleted snapshots and EBS-backed AMIs. When using Recycle Bin, if your resources are \n deleted, they are retained in the Recycle Bin for a time period that you specify.</p>\n <p>You can restore a resource from the Recycle Bin at any time before its retention period \n expires. After you restore a resource from the Recycle Bin, the resource is removed from the \n Recycle Bin, and you can then use it in the same way you use any other resource of that type \n in your account. If the retention period expires and the resource is not restored, the resource \n is permanently deleted from the Recycle Bin and is no longer available for recovery. For more \n information about Recycle Bin, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-recycle-bin.html\">\n Recycle Bin</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>",
"smithy.api#documentation": "<p>This is the <i>Recycle Bin API Reference</i>. This documentation provides \n descriptions and syntax for each of the actions and data types in Recycle Bin.</p>\n <p>Recycle Bin is a resource recovery feature that enables you to restore accidentally \n deleted snapshots and EBS-backed AMIs. When using Recycle Bin, if your resources are \n deleted, they are retained in the Recycle Bin for a time period that you specify.</p>\n <p>You can restore a resource from the Recycle Bin at any time before its retention period \n expires. After you restore a resource from the Recycle Bin, the resource is removed from the \n Recycle Bin, and you can then use it in the same way you use any other resource of that type \n in your account. If the retention period expires and the resource is not restored, the resource \n is permanently deleted from the Recycle Bin and is no longer available for recovery. For more \n information about Recycle Bin, see <a href=\"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html\">\n Recycle Bin</a> in the <i>Amazon Elastic Compute Cloud User Guide</i>.</p>",
"smithy.api#title": "Amazon Recycle Bin",
"smithy.rules#endpointRuleSet": {
"version": "1.0",
Expand Down Expand Up @@ -1125,6 +1125,12 @@
"traits": {
"smithy.api#documentation": "<p>The lock state for the retention rule.</p>\n <ul>\n <li>\n <p>\n <code>locked</code> - The retention rule is locked and can't be modified or deleted.</p>\n </li>\n <li>\n <p>\n <code>pending_unlock</code> - The retention rule has been unlocked but it is still within \n the unlock delay period. The retention rule can be modified or deleted only after the unlock \n delay period has expired.</p>\n </li>\n <li>\n <p>\n <code>unlocked</code> - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.</p>\n </li>\n <li>\n <p>\n <code>null</code> - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the <code>locked</code> and <code>unlocked</code> states \n only; it can never transition back to <code>null</code>.</p>\n </li>\n </ul>"
}
},
"RuleArn": {
"target": "com.amazonaws.rbin#RuleArn",
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the retention rule.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -1294,6 +1300,12 @@
"traits": {
"smithy.api#documentation": "<p>The date and time at which the unlock delay is set to expire. Only returned \n for retention rules that have been unlocked and that are still within the unlock \n delay period.</p>"
}
},
"RuleArn": {
"target": "com.amazonaws.rbin#RuleArn",
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the retention rule.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -1577,6 +1589,12 @@
"traits": {
"smithy.api#documentation": "<p>The lock state for the retention rule.</p>\n <ul>\n <li>\n <p>\n <code>locked</code> - The retention rule is locked and can't be modified or deleted.</p>\n </li>\n <li>\n <p>\n <code>pending_unlock</code> - The retention rule has been unlocked but it is still within \n the unlock delay period. The retention rule can be modified or deleted only after the unlock \n delay period has expired.</p>\n </li>\n <li>\n <p>\n <code>unlocked</code> - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.</p>\n </li>\n <li>\n <p>\n <code>null</code> - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the <code>locked</code> and <code>unlocked</code> states \n only; it can never transition back to <code>null</code>.</p>\n </li>\n </ul>"
}
},
"RuleArn": {
"target": "com.amazonaws.rbin#RuleArn",
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the retention rule.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -1814,6 +1832,12 @@
"traits": {
"smithy.api#documentation": "<p>The lock state for the retention rule.</p>\n <ul>\n <li>\n <p>\n <code>locked</code> - The retention rule is locked and can't be modified or deleted.</p>\n </li>\n <li>\n <p>\n <code>pending_unlock</code> - The retention rule has been unlocked but it is still within \n the unlock delay period. The retention rule can be modified or deleted only after the unlock \n delay period has expired.</p>\n </li>\n <li>\n <p>\n <code>unlocked</code> - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.</p>\n </li>\n <li>\n <p>\n <code>null</code> - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the <code>locked</code> and <code>unlocked</code> states \n only; it can never transition back to <code>null</code>.</p>\n </li>\n </ul>"
}
},
"RuleArn": {
"target": "com.amazonaws.rbin#RuleArn",
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the retention rule.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2128,6 +2152,12 @@
"traits": {
"smithy.api#documentation": "<p>The date and time at which the unlock delay is set to expire. Only returned \n for retention rules that have been unlocked and that are still within the unlock \n delay period.</p>"
}
},
"RuleArn": {
"target": "com.amazonaws.rbin#RuleArn",
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the retention rule.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2211,6 +2241,9 @@
{
"target": "com.amazonaws.rbin#ResourceNotFoundException"
},
{
"target": "com.amazonaws.rbin#ServiceQuotaExceededException"
},
{
"target": "com.amazonaws.rbin#ValidationException"
}
Expand Down Expand Up @@ -2311,6 +2344,12 @@
"traits": {
"smithy.api#documentation": "<p>The date and time at which the unlock delay is set to expire. Only returned \n for retention rules that have been unlocked and that are still within the unlock \n delay period.</p>"
}
},
"RuleArn": {
"target": "com.amazonaws.rbin#RuleArn",
"traits": {
"smithy.api#documentation": "<p>The Amazon Resource Name (ARN) of the retention rule.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit b960b65

Please sign in to comment.