diff --git a/clients/client-application-auto-scaling/README.md b/clients/client-application-auto-scaling/README.md index 4dc772a0c26c0..a2b21e8452e34 100644 --- a/clients/client-application-auto-scaling/README.md +++ b/clients/client-application-auto-scaling/README.md @@ -334,6 +334,14 @@ DescribeScheduledActions [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/classes/describescheduledactionscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/describescheduledactionscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/describescheduledactionscommandoutput.html) + +
+ +ListTagsForResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/classes/listtagsforresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/listtagsforresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/listtagsforresourcecommandoutput.html) +
@@ -359,3 +367,19 @@ RegisterScalableTarget [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/classes/registerscalabletargetcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/registerscalabletargetcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/registerscalabletargetcommandoutput.html)
+
+ +TagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/classes/tagresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/tagresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/tagresourcecommandoutput.html) + +
+
+ +UntagResource + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/classes/untagresourcecommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/untagresourcecommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-application-auto-scaling/interfaces/untagresourcecommandoutput.html) + +
diff --git a/clients/client-application-auto-scaling/package.json b/clients/client-application-auto-scaling/package.json index 6bea6456f0133..4b8bcbb3eedd4 100644 --- a/clients/client-application-auto-scaling/package.json +++ b/clients/client-application-auto-scaling/package.json @@ -64,27 +64,15 @@ "typedoc": "0.23.23", "typescript": "~4.9.5" }, - "engines": { - "node": ">=14.0.0" - }, - "typesVersions": { - "<4.0": { - "dist-types/*": [ - "dist-types/ts3.4/*" - ] - } - }, - "files": [ - "dist-*" - ], + "engines": { "node": ">=14.0.0" }, + "typesVersions": { "<4.0": { "dist-types/*": ["dist-types/ts3.4/*"] } }, + "files": ["dist-*"], "author": { "name": "AWS SDK for JavaScript Team", "url": "https://aws.amazon.com/javascript/" }, "license": "Apache-2.0", - "browser": { - "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" - }, + "browser": { "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.browser" }, "react-native": { "./dist-es/runtimeConfig": "./dist-es/runtimeConfig.native" }, diff --git a/clients/client-application-auto-scaling/src/ApplicationAutoScaling.ts b/clients/client-application-auto-scaling/src/ApplicationAutoScaling.ts index dd5317fb71a23..c6fea9ca025ef 100644 --- a/clients/client-application-auto-scaling/src/ApplicationAutoScaling.ts +++ b/clients/client-application-auto-scaling/src/ApplicationAutoScaling.ts @@ -37,6 +37,11 @@ import { DescribeScheduledActionsCommandInput, DescribeScheduledActionsCommandOutput, } from "./commands/DescribeScheduledActionsCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; import { PutScalingPolicyCommand, PutScalingPolicyCommandInput, @@ -52,6 +57,12 @@ import { RegisterScalableTargetCommandInput, RegisterScalableTargetCommandOutput, } from "./commands/RegisterScalableTargetCommand"; +import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput, +} from "./commands/UntagResourceCommand"; /** *

With Application Auto Scaling, you can configure automatic scaling for the following @@ -375,6 +386,40 @@ export class ApplicationAutoScaling extends ApplicationAutoScalingClient { } } + /** + *

Returns all the tags on the specified Application Auto Scaling scalable target.

+ *

For general information about tags, including the format and syntax, see Tagging Amazon Web Services + * resources in the Amazon Web Services General Reference.

+ */ + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListTagsForResourceCommandOutput) => void), + cb?: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): Promise | void { + const command = new ListTagsForResourceCommand(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); + } + } + /** *

Creates or updates a scaling policy for an Application Auto Scaling scalable target.

*

Each scalable target is identified by a service namespace, resource ID, and scalable @@ -398,8 +443,8 @@ export class ApplicationAutoScaling extends ApplicationAutoScalingClient { *

For more information, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide.

* *

If a scalable target is deregistered, the scalable target is no longer available to - * execute scaling policies. Any scaling policies that were specified for the scalable - * target are deleted.

+ * use scaling policies. Any scaling policies that were specified for the scalable target + * are deleted.

*
*/ public putScalingPolicy( @@ -437,7 +482,7 @@ export class ApplicationAutoScaling extends ApplicationAutoScalingClient { * dimension. A scheduled action applies to the scalable target identified by those three * attributes. You cannot create a scheduled action until you have registered the resource as * a scalable target.

- *

When start and end times are specified with a recurring schedule using a cron expression + *

When you specify start and end times with a recurring schedule using a cron expression * or rates, they form the boundaries for when the recurring action starts and stops.

*

To update a scheduled action, specify the parameters that you want to change. If you * don't specify start and end times, the old values are deleted.

@@ -478,7 +523,8 @@ export class ApplicationAutoScaling extends ApplicationAutoScalingClient { } /** - *

Registers or updates a scalable target, the resource that you want to scale.

+ *

Registers or updates a scalable target, which is the resource that you want to + * scale.

*

Scalable targets are uniquely identified by the combination of resource ID, scalable * dimension, and namespace, which represents some capacity dimension of the underlying * service.

@@ -486,9 +532,9 @@ export class ApplicationAutoScaling extends ApplicationAutoScalingClient { * maximum capacity. If the specified resource is not active in the target service, this * operation does not change the resource's current capacity. Otherwise, it changes the * resource's current capacity to a value that is inside of this range.

- *

If you choose to add a scaling policy, current capacity is adjustable within the - * specified range when scaling starts. Application Auto Scaling scaling policies will not scale capacity to - * values that are outside of the minimum and maximum range.

+ *

If you add a scaling policy, current capacity is adjustable within the specified range + * when scaling starts. Application Auto Scaling scaling policies will not scale capacity to values that are + * outside of the minimum and maximum range.

*

After you register a scalable target, you do not need to register it again to use other * Application Auto Scaling operations. To see which resources have been registered, use DescribeScalableTargets. You can also view the scaling policies for a service * namespace by using DescribeScalableTargets. If you no longer need a scalable target, you can @@ -497,11 +543,17 @@ export class ApplicationAutoScaling extends ApplicationAutoScalingClient { * parameters that identify the scalable target: resource ID, scalable dimension, and * namespace. Any parameters that you don't specify are not changed by this update request.

* - *

If you call the RegisterScalableTarget API to update an existing - * scalable target, Application Auto Scaling retrieves the current capacity of the resource. If it is below - * the minimum capacity or above the maximum capacity, Application Auto Scaling adjusts the capacity of the - * scalable target to place it within these bounds, even if you don't include the - * MinCapacity or MaxCapacity request parameters.

+ *

If you call the RegisterScalableTarget API operation to create a + * scalable target, there might be a brief delay until the operation achieves eventual + * consistency. You might become aware of this brief delay if you get unexpected + * errors when performing sequential operations. The typical strategy is to retry the + * request, and some Amazon Web Services SDKs include automatic backoff and retry logic.

+ *

If you call the RegisterScalableTarget API operation to update an + * existing scalable target, Application Auto Scaling retrieves the current capacity of the resource. If + * it's below the minimum capacity or above the maximum capacity, Application Auto Scaling adjusts the + * capacity of the scalable target to place it within these bounds, even if you don't + * include the MinCapacity or MaxCapacity request + * parameters.

*
*/ public registerScalableTarget( @@ -532,4 +584,74 @@ export class ApplicationAutoScaling extends ApplicationAutoScalingClient { return this.send(command, optionsOrCb); } } + + /** + *

Adds or edits tags on an Application Auto Scaling scalable target.

+ *

Each tag consists of a tag key and a tag value, which are both case-sensitive strings. + * To add a tag, specify a new tag key and a tag value. To edit a tag, specify an existing tag + * key and a new tag value.

+ *

You can use this operation to tag an Application Auto Scaling scalable target, but you cannot tag a + * scaling policy or scheduled action.

+ *

You can also add tags to an Application Auto Scaling scalable target while creating it + * (RegisterScalableTarget).

+ *

For general information about tags, including the format and syntax, see Tagging Amazon Web Services + * resources in the Amazon Web Services General Reference.

+ *

Use tags to control access to a scalable target. For more information, see Tagging support + * for Application Auto Scaling in the Application Auto Scaling User Guide.

+ */ + public tagResource(args: TagResourceCommandInput, options?: __HttpHandlerOptions): Promise; + public tagResource(args: TagResourceCommandInput, cb: (err: any, data?: TagResourceCommandOutput) => void): void; + public tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: TagResourceCommandOutput) => void), + cb?: (err: any, data?: TagResourceCommandOutput) => void + ): Promise | void { + const command = new TagResourceCommand(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); + } + } + + /** + *

Deletes tags from an Application Auto Scaling scalable target. To delete a tag, specify the tag key and + * the Application Auto Scaling scalable target.

+ */ + public untagResource( + args: UntagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public untagResource( + args: UntagResourceCommandInput, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UntagResourceCommandOutput) => void), + cb?: (err: any, data?: UntagResourceCommandOutput) => void + ): Promise | void { + const command = new UntagResourceCommand(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); + } + } } diff --git a/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts b/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts index a24da93dee600..f4d3a1971a7cd 100644 --- a/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts +++ b/clients/client-application-auto-scaling/src/ApplicationAutoScalingClient.ts @@ -77,12 +77,18 @@ import { DescribeScheduledActionsCommandInput, DescribeScheduledActionsCommandOutput, } from "./commands/DescribeScheduledActionsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "./commands/ListTagsForResourceCommand"; import { PutScalingPolicyCommandInput, PutScalingPolicyCommandOutput } from "./commands/PutScalingPolicyCommand"; import { PutScheduledActionCommandInput, PutScheduledActionCommandOutput } from "./commands/PutScheduledActionCommand"; import { RegisterScalableTargetCommandInput, RegisterScalableTargetCommandOutput, } from "./commands/RegisterScalableTargetCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, @@ -99,9 +105,12 @@ export type ServiceInputTypes = | DescribeScalingActivitiesCommandInput | DescribeScalingPoliciesCommandInput | DescribeScheduledActionsCommandInput + | ListTagsForResourceCommandInput | PutScalingPolicyCommandInput | PutScheduledActionCommandInput - | RegisterScalableTargetCommandInput; + | RegisterScalableTargetCommandInput + | TagResourceCommandInput + | UntagResourceCommandInput; export type ServiceOutputTypes = | DeleteScalingPolicyCommandOutput @@ -111,9 +120,12 @@ export type ServiceOutputTypes = | DescribeScalingActivitiesCommandOutput | DescribeScalingPoliciesCommandOutput | DescribeScheduledActionsCommandOutput + | ListTagsForResourceCommandOutput | PutScalingPolicyCommandOutput | PutScheduledActionCommandOutput - | RegisterScalableTargetCommandOutput; + | RegisterScalableTargetCommandOutput + | TagResourceCommandOutput + | UntagResourceCommandOutput; export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { /** diff --git a/clients/client-application-auto-scaling/src/commands/ListTagsForResourceCommand.ts b/clients/client-application-auto-scaling/src/commands/ListTagsForResourceCommand.ts new file mode 100644 index 0000000000000..95dab29215d7e --- /dev/null +++ b/clients/client-application-auto-scaling/src/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,130 @@ +// 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 { + ApplicationAutoScalingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ApplicationAutoScalingClient"; +import { + ListTagsForResourceRequest, + ListTagsForResourceRequestFilterSensitiveLog, + ListTagsForResourceResponse, + ListTagsForResourceResponseFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_json1_1ListTagsForResourceCommand, + serializeAws_json1_1ListTagsForResourceCommand, +} from "../protocols/Aws_json1_1"; + +/** + * The input for {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandInput extends ListTagsForResourceRequest {} +/** + * The output of {@link ListTagsForResourceCommand}. + */ +export interface ListTagsForResourceCommandOutput extends ListTagsForResourceResponse, __MetadataBearer {} + +/** + *

Returns all the tags on the specified Application Auto Scaling scalable target.

+ *

For general information about tags, including the format and syntax, see Tagging Amazon Web Services + * resources in the Amazon Web Services General Reference.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ApplicationAutoScalingClient, ListTagsForResourceCommand } from "@aws-sdk/client-application-auto-scaling"; // ES Modules import + * // const { ApplicationAutoScalingClient, ListTagsForResourceCommand } = require("@aws-sdk/client-application-auto-scaling"); // CommonJS import + * const client = new ApplicationAutoScalingClient(config); + * const command = new ListTagsForResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListTagsForResourceCommandInput} for command's `input` shape. + * @see {@link ListTagsForResourceCommandOutput} for command's `response` shape. + * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape. + * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * + */ +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + ApplicationAutoScalingClientResolvedConfig +> { + // 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: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ApplicationAutoScalingClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, ListTagsForResourceCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ApplicationAutoScalingClient"; + const commandName = "ListTagsForResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: ListTagsForResourceRequestFilterSensitiveLog, + outputFilterSensitiveLog: ListTagsForResourceResponseFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: ListTagsForResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1ListTagsForResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1ListTagsForResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-application-auto-scaling/src/commands/PutScalingPolicyCommand.ts b/clients/client-application-auto-scaling/src/commands/PutScalingPolicyCommand.ts index 2390bbd55e409..a8a8049e84f2c 100644 --- a/clients/client-application-auto-scaling/src/commands/PutScalingPolicyCommand.ts +++ b/clients/client-application-auto-scaling/src/commands/PutScalingPolicyCommand.ts @@ -61,8 +61,8 @@ export interface PutScalingPolicyCommandOutput extends PutScalingPolicyResponse, *

For more information, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide.

* *

If a scalable target is deregistered, the scalable target is no longer available to - * execute scaling policies. Any scaling policies that were specified for the scalable - * target are deleted.

+ * use scaling policies. Any scaling policies that were specified for the scalable target + * are deleted.

*
* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-application-auto-scaling/src/commands/PutScheduledActionCommand.ts b/clients/client-application-auto-scaling/src/commands/PutScheduledActionCommand.ts index 129182d908485..8e2eea0c96f77 100644 --- a/clients/client-application-auto-scaling/src/commands/PutScheduledActionCommand.ts +++ b/clients/client-application-auto-scaling/src/commands/PutScheduledActionCommand.ts @@ -44,7 +44,7 @@ export interface PutScheduledActionCommandOutput extends PutScheduledActionRespo * dimension. A scheduled action applies to the scalable target identified by those three * attributes. You cannot create a scheduled action until you have registered the resource as * a scalable target.

- *

When start and end times are specified with a recurring schedule using a cron expression + *

When you specify start and end times with a recurring schedule using a cron expression * or rates, they form the boundaries for when the recurring action starts and stops.

*

To update a scheduled action, specify the parameters that you want to change. If you * don't specify start and end times, the old values are deleted.

diff --git a/clients/client-application-auto-scaling/src/commands/RegisterScalableTargetCommand.ts b/clients/client-application-auto-scaling/src/commands/RegisterScalableTargetCommand.ts index e34e7f1b4eba0..53bffbb975767 100644 --- a/clients/client-application-auto-scaling/src/commands/RegisterScalableTargetCommand.ts +++ b/clients/client-application-auto-scaling/src/commands/RegisterScalableTargetCommand.ts @@ -39,7 +39,8 @@ export interface RegisterScalableTargetCommandInput extends RegisterScalableTarg export interface RegisterScalableTargetCommandOutput extends RegisterScalableTargetResponse, __MetadataBearer {} /** - *

Registers or updates a scalable target, the resource that you want to scale.

+ *

Registers or updates a scalable target, which is the resource that you want to + * scale.

*

Scalable targets are uniquely identified by the combination of resource ID, scalable * dimension, and namespace, which represents some capacity dimension of the underlying * service.

@@ -47,9 +48,9 @@ export interface RegisterScalableTargetCommandOutput extends RegisterScalableTar * maximum capacity. If the specified resource is not active in the target service, this * operation does not change the resource's current capacity. Otherwise, it changes the * resource's current capacity to a value that is inside of this range.

- *

If you choose to add a scaling policy, current capacity is adjustable within the - * specified range when scaling starts. Application Auto Scaling scaling policies will not scale capacity to - * values that are outside of the minimum and maximum range.

+ *

If you add a scaling policy, current capacity is adjustable within the specified range + * when scaling starts. Application Auto Scaling scaling policies will not scale capacity to values that are + * outside of the minimum and maximum range.

*

After you register a scalable target, you do not need to register it again to use other * Application Auto Scaling operations. To see which resources have been registered, use DescribeScalableTargets. You can also view the scaling policies for a service * namespace by using DescribeScalableTargets. If you no longer need a scalable target, you can @@ -58,11 +59,17 @@ export interface RegisterScalableTargetCommandOutput extends RegisterScalableTar * parameters that identify the scalable target: resource ID, scalable dimension, and * namespace. Any parameters that you don't specify are not changed by this update request.

* - *

If you call the RegisterScalableTarget API to update an existing - * scalable target, Application Auto Scaling retrieves the current capacity of the resource. If it is below - * the minimum capacity or above the maximum capacity, Application Auto Scaling adjusts the capacity of the - * scalable target to place it within these bounds, even if you don't include the - * MinCapacity or MaxCapacity request parameters.

+ *

If you call the RegisterScalableTarget API operation to create a + * scalable target, there might be a brief delay until the operation achieves eventual + * consistency. You might become aware of this brief delay if you get unexpected + * errors when performing sequential operations. The typical strategy is to retry the + * request, and some Amazon Web Services SDKs include automatic backoff and retry logic.

+ *

If you call the RegisterScalableTarget API operation to update an + * existing scalable target, Application Auto Scaling retrieves the current capacity of the resource. If + * it's below the minimum capacity or above the maximum capacity, Application Auto Scaling adjusts the + * capacity of the scalable target to place it within these bounds, even if you don't + * include the MinCapacity or MaxCapacity request + * parameters.

*
* @example * Use a bare-bones client and the command you need to make an API call. diff --git a/clients/client-application-auto-scaling/src/commands/TagResourceCommand.ts b/clients/client-application-auto-scaling/src/commands/TagResourceCommand.ts new file mode 100644 index 0000000000000..d590c5ecaa783 --- /dev/null +++ b/clients/client-application-auto-scaling/src/commands/TagResourceCommand.ts @@ -0,0 +1,144 @@ +// 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 { + ApplicationAutoScalingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ApplicationAutoScalingClient"; +import { + TagResourceRequest, + TagResourceRequestFilterSensitiveLog, + TagResourceResponse, + TagResourceResponseFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_json1_1TagResourceCommand, + serializeAws_json1_1TagResourceCommand, +} from "../protocols/Aws_json1_1"; + +/** + * The input for {@link TagResourceCommand}. + */ +export interface TagResourceCommandInput extends TagResourceRequest {} +/** + * The output of {@link TagResourceCommand}. + */ +export interface TagResourceCommandOutput extends TagResourceResponse, __MetadataBearer {} + +/** + *

Adds or edits tags on an Application Auto Scaling scalable target.

+ *

Each tag consists of a tag key and a tag value, which are both case-sensitive strings. + * To add a tag, specify a new tag key and a tag value. To edit a tag, specify an existing tag + * key and a new tag value.

+ *

You can use this operation to tag an Application Auto Scaling scalable target, but you cannot tag a + * scaling policy or scheduled action.

+ *

You can also add tags to an Application Auto Scaling scalable target while creating it + * (RegisterScalableTarget).

+ *

For general information about tags, including the format and syntax, see Tagging Amazon Web Services + * resources in the Amazon Web Services General Reference.

+ *

Use tags to control access to a scalable target. For more information, see Tagging support + * for Application Auto Scaling in the Application Auto Scaling User Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ApplicationAutoScalingClient, TagResourceCommand } from "@aws-sdk/client-application-auto-scaling"; // ES Modules import + * // const { ApplicationAutoScalingClient, TagResourceCommand } = require("@aws-sdk/client-application-auto-scaling"); // CommonJS import + * const client = new ApplicationAutoScalingClient(config); + * const command = new TagResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link TagResourceCommandInput} for command's `input` shape. + * @see {@link TagResourceCommandOutput} for command's `response` shape. + * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape. + * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * @throws {@link TooManyTagsException} (client fault) + *

The request contains too many tags. Try the request again with fewer tags.

+ * + * @throws {@link ValidationException} (client fault) + *

An exception was thrown for a validation issue. Review the available parameters for the + * API request.

+ * + * + */ +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + ApplicationAutoScalingClientResolvedConfig +> { + // 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: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ApplicationAutoScalingClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, TagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ApplicationAutoScalingClient"; + const commandName = "TagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: TagResourceRequestFilterSensitiveLog, + outputFilterSensitiveLog: TagResourceResponseFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: TagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1TagResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1TagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-application-auto-scaling/src/commands/UntagResourceCommand.ts b/clients/client-application-auto-scaling/src/commands/UntagResourceCommand.ts new file mode 100644 index 0000000000000..24abfc6f32a53 --- /dev/null +++ b/clients/client-application-auto-scaling/src/commands/UntagResourceCommand.ts @@ -0,0 +1,131 @@ +// 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 { + ApplicationAutoScalingClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes, +} from "../ApplicationAutoScalingClient"; +import { + UntagResourceRequest, + UntagResourceRequestFilterSensitiveLog, + UntagResourceResponse, + UntagResourceResponseFilterSensitiveLog, +} from "../models/models_0"; +import { + deserializeAws_json1_1UntagResourceCommand, + serializeAws_json1_1UntagResourceCommand, +} from "../protocols/Aws_json1_1"; + +/** + * The input for {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandInput extends UntagResourceRequest {} +/** + * The output of {@link UntagResourceCommand}. + */ +export interface UntagResourceCommandOutput extends UntagResourceResponse, __MetadataBearer {} + +/** + *

Deletes tags from an Application Auto Scaling scalable target. To delete a tag, specify the tag key and + * the Application Auto Scaling scalable target.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { ApplicationAutoScalingClient, UntagResourceCommand } from "@aws-sdk/client-application-auto-scaling"; // ES Modules import + * // const { ApplicationAutoScalingClient, UntagResourceCommand } = require("@aws-sdk/client-application-auto-scaling"); // CommonJS import + * const client = new ApplicationAutoScalingClient(config); + * const command = new UntagResourceCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UntagResourceCommandInput} for command's `input` shape. + * @see {@link UntagResourceCommandOutput} for command's `response` shape. + * @see {@link ApplicationAutoScalingClientResolvedConfig | config} for ApplicationAutoScalingClient's `config` shape. + * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource doesn't exist.

+ * + * @throws {@link ValidationException} (client fault) + *

An exception was thrown for a validation issue. Review the available parameters for the + * API request.

+ * + * + */ +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + ApplicationAutoScalingClientResolvedConfig +> { + // 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: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: ApplicationAutoScalingClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use(getEndpointPlugin(configuration, UntagResourceCommand.getEndpointParameterInstructions())); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "ApplicationAutoScalingClient"; + const commandName = "UntagResourceCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: UntagResourceRequestFilterSensitiveLog, + outputFilterSensitiveLog: UntagResourceResponseFilterSensitiveLog, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize(input: UntagResourceCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return serializeAws_json1_1UntagResourceCommand(input, context); + } + + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return deserializeAws_json1_1UntagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-application-auto-scaling/src/commands/index.ts b/clients/client-application-auto-scaling/src/commands/index.ts index 369068ed11295..f65f1360afe91 100644 --- a/clients/client-application-auto-scaling/src/commands/index.ts +++ b/clients/client-application-auto-scaling/src/commands/index.ts @@ -6,6 +6,9 @@ export * from "./DescribeScalableTargetsCommand"; export * from "./DescribeScalingActivitiesCommand"; export * from "./DescribeScalingPoliciesCommand"; export * from "./DescribeScheduledActionsCommand"; +export * from "./ListTagsForResourceCommand"; export * from "./PutScalingPolicyCommand"; export * from "./PutScheduledActionCommand"; export * from "./RegisterScalableTargetCommand"; +export * from "./TagResourceCommand"; +export * from "./UntagResourceCommand"; diff --git a/clients/client-application-auto-scaling/src/models/models_0.ts b/clients/client-application-auto-scaling/src/models/models_0.ts index 3a0247ed7391e..92613a10d7cfd 100644 --- a/clients/client-application-auto-scaling/src/models/models_0.ts +++ b/clients/client-application-auto-scaling/src/models/models_0.ts @@ -1069,6 +1069,11 @@ export interface ScalableTarget { * state.

*/ SuspendedState?: SuspendedState; + + /** + *

The ARN of the scalable target.

+ */ + ScalableTargetARN?: string; } export interface DescribeScalableTargetsResponse { @@ -1782,12 +1787,14 @@ export enum MetricAggregationType { * 50:

*
    *
  • - *

    To trigger the adjustment when the metric is greater than or equal to 50 and less - * than 60, specify a lower bound of 0 and an upper bound of 10.

    + *

    To initiate the adjustment when the metric is greater than or equal to 50 and less + * than 60, specify a lower bound of 0 and an upper bound of + * 10.

    *
  • *
  • - *

    To trigger the adjustment when the metric is greater than 40 and less than or - * equal to 50, specify a lower bound of -10 and an upper bound of 0.

    + *

    To initiate the adjustment when the metric is greater than 40 and less than or + * equal to 50, specify a lower bound of -10 and an upper bound of + * 0.

    *
  • *
*

There are a few rules for the step adjustments for your step policy:

@@ -1814,7 +1821,7 @@ export interface StepAdjustment { /** *

The lower bound for the difference between the alarm threshold and the CloudWatch metric. If * the metric value is above the breach threshold, the lower bound is inclusive (the metric - * must be greater than or equal to the threshold plus the lower bound). Otherwise, it is + * must be greater than or equal to the threshold plus the lower bound). Otherwise, it's * exclusive (the metric must be greater than the threshold plus the lower bound). A null * value indicates negative infinity.

*/ @@ -1823,7 +1830,7 @@ export interface StepAdjustment { /** *

The upper bound for the difference between the alarm threshold and the CloudWatch metric. If * the metric value is above the breach threshold, the upper bound is exclusive (the metric - * must be less than the threshold plus the upper bound). Otherwise, it is inclusive (the + * must be less than the threshold plus the upper bound). Otherwise, it's inclusive (the * metric must be less than or equal to the threshold plus the upper bound). A null value * indicates positive infinity.

*

The upper bound must be greater than the lower bound.

@@ -2020,8 +2027,7 @@ export interface TargetTrackingMetricStat { /** *

The statistic to return. It can include any CloudWatch statistic or extended statistic. For a * list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.

- *

The most commonly used metrics for scaling is Average - *

+ *

The most commonly used metric for scaling is Average.

*/ Stat: string | undefined; @@ -2123,7 +2129,7 @@ export enum MetricStatistic { export interface CustomizedMetricSpecification { /** *

The name of the metric. To get the exact metric name, namespace, and dimensions, inspect - * the Metric object that is returned by a call to ListMetrics.

+ * the Metric object that's returned by a call to ListMetrics.

*/ MetricName?: string; @@ -3086,6 +3092,50 @@ export interface DescribeScheduledActionsResponse { NextToken?: string; } +export interface ListTagsForResourceRequest { + /** + *

Specify the ARN of the scalable target.

+ *

For example: + * arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123 + *

+ *

To get the ARN for a scalable target, use DescribeScalableTargets.

+ */ + ResourceARN: string | undefined; +} + +export interface ListTagsForResourceResponse { + /** + *

A list of tags. Each tag consists of a tag key and a tag value.

+ */ + Tags?: Record; +} + +/** + *

The specified resource doesn't exist.

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

The name of the Application Auto Scaling resource. This value is an Amazon Resource Name (ARN).

+ */ + ResourceName?: string; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ResourceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceNotFoundException.prototype); + this.Message = opts.Message; + this.ResourceName = opts.ResourceName; + } +} + /** *

A per-account resource limit is exceeded. For more information, see Application Auto Scaling service quotas.

*/ @@ -3755,7 +3805,7 @@ export interface RegisterScalableTargetRequest { *

The maximum value that you plan to scale out to. When a scaling policy is in effect, * Application Auto Scaling can scale out (expand) as needed to the maximum capacity limit in response to * changing demand. This property is required when registering a new scalable target.

- *

Although you can specify a large maximum capacity, note that service quotas may impose + *

Although you can specify a large maximum capacity, note that service quotas might impose * lower limits. Each service has its own default quotas for the maximum capacity of the * resource. If you want to specify a higher limit, you can request an increase. For more * information, consult the documentation for that service. For information about the default @@ -3799,9 +3849,95 @@ export interface RegisterScalableTargetRequest { * Guide.

*/ SuspendedState?: SuspendedState; + + /** + *

Assigns one or more tags to the scalable target. Use this parameter to tag the scalable + * target when it is created. To tag an existing scalable target, use the TagResource operation.

+ *

Each tag consists of a tag key and a tag value. Both the tag key and the tag value are + * required. You cannot have more than one tag on a scalable target with the same tag + * key.

+ *

Use tags to control access to a scalable target. For more information, see Tagging support + * for Application Auto Scaling in the Application Auto Scaling User Guide.

+ */ + Tags?: Record; +} + +export interface RegisterScalableTargetResponse { + /** + *

The ARN of the scalable target.

+ */ + ScalableTargetARN?: string; } -export interface RegisterScalableTargetResponse {} +export interface TagResourceRequest { + /** + *

Identifies the Application Auto Scaling scalable target that you want to apply tags to.

+ *

For example: + * arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123 + *

+ *

To get the ARN for a scalable target, use DescribeScalableTargets.

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

The tags assigned to the resource. A tag is a label that you assign to an AWS + * resource.

+ *

Each tag consists of a tag key and a tag value.

+ *

You cannot have more than one tag on an Application Auto Scaling scalable target with the same tag key. + * If you specify an existing tag key with a different tag value, Application Auto Scaling replaces the + * current tag value with the specified one.

+ *

For information about the rules that apply to tag keys and tag values, see User-defined tag + * restrictions in the Amazon Web Services Billing and Cost Management User + * Guide.

+ */ + Tags: Record | undefined; +} + +export interface TagResourceResponse {} + +/** + *

The request contains too many tags. Try the request again with fewer tags.

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

The name of the Application Auto Scaling resource. This value is an Amazon Resource Name (ARN).

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

Identifies the Application Auto Scaling scalable target from which to remove tags.

+ *

For example: + * arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123 + *

+ *

To get the ARN for a scalable target, use DescribeScalableTargets.

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

One or more tag keys. Specify only the tag keys, not the tag values.

+ */ + TagKeys: string[] | undefined; +} + +export interface UntagResourceResponse {} /** * @internal @@ -4029,6 +4165,20 @@ export const DescribeScheduledActionsResponseFilterSensitiveLog = (obj: Describe ...obj, }); +/** + * @internal + */ +export const ListTagsForResourceRequestFilterSensitiveLog = (obj: ListTagsForResourceRequest): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const ListTagsForResourceResponseFilterSensitiveLog = (obj: ListTagsForResourceResponse): any => ({ + ...obj, +}); + /** * @internal */ @@ -4070,3 +4220,31 @@ export const RegisterScalableTargetRequestFilterSensitiveLog = (obj: RegisterSca export const RegisterScalableTargetResponseFilterSensitiveLog = (obj: RegisterScalableTargetResponse): any => ({ ...obj, }); + +/** + * @internal + */ +export const TagResourceRequestFilterSensitiveLog = (obj: TagResourceRequest): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const TagResourceResponseFilterSensitiveLog = (obj: TagResourceResponse): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const UntagResourceRequestFilterSensitiveLog = (obj: UntagResourceRequest): any => ({ + ...obj, +}); + +/** + * @internal + */ +export const UntagResourceResponseFilterSensitiveLog = (obj: UntagResourceResponse): any => ({ + ...obj, +}); diff --git a/clients/client-application-auto-scaling/src/protocols/Aws_json1_1.ts b/clients/client-application-auto-scaling/src/protocols/Aws_json1_1.ts index 58280511696ea..6bbfdddfd6516 100644 --- a/clients/client-application-auto-scaling/src/protocols/Aws_json1_1.ts +++ b/clients/client-application-auto-scaling/src/protocols/Aws_json1_1.ts @@ -47,12 +47,18 @@ import { DescribeScheduledActionsCommandInput, DescribeScheduledActionsCommandOutput, } from "../commands/DescribeScheduledActionsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, +} from "../commands/ListTagsForResourceCommand"; import { PutScalingPolicyCommandInput, PutScalingPolicyCommandOutput } from "../commands/PutScalingPolicyCommand"; import { PutScheduledActionCommandInput, PutScheduledActionCommandOutput } from "../commands/PutScheduledActionCommand"; import { RegisterScalableTargetCommandInput, RegisterScalableTargetCommandOutput, } from "../commands/RegisterScalableTargetCommand"; +import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; +import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { ApplicationAutoScalingServiceException as __BaseException } from "../models/ApplicationAutoScalingServiceException"; import { Alarm, @@ -76,6 +82,8 @@ import { InternalServiceException, InvalidNextTokenException, LimitExceededException, + ListTagsForResourceRequest, + ListTagsForResourceResponse, MetricDimension, NotScaledReason, ObjectNotFoundException, @@ -86,6 +94,7 @@ import { PutScheduledActionResponse, RegisterScalableTargetRequest, RegisterScalableTargetResponse, + ResourceNotFoundException, ScalableTarget, ScalableTargetAction, ScalingActivity, @@ -94,11 +103,16 @@ import { StepAdjustment, StepScalingPolicyConfiguration, SuspendedState, + TagResourceRequest, + TagResourceResponse, TargetTrackingMetric, TargetTrackingMetricDataQuery, TargetTrackingMetricDimension, TargetTrackingMetricStat, TargetTrackingScalingPolicyConfiguration, + TooManyTagsException, + UntagResourceRequest, + UntagResourceResponse, ValidationException, } from "../models/models_0"; @@ -193,6 +207,19 @@ export const serializeAws_json1_1DescribeScheduledActionsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1ListTagsForResourceCommand = async ( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AnyScaleFrontendService.ListTagsForResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1ListTagsForResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1PutScalingPolicyCommand = async ( input: PutScalingPolicyCommandInput, context: __SerdeContext @@ -232,6 +259,32 @@ export const serializeAws_json1_1RegisterScalableTargetCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1TagResourceCommand = async ( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AnyScaleFrontendService.TagResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + +export const serializeAws_json1_1UntagResourceCommand = async ( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "AnyScaleFrontendService.UntagResource", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const deserializeAws_json1_1DeleteScalingPolicyCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -585,6 +638,47 @@ const deserializeAws_json1_1DescribeScheduledActionsCommandError = async ( } }; +export const deserializeAws_json1_1ListTagsForResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1ListTagsForResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListTagsForResourceResponse(data, context); + const response: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1ListTagsForResourceCommandError = 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 "ResourceNotFoundException": + case "com.amazonaws.applicationautoscaling#ResourceNotFoundException": + throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + export const deserializeAws_json1_1PutScalingPolicyCommand = async ( output: __HttpResponse, context: __SerdeContext @@ -744,6 +838,97 @@ const deserializeAws_json1_1RegisterScalableTargetCommandError = async ( } }; +export const deserializeAws_json1_1TagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1TagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1TagResourceResponse(data, context); + const response: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1TagResourceCommandError = 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 "ResourceNotFoundException": + case "com.amazonaws.applicationautoscaling#ResourceNotFoundException": + throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "TooManyTagsException": + case "com.amazonaws.applicationautoscaling#TooManyTagsException": + throw await deserializeAws_json1_1TooManyTagsExceptionResponse(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.applicationautoscaling#ValidationException": + throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + +export const deserializeAws_json1_1UntagResourceCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode >= 300) { + return deserializeAws_json1_1UntagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UntagResourceResponse(data, context); + const response: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + ...contents, + }; + return Promise.resolve(response); +}; + +const deserializeAws_json1_1UntagResourceCommandError = 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 "ResourceNotFoundException": + case "com.amazonaws.applicationautoscaling#ResourceNotFoundException": + throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.applicationautoscaling#ValidationException": + throw await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + throwDefaultError({ + output, + parsedBody, + exceptionCtor: __BaseException, + errorCode, + }); + } +}; + const deserializeAws_json1_1ConcurrentUpdateExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -822,6 +1007,32 @@ const deserializeAws_json1_1ObjectNotFoundExceptionResponse = async ( return __decorateServiceException(exception, body); }; +const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_1ResourceNotFoundException(body, context); + const exception = new ResourceNotFoundException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + +const deserializeAws_json1_1TooManyTagsExceptionResponse = async ( + parsedOutput: any, + context: __SerdeContext +): Promise => { + const body = parsedOutput.body; + const deserialized: any = deserializeAws_json1_1TooManyTagsException(body, context); + const exception = new TooManyTagsException({ + $metadata: deserializeMetadata(parsedOutput), + ...deserialized, + }); + return __decorateServiceException(exception, body); +}; + const deserializeAws_json1_1ValidationExceptionResponse = async ( parsedOutput: any, context: __SerdeContext @@ -947,6 +1158,15 @@ const serializeAws_json1_1DescribeScheduledActionsRequest = ( }; }; +const serializeAws_json1_1ListTagsForResourceRequest = ( + input: ListTagsForResourceRequest, + context: __SerdeContext +): any => { + return { + ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), + }; +}; + const serializeAws_json1_1MetricDimension = (input: MetricDimension, context: __SerdeContext): any => { return { ...(input.Name != null && { Name: input.Name }), @@ -1027,6 +1247,7 @@ const serializeAws_json1_1RegisterScalableTargetRequest = ( ...(input.SuspendedState != null && { SuspendedState: serializeAws_json1_1SuspendedState(input.SuspendedState, context), }), + ...(input.Tags != null && { Tags: serializeAws_json1_1TagMap(input.Tags, context) }), }; }; @@ -1088,6 +1309,31 @@ const serializeAws_json1_1SuspendedState = (input: SuspendedState, context: __Se }; }; +const serializeAws_json1_1TagKeyList = (input: string[], context: __SerdeContext): any => { + return input + .filter((e: any) => e != null) + .map((entry) => { + return entry; + }); +}; + +const serializeAws_json1_1TagMap = (input: Record, context: __SerdeContext): any => { + return Object.entries(input).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = value; + return acc; + }, {}); +}; + +const serializeAws_json1_1TagResourceRequest = (input: TagResourceRequest, context: __SerdeContext): any => { + return { + ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), + ...(input.Tags != null && { Tags: serializeAws_json1_1TagMap(input.Tags, context) }), + }; +}; + const serializeAws_json1_1TargetTrackingMetric = (input: TargetTrackingMetric, context: __SerdeContext): any => { return { ...(input.Dimensions != null && { @@ -1180,6 +1426,13 @@ const serializeAws_json1_1TargetTrackingScalingPolicyConfiguration = ( }; }; +const serializeAws_json1_1UntagResourceRequest = (input: UntagResourceRequest, context: __SerdeContext): any => { + return { + ...(input.ResourceARN != null && { ResourceARN: input.ResourceARN }), + ...(input.TagKeys != null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }), + }; +}; + const deserializeAws_json1_1Alarm = (output: any, context: __SerdeContext): Alarm => { return { AlarmARN: __expectString(output.AlarmARN), @@ -1332,6 +1585,15 @@ const deserializeAws_json1_1LimitExceededException = (output: any, context: __Se } as any; }; +const deserializeAws_json1_1ListTagsForResourceResponse = ( + output: any, + context: __SerdeContext +): ListTagsForResourceResponse => { + return { + Tags: output.Tags != null ? deserializeAws_json1_1TagMap(output.Tags, context) : undefined, + } as any; +}; + const deserializeAws_json1_1MetricDimension = (output: any, context: __SerdeContext): MetricDimension => { return { Name: __expectString(output.Name), @@ -1412,7 +1674,19 @@ const deserializeAws_json1_1RegisterScalableTargetResponse = ( output: any, context: __SerdeContext ): RegisterScalableTargetResponse => { - return {} as any; + return { + ScalableTargetARN: __expectString(output.ScalableTargetARN), + } as any; +}; + +const deserializeAws_json1_1ResourceNotFoundException = ( + output: any, + context: __SerdeContext +): ResourceNotFoundException => { + return { + Message: __expectString(output.Message), + ResourceName: __expectString(output.ResourceName), + } as any; }; const deserializeAws_json1_1ScalableTarget = (output: any, context: __SerdeContext): ScalableTarget => { @@ -1426,6 +1700,7 @@ const deserializeAws_json1_1ScalableTarget = (output: any, context: __SerdeConte ResourceId: __expectString(output.ResourceId), RoleARN: __expectString(output.RoleARN), ScalableDimension: __expectString(output.ScalableDimension), + ScalableTargetARN: __expectString(output.ScalableTargetARN), ServiceNamespace: __expectString(output.ServiceNamespace), SuspendedState: output.SuspendedState != null ? deserializeAws_json1_1SuspendedState(output.SuspendedState, context) : undefined, @@ -1604,6 +1879,20 @@ const deserializeAws_json1_1SuspendedState = (output: any, context: __SerdeConte } as any; }; +const deserializeAws_json1_1TagMap = (output: any, context: __SerdeContext): Record => { + return Object.entries(output).reduce((acc: Record, [key, value]: [string, any]) => { + if (value === null) { + return acc; + } + acc[key] = __expectString(value) as any; + return acc; + }, {}); +}; + +const deserializeAws_json1_1TagResourceResponse = (output: any, context: __SerdeContext): TagResourceResponse => { + return {} as any; +}; + const deserializeAws_json1_1TargetTrackingMetric = (output: any, context: __SerdeContext): TargetTrackingMetric => { return { Dimensions: @@ -1702,6 +1991,17 @@ const deserializeAws_json1_1TargetTrackingScalingPolicyConfiguration = ( } as any; }; +const deserializeAws_json1_1TooManyTagsException = (output: any, context: __SerdeContext): TooManyTagsException => { + return { + Message: __expectString(output.Message), + ResourceName: __expectString(output.ResourceName), + } as any; +}; + +const deserializeAws_json1_1UntagResourceResponse = (output: any, context: __SerdeContext): UntagResourceResponse => { + return {} as any; +}; + const deserializeAws_json1_1ValidationException = (output: any, context: __SerdeContext): ValidationException => { return { Message: __expectString(output.Message), diff --git a/codegen/sdk-codegen/aws-models/application-auto-scaling.json b/codegen/sdk-codegen/aws-models/application-auto-scaling.json index 9716cb58d0c77..cec0ea1f99ea3 100644 --- a/codegen/sdk-codegen/aws-models/application-auto-scaling.json +++ b/codegen/sdk-codegen/aws-models/application-auto-scaling.json @@ -80,6 +80,16 @@ "target": "com.amazonaws.applicationautoscaling#Alarm" } }, + "com.amazonaws.applicationautoscaling#AmazonResourceName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1011 + }, + "smithy.api#pattern": "^arn:.+:application-autoscaling:.+:[0-9]+:scalable-target\\/[a-zA-Z0-9-]+$" + } + }, "com.amazonaws.applicationautoscaling#AnyScaleFrontendService": { "type": "service", "version": "2016-02-06", @@ -105,6 +115,9 @@ { "target": "com.amazonaws.applicationautoscaling#DescribeScheduledActions" }, + { + "target": "com.amazonaws.applicationautoscaling#ListTagsForResource" + }, { "target": "com.amazonaws.applicationautoscaling#PutScalingPolicy" }, @@ -113,6 +126,12 @@ }, { "target": "com.amazonaws.applicationautoscaling#RegisterScalableTarget" + }, + { + "target": "com.amazonaws.applicationautoscaling#TagResource" + }, + { + "target": "com.amazonaws.applicationautoscaling#UntagResource" } ], "traits": { @@ -514,9 +533,9 @@ } }, "params": { - "Region": "af-south-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "af-south-1" } }, { @@ -527,9 +546,9 @@ } }, "params": { - "Region": "ap-east-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "ap-east-1" } }, { @@ -540,9 +559,9 @@ } }, "params": { - "Region": "ap-northeast-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "ap-northeast-1" } }, { @@ -553,9 +572,9 @@ } }, "params": { - "Region": "ap-northeast-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "ap-northeast-2" } }, { @@ -566,9 +585,9 @@ } }, "params": { - "Region": "ap-northeast-3", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "ap-northeast-3" } }, { @@ -579,9 +598,9 @@ } }, "params": { - "Region": "ap-south-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "ap-south-1" } }, { @@ -592,9 +611,9 @@ } }, "params": { - "Region": "ap-southeast-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "ap-southeast-1" } }, { @@ -605,9 +624,9 @@ } }, "params": { - "Region": "ap-southeast-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "ap-southeast-2" } }, { @@ -618,9 +637,9 @@ } }, "params": { - "Region": "ap-southeast-3", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "ap-southeast-3" } }, { @@ -631,9 +650,9 @@ } }, "params": { - "Region": "ca-central-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "ca-central-1" } }, { @@ -644,9 +663,9 @@ } }, "params": { - "Region": "eu-central-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "eu-central-1" } }, { @@ -657,9 +676,9 @@ } }, "params": { - "Region": "eu-north-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "eu-north-1" } }, { @@ -670,9 +689,9 @@ } }, "params": { - "Region": "eu-south-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "eu-south-1" } }, { @@ -683,9 +702,9 @@ } }, "params": { - "Region": "eu-west-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "eu-west-1" } }, { @@ -696,9 +715,9 @@ } }, "params": { - "Region": "eu-west-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "eu-west-2" } }, { @@ -709,9 +728,9 @@ } }, "params": { - "Region": "eu-west-3", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "eu-west-3" } }, { @@ -722,9 +741,9 @@ } }, "params": { - "Region": "me-south-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "me-south-1" } }, { @@ -735,9 +754,9 @@ } }, "params": { - "Region": "sa-east-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "sa-east-1" } }, { @@ -748,9 +767,9 @@ } }, "params": { - "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "us-east-1" } }, { @@ -761,9 +780,9 @@ } }, "params": { - "Region": "us-east-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "us-east-2" } }, { @@ -774,9 +793,9 @@ } }, "params": { - "Region": "us-west-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "us-west-1" } }, { @@ -787,9 +806,9 @@ } }, "params": { - "Region": "us-west-2", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "us-west-2" } }, { @@ -800,9 +819,9 @@ } }, "params": { - "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": true, - "UseFIPS": true + "Region": "us-east-1" } }, { @@ -813,9 +832,9 @@ } }, "params": { - "Region": "us-east-1", + "UseFIPS": true, "UseDualStack": false, - "UseFIPS": true + "Region": "us-east-1" } }, { @@ -826,9 +845,9 @@ } }, "params": { - "Region": "us-east-1", + "UseFIPS": false, "UseDualStack": true, - "UseFIPS": false + "Region": "us-east-1" } }, { @@ -839,9 +858,9 @@ } }, "params": { - "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "cn-north-1" } }, { @@ -852,9 +871,9 @@ } }, "params": { - "Region": "cn-northwest-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "cn-northwest-1" } }, { @@ -865,9 +884,9 @@ } }, "params": { - "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": true, - "UseFIPS": true + "Region": "cn-north-1" } }, { @@ -878,9 +897,9 @@ } }, "params": { - "Region": "cn-north-1", + "UseFIPS": true, "UseDualStack": false, - "UseFIPS": true + "Region": "cn-north-1" } }, { @@ -891,9 +910,9 @@ } }, "params": { - "Region": "cn-north-1", + "UseFIPS": false, "UseDualStack": true, - "UseFIPS": false + "Region": "cn-north-1" } }, { @@ -904,9 +923,9 @@ } }, "params": { - "Region": "us-gov-east-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "us-gov-east-1" } }, { @@ -917,9 +936,9 @@ } }, "params": { - "Region": "us-gov-east-1", + "UseFIPS": true, "UseDualStack": false, - "UseFIPS": true + "Region": "us-gov-east-1" } }, { @@ -930,9 +949,9 @@ } }, "params": { - "Region": "us-gov-west-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "us-gov-west-1" } }, { @@ -943,9 +962,9 @@ } }, "params": { - "Region": "us-gov-west-1", + "UseFIPS": true, "UseDualStack": false, - "UseFIPS": true + "Region": "us-gov-west-1" } }, { @@ -956,9 +975,9 @@ } }, "params": { - "Region": "us-gov-east-1", + "UseFIPS": true, "UseDualStack": true, - "UseFIPS": true + "Region": "us-gov-east-1" } }, { @@ -969,9 +988,9 @@ } }, "params": { - "Region": "us-gov-east-1", + "UseFIPS": false, "UseDualStack": true, - "UseFIPS": false + "Region": "us-gov-east-1" } }, { @@ -982,9 +1001,9 @@ } }, "params": { - "Region": "us-iso-east-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "us-iso-east-1" } }, { @@ -995,9 +1014,9 @@ } }, "params": { - "Region": "us-iso-west-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "us-iso-west-1" } }, { @@ -1008,9 +1027,9 @@ } }, "params": { - "Region": "us-iso-east-1", + "UseFIPS": true, "UseDualStack": false, - "UseFIPS": true + "Region": "us-iso-east-1" } }, { @@ -1021,9 +1040,9 @@ } }, "params": { - "Region": "us-isob-east-1", + "UseFIPS": false, "UseDualStack": false, - "UseFIPS": false + "Region": "us-isob-east-1" } }, { @@ -1034,9 +1053,9 @@ } }, "params": { - "Region": "us-isob-east-1", + "UseFIPS": true, "UseDualStack": false, - "UseFIPS": true + "Region": "us-isob-east-1" } }, { @@ -1047,9 +1066,9 @@ } }, "params": { - "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, + "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1061,8 +1080,8 @@ } }, "params": { - "UseDualStack": false, "UseFIPS": false, + "UseDualStack": false, "Endpoint": "https://example.com" } }, @@ -1072,9 +1091,9 @@ "error": "Invalid Configuration: FIPS and custom endpoint are not supported" }, "params": { - "Region": "us-east-1", - "UseDualStack": false, "UseFIPS": true, + "UseDualStack": false, + "Region": "us-east-1", "Endpoint": "https://example.com" } }, @@ -1084,9 +1103,9 @@ "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" }, "params": { - "Region": "us-east-1", - "UseDualStack": true, "UseFIPS": false, + "UseDualStack": true, + "Region": "us-east-1", "Endpoint": "https://example.com" } } @@ -1121,7 +1140,7 @@ "MetricName": { "target": "com.amazonaws.applicationautoscaling#MetricName", "traits": { - "smithy.api#documentation": "

The name of the metric. To get the exact metric name, namespace, and dimensions, inspect\n the Metric object that is returned by a call to ListMetrics.

" + "smithy.api#documentation": "

The name of the metric. To get the exact metric name, namespace, and dimensions, inspect\n the Metric object that's returned by a call to ListMetrics.

" } }, "Namespace": { @@ -1750,6 +1769,9 @@ "com.amazonaws.applicationautoscaling#ErrorMessage": { "type": "string" }, + "com.amazonaws.applicationautoscaling#ExceptionMessage": { + "type": "string" + }, "com.amazonaws.applicationautoscaling#Expression": { "type": "string", "traits": { @@ -1841,6 +1863,52 @@ "smithy.api#httpError": 400 } }, + "com.amazonaws.applicationautoscaling#ListTagsForResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.applicationautoscaling#ListTagsForResourceRequest" + }, + "output": { + "target": "com.amazonaws.applicationautoscaling#ListTagsForResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.applicationautoscaling#ResourceNotFoundException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns all the tags on the specified Application Auto Scaling scalable target.

\n

For general information about tags, including the format and syntax, see Tagging Amazon Web Services\n resources in the Amazon Web Services General Reference.

" + } + }, + "com.amazonaws.applicationautoscaling#ListTagsForResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.applicationautoscaling#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

Specify the ARN of the scalable target.

\n

For example:\n arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123\n

\n

To get the ARN for a scalable target, use DescribeScalableTargets.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.applicationautoscaling#ListTagsForResourceResponse": { + "type": "structure", + "members": { + "Tags": { + "target": "com.amazonaws.applicationautoscaling#TagMap", + "traits": { + "smithy.api#documentation": "

A list of tags. Each tag consists of a tag key and a tag value.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.applicationautoscaling#MaxResults": { "type": "integer" }, @@ -2215,7 +2283,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates or updates a scaling policy for an Application Auto Scaling scalable target.

\n

Each scalable target is identified by a service namespace, resource ID, and scalable\n dimension. A scaling policy applies to the scalable target identified by those three\n attributes. You cannot create a scaling policy until you have registered the resource as a\n scalable target.

\n

Multiple scaling policies can be in force at the same time for the same scalable target.\n You can have one or more target tracking scaling policies, one or more step scaling\n policies, or both. However, there is a chance that multiple policies could conflict,\n instructing the scalable target to scale out or in at the same time. Application Auto Scaling gives\n precedence to the policy that provides the largest capacity for both scale out and scale\n in. For example, if one policy increases capacity by 3, another policy increases capacity\n by 200 percent, and the current capacity is 10, Application Auto Scaling uses the policy with the highest\n calculated capacity (200% of 10 = 20) and scales out to 30.

\n

We recommend caution, however, when using target tracking scaling policies with step\n scaling policies because conflicts between these policies can cause undesirable behavior.\n For example, if the step scaling policy initiates a scale-in activity before the target\n tracking policy is ready to scale in, the scale-in activity will not be blocked. After the\n scale-in activity completes, the target tracking policy could instruct the scalable target\n to scale out again.

\n

For more information, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide.

\n \n

If a scalable target is deregistered, the scalable target is no longer available to\n execute scaling policies. Any scaling policies that were specified for the scalable\n target are deleted.

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

Creates or updates a scaling policy for an Application Auto Scaling scalable target.

\n

Each scalable target is identified by a service namespace, resource ID, and scalable\n dimension. A scaling policy applies to the scalable target identified by those three\n attributes. You cannot create a scaling policy until you have registered the resource as a\n scalable target.

\n

Multiple scaling policies can be in force at the same time for the same scalable target.\n You can have one or more target tracking scaling policies, one or more step scaling\n policies, or both. However, there is a chance that multiple policies could conflict,\n instructing the scalable target to scale out or in at the same time. Application Auto Scaling gives\n precedence to the policy that provides the largest capacity for both scale out and scale\n in. For example, if one policy increases capacity by 3, another policy increases capacity\n by 200 percent, and the current capacity is 10, Application Auto Scaling uses the policy with the highest\n calculated capacity (200% of 10 = 20) and scales out to 30.

\n

We recommend caution, however, when using target tracking scaling policies with step\n scaling policies because conflicts between these policies can cause undesirable behavior.\n For example, if the step scaling policy initiates a scale-in activity before the target\n tracking policy is ready to scale in, the scale-in activity will not be blocked. After the\n scale-in activity completes, the target tracking policy could instruct the scalable target\n to scale out again.

\n

For more information, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide.

\n \n

If a scalable target is deregistered, the scalable target is no longer available to\n use scaling policies. Any scaling policies that were specified for the scalable target\n are deleted.

\n
" } }, "com.amazonaws.applicationautoscaling#PutScalingPolicyRequest": { @@ -2319,7 +2387,7 @@ } ], "traits": { - "smithy.api#documentation": "

Creates or updates a scheduled action for an Application Auto Scaling scalable target.

\n

Each scalable target is identified by a service namespace, resource ID, and scalable\n dimension. A scheduled action applies to the scalable target identified by those three\n attributes. You cannot create a scheduled action until you have registered the resource as\n a scalable target.

\n

When start and end times are specified with a recurring schedule using a cron expression\n or rates, they form the boundaries for when the recurring action starts and stops.

\n

To update a scheduled action, specify the parameters that you want to change. If you\n don't specify start and end times, the old values are deleted.

\n

For more information, see Scheduled scaling in the Application Auto Scaling User Guide.

\n \n

If a scalable target is deregistered, the scalable target is no longer available to\n run scheduled actions. Any scheduled actions that were specified for the scalable target\n are deleted.

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

Creates or updates a scheduled action for an Application Auto Scaling scalable target.

\n

Each scalable target is identified by a service namespace, resource ID, and scalable\n dimension. A scheduled action applies to the scalable target identified by those three\n attributes. You cannot create a scheduled action until you have registered the resource as\n a scalable target.

\n

When you specify start and end times with a recurring schedule using a cron expression\n or rates, they form the boundaries for when the recurring action starts and stops.

\n

To update a scheduled action, specify the parameters that you want to change. If you\n don't specify start and end times, the old values are deleted.

\n

For more information, see Scheduled scaling in the Application Auto Scaling User Guide.

\n \n

If a scalable target is deregistered, the scalable target is no longer available to\n run scheduled actions. Any scheduled actions that were specified for the scalable target\n are deleted.

\n
" } }, "com.amazonaws.applicationautoscaling#PutScheduledActionRequest": { @@ -2418,7 +2486,7 @@ } ], "traits": { - "smithy.api#documentation": "

Registers or updates a scalable target, the resource that you want to scale.

\n

Scalable targets are uniquely identified by the combination of resource ID, scalable\n dimension, and namespace, which represents some capacity dimension of the underlying\n service.

\n

When you register a new scalable target, you must specify values for the minimum and\n maximum capacity. If the specified resource is not active in the target service, this\n operation does not change the resource's current capacity. Otherwise, it changes the\n resource's current capacity to a value that is inside of this range.

\n

If you choose to add a scaling policy, current capacity is adjustable within the\n specified range when scaling starts. Application Auto Scaling scaling policies will not scale capacity to\n values that are outside of the minimum and maximum range.

\n

After you register a scalable target, you do not need to register it again to use other\n Application Auto Scaling operations. To see which resources have been registered, use DescribeScalableTargets. You can also view the scaling policies for a service\n namespace by using DescribeScalableTargets. If you no longer need a scalable target, you can\n deregister it by using DeregisterScalableTarget.

\n

To update a scalable target, specify the parameters that you want to change. Include the\n parameters that identify the scalable target: resource ID, scalable dimension, and\n namespace. Any parameters that you don't specify are not changed by this update request.

\n \n

If you call the RegisterScalableTarget API to update an existing\n scalable target, Application Auto Scaling retrieves the current capacity of the resource. If it is below\n the minimum capacity or above the maximum capacity, Application Auto Scaling adjusts the capacity of the\n scalable target to place it within these bounds, even if you don't include the\n MinCapacity or MaxCapacity request parameters.

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

Registers or updates a scalable target, which is the resource that you want to\n scale.

\n

Scalable targets are uniquely identified by the combination of resource ID, scalable\n dimension, and namespace, which represents some capacity dimension of the underlying\n service.

\n

When you register a new scalable target, you must specify values for the minimum and\n maximum capacity. If the specified resource is not active in the target service, this\n operation does not change the resource's current capacity. Otherwise, it changes the\n resource's current capacity to a value that is inside of this range.

\n

If you add a scaling policy, current capacity is adjustable within the specified range\n when scaling starts. Application Auto Scaling scaling policies will not scale capacity to values that are\n outside of the minimum and maximum range.

\n

After you register a scalable target, you do not need to register it again to use other\n Application Auto Scaling operations. To see which resources have been registered, use DescribeScalableTargets. You can also view the scaling policies for a service\n namespace by using DescribeScalableTargets. If you no longer need a scalable target, you can\n deregister it by using DeregisterScalableTarget.

\n

To update a scalable target, specify the parameters that you want to change. Include the\n parameters that identify the scalable target: resource ID, scalable dimension, and\n namespace. Any parameters that you don't specify are not changed by this update request.

\n \n

If you call the RegisterScalableTarget API operation to create a\n scalable target, there might be a brief delay until the operation achieves eventual\n consistency. You might become aware of this brief delay if you get unexpected\n errors when performing sequential operations. The typical strategy is to retry the\n request, and some Amazon Web Services SDKs include automatic backoff and retry logic.

\n

If you call the RegisterScalableTarget API operation to update an\n existing scalable target, Application Auto Scaling retrieves the current capacity of the resource. If\n it's below the minimum capacity or above the maximum capacity, Application Auto Scaling adjusts the\n capacity of the scalable target to place it within these bounds, even if you don't\n include the MinCapacity or MaxCapacity request\n parameters.

\n
" } }, "com.amazonaws.applicationautoscaling#RegisterScalableTargetRequest": { @@ -2454,7 +2522,7 @@ "MaxCapacity": { "target": "com.amazonaws.applicationautoscaling#ResourceCapacity", "traits": { - "smithy.api#documentation": "

The maximum value that you plan to scale out to. When a scaling policy is in effect,\n Application Auto Scaling can scale out (expand) as needed to the maximum capacity limit in response to\n changing demand. This property is required when registering a new scalable target.

\n

Although you can specify a large maximum capacity, note that service quotas may impose\n lower limits. Each service has its own default quotas for the maximum capacity of the\n resource. If you want to specify a higher limit, you can request an increase. For more\n information, consult the documentation for that service. For information about the default\n quotas for each service, see Service endpoints and\n quotas in the Amazon Web Services General Reference.

" + "smithy.api#documentation": "

The maximum value that you plan to scale out to. When a scaling policy is in effect,\n Application Auto Scaling can scale out (expand) as needed to the maximum capacity limit in response to\n changing demand. This property is required when registering a new scalable target.

\n

Although you can specify a large maximum capacity, note that service quotas might impose\n lower limits. Each service has its own default quotas for the maximum capacity of the\n resource. If you want to specify a higher limit, you can request an increase. For more\n information, consult the documentation for that service. For information about the default\n quotas for each service, see Service endpoints and\n quotas in the Amazon Web Services General Reference.

" } }, "RoleARN": { @@ -2468,6 +2536,12 @@ "traits": { "smithy.api#documentation": "

An embedded object that contains attributes and attribute values that are used to\n suspend and resume automatic scaling. Setting the value of an attribute to\n true suspends the specified scaling activities. Setting it to\n false (default) resumes the specified scaling activities.

\n

\n Suspension Outcomes\n

\n
    \n
  • \n

    For DynamicScalingInSuspended, while a suspension is in effect, all\n scale-in activities that are triggered by a scaling policy are suspended.

    \n
  • \n
  • \n

    For DynamicScalingOutSuspended, while a suspension is in effect, all\n scale-out activities that are triggered by a scaling policy are suspended.

    \n
  • \n
  • \n

    For ScheduledScalingSuspended, while a suspension is in effect, all\n scaling activities that involve scheduled actions are suspended.

    \n
  • \n
\n

For more information, see Suspending and resuming scaling in the Application Auto Scaling User\n Guide.

" } + }, + "Tags": { + "target": "com.amazonaws.applicationautoscaling#TagMap", + "traits": { + "smithy.api#documentation": "

Assigns one or more tags to the scalable target. Use this parameter to tag the scalable\n target when it is created. To tag an existing scalable target, use the TagResource operation.

\n

Each tag consists of a tag key and a tag value. Both the tag key and the tag value are\n required. You cannot have more than one tag on a scalable target with the same tag\n key.

\n

Use tags to control access to a scalable target. For more information, see Tagging support\n for Application Auto Scaling in the Application Auto Scaling User Guide.

" + } } }, "traits": { @@ -2476,7 +2550,14 @@ }, "com.amazonaws.applicationautoscaling#RegisterScalableTargetResponse": { "type": "structure", - "members": {}, + "members": { + "ScalableTargetARN": { + "target": "com.amazonaws.applicationautoscaling#XmlString", + "traits": { + "smithy.api#documentation": "

The ARN of the scalable target.

" + } + } + }, "traits": { "smithy.api#output": {} } @@ -2521,6 +2602,25 @@ } } }, + "com.amazonaws.applicationautoscaling#ResourceNotFoundException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.applicationautoscaling#ExceptionMessage" + }, + "ResourceName": { + "target": "com.amazonaws.applicationautoscaling#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Application Auto Scaling resource. This value is an Amazon Resource Name (ARN).

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

The specified resource doesn't exist.

", + "smithy.api#error": "client", + "smithy.api#httpError": 404 + } + }, "com.amazonaws.applicationautoscaling#ReturnData": { "type": "boolean" }, @@ -2706,6 +2806,12 @@ "traits": { "smithy.api#documentation": "

Specifies whether the scaling activities for a scalable target are in a suspended\n state.

" } + }, + "ScalableTargetARN": { + "target": "com.amazonaws.applicationautoscaling#XmlString", + "traits": { + "smithy.api#documentation": "

The ARN of the scalable target.

" + } } }, "traits": { @@ -3151,13 +3257,13 @@ "MetricIntervalLowerBound": { "target": "com.amazonaws.applicationautoscaling#MetricScale", "traits": { - "smithy.api#documentation": "

The lower bound for the difference between the alarm threshold and the CloudWatch metric. If\n the metric value is above the breach threshold, the lower bound is inclusive (the metric\n must be greater than or equal to the threshold plus the lower bound). Otherwise, it is\n exclusive (the metric must be greater than the threshold plus the lower bound). A null\n value indicates negative infinity.

" + "smithy.api#documentation": "

The lower bound for the difference between the alarm threshold and the CloudWatch metric. If\n the metric value is above the breach threshold, the lower bound is inclusive (the metric\n must be greater than or equal to the threshold plus the lower bound). Otherwise, it's\n exclusive (the metric must be greater than the threshold plus the lower bound). A null\n value indicates negative infinity.

" } }, "MetricIntervalUpperBound": { "target": "com.amazonaws.applicationautoscaling#MetricScale", "traits": { - "smithy.api#documentation": "

The upper bound for the difference between the alarm threshold and the CloudWatch metric. If\n the metric value is above the breach threshold, the upper bound is exclusive (the metric\n must be less than the threshold plus the upper bound). Otherwise, it is inclusive (the\n metric must be less than or equal to the threshold plus the upper bound). A null value\n indicates positive infinity.

\n

The upper bound must be greater than the lower bound.

" + "smithy.api#documentation": "

The upper bound for the difference between the alarm threshold and the CloudWatch metric. If\n the metric value is above the breach threshold, the upper bound is exclusive (the metric\n must be less than the threshold plus the upper bound). Otherwise, it's inclusive (the\n metric must be less than or equal to the threshold plus the upper bound). A null value\n indicates positive infinity.

\n

The upper bound must be greater than the lower bound.

" } }, "ScalingAdjustment": { @@ -3169,7 +3275,7 @@ } }, "traits": { - "smithy.api#documentation": "

Represents a step adjustment for a StepScalingPolicyConfiguration. Describes an adjustment based on the difference\n between the value of the aggregated CloudWatch metric and the breach threshold that you've\n defined for the alarm.

\n

For the following examples, suppose that you have an alarm with a breach threshold of\n 50:

\n
    \n
  • \n

    To trigger the adjustment when the metric is greater than or equal to 50 and less\n than 60, specify a lower bound of 0 and an upper bound of 10.

    \n
  • \n
  • \n

    To trigger the adjustment when the metric is greater than 40 and less than or\n equal to 50, specify a lower bound of -10 and an upper bound of 0.

    \n
  • \n
\n

There are a few rules for the step adjustments for your step policy:

\n
    \n
  • \n

    The ranges of your step adjustments can't overlap or have a gap.

    \n
  • \n
  • \n

    At most one step adjustment can have a null lower bound. If one step adjustment\n has a negative lower bound, then there must be a step adjustment with a null lower\n bound.

    \n
  • \n
  • \n

    At most one step adjustment can have a null upper bound. If one step adjustment\n has a positive upper bound, then there must be a step adjustment with a null upper\n bound.

    \n
  • \n
  • \n

    The upper and lower bound can't be null in the same step adjustment.

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

Represents a step adjustment for a StepScalingPolicyConfiguration. Describes an adjustment based on the difference\n between the value of the aggregated CloudWatch metric and the breach threshold that you've\n defined for the alarm.

\n

For the following examples, suppose that you have an alarm with a breach threshold of\n 50:

\n
    \n
  • \n

    To initiate the adjustment when the metric is greater than or equal to 50 and less\n than 60, specify a lower bound of 0 and an upper bound of\n 10.

    \n
  • \n
  • \n

    To initiate the adjustment when the metric is greater than 40 and less than or\n equal to 50, specify a lower bound of -10 and an upper bound of\n 0.

    \n
  • \n
\n

There are a few rules for the step adjustments for your step policy:

\n
    \n
  • \n

    The ranges of your step adjustments can't overlap or have a gap.

    \n
  • \n
  • \n

    At most one step adjustment can have a null lower bound. If one step adjustment\n has a negative lower bound, then there must be a step adjustment with a null lower\n bound.

    \n
  • \n
  • \n

    At most one step adjustment can have a null upper bound. If one step adjustment\n has a positive upper bound, then there must be a step adjustment with a null upper\n bound.

    \n
  • \n
  • \n

    The upper and lower bound can't be null in the same step adjustment.

    \n
  • \n
" } }, "com.amazonaws.applicationautoscaling#StepAdjustments": { @@ -3242,6 +3348,97 @@ "smithy.api#documentation": "

Specifies whether the scaling activities for a scalable target are in a suspended state.\n

" } }, + "com.amazonaws.applicationautoscaling#TagKey": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 128 + } + } + }, + "com.amazonaws.applicationautoscaling#TagKeyList": { + "type": "list", + "member": { + "target": "com.amazonaws.applicationautoscaling#TagKey" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 200 + } + } + }, + "com.amazonaws.applicationautoscaling#TagMap": { + "type": "map", + "key": { + "target": "com.amazonaws.applicationautoscaling#TagKey" + }, + "value": { + "target": "com.amazonaws.applicationautoscaling#TagValue" + } + }, + "com.amazonaws.applicationautoscaling#TagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.applicationautoscaling#TagResourceRequest" + }, + "output": { + "target": "com.amazonaws.applicationautoscaling#TagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.applicationautoscaling#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.applicationautoscaling#TooManyTagsException" + }, + { + "target": "com.amazonaws.applicationautoscaling#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Adds or edits tags on an Application Auto Scaling scalable target.

\n

Each tag consists of a tag key and a tag value, which are both case-sensitive strings.\n To add a tag, specify a new tag key and a tag value. To edit a tag, specify an existing tag\n key and a new tag value.

\n

You can use this operation to tag an Application Auto Scaling scalable target, but you cannot tag a\n scaling policy or scheduled action.

\n

You can also add tags to an Application Auto Scaling scalable target while creating it\n (RegisterScalableTarget).

\n

For general information about tags, including the format and syntax, see Tagging Amazon Web Services\n resources in the Amazon Web Services General Reference.

\n

Use tags to control access to a scalable target. For more information, see Tagging support\n for Application Auto Scaling in the Application Auto Scaling User Guide.

" + } + }, + "com.amazonaws.applicationautoscaling#TagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.applicationautoscaling#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

Identifies the Application Auto Scaling scalable target that you want to apply tags to.

\n

For example:\n arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123\n

\n

To get the ARN for a scalable target, use DescribeScalableTargets.

", + "smithy.api#required": {} + } + }, + "Tags": { + "target": "com.amazonaws.applicationautoscaling#TagMap", + "traits": { + "smithy.api#documentation": "

The tags assigned to the resource. A tag is a label that you assign to an AWS\n resource.

\n

Each tag consists of a tag key and a tag value.

\n

You cannot have more than one tag on an Application Auto Scaling scalable target with the same tag key.\n If you specify an existing tag key with a different tag value, Application Auto Scaling replaces the\n current tag value with the specified one.

\n

For information about the rules that apply to tag keys and tag values, see User-defined tag\n restrictions in the Amazon Web Services Billing and Cost Management User\n Guide.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.applicationautoscaling#TagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.applicationautoscaling#TagValue": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 256 + } + } + }, "com.amazonaws.applicationautoscaling#TargetTrackingMetric": { "type": "structure", "members": { @@ -3394,7 +3591,7 @@ "Stat": { "target": "com.amazonaws.applicationautoscaling#XmlString", "traits": { - "smithy.api#documentation": "

The statistic to return. It can include any CloudWatch statistic or extended statistic. For a\n list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.

\n

The most commonly used metrics for scaling is Average\n

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

The statistic to return. It can include any CloudWatch statistic or extended statistic. For a\n list of valid values, see the table in Statistics in the Amazon CloudWatch User Guide.

\n

The most commonly used metric for scaling is Average.

", "smithy.api#required": {} } }, @@ -3467,6 +3664,74 @@ "com.amazonaws.applicationautoscaling#TimestampType": { "type": "timestamp" }, + "com.amazonaws.applicationautoscaling#TooManyTagsException": { + "type": "structure", + "members": { + "Message": { + "target": "com.amazonaws.applicationautoscaling#ExceptionMessage" + }, + "ResourceName": { + "target": "com.amazonaws.applicationautoscaling#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

The name of the Application Auto Scaling resource. This value is an Amazon Resource Name (ARN).

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

The request contains too many tags. Try the request again with fewer tags.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400 + } + }, + "com.amazonaws.applicationautoscaling#UntagResource": { + "type": "operation", + "input": { + "target": "com.amazonaws.applicationautoscaling#UntagResourceRequest" + }, + "output": { + "target": "com.amazonaws.applicationautoscaling#UntagResourceResponse" + }, + "errors": [ + { + "target": "com.amazonaws.applicationautoscaling#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.applicationautoscaling#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes tags from an Application Auto Scaling scalable target. To delete a tag, specify the tag key and\n the Application Auto Scaling scalable target.

" + } + }, + "com.amazonaws.applicationautoscaling#UntagResourceRequest": { + "type": "structure", + "members": { + "ResourceARN": { + "target": "com.amazonaws.applicationautoscaling#AmazonResourceName", + "traits": { + "smithy.api#documentation": "

Identifies the Application Auto Scaling scalable target from which to remove tags.

\n

For example:\n arn:aws:application-autoscaling:us-east-1:123456789012:scalable-target/1234abcd56ab78cd901ef1234567890ab123\n

\n

To get the ARN for a scalable target, use DescribeScalableTargets.

", + "smithy.api#required": {} + } + }, + "TagKeys": { + "target": "com.amazonaws.applicationautoscaling#TagKeyList", + "traits": { + "smithy.api#documentation": "

One or more tag keys. Specify only the tag keys, not the tag values.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.applicationautoscaling#UntagResourceResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.applicationautoscaling#ValidationException": { "type": "structure", "members": {