Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates or updates a policy for an Application Auto Scaling scalable target.
Each scalable target is identified by a service namespace, resource ID, and scalable dimension. A scaling policy applies to the scalable target identified by those three attributes. You cannot create a scaling policy without first registering a scalable target using RegisterScalableTarget
.
To update a policy, specify its policy name and the parameters that you want to change. Any parameters that you don't specify are not changed by this update request.
You can view the scaling policies for a service namespace using DescribeScalingPolicies
. If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy
.
- putScalingPolicy :: Text -> ServiceNamespace -> Text -> ScalableDimension -> PutScalingPolicy
- data PutScalingPolicy
- pspPolicyType :: Lens' PutScalingPolicy (Maybe PolicyType)
- pspStepScalingPolicyConfiguration :: Lens' PutScalingPolicy (Maybe StepScalingPolicyConfiguration)
- pspPolicyName :: Lens' PutScalingPolicy Text
- pspServiceNamespace :: Lens' PutScalingPolicy ServiceNamespace
- pspResourceId :: Lens' PutScalingPolicy Text
- pspScalableDimension :: Lens' PutScalingPolicy ScalableDimension
- putScalingPolicyResponse :: Int -> Text -> PutScalingPolicyResponse
- data PutScalingPolicyResponse
- psprsResponseStatus :: Lens' PutScalingPolicyResponse Int
- psprsPolicyARN :: Lens' PutScalingPolicyResponse Text
Creating a Request
:: Text | |
-> ServiceNamespace | |
-> Text | |
-> ScalableDimension | |
-> PutScalingPolicy |
Creates a value of PutScalingPolicy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
pspPolicyType
- The policy type. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required.pspStepScalingPolicyConfiguration
- The configuration for the step scaling policy. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required. For more information, seeStepScalingPolicyConfiguration
andStepAdjustment
.pspPolicyName
- The name of the scaling policy.pspServiceNamespace
- The namespace of the AWS service. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference .pspResourceId
- The identifier of the resource associated with the scaling policy. This string consists of the resource type and unique identifier. * ECS service - The resource type isservice
and the unique identifier is the cluster name and service name. Example:servicedefaultsample-webapp
. * Spot fleet request - The resource type isspot-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 isinstancegroup
and the unique identifier is the cluster ID and instance group ID. Example:instancegroupj-2EEZNYKUA1NTVig-1791Y4E1L8YI0
.pspScalableDimension
- The scalable dimension. 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.
data PutScalingPolicy Source #
See: putScalingPolicy
smart constructor.
Request Lenses
pspPolicyType :: Lens' PutScalingPolicy (Maybe PolicyType) Source #
The policy type. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required.
pspStepScalingPolicyConfiguration :: Lens' PutScalingPolicy (Maybe StepScalingPolicyConfiguration) Source #
The configuration for the step scaling policy. If you are creating a new policy, this parameter is required. If you are updating a policy, this parameter is not required. For more information, see StepScalingPolicyConfiguration
and StepAdjustment
.
pspPolicyName :: Lens' PutScalingPolicy Text Source #
The name of the scaling policy.
pspServiceNamespace :: Lens' PutScalingPolicy ServiceNamespace Source #
The namespace of the AWS service. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference .
pspResourceId :: Lens' PutScalingPolicy Text Source #
The identifier of the resource associated with the scaling policy. 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
.
pspScalableDimension :: Lens' PutScalingPolicy ScalableDimension Source #
The scalable dimension. 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.
Destructuring the Response
putScalingPolicyResponse Source #
Creates a value of PutScalingPolicyResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
psprsResponseStatus
- -- | The response status code.psprsPolicyARN
- The Amazon Resource Name (ARN) of the resulting scaling policy.
data PutScalingPolicyResponse Source #
See: putScalingPolicyResponse
smart constructor.
Response Lenses
psprsResponseStatus :: Lens' PutScalingPolicyResponse Int Source #
- - | The response status code.
psprsPolicyARN :: Lens' PutScalingPolicyResponse Text Source #
The Amazon Resource Name (ARN) of the resulting scaling policy.