- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteScheduledActionCommand
Deletes the specified scheduled action for an Application Auto Scaling scalable target.
For more information, see Delete a scheduled action in the Application Auto Scaling User Guide.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ApplicationAutoScalingClient, DeleteScheduledActionCommand } from "@aws-sdk/client-application-auto-scaling"; // ES Modules import
// const { ApplicationAutoScalingClient, DeleteScheduledActionCommand } = require("@aws-sdk/client-application-auto-scaling"); // CommonJS import
const client = new ApplicationAutoScalingClient(config);
const input = { // DeleteScheduledActionRequest
ServiceNamespace: "ecs" || "elasticmapreduce" || "ec2" || "appstream" || "dynamodb" || "rds" || "sagemaker" || "custom-resource" || "comprehend" || "lambda" || "cassandra" || "kafka" || "elasticache" || "neptune" || "workspaces", // required
ScheduledActionName: "STRING_VALUE", // required
ResourceId: "STRING_VALUE", // required
ScalableDimension: "ecs:service:DesiredCount" || "ec2:spot-fleet-request:TargetCapacity" || "elasticmapreduce:instancegroup:InstanceCount" || "appstream:fleet:DesiredCapacity" || "dynamodb:table:ReadCapacityUnits" || "dynamodb:table:WriteCapacityUnits" || "dynamodb:index:ReadCapacityUnits" || "dynamodb:index:WriteCapacityUnits" || "rds:cluster:ReadReplicaCount" || "sagemaker:variant:DesiredInstanceCount" || "custom-resource:ResourceType:Property" || "comprehend:document-classifier-endpoint:DesiredInferenceUnits" || "comprehend:entity-recognizer-endpoint:DesiredInferenceUnits" || "lambda:function:ProvisionedConcurrency" || "cassandra:table:ReadCapacityUnits" || "cassandra:table:WriteCapacityUnits" || "kafka:broker-storage:VolumeSize" || "elasticache:replication-group:NodeGroups" || "elasticache:replication-group:Replicas" || "neptune:cluster:ReadReplicaCount" || "sagemaker:variant:DesiredProvisionedConcurrency" || "sagemaker:inference-component:DesiredCopyCount" || "workspaces:workspacespool:DesiredUserSessions", // required
};
const command = new DeleteScheduledActionCommand(input);
const response = await client.send(command);
// {};
Example Usage
DeleteScheduledActionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
ResourceId Required | string | undefined | The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier.
|
ScalableDimension Required | ScalableDimension | undefined | The scalable dimension. This string consists of the service namespace, resource type, and scaling property.
|
ScheduledActionName Required | string | undefined | The name of the scheduled action. |
ServiceNamespace Required | ServiceNamespace | undefined | The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own application or service, use |
DeleteScheduledActionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConcurrentUpdateException | server | Concurrent updates caused an exception, for example, if you request an update to an Application Auto Scaling resource that already has a pending update. |
InternalServiceException | server | The service encountered an internal error. |
ObjectNotFoundException | client | The specified object could not be found. For any operation that depends on the existence of a scalable target, this exception is thrown if the scalable target with the specified service namespace, resource ID, and scalable dimension does not exist. For any operation that deletes or deregisters a resource, this exception is thrown if the resource cannot be found. |
ValidationException | client | An exception was thrown for a validation issue. Review the available parameters for the API request. |
ApplicationAutoScalingServiceException | Base exception class for all service exceptions from ApplicationAutoScaling service. |