amazonka-application-autoscaling-1.6.1: Amazon Application Auto Scaling SDK.

Copyright(c) 2013-2018 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.ApplicationAutoScaling.PutScheduledAction

Contents

Description

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

Each scalable target is identified by a service namespace, resource ID, and scalable dimension. A scheduled action applies to the scalable target identified by those three attributes. You cannot create a scheduled action until you register the scalable target using RegisterScalableTarget .

To update an action, specify its name and the parameters that you want to change. If you don't specify start and end times, the old values are deleted. Any other parameters that you don't specify are not changed by this update request.

You can view the scheduled actions using DescribeScheduledActions . If you are no longer using a scheduled action, you can delete it using DeleteScheduledAction .

Synopsis

Creating a Request

putScheduledAction Source #

Creates a value of PutScheduledAction with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • psaScalableDimension - The scalable dimension. This parameter is required if you are creating a scheduled action. This string consists of the service namespace, resource type, and scaling property. * ecs:service:DesiredCount - The desired task count of an ECS service. * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot fleet request. * elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group. * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream 2.0 fleet. * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table. * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table. * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index. * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index. * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition. * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for an Amazon SageMaker model endpoint variant.
  • psaStartTime - The date and time for the scheduled action to start.
  • psaSchedule - The schedule for this action. The following formats are supported: * At expressions - at(yyyy -mm -dd Thh :mm :ss ) * Rate expressions - rate(value unit ) * Cron expressions - cron(fields ) At expressions are useful for one-time schedules. Specify the time, in UTC. For rate expressions, value is a positive integer and unit is minute | minutes | hour | hours | day | days . For more information about cron expressions, see Cron .
  • psaEndTime - The date and time for the scheduled action to end.
  • psaScalableTargetAction - The new minimum and maximum capacity. You can set both values or just one. During the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.
  • psaServiceNamespace - The namespace of the AWS service. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference .
  • psaScheduledActionName - The name of the scheduled action.
  • psaResourceId - The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier. * ECS service - The resource type is service and the unique identifier is the cluster name and service name. Example: servicedefaultsample-webapp . * Spot fleet request - The resource type is spot-fleet-request and the unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE . * EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroupj-2EEZNYKUA1NTVig-1791Y4E1L8YI0 . * AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet . * DynamoDB table - The resource type is table and the unique identifier is the resource ID. Example: table/my-table . * DynamoDB global secondary index - The resource type is index and the unique identifier is the resource ID. Example: tablemy-tableindex/my-table-index . * Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster . * Amazon SageMaker endpoint variants - The resource type is variant and the unique identifier is the resource ID. Example: endpointmy-end-pointvariant/KMeansClustering .

data PutScheduledAction Source #

See: putScheduledAction smart constructor.

Instances
Eq PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Data PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutScheduledAction -> c PutScheduledAction #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutScheduledAction #

toConstr :: PutScheduledAction -> Constr #

dataTypeOf :: PutScheduledAction -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PutScheduledAction) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutScheduledAction) #

gmapT :: (forall b. Data b => b -> b) -> PutScheduledAction -> PutScheduledAction #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutScheduledAction -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutScheduledAction -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutScheduledAction -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutScheduledAction -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutScheduledAction -> m PutScheduledAction #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutScheduledAction -> m PutScheduledAction #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutScheduledAction -> m PutScheduledAction #

Read PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Show PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Generic PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Associated Types

type Rep PutScheduledAction :: Type -> Type #

Hashable PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

ToJSON PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

AWSRequest PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Associated Types

type Rs PutScheduledAction :: Type #

ToHeaders PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

ToPath PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

ToQuery PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

NFData PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Methods

rnf :: PutScheduledAction -> () #

type Rep PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

type Rep PutScheduledAction = D1 (MetaData "PutScheduledAction" "Network.AWS.ApplicationAutoScaling.PutScheduledAction" "amazonka-application-autoscaling-1.6.1-Ev8NynEC12oENiC08b24gQ" False) (C1 (MetaCons "PutScheduledAction'" PrefixI True) (((S1 (MetaSel (Just "_psaScalableDimension") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ScalableDimension)) :*: S1 (MetaSel (Just "_psaStartTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe POSIX))) :*: (S1 (MetaSel (Just "_psaSchedule") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_psaEndTime") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe POSIX)))) :*: ((S1 (MetaSel (Just "_psaScalableTargetAction") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ScalableTargetAction)) :*: S1 (MetaSel (Just "_psaServiceNamespace") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ServiceNamespace)) :*: (S1 (MetaSel (Just "_psaScheduledActionName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_psaResourceId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs PutScheduledAction Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Request Lenses

psaScalableDimension :: Lens' PutScheduledAction (Maybe ScalableDimension) Source #

The scalable dimension. This parameter is required if you are creating a scheduled action. This string consists of the service namespace, resource type, and scaling property. * ecs:service:DesiredCount - The desired task count of an ECS service. * ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot fleet request. * elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group. * appstream:fleet:DesiredCapacity - The desired capacity of an AppStream 2.0 fleet. * dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table. * dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table. * dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index. * dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index. * rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster. Available for Aurora MySQL-compatible edition. * sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for an Amazon SageMaker model endpoint variant.

psaStartTime :: Lens' PutScheduledAction (Maybe UTCTime) Source #

The date and time for the scheduled action to start.

psaSchedule :: Lens' PutScheduledAction (Maybe Text) Source #

The schedule for this action. The following formats are supported: * At expressions - at(yyyy -mm -dd Thh :mm :ss ) * Rate expressions - rate(value unit ) * Cron expressions - cron(fields ) At expressions are useful for one-time schedules. Specify the time, in UTC. For rate expressions, value is a positive integer and unit is minute | minutes | hour | hours | day | days . For more information about cron expressions, see Cron .

psaEndTime :: Lens' PutScheduledAction (Maybe UTCTime) Source #

The date and time for the scheduled action to end.

psaScalableTargetAction :: Lens' PutScheduledAction (Maybe ScalableTargetAction) Source #

The new minimum and maximum capacity. You can set both values or just one. During the scheduled time, if the current capacity is below the minimum capacity, Application Auto Scaling scales out to the minimum capacity. If the current capacity is above the maximum capacity, Application Auto Scaling scales in to the maximum capacity.

psaServiceNamespace :: Lens' PutScheduledAction ServiceNamespace Source #

The namespace of the AWS service. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference .

psaScheduledActionName :: Lens' PutScheduledAction Text Source #

The name of the scheduled action.

psaResourceId :: Lens' PutScheduledAction Text Source #

The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier. * ECS service - The resource type is service and the unique identifier is the cluster name and service name. Example: servicedefaultsample-webapp . * Spot fleet request - The resource type is spot-fleet-request and the unique identifier is the Spot fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE . * EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroupj-2EEZNYKUA1NTVig-1791Y4E1L8YI0 . * AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name. Example: fleet/sample-fleet . * DynamoDB table - The resource type is table and the unique identifier is the resource ID. Example: table/my-table . * DynamoDB global secondary index - The resource type is index and the unique identifier is the resource ID. Example: tablemy-tableindex/my-table-index . * Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name. Example: cluster:my-db-cluster . * Amazon SageMaker endpoint variants - The resource type is variant and the unique identifier is the resource ID. Example: endpointmy-end-pointvariant/KMeansClustering .

Destructuring the Response

putScheduledActionResponse Source #

Creates a value of PutScheduledActionResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data PutScheduledActionResponse Source #

See: putScheduledActionResponse smart constructor.

Instances
Eq PutScheduledActionResponse Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Data PutScheduledActionResponse Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PutScheduledActionResponse -> c PutScheduledActionResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PutScheduledActionResponse #

toConstr :: PutScheduledActionResponse -> Constr #

dataTypeOf :: PutScheduledActionResponse -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PutScheduledActionResponse) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PutScheduledActionResponse) #

gmapT :: (forall b. Data b => b -> b) -> PutScheduledActionResponse -> PutScheduledActionResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PutScheduledActionResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PutScheduledActionResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> PutScheduledActionResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PutScheduledActionResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PutScheduledActionResponse -> m PutScheduledActionResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PutScheduledActionResponse -> m PutScheduledActionResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PutScheduledActionResponse -> m PutScheduledActionResponse #

Read PutScheduledActionResponse Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Show PutScheduledActionResponse Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Generic PutScheduledActionResponse Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

Associated Types

type Rep PutScheduledActionResponse :: Type -> Type #

NFData PutScheduledActionResponse Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

type Rep PutScheduledActionResponse Source # 
Instance details

Defined in Network.AWS.ApplicationAutoScaling.PutScheduledAction

type Rep PutScheduledActionResponse = D1 (MetaData "PutScheduledActionResponse" "Network.AWS.ApplicationAutoScaling.PutScheduledAction" "amazonka-application-autoscaling-1.6.1-Ev8NynEC12oENiC08b24gQ" True) (C1 (MetaCons "PutScheduledActionResponse'" PrefixI True) (S1 (MetaSel (Just "_psarsResponseStatus") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

Response Lenses