![]() |
![]()
| ![]() |
![]()
NAMEPaws::ApplicationAutoScaling::PutScalingPolicy - Arguments for method PutScalingPolicy on Paws::ApplicationAutoScaling DESCRIPTIONThis class represents the parameters used for calling the method PutScalingPolicy on the Application Auto Scaling service. Use the attributes of this class as arguments to method PutScalingPolicy. You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutScalingPolicy. SYNOPSISmy $application-autoscaling = Paws->service('ApplicationAutoScaling'); # To apply a scaling policy to an Amazon ECS service # This example applies a scaling policy to an Amazon ECS service called web-app # in the default cluster. The policy increases the desired count of the service # by 200%, with a cool down period of 60 seconds. my $PutScalingPolicyResponse = $application -autoscaling->PutScalingPolicy( 'PolicyName' => 'web-app-cpu-gt-75', 'PolicyType' => 'StepScaling', 'ResourceId' => 'service/default/web-app', 'ScalableDimension' => 'ecs:service:DesiredCount', 'ServiceNamespace' => 'ecs', 'StepScalingPolicyConfiguration' => { 'AdjustmentType' => 'PercentChangeInCapacity', 'Cooldown' => 60, 'StepAdjustments' => [ { 'MetricIntervalLowerBound' => 0, 'ScalingAdjustment' => 200 } ] } ); # Results: my $PolicyARN = $PutScalingPolicyResponse->PolicyARN; # Returns a L<Paws::ApplicationAutoScaling::PutScalingPolicyResponse> object. # To apply a scaling policy to an Amazon EC2 Spot fleet # This example applies a scaling policy to an Amazon EC2 Spot fleet. The policy # increases the target capacity of the spot fleet by 200%, with a cool down # period of 180 seconds.", my $PutScalingPolicyResponse = $application -autoscaling->PutScalingPolicy( 'PolicyName' => 'fleet-cpu-gt-75', 'PolicyType' => 'StepScaling', 'ResourceId' => 'spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3', 'ScalableDimension' => 'ec2:spot-fleet-request:TargetCapacity', 'ServiceNamespace' => 'ec2', 'StepScalingPolicyConfiguration' => { 'AdjustmentType' => 'PercentChangeInCapacity', 'Cooldown' => 180, 'StepAdjustments' => [ { 'MetricIntervalLowerBound' => 0, 'ScalingAdjustment' => 200 } ] } ); # Results: my $PolicyARN = $PutScalingPolicyResponse->PolicyARN; # Returns a L<Paws::ApplicationAutoScaling::PutScalingPolicyResponse> object. Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see <https://docs.aws.amazon.com/goto/WebAPI/application-autoscaling/PutScalingPolicy> ATTRIBUTESREQUIRED PolicyName => StrThe name of the scaling policy. PolicyType => StrThe policy type. This parameter is required if you are creating a scaling policy. The following policy types are supported: "TargetTrackingScaling"—Not supported for Amazon EMR "StepScaling"—Not supported for DynamoDB, Amazon Comprehend, Lambda, Amazon Keyspaces (for Apache Cassandra), or Amazon MSK. For more information, see Target tracking scaling policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html) and Step scaling policies (https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-step-scaling-policies.html) in the Application Auto Scaling User Guide. Valid values are: "StepScaling", "TargetTrackingScaling" REQUIRED ResourceId => StrThe identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier.
REQUIRED ScalableDimension => StrThe scalable dimension. This string consists of the service namespace, resource type, and scaling property.
Valid values are: "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" REQUIRED ServiceNamespace => StrThe namespace of the AWS service that provides the resource. For a resource provided by your own application or service, use "custom-resource" instead. Valid values are: "ecs", "elasticmapreduce", "ec2", "appstream", "dynamodb", "rds", "sagemaker", "custom-resource", "comprehend", "lambda", "cassandra", "kafka" StepScalingPolicyConfiguration => Paws::ApplicationAutoScaling::StepScalingPolicyConfigurationA step scaling policy. This parameter is required if you are creating a policy and the policy type is "StepScaling". TargetTrackingScalingPolicyConfiguration => Paws::ApplicationAutoScaling::TargetTrackingScalingPolicyConfigurationA target tracking scaling policy. Includes support for predefined or customized metrics. This parameter is required if you are creating a policy and the policy type is "TargetTrackingScaling". SEE ALSOThis class forms part of Paws, documenting arguments for method PutScalingPolicy in Paws::ApplicationAutoScaling BUGS and CONTRIBUTIONSThe source code is located here: <https://github.com/pplu/aws-sdk-perl> Please report bugs to: <https://github.com/pplu/aws-sdk-perl/issues>
|