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 existing Application Auto Scaling scalable target. Each scalable target is identified by service namespace, a resource ID, and a scalable dimension, and a scaling policy applies to a scalable target that is identified by those three attributes. You cannot create a scaling policy without first registering a scalable target with RegisterScalableTarget.
To update an existing policy, use the existing policy name and set the parameters you want to change. Any existing parameter not changed in an update to an existing policy is not changed in this update request.
You can view the existing scaling policies for a service namespace with DescribeScalingPolicies. If you are no longer using a scaling policy, you can delete it with 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:
data PutScalingPolicy Source #
See: putScalingPolicy
smart constructor.
Request Lenses
pspPolicyType :: Lens' PutScalingPolicy (Maybe PolicyType) Source #
The policy type. This parameter is required if you are creating a new policy.
pspStepScalingPolicyConfiguration :: Lens' PutScalingPolicy (Maybe StepScalingPolicyConfiguration) Source #
The configuration for the step scaling policy. This parameter is required if you are creating a new policy. For more information, see StepScalingPolicyConfiguration and StepAdjustment in the Application Auto Scaling API Reference.
pspPolicyName :: Lens' PutScalingPolicy Text Source #
The name of the scaling policy.
pspServiceNamespace :: Lens' PutScalingPolicy ServiceNamespace Source #
The AWS service namespace of the scalable target that this scaling policy applies to. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.
pspResourceId :: Lens' PutScalingPolicy Text Source #
The unique resource identifier string for the scalable target that this scaling policy applies to. For Amazon ECS services, this value is the resource type, followed by the cluster name and service name, such as 'service\/default\/sample-webapp'.
pspScalableDimension :: Lens' PutScalingPolicy ScalableDimension Source #
The scalable dimension of the scalable target that this scaling policy applies to. The scalable dimension contains the service namespace, resource type, and scaling property, such as 'ecs:service:DesiredCount' for the desired task count of an Amazon ECS service.
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:
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.