diff --git a/clients/client-rbin/src/Rbin.ts b/clients/client-rbin/src/Rbin.ts index 36dc62d199f3..59c2669dc836 100644 --- a/clients/client-rbin/src/Rbin.ts +++ b/clients/client-rbin/src/Rbin.ts @@ -10,7 +10,9 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "./commands/ListTagsForResourceCommand"; +import { LockRuleCommand, LockRuleCommandInput, LockRuleCommandOutput } from "./commands/LockRuleCommand"; import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UnlockRuleCommand, UnlockRuleCommandInput, UnlockRuleCommandOutput } from "./commands/UnlockRuleCommand"; import { UntagResourceCommand, UntagResourceCommandInput, @@ -174,6 +176,32 @@ export class Rbin extends RbinClient { } } + /** + *

Locks a retention rule. A locked retention rule can't be modified or deleted.

+ */ + public lockRule(args: LockRuleCommandInput, options?: __HttpHandlerOptions): Promise; + public lockRule(args: LockRuleCommandInput, cb: (err: any, data?: LockRuleCommandOutput) => void): void; + public lockRule( + args: LockRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: LockRuleCommandOutput) => void + ): void; + public lockRule( + args: LockRuleCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: LockRuleCommandOutput) => void), + cb?: (err: any, data?: LockRuleCommandOutput) => void + ): Promise | void { + const command = new LockRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Assigns tags to the specified retention rule.

*/ @@ -200,6 +228,33 @@ export class Rbin extends RbinClient { } } + /** + *

Unlocks a retention rule. After a retention rule is unlocked, it can be modified or deleted + * only after the unlock delay period expires.

+ */ + public unlockRule(args: UnlockRuleCommandInput, options?: __HttpHandlerOptions): Promise; + public unlockRule(args: UnlockRuleCommandInput, cb: (err: any, data?: UnlockRuleCommandOutput) => void): void; + public unlockRule( + args: UnlockRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UnlockRuleCommandOutput) => void + ): void; + public unlockRule( + args: UnlockRuleCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UnlockRuleCommandOutput) => void), + cb?: (err: any, data?: UnlockRuleCommandOutput) => void + ): Promise | void { + const command = new UnlockRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + /** *

Unassigns a tag from a retention rule.

*/ @@ -233,7 +288,9 @@ export class Rbin extends RbinClient { } /** - *

Updates an existing Recycle Bin retention rule. For more information, see + *

Updates an existing Recycle Bin retention rule. You can update a retention rule's description, + * resource tags, and retention period at any time after creation. You can't update a retention rule's + * resource type after creation. For more information, see * Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.

*/ public updateRule(args: UpdateRuleCommandInput, options?: __HttpHandlerOptions): Promise; diff --git a/clients/client-rbin/src/RbinClient.ts b/clients/client-rbin/src/RbinClient.ts index 37979245cd5d..ccde070727fc 100644 --- a/clients/client-rbin/src/RbinClient.ts +++ b/clients/client-rbin/src/RbinClient.ts @@ -55,7 +55,9 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "./commands/ListTagsForResourceCommand"; +import { LockRuleCommandInput, LockRuleCommandOutput } from "./commands/LockRuleCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UnlockRuleCommandInput, UnlockRuleCommandOutput } from "./commands/UnlockRuleCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { UpdateRuleCommandInput, UpdateRuleCommandOutput } from "./commands/UpdateRuleCommand"; import { @@ -72,7 +74,9 @@ export type ServiceInputTypes = | GetRuleCommandInput | ListRulesCommandInput | ListTagsForResourceCommandInput + | LockRuleCommandInput | TagResourceCommandInput + | UnlockRuleCommandInput | UntagResourceCommandInput | UpdateRuleCommandInput; @@ -82,7 +86,9 @@ export type ServiceOutputTypes = | GetRuleCommandOutput | ListRulesCommandOutput | ListTagsForResourceCommandOutput + | LockRuleCommandOutput | TagResourceCommandOutput + | UnlockRuleCommandOutput | UntagResourceCommandOutput | UpdateRuleCommandOutput; diff --git a/clients/client-rbin/src/commands/LockRuleCommand.ts b/clients/client-rbin/src/commands/LockRuleCommand.ts new file mode 100644 index 000000000000..5b4570553a74 --- /dev/null +++ b/clients/client-rbin/src/commands/LockRuleCommand.ts @@ -0,0 +1,108 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + LockRuleRequest, + LockRuleRequestFilterSensitiveLog, + LockRuleResponse, + LockRuleResponseFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_restJson1LockRuleCommand, + serializeAws_restJson1LockRuleCommand, +} from "../protocols/Aws_restJson1"; +import { RbinClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RbinClient"; + +export interface LockRuleCommandInput extends LockRuleRequest {} +export interface LockRuleCommandOutput extends LockRuleResponse, __MetadataBearer {} + +/** + *

Locks a retention rule. A locked retention rule can't be modified or deleted.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RbinClient, LockRuleCommand } from "@aws-sdk/client-rbin"; // ES Modules import + * // const { RbinClient, LockRuleCommand } = require("@aws-sdk/client-rbin"); // CommonJS import + * const client = new RbinClient(config); + * const command = new LockRuleCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link LockRuleCommandInput} for command's `input` shape. + * @see {@link LockRuleCommandOutput} for command's `response` shape. + * @see {@link RbinClientResolvedConfig | config} for RbinClient's `config` shape. + * + */ +export class LockRuleCommand extends $Command { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + constructor(readonly input: LockRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RbinClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, LockRuleCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RbinClient"; + const commandName = "LockRuleCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: LockRuleRequestFilterSensitiveLog, + outputFilterSensitiveLog: LockRuleResponseFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: LockRuleCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1LockRuleCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1LockRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rbin/src/commands/UnlockRuleCommand.ts b/clients/client-rbin/src/commands/UnlockRuleCommand.ts new file mode 100644 index 000000000000..8444aef6bf71 --- /dev/null +++ b/clients/client-rbin/src/commands/UnlockRuleCommand.ts @@ -0,0 +1,113 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { + UnlockRuleRequest, + UnlockRuleRequestFilterSensitiveLog, + UnlockRuleResponse, + UnlockRuleResponseFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_restJson1UnlockRuleCommand, + serializeAws_restJson1UnlockRuleCommand, +} from "../protocols/Aws_restJson1"; +import { RbinClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RbinClient"; + +export interface UnlockRuleCommandInput extends UnlockRuleRequest {} +export interface UnlockRuleCommandOutput extends UnlockRuleResponse, __MetadataBearer {} + +/** + *

Unlocks a retention rule. After a retention rule is unlocked, it can be modified or deleted + * only after the unlock delay period expires.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { RbinClient, UnlockRuleCommand } from "@aws-sdk/client-rbin"; // ES Modules import + * // const { RbinClient, UnlockRuleCommand } = require("@aws-sdk/client-rbin"); // CommonJS import + * const client = new RbinClient(config); + * const command = new UnlockRuleCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UnlockRuleCommandInput} for command's `input` shape. + * @see {@link UnlockRuleCommandOutput} for command's `response` shape. + * @see {@link RbinClientResolvedConfig | config} for RbinClient's `config` shape. + * + */ +export class UnlockRuleCommand extends $Command< + UnlockRuleCommandInput, + UnlockRuleCommandOutput, + RbinClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + constructor(readonly input: UnlockRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: RbinClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UnlockRuleCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "RbinClient"; + const commandName = "UnlockRuleCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UnlockRuleRequestFilterSensitiveLog, + outputFilterSensitiveLog: UnlockRuleResponseFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UnlockRuleCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_restJson1UnlockRuleCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_restJson1UnlockRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-rbin/src/commands/UpdateRuleCommand.ts b/clients/client-rbin/src/commands/UpdateRuleCommand.ts index 1c3b5c969a6d..4d8eb78b05ff 100644 --- a/clients/client-rbin/src/commands/UpdateRuleCommand.ts +++ b/clients/client-rbin/src/commands/UpdateRuleCommand.ts @@ -29,7 +29,9 @@ export interface UpdateRuleCommandInput extends UpdateRuleRequest {} export interface UpdateRuleCommandOutput extends UpdateRuleResponse, __MetadataBearer {} /** - *

Updates an existing Recycle Bin retention rule. For more information, see + *

Updates an existing Recycle Bin retention rule. You can update a retention rule's description, + * resource tags, and retention period at any time after creation. You can't update a retention rule's + * resource type after creation. For more information, see * Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.

* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-rbin/src/commands/index.ts b/clients/client-rbin/src/commands/index.ts index 3c60549b8ef3..cd987412526f 100644 --- a/clients/client-rbin/src/commands/index.ts +++ b/clients/client-rbin/src/commands/index.ts @@ -4,6 +4,8 @@ export * from "./DeleteRuleCommand"; export * from "./GetRuleCommand"; export * from "./ListRulesCommand"; export * from "./ListTagsForResourceCommand"; +export * from "./LockRuleCommand"; export * from "./TagResourceCommand"; +export * from "./UnlockRuleCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateRuleCommand"; diff --git a/clients/client-rbin/src/endpoint/EndpointParameters.ts b/clients/client-rbin/src/endpoint/EndpointParameters.ts index 46930fbb6eb9..cec1cf18c971 100644 --- a/clients/client-rbin/src/endpoint/EndpointParameters.ts +++ b/clients/client-rbin/src/endpoint/EndpointParameters.ts @@ -24,7 +24,7 @@ export const resolveClientEndpointParameters = ( }; export interface EndpointParameters extends __EndpointParameters { - Region?: string; + Region: string; UseDualStack?: boolean; UseFIPS?: boolean; Endpoint?: string; diff --git a/clients/client-rbin/src/endpoint/ruleset.ts b/clients/client-rbin/src/endpoint/ruleset.ts index 557dfbb208c7..fb1919c3ad96 100644 --- a/clients/client-rbin/src/endpoint/ruleset.ts +++ b/clients/client-rbin/src/endpoint/ruleset.ts @@ -6,7 +6,7 @@ export const ruleSet: RuleSetObject = { parameters: { Region: { builtIn: "AWS::Region", - required: false, + required: true, documentation: "The AWS region used to dispatch the request.", type: "String", }, diff --git a/clients/client-rbin/src/models/models_0.ts b/clients/client-rbin/src/models/models_0.ts index e2c41b4d9dd8..e21b8d85ac59 100644 --- a/clients/client-rbin/src/models/models_0.ts +++ b/clients/client-rbin/src/models/models_0.ts @@ -3,6 +3,39 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-cl import { RbinServiceException as __BaseException } from "./RbinServiceException"; +export enum UnlockDelayUnit { + DAYS = "DAYS", +} + +/** + *

Information about the retention rule unlock delay. The unlock delay is the period after which + * a retention rule can be modified or edited after it has been unlocked by a user with the required + * permissions. The retention rule can't be modified or deleted during the unlock delay.

+ */ +export interface UnlockDelay { + /** + *

The unlock delay period, measured in the unit specified for + * UnlockDelayUnit.

+ */ + UnlockDelayValue: number | undefined; + + /** + *

The unit of time in which to measure the unlock delay. Currently, the unlock delay can + * be measure only in days.

+ */ + UnlockDelayUnit: UnlockDelayUnit | string | undefined; +} + +/** + *

Information about a retention rule lock configuration.

+ */ +export interface LockConfiguration { + /** + *

Information about the retention rule unlock delay.

+ */ + UnlockDelay: UnlockDelay | undefined; +} + /** *

Information about the resource tags used to identify resources that are retained by the retention * rule.

@@ -94,6 +127,17 @@ export interface CreateRuleRequest { * resource type in the Region in which the rule is created, even if the resources are not tagged.

*/ ResourceTags?: ResourceTag[]; + + /** + *

Information about the retention rule lock configuration.

+ */ + LockConfiguration?: LockConfiguration; +} + +export enum LockState { + LOCKED = "locked", + PENDING_UNLOCK = "pending_unlock", + UNLOCKED = "unlocked", } export enum RuleStatus { @@ -138,6 +182,39 @@ export interface CreateRuleResponse { * state retain resources.

*/ Status?: RuleStatus | string; + + /** + *

Information about the retention rule lock configuration.

+ */ + LockConfiguration?: LockConfiguration; + + /** + *

The lock state for the retention rule.

+ *
    + *
  • + *

    + * locked - The retention rule is locked and can't be modified or deleted.

    + *
  • + *
  • + *

    + * pending_unlock - The retention rule has been unlocked but it is still within + * the unlock delay period. The retention rule can be modified or deleted only after the unlock + * delay period has expired.

    + *
  • + *
  • + *

    + * unlocked - The retention rule is unlocked and it can be modified or deleted by + * any user with the required permissions.

    + *
  • + *
  • + *

    + * null - The retention rule has never been locked. Once a retention rule has + * been locked, it can transition between the locked and unlocked states + * only; it can never transition back to null.

    + *
  • + *
+ */ + LockState?: LockState | string; } /** @@ -222,6 +299,36 @@ export class ValidationException extends __BaseException { } } +export enum ConflictExceptionReason { + INVALID_RULE_STATE = "INVALID_RULE_STATE", +} + +/** + *

The specified retention rule lock request can't be completed.

+ */ +export class ConflictException extends __BaseException { + readonly name: "ConflictException" = "ConflictException"; + readonly $fault: "client" = "client"; + Message?: string; + /** + *

The reason for the exception.

+ */ + Reason?: ConflictExceptionReason | string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ConflictException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConflictException.prototype); + this.Message = opts.Message; + this.Reason = opts.Reason; + } +} + export interface DeleteRuleRequest { /** *

The unique ID of the retention rule.

@@ -300,6 +407,46 @@ export interface GetRuleResponse { * state retain resources.

*/ Status?: RuleStatus | string; + + /** + *

Information about the retention rule lock configuration.

+ */ + LockConfiguration?: LockConfiguration; + + /** + *

The lock state for the retention rule.

+ *
    + *
  • + *

    + * locked - The retention rule is locked and can't be modified or deleted.

    + *
  • + *
  • + *

    + * pending_unlock - The retention rule has been unlocked but it is still within + * the unlock delay period. The retention rule can be modified or deleted only after the unlock + * delay period has expired.

    + *
  • + *
  • + *

    + * unlocked - The retention rule is unlocked and it can be modified or deleted by + * any user with the required permissions.

    + *
  • + *
  • + *

    + * null - The retention rule has never been locked. Once a retention rule has + * been locked, it can transition between the locked and unlocked states + * only; it can never transition back to null.

    + *
  • + *
+ */ + LockState?: LockState | string; + + /** + *

The date and time at which the unlock delay is set to expire. Only returned + * for retention rules that have been unlocked and that are still within the unlock + * delay period.

+ */ + LockEndTime?: Date; } export interface ListRulesRequest { @@ -328,6 +475,12 @@ export interface ListRulesRequest { * rule.

*/ ResourceTags?: ResourceTag[]; + + /** + *

The lock state of the retention rules to list. Only retention rules with the specified + * lock state are returned.

+ */ + LockState?: LockState | string; } /** @@ -348,6 +501,34 @@ export interface RuleSummary { *

Information about the retention period for which the retention rule is to retain resources.

*/ RetentionPeriod?: RetentionPeriod; + + /** + *

The lock state for the retention rule.

+ *
    + *
  • + *

    + * locked - The retention rule is locked and can't be modified or deleted.

    + *
  • + *
  • + *

    + * pending_unlock - The retention rule has been unlocked but it is still within + * the unlock delay period. The retention rule can be modified or deleted only after the unlock + * delay period has expired.

    + *
  • + *
  • + *

    + * unlocked - The retention rule is unlocked and it can be modified or deleted by + * any user with the required permissions.

    + *
  • + *
  • + *

    + * null - The retention rule has never been locked. Once a retention rule has + * been locked, it can transition between the locked and unlocked states + * only; it can never transition back to null.

    + *
  • + *
+ */ + LockState?: LockState | string; } export interface ListRulesResponse { @@ -376,6 +557,85 @@ export interface ListTagsForResourceResponse { Tags?: Tag[]; } +export interface LockRuleRequest { + /** + *

The unique ID of the retention rule.

+ */ + Identifier: string | undefined; + + /** + *

Information about the retention rule lock configuration.

+ */ + LockConfiguration: LockConfiguration | undefined; +} + +export interface LockRuleResponse { + /** + *

The unique ID of the retention rule.

+ */ + Identifier?: string; + + /** + *

The retention rule description.

+ */ + Description?: string; + + /** + *

The resource type retained by the retention rule.

+ */ + ResourceType?: ResourceType | string; + + /** + *

Information about the retention period for which the retention rule is to retain resources.

+ */ + RetentionPeriod?: RetentionPeriod; + + /** + *

Information about the resource tags used to identify resources that are retained by the retention + * rule.

+ */ + ResourceTags?: ResourceTag[]; + + /** + *

The state of the retention rule. Only retention rules that are in the available + * state retain resources.

+ */ + Status?: RuleStatus | string; + + /** + *

Information about the retention rule lock configuration.

+ */ + LockConfiguration?: LockConfiguration; + + /** + *

The lock state for the retention rule.

+ *
    + *
  • + *

    + * locked - The retention rule is locked and can't be modified or deleted.

    + *
  • + *
  • + *

    + * pending_unlock - The retention rule has been unlocked but it is still within + * the unlock delay period. The retention rule can be modified or deleted only after the unlock + * delay period has expired.

    + *
  • + *
  • + *

    + * unlocked - The retention rule is unlocked and it can be modified or deleted by + * any user with the required permissions.

    + *
  • + *
  • + *

    + * null - The retention rule has never been locked. Once a retention rule has + * been locked, it can transition between the locked and unlocked states + * only; it can never transition back to null.

    + *
  • + *
+ */ + LockState?: LockState | string; +} + export interface TagResourceRequest { /** *

The Amazon Resource Name (ARN) of the retention rule.

@@ -390,6 +650,87 @@ export interface TagResourceRequest { export interface TagResourceResponse {} +export interface UnlockRuleRequest { + /** + *

The unique ID of the retention rule.

+ */ + Identifier: string | undefined; +} + +export interface UnlockRuleResponse { + /** + *

The unique ID of the retention rule.

+ */ + Identifier?: string; + + /** + *

The retention rule description.

+ */ + Description?: string; + + /** + *

The resource type retained by the retention rule.

+ */ + ResourceType?: ResourceType | string; + + /** + *

Information about the retention period for which the retention rule is to retain resources.

+ */ + RetentionPeriod?: RetentionPeriod; + + /** + *

Information about the resource tags used to identify resources that are retained by the retention + * rule.

+ */ + ResourceTags?: ResourceTag[]; + + /** + *

The state of the retention rule. Only retention rules that are in the available + * state retain resources.

+ */ + Status?: RuleStatus | string; + + /** + *

Information about the retention rule lock configuration.

+ */ + LockConfiguration?: LockConfiguration; + + /** + *

The lock state for the retention rule.

+ *
    + *
  • + *

    + * locked - The retention rule is locked and can't be modified or deleted.

    + *
  • + *
  • + *

    + * pending_unlock - The retention rule has been unlocked but it is still within + * the unlock delay period. The retention rule can be modified or deleted only after the unlock + * delay period has expired.

    + *
  • + *
  • + *

    + * unlocked - The retention rule is unlocked and it can be modified or deleted by + * any user with the required permissions.

    + *
  • + *
  • + *

    + * null - The retention rule has never been locked. Once a retention rule has + * been locked, it can transition between the locked and unlocked states + * only; it can never transition back to null.

    + *
  • + *
+ */ + LockState?: LockState | string; + + /** + *

The date and time at which the unlock delay is set to expire. Only returned + * for retention rules that have been unlocked and that are still within the unlock + * delay period.

+ */ + LockEndTime?: Date; +} + export interface UntagResourceRequest { /** *

The Amazon Resource Name (ARN) of the retention rule.

@@ -421,9 +762,10 @@ export interface UpdateRuleRequest { Description?: string; /** - *

The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots - * and EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT. To - * retain EBS-backed AMIs, specify EC2_IMAGE.

+ * + *

This parameter is currently not supported. You can't update a retention rule's resource type + * after creation.

+ *
*/ ResourceType?: ResourceType | string; @@ -472,8 +814,57 @@ export interface UpdateRuleResponse { * state retain resources.

*/ Status?: RuleStatus | string; + + /** + *

The lock state for the retention rule.

+ *
    + *
  • + *

    + * locked - The retention rule is locked and can't be modified or deleted.

    + *
  • + *
  • + *

    + * pending_unlock - The retention rule has been unlocked but it is still within + * the unlock delay period. The retention rule can be modified or deleted only after the unlock + * delay period has expired.

    + *
  • + *
  • + *

    + * unlocked - The retention rule is unlocked and it can be modified or deleted by + * any user with the required permissions.

    + *
  • + *
  • + *

    + * null - The retention rule has never been locked. Once a retention rule has + * been locked, it can transition between the locked and unlocked states + * only; it can never transition back to null.

    + *
  • + *
+ */ + LockState?: LockState | string; + + /** + *

The date and time at which the unlock delay is set to expire. Only returned + * for retention rules that have been unlocked and that are still within the unlock + * delay period.

+ */ + LockEndTime?: Date; } +/** + * @internal + */ +export const UnlockDelayFilterSensitiveLog = (obj: UnlockDelay): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const LockConfigurationFilterSensitiveLog = (obj: LockConfiguration): any => ({ + ...obj, +}); + /** * @internal */ @@ -572,6 +963,20 @@ export const ListTagsForResourceResponseFilterSensitiveLog = (obj: ListTagsForRe ...obj, }); +/** + * @internal + */ +export const LockRuleRequestFilterSensitiveLog = (obj: LockRuleRequest): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const LockRuleResponseFilterSensitiveLog = (obj: LockRuleResponse): any => ({ + ...obj, +}); + /** * @internal */ @@ -586,6 +991,20 @@ export const TagResourceResponseFilterSensitiveLog = (obj: TagResourceResponse): ...obj, }); +/** + * @internal + */ +export const UnlockRuleRequestFilterSensitiveLog = (obj: UnlockRuleRequest): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const UnlockRuleResponseFilterSensitiveLog = (obj: UnlockRuleResponse): any => ({ + ...obj, +}); + /** * @internal */ diff --git a/clients/client-rbin/src/protocols/Aws_restJson1.ts b/clients/client-rbin/src/protocols/Aws_restJson1.ts index b150c01a0b08..bd462c205c3f 100644 --- a/clients/client-rbin/src/protocols/Aws_restJson1.ts +++ b/clients/client-rbin/src/protocols/Aws_restJson1.ts @@ -4,10 +4,12 @@ import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, + expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, map as __map, + parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client"; @@ -25,17 +27,22 @@ import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, } from "../commands/ListTagsForResourceCommand"; +import { LockRuleCommandInput, LockRuleCommandOutput } from "../commands/LockRuleCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UnlockRuleCommandInput, UnlockRuleCommandOutput } from "../commands/UnlockRuleCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { UpdateRuleCommandInput, UpdateRuleCommandOutput } from "../commands/UpdateRuleCommand"; import { + ConflictException, InternalServerException, + LockConfiguration, ResourceNotFoundException, ResourceTag, RetentionPeriod, RuleSummary, ServiceQuotaExceededException, Tag, + UnlockDelay, ValidationException, } from "../models/models_0"; import { RbinServiceException as __BaseException } from "../models/RbinServiceException"; @@ -52,6 +59,9 @@ export const serializeAws_restJson1CreateRuleCommand = async ( let body: any; body = JSON.stringify({ ...(input.Description != null && { Description: input.Description }), + ...(input.LockConfiguration != null && { + LockConfiguration: serializeAws_restJson1LockConfiguration(input.LockConfiguration, context), + }), ...(input.ResourceTags != null && { ResourceTags: serializeAws_restJson1ResourceTags(input.ResourceTags, context), }), @@ -123,6 +133,7 @@ export const serializeAws_restJson1ListRulesCommand = async ( const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/list-rules"; let body: any; body = JSON.stringify({ + ...(input.LockState != null && { LockState: input.LockState }), ...(input.MaxResults != null && { MaxResults: input.MaxResults }), ...(input.NextToken != null && { NextToken: input.NextToken }), ...(input.ResourceTags != null && { @@ -161,6 +172,33 @@ export const serializeAws_restJson1ListTagsForResourceCommand = async ( }); }; +export const serializeAws_restJson1LockRuleCommand = async ( + input: LockRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules/{Identifier}/lock"; + resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier!, "{Identifier}", false); + let body: any; + body = JSON.stringify({ + ...(input.LockConfiguration != null && { + LockConfiguration: serializeAws_restJson1LockConfiguration(input.LockConfiguration, context), + }), + }); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1TagResourceCommand = async ( input: TagResourceCommandInput, context: __SerdeContext @@ -186,6 +224,27 @@ export const serializeAws_restJson1TagResourceCommand = async ( }); }; +export const serializeAws_restJson1UnlockRuleCommand = async ( + input: UnlockRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = {}; + let resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/rules/{Identifier}/unlock"; + resolvedPath = __resolvedPath(resolvedPath, input, "Identifier", () => input.Identifier!, "{Identifier}", false); + let body: any; + return new __HttpRequest({ + protocol, + hostname, + port, + method: "PATCH", + headers, + path: resolvedPath, + body, + }); +}; + export const serializeAws_restJson1UntagResourceCommand = async ( input: UntagResourceCommandInput, context: __SerdeContext @@ -259,6 +318,12 @@ export const deserializeAws_restJson1CreateRuleCommand = async ( if (data.Identifier != null) { contents.Identifier = __expectString(data.Identifier); } + if (data.LockConfiguration != null) { + contents.LockConfiguration = deserializeAws_restJson1LockConfiguration(data.LockConfiguration, context); + } + if (data.LockState != null) { + contents.LockState = __expectString(data.LockState); + } if (data.ResourceTags != null) { contents.ResourceTags = deserializeAws_restJson1ResourceTags(data.ResourceTags, context); } @@ -331,6 +396,9 @@ const deserializeAws_restJson1DeleteRuleCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "ConflictException": + case "com.amazonaws.rbin#ConflictException": + throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context); case "InternalServerException": case "com.amazonaws.rbin#InternalServerException": throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context); @@ -368,6 +436,15 @@ export const deserializeAws_restJson1GetRuleCommand = async ( if (data.Identifier != null) { contents.Identifier = __expectString(data.Identifier); } + if (data.LockConfiguration != null) { + contents.LockConfiguration = deserializeAws_restJson1LockConfiguration(data.LockConfiguration, context); + } + if (data.LockEndTime != null) { + contents.LockEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LockEndTime))); + } + if (data.LockState != null) { + contents.LockState = __expectString(data.LockState); + } if (data.ResourceTags != null) { contents.ResourceTags = deserializeAws_restJson1ResourceTags(data.ResourceTags, context); } @@ -507,6 +584,77 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async ( } }; +export const deserializeAws_restJson1LockRuleCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1LockRuleCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Description != null) { + contents.Description = __expectString(data.Description); + } + if (data.Identifier != null) { + contents.Identifier = __expectString(data.Identifier); + } + if (data.LockConfiguration != null) { + contents.LockConfiguration = deserializeAws_restJson1LockConfiguration(data.LockConfiguration, context); + } + if (data.LockState != null) { + contents.LockState = __expectString(data.LockState); + } + if (data.ResourceTags != null) { + contents.ResourceTags = deserializeAws_restJson1ResourceTags(data.ResourceTags, context); + } + if (data.ResourceType != null) { + contents.ResourceType = __expectString(data.ResourceType); + } + if (data.RetentionPeriod != null) { + contents.RetentionPeriod = deserializeAws_restJson1RetentionPeriod(data.RetentionPeriod, context); + } + if (data.Status != null) { + contents.Status = __expectString(data.Status); + } + return contents; +}; + +const deserializeAws_restJson1LockRuleCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.rbin#ConflictException": + throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.rbin#InternalServerException": + throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rbin#ResourceNotFoundException": + throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.rbin#ValidationException": + throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + export const deserializeAws_restJson1TagResourceCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -554,6 +702,80 @@ const deserializeAws_restJson1TagResourceCommandError = async ( } }; +export const deserializeAws_restJson1UnlockRuleCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return deserializeAws_restJson1UnlockRuleCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + if (data.Description != null) { + contents.Description = __expectString(data.Description); + } + if (data.Identifier != null) { + contents.Identifier = __expectString(data.Identifier); + } + if (data.LockConfiguration != null) { + contents.LockConfiguration = deserializeAws_restJson1LockConfiguration(data.LockConfiguration, context); + } + if (data.LockEndTime != null) { + contents.LockEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LockEndTime))); + } + if (data.LockState != null) { + contents.LockState = __expectString(data.LockState); + } + if (data.ResourceTags != null) { + contents.ResourceTags = deserializeAws_restJson1ResourceTags(data.ResourceTags, context); + } + if (data.ResourceType != null) { + contents.ResourceType = __expectString(data.ResourceType); + } + if (data.RetentionPeriod != null) { + contents.RetentionPeriod = deserializeAws_restJson1RetentionPeriod(data.RetentionPeriod, context); + } + if (data.Status != null) { + contents.Status = __expectString(data.Status); + } + return contents; +}; + +const deserializeAws_restJson1UnlockRuleCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "ConflictException": + case "com.amazonaws.rbin#ConflictException": + throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.rbin#InternalServerException": + throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context); + case "ResourceNotFoundException": + case "com.amazonaws.rbin#ResourceNotFoundException": + throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.rbin#ValidationException": + throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + export const deserializeAws_restJson1UntagResourceCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -615,6 +837,12 @@ export const deserializeAws_restJson1UpdateRuleCommand = async ( if (data.Identifier != null) { contents.Identifier = __expectString(data.Identifier); } + if (data.LockEndTime != null) { + contents.LockEndTime = __expectNonNull(__parseEpochTimestamp(__expectNumber(data.LockEndTime))); + } + if (data.LockState != null) { + contents.LockState = __expectString(data.LockState); + } if (data.ResourceTags != null) { contents.ResourceTags = deserializeAws_restJson1ResourceTags(data.ResourceTags, context); } @@ -640,6 +868,9 @@ const deserializeAws_restJson1UpdateRuleCommandError = async ( }; const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); switch (errorCode) { + case "ConflictException": + case "com.amazonaws.rbin#ConflictException": + throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context); case "InternalServerException": case "com.amazonaws.rbin#InternalServerException": throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context); @@ -661,6 +892,25 @@ const deserializeAws_restJson1UpdateRuleCommandError = async ( }; const map = __map; +const deserializeAws_restJson1ConflictExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + if (data.Message != null) { + contents.Message = __expectString(data.Message); + } + if (data.Reason != null) { + contents.Reason = __expectString(data.Reason); + } + const exception = new ConflictException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + const deserializeAws_restJson1InternalServerExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -734,6 +984,12 @@ const deserializeAws_restJson1ValidationExceptionResponse = async ( return __decorateServiceException(exception, parsedOutput.body); }; +const serializeAws_restJson1LockConfiguration = (input: LockConfiguration, context: __SerdeContext): any => { + return { + ...(input.UnlockDelay != null && { UnlockDelay: serializeAws_restJson1UnlockDelay(input.UnlockDelay, context) }), + }; +}; + const serializeAws_restJson1ResourceTag = (input: ResourceTag, context: __SerdeContext): any => { return { ...(input.ResourceTagKey != null && { ResourceTagKey: input.ResourceTagKey }), @@ -771,6 +1027,20 @@ const serializeAws_restJson1TagList = (input: Tag[], context: __SerdeContext): a }); }; +const serializeAws_restJson1UnlockDelay = (input: UnlockDelay, context: __SerdeContext): any => { + return { + ...(input.UnlockDelayUnit != null && { UnlockDelayUnit: input.UnlockDelayUnit }), + ...(input.UnlockDelayValue != null && { UnlockDelayValue: input.UnlockDelayValue }), + }; +}; + +const deserializeAws_restJson1LockConfiguration = (output: any, context: __SerdeContext): LockConfiguration => { + return { + UnlockDelay: + output.UnlockDelay != null ? deserializeAws_restJson1UnlockDelay(output.UnlockDelay, context) : undefined, + } as any; +}; + const deserializeAws_restJson1ResourceTag = (output: any, context: __SerdeContext): ResourceTag => { return { ResourceTagKey: __expectString(output.ResourceTagKey), @@ -801,6 +1071,7 @@ const deserializeAws_restJson1RuleSummary = (output: any, context: __SerdeContex return { Description: __expectString(output.Description), Identifier: __expectString(output.Identifier), + LockState: __expectString(output.LockState), RetentionPeriod: output.RetentionPeriod != null ? deserializeAws_restJson1RetentionPeriod(output.RetentionPeriod, context) @@ -839,6 +1110,13 @@ const deserializeAws_restJson1TagList = (output: any, context: __SerdeContext): return retVal; }; +const deserializeAws_restJson1UnlockDelay = (output: any, context: __SerdeContext): UnlockDelay => { + return { + UnlockDelayUnit: __expectString(output.UnlockDelayUnit), + UnlockDelayValue: __expectInt32(output.UnlockDelayValue), + } as any; +}; + const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ httpStatusCode: output.statusCode, requestId: diff --git a/codegen/sdk-codegen/aws-models/rbin.json b/codegen/sdk-codegen/aws-models/rbin.json index 3e6ea8d488e8..39ae185309c2 100644 --- a/codegen/sdk-codegen/aws-models/rbin.json +++ b/codegen/sdk-codegen/aws-models/rbin.json @@ -48,9 +48,15 @@ { "target": "com.amazonaws.rbin#ListTagsForResource" }, + { + "target": "com.amazonaws.rbin#LockRule" + }, { "target": "com.amazonaws.rbin#TagResource" }, + { + "target": "com.amazonaws.rbin#UnlockRule" + }, { "target": "com.amazonaws.rbin#UntagResource" }, @@ -77,7 +83,7 @@ "parameters": { "Region": { "builtIn": "AWS::Region", - "required": false, + "required": true, "documentation": "The AWS region used to dispatch the request.", "type": "String" }, @@ -398,8 +404,8 @@ }, "params": { "Region": "ap-south-2", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -411,8 +417,8 @@ }, "params": { "Region": "ap-south-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -424,8 +430,8 @@ }, "params": { "Region": "ap-south-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -437,8 +443,8 @@ }, "params": { "Region": "ap-south-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -450,8 +456,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -463,8 +469,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -476,8 +482,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -489,8 +495,8 @@ }, "params": { "Region": "ap-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -502,8 +508,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -515,8 +521,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -528,8 +534,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -541,8 +547,8 @@ }, "params": { "Region": "eu-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -554,8 +560,8 @@ }, "params": { "Region": "eu-south-2", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -567,8 +573,8 @@ }, "params": { "Region": "eu-south-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -580,8 +586,8 @@ }, "params": { "Region": "eu-south-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -593,8 +599,8 @@ }, "params": { "Region": "eu-south-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -606,8 +612,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -619,8 +625,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -632,8 +638,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -645,8 +651,8 @@ }, "params": { "Region": "us-gov-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -658,8 +664,8 @@ }, "params": { "Region": "me-central-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -671,8 +677,8 @@ }, "params": { "Region": "me-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -684,8 +690,8 @@ }, "params": { "Region": "me-central-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -697,8 +703,8 @@ }, "params": { "Region": "me-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -710,8 +716,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -723,8 +729,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -736,8 +742,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -749,8 +755,8 @@ }, "params": { "Region": "ca-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -762,8 +768,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -775,8 +781,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -788,8 +794,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -801,8 +807,8 @@ }, "params": { "Region": "eu-central-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -814,8 +820,8 @@ }, "params": { "Region": "eu-central-2", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -827,8 +833,8 @@ }, "params": { "Region": "eu-central-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -840,8 +846,8 @@ }, "params": { "Region": "eu-central-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -853,8 +859,8 @@ }, "params": { "Region": "eu-central-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -866,8 +872,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -879,8 +885,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -892,8 +898,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -905,8 +911,8 @@ }, "params": { "Region": "us-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -918,8 +924,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -931,8 +937,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -944,8 +950,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -957,8 +963,8 @@ }, "params": { "Region": "us-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -970,8 +976,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -983,8 +989,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -996,8 +1002,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1009,8 +1015,8 @@ }, "params": { "Region": "af-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1022,8 +1028,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1035,8 +1041,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1048,8 +1054,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1061,8 +1067,8 @@ }, "params": { "Region": "eu-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1074,8 +1080,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1087,8 +1093,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1100,8 +1106,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1113,8 +1119,8 @@ }, "params": { "Region": "eu-west-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1126,8 +1132,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1139,8 +1145,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1152,8 +1158,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1165,8 +1171,8 @@ }, "params": { "Region": "eu-west-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1178,8 +1184,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1191,8 +1197,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1204,8 +1210,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1217,8 +1223,8 @@ }, "params": { "Region": "eu-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1230,8 +1236,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1243,8 +1249,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1256,8 +1262,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1269,8 +1275,8 @@ }, "params": { "Region": "ap-northeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1282,8 +1288,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1295,8 +1301,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1308,8 +1314,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1321,8 +1327,8 @@ }, "params": { "Region": "ap-northeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1334,8 +1340,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1347,8 +1353,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1360,8 +1366,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1373,8 +1379,8 @@ }, "params": { "Region": "ap-northeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1386,8 +1392,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1399,8 +1405,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1412,8 +1418,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1425,8 +1431,8 @@ }, "params": { "Region": "me-south-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1438,8 +1444,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1451,8 +1457,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1464,8 +1470,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1477,8 +1483,8 @@ }, "params": { "Region": "sa-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1490,8 +1496,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1503,8 +1509,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1516,8 +1522,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1529,8 +1535,8 @@ }, "params": { "Region": "ap-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1542,8 +1548,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1555,8 +1561,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1568,8 +1574,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1581,8 +1587,8 @@ }, "params": { "Region": "cn-north-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1594,8 +1600,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1607,8 +1613,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1620,8 +1626,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1633,8 +1639,8 @@ }, "params": { "Region": "us-gov-west-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1646,8 +1652,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1659,8 +1665,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1672,8 +1678,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1685,8 +1691,8 @@ }, "params": { "Region": "ap-southeast-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1698,8 +1704,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1711,8 +1717,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1724,8 +1730,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1737,8 +1743,8 @@ }, "params": { "Region": "ap-southeast-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1750,8 +1756,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1763,8 +1769,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1776,8 +1782,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1789,8 +1795,8 @@ }, "params": { "Region": "ap-southeast-3", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1802,8 +1808,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1815,8 +1821,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1828,8 +1834,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1841,8 +1847,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1854,8 +1860,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1867,8 +1873,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1880,8 +1886,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1893,8 +1899,8 @@ }, "params": { "Region": "us-east-2", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1906,8 +1912,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": true, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": true } }, { @@ -1919,8 +1925,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": true + "UseFIPS": true, + "UseDualStack": false } }, { @@ -1932,8 +1938,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": true, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": true } }, { @@ -1945,8 +1951,8 @@ }, "params": { "Region": "cn-northwest-1", - "UseDualStack": false, - "UseFIPS": false + "UseFIPS": false, + "UseDualStack": false } }, { @@ -1958,8 +1964,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1970,8 +1976,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1982,8 +1988,8 @@ }, "params": { "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, "Endpoint": "https://example.com" } } @@ -1992,10 +1998,40 @@ } } }, - "com.amazonaws.rbin#CreateRule": { - "type": "operation", - "input": { - "target": "com.amazonaws.rbin#CreateRuleRequest" + "com.amazonaws.rbin#ConflictException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.rbin#ErrorMessage" + }, + "Reason": { + "target": "com.amazonaws.rbin#ConflictExceptionReason", + "traits": { + "smithy.api#documentation": "

The reason for the exception.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The specified retention rule lock request can't be completed.

", + "smithy.api#error": "client", + "smithy.api#httpError": 409 + } + }, + "com.amazonaws.rbin#ConflictExceptionReason": { + "type": "enum", + "members": { + "INVALID_RULE_STATE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_RULE_STATE" + } + } + } + }, + "com.amazonaws.rbin#CreateRule": { + "type": "operation", + "input": { + "target": "com.amazonaws.rbin#CreateRuleRequest" }, "output": { "target": "com.amazonaws.rbin#CreateRuleResponse" @@ -2054,6 +2090,12 @@ "traits": { "smithy.api#documentation": "

Specifies the resource tags to use to identify resources that are to be retained by a \n tag-level retention rule. For tag-level retention rules, only deleted resources, of the specified resource type, that \n have one or more of the specified tag key and value pairs are retained. If a resource is deleted, but it does not have \n any of the specified tag key and value pairs, it is immediately deleted without being retained by the retention rule.

\n

You can add the same tag key and value pair to a maximum or five retention rules.

\n

To create a Region-level retention rule, omit this parameter. A Region-level retention rule \n does not have any resource tags specified. It retains all deleted resources of the specified \n resource type in the Region in which the rule is created, even if the resources are not tagged.

" } + }, + "LockConfiguration": { + "target": "com.amazonaws.rbin#LockConfiguration", + "traits": { + "smithy.api#documentation": "

Information about the retention rule lock configuration.

" + } } } }, @@ -2098,6 +2140,18 @@ "traits": { "smithy.api#documentation": "

The state of the retention rule. Only retention rules that are in the available \n state retain resources.

" } + }, + "LockConfiguration": { + "target": "com.amazonaws.rbin#LockConfiguration", + "traits": { + "smithy.api#documentation": "

Information about the retention rule lock configuration.

" + } + }, + "LockState": { + "target": "com.amazonaws.rbin#LockState", + "traits": { + "smithy.api#documentation": "

The lock state for the retention rule.

\n
    \n
  • \n

    \n locked - The retention rule is locked and can't be modified or deleted.

    \n
  • \n
  • \n

    \n pending_unlock - 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.

    \n
  • \n
  • \n

    \n unlocked - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.

    \n
  • \n
  • \n

    \n null - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the locked and unlocked states \n only; it can never transition back to null.

    \n
  • \n
" + } } } }, @@ -2110,6 +2164,9 @@ "target": "com.amazonaws.rbin#DeleteRuleResponse" }, "errors": [ + { + "target": "com.amazonaws.rbin#ConflictException" + }, { "target": "com.amazonaws.rbin#InternalServerException" }, @@ -2234,6 +2291,24 @@ "traits": { "smithy.api#documentation": "

The state of the retention rule. Only retention rules that are in the available \n state retain resources.

" } + }, + "LockConfiguration": { + "target": "com.amazonaws.rbin#LockConfiguration", + "traits": { + "smithy.api#documentation": "

Information about the retention rule lock configuration.

" + } + }, + "LockState": { + "target": "com.amazonaws.rbin#LockState", + "traits": { + "smithy.api#documentation": "

The lock state for the retention rule.

\n
    \n
  • \n

    \n locked - The retention rule is locked and can't be modified or deleted.

    \n
  • \n
  • \n

    \n pending_unlock - 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.

    \n
  • \n
  • \n

    \n unlocked - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.

    \n
  • \n
  • \n

    \n null - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the locked and unlocked states \n only; it can never transition back to null.

    \n
  • \n
" + } + }, + "LockEndTime": { + "target": "com.amazonaws.rbin#TimeStamp", + "traits": { + "smithy.api#documentation": "

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.

" + } } } }, @@ -2276,6 +2351,7 @@ "smithy.api#paginated": { "inputToken": "NextToken", "outputToken": "NextToken", + "items": "Rules", "pageSize": "MaxResults" } } @@ -2307,6 +2383,12 @@ "traits": { "smithy.api#documentation": "

Information about the resource tags used to identify resources that are retained by the retention \n rule.

" } + }, + "LockState": { + "target": "com.amazonaws.rbin#LockState", + "traits": { + "smithy.api#documentation": "

The lock state of the retention rules to list. Only retention rules with the specified \n lock state are returned.

" + } } } }, @@ -2379,6 +2461,145 @@ } } }, + "com.amazonaws.rbin#LockConfiguration": { + "type": "structure", + "members": { + "UnlockDelay": { + "target": "com.amazonaws.rbin#UnlockDelay", + "traits": { + "smithy.api#documentation": "

Information about the retention rule unlock delay.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about a retention rule lock configuration.

" + } + }, + "com.amazonaws.rbin#LockRule": { + "type": "operation", + "input": { + "target": "com.amazonaws.rbin#LockRuleRequest" + }, + "output": { + "target": "com.amazonaws.rbin#LockRuleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rbin#ConflictException" + }, + { + "target": "com.amazonaws.rbin#InternalServerException" + }, + { + "target": "com.amazonaws.rbin#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rbin#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Locks a retention rule. A locked retention rule can't be modified or deleted.

", + "smithy.api#http": { + "method": "PATCH", + "uri": "/rules/{Identifier}/lock", + "code": 200 + } + } + }, + "com.amazonaws.rbin#LockRuleRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "

The unique ID of the retention rule.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "LockConfiguration": { + "target": "com.amazonaws.rbin#LockConfiguration", + "traits": { + "smithy.api#documentation": "

Information about the retention rule lock configuration.

", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rbin#LockRuleResponse": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "

The unique ID of the retention rule.

" + } + }, + "Description": { + "target": "com.amazonaws.rbin#Description", + "traits": { + "smithy.api#documentation": "

The retention rule description.

" + } + }, + "ResourceType": { + "target": "com.amazonaws.rbin#ResourceType", + "traits": { + "smithy.api#documentation": "

The resource type retained by the retention rule.

" + } + }, + "RetentionPeriod": { + "target": "com.amazonaws.rbin#RetentionPeriod" + }, + "ResourceTags": { + "target": "com.amazonaws.rbin#ResourceTags", + "traits": { + "smithy.api#documentation": "

Information about the resource tags used to identify resources that are retained by the retention \n rule.

" + } + }, + "Status": { + "target": "com.amazonaws.rbin#RuleStatus", + "traits": { + "smithy.api#documentation": "

The state of the retention rule. Only retention rules that are in the available \n state retain resources.

" + } + }, + "LockConfiguration": { + "target": "com.amazonaws.rbin#LockConfiguration", + "traits": { + "smithy.api#documentation": "

Information about the retention rule lock configuration.

" + } + }, + "LockState": { + "target": "com.amazonaws.rbin#LockState", + "traits": { + "smithy.api#documentation": "

The lock state for the retention rule.

\n
    \n
  • \n

    \n locked - The retention rule is locked and can't be modified or deleted.

    \n
  • \n
  • \n

    \n pending_unlock - 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.

    \n
  • \n
  • \n

    \n unlocked - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.

    \n
  • \n
  • \n

    \n null - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the locked and unlocked states \n only; it can never transition back to null.

    \n
  • \n
" + } + } + } + }, + "com.amazonaws.rbin#LockState": { + "type": "enum", + "members": { + "LOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "locked" + } + }, + "PENDING_UNLOCK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending_unlock" + } + }, + "UNLOCKED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "unlocked" + } + } + } + }, "com.amazonaws.rbin#MaxResults": { "type": "integer", "traits": { @@ -2414,14 +2635,14 @@ } }, "com.amazonaws.rbin#ResourceNotFoundExceptionReason": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "RULE_NOT_FOUND", - "name": "RULE_NOT_FOUND" + "type": "enum", + "members": { + "RULE_NOT_FOUND": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RULE_NOT_FOUND" } - ] + } } }, "com.amazonaws.rbin#ResourceTag": { @@ -2470,18 +2691,20 @@ } }, "com.amazonaws.rbin#ResourceType": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "EBS_SNAPSHOT", - "name": "EBS_SNAPSHOT" - }, - { - "value": "EC2_IMAGE", - "name": "EC2_IMAGE" + "type": "enum", + "members": { + "EBS_SNAPSHOT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EBS_SNAPSHOT" } - ] + }, + "EC2_IMAGE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "EC2_IMAGE" + } + } } }, "com.amazonaws.rbin#RetentionPeriod": { @@ -2507,14 +2730,14 @@ } }, "com.amazonaws.rbin#RetentionPeriodUnit": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "DAYS", - "name": "DAYS" + "type": "enum", + "members": { + "DAYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DAYS" } - ] + } } }, "com.amazonaws.rbin#RetentionPeriodValue": { @@ -2543,18 +2766,20 @@ } }, "com.amazonaws.rbin#RuleStatus": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "pending", - "name": "PENDING" - }, - { - "value": "available", - "name": "AVAILABLE" + "type": "enum", + "members": { + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pending" + } + }, + "AVAILABLE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "available" } - ] + } } }, "com.amazonaws.rbin#RuleSummary": { @@ -2577,6 +2802,12 @@ "traits": { "smithy.api#documentation": "

Information about the retention period for which the retention rule is to retain resources.

" } + }, + "LockState": { + "target": "com.amazonaws.rbin#LockState", + "traits": { + "smithy.api#documentation": "

The lock state for the retention rule.

\n
    \n
  • \n

    \n locked - The retention rule is locked and can't be modified or deleted.

    \n
  • \n
  • \n

    \n pending_unlock - 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.

    \n
  • \n
  • \n

    \n unlocked - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.

    \n
  • \n
  • \n

    \n null - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the locked and unlocked states \n only; it can never transition back to null.

    \n
  • \n
" + } } }, "traits": { @@ -2609,14 +2840,14 @@ } }, "com.amazonaws.rbin#ServiceQuotaExceededExceptionReason": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "SERVICE_QUOTA_EXCEEDED", - "name": "SERVICE_QUOTA_EXCEEDED" + "type": "enum", + "members": { + "SERVICE_QUOTA_EXCEEDED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "SERVICE_QUOTA_EXCEEDED" } - ] + } } }, "com.amazonaws.rbin#Tag": { @@ -2740,6 +2971,151 @@ "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" } }, + "com.amazonaws.rbin#TimeStamp": { + "type": "timestamp" + }, + "com.amazonaws.rbin#UnlockDelay": { + "type": "structure", + "members": { + "UnlockDelayValue": { + "target": "com.amazonaws.rbin#UnlockDelayValue", + "traits": { + "smithy.api#documentation": "

The unlock delay period, measured in the unit specified for \n UnlockDelayUnit.

", + "smithy.api#required": {} + } + }, + "UnlockDelayUnit": { + "target": "com.amazonaws.rbin#UnlockDelayUnit", + "traits": { + "smithy.api#documentation": "

The unit of time in which to measure the unlock delay. Currently, the unlock delay can \n be measure only in days.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Information about the retention rule unlock delay. The unlock delay is the period after which \n a retention rule can be modified or edited after it has been unlocked by a user with the required \n permissions. The retention rule can't be modified or deleted during the unlock delay.

" + } + }, + "com.amazonaws.rbin#UnlockDelayUnit": { + "type": "enum", + "members": { + "DAYS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "DAYS" + } + } + } + }, + "com.amazonaws.rbin#UnlockDelayValue": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 7, + "max": 30 + } + } + }, + "com.amazonaws.rbin#UnlockRule": { + "type": "operation", + "input": { + "target": "com.amazonaws.rbin#UnlockRuleRequest" + }, + "output": { + "target": "com.amazonaws.rbin#UnlockRuleResponse" + }, + "errors": [ + { + "target": "com.amazonaws.rbin#ConflictException" + }, + { + "target": "com.amazonaws.rbin#InternalServerException" + }, + { + "target": "com.amazonaws.rbin#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.rbin#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Unlocks a retention rule. After a retention rule is unlocked, it can be modified or deleted \n only after the unlock delay period expires.

", + "smithy.api#http": { + "method": "PATCH", + "uri": "/rules/{Identifier}/unlock", + "code": 200 + } + } + }, + "com.amazonaws.rbin#UnlockRuleRequest": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "

The unique ID of the retention rule.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.rbin#UnlockRuleResponse": { + "type": "structure", + "members": { + "Identifier": { + "target": "com.amazonaws.rbin#RuleIdentifier", + "traits": { + "smithy.api#documentation": "

The unique ID of the retention rule.

" + } + }, + "Description": { + "target": "com.amazonaws.rbin#Description", + "traits": { + "smithy.api#documentation": "

The retention rule description.

" + } + }, + "ResourceType": { + "target": "com.amazonaws.rbin#ResourceType", + "traits": { + "smithy.api#documentation": "

The resource type retained by the retention rule.

" + } + }, + "RetentionPeriod": { + "target": "com.amazonaws.rbin#RetentionPeriod" + }, + "ResourceTags": { + "target": "com.amazonaws.rbin#ResourceTags", + "traits": { + "smithy.api#documentation": "

Information about the resource tags used to identify resources that are retained by the retention \n rule.

" + } + }, + "Status": { + "target": "com.amazonaws.rbin#RuleStatus", + "traits": { + "smithy.api#documentation": "

The state of the retention rule. Only retention rules that are in the available \n state retain resources.

" + } + }, + "LockConfiguration": { + "target": "com.amazonaws.rbin#LockConfiguration", + "traits": { + "smithy.api#documentation": "

Information about the retention rule lock configuration.

" + } + }, + "LockState": { + "target": "com.amazonaws.rbin#LockState", + "traits": { + "smithy.api#documentation": "

The lock state for the retention rule.

\n
    \n
  • \n

    \n locked - The retention rule is locked and can't be modified or deleted.

    \n
  • \n
  • \n

    \n pending_unlock - 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.

    \n
  • \n
  • \n

    \n unlocked - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.

    \n
  • \n
  • \n

    \n null - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the locked and unlocked states \n only; it can never transition back to null.

    \n
  • \n
" + } + }, + "LockEndTime": { + "target": "com.amazonaws.rbin#TimeStamp", + "traits": { + "smithy.api#documentation": "

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.

" + } + } + } + }, "com.amazonaws.rbin#UntagResource": { "type": "operation", "input": { @@ -2802,6 +3178,9 @@ "target": "com.amazonaws.rbin#UpdateRuleResponse" }, "errors": [ + { + "target": "com.amazonaws.rbin#ConflictException" + }, { "target": "com.amazonaws.rbin#InternalServerException" }, @@ -2813,7 +3192,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates an existing Recycle Bin retention rule. For more information, see \n Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.

", + "smithy.api#documentation": "

Updates an existing Recycle Bin retention rule. You can update a retention rule's description, \n resource tags, and retention period at any time after creation. You can't update a retention rule's \n resource type after creation. For more information, see \n Update Recycle Bin retention rules in the Amazon Elastic Compute Cloud User Guide.

", "smithy.api#http": { "method": "PATCH", "uri": "/rules/{Identifier}", @@ -2847,7 +3226,7 @@ "ResourceType": { "target": "com.amazonaws.rbin#ResourceType", "traits": { - "smithy.api#documentation": "

The resource type to be retained by the retention rule. Currently, only Amazon EBS snapshots \n and EBS-backed AMIs are supported. To retain snapshots, specify EBS_SNAPSHOT. To \n retain EBS-backed AMIs, specify EC2_IMAGE.

" + "smithy.api#documentation": "\n

This parameter is currently not supported. You can't update a retention rule's resource type \n after creation.

\n
" } }, "ResourceTags": { @@ -2893,6 +3272,18 @@ "traits": { "smithy.api#documentation": "

The state of the retention rule. Only retention rules that are in the available \n state retain resources.

" } + }, + "LockState": { + "target": "com.amazonaws.rbin#LockState", + "traits": { + "smithy.api#documentation": "

The lock state for the retention rule.

\n
    \n
  • \n

    \n locked - The retention rule is locked and can't be modified or deleted.

    \n
  • \n
  • \n

    \n pending_unlock - 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.

    \n
  • \n
  • \n

    \n unlocked - The retention rule is unlocked and it can be modified or deleted by \n any user with the required permissions.

    \n
  • \n
  • \n

    \n null - The retention rule has never been locked. Once a retention rule has \n been locked, it can transition between the locked and unlocked states \n only; it can never transition back to null.

    \n
  • \n
" + } + }, + "LockEndTime": { + "target": "com.amazonaws.rbin#TimeStamp", + "traits": { + "smithy.api#documentation": "

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.

" + } } } }, @@ -2916,19 +3307,21 @@ } }, "com.amazonaws.rbin#ValidationExceptionReason": { - "type": "string", - "traits": { - "smithy.api#enum": [ - { - "value": "INVALID_PAGE_TOKEN", - "name": "INVALID_PAGE_TOKEN" - }, - { - "value": "INVALID_PARAMETER_VALUE", - "name": "INVALID_PARAMETER_VALUE" + "type": "enum", + "members": { + "INVALID_PAGE_TOKEN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_PAGE_TOKEN" } - ] + }, + "INVALID_PARAMETER_VALUE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "INVALID_PARAMETER_VALUE" + } + } } } } -} \ No newline at end of file +}