Class ScalingPolicy
- All Implemented Interfaces:
Serializable
,Cloneable
An object representing a scaling policy.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
The CloudWatch alarms that are associated with the scaling policy.The Unix timestamp for when the scaling policy was created.The Amazon Resource Name (ARN) of the scaling policy.The name of the scaling policy.The scaling policy type.The unique identifier string for the resource associated with the scaling policy.The scalable dimension associated with the scaling policy.The namespace for the AWS service that the scaling policy is associated with.The configuration for the step scaling policy.int
hashCode()
void
setAlarms
(Collection<Alarm> alarms) The CloudWatch alarms that are associated with the scaling policy.void
setCreationTime
(Date creationTime) The Unix timestamp for when the scaling policy was created.void
setPolicyARN
(String policyARN) The Amazon Resource Name (ARN) of the scaling policy.void
setPolicyName
(String policyName) The name of the scaling policy.void
setPolicyType
(PolicyType policyType) The scaling policy type.void
setPolicyType
(String policyType) The scaling policy type.void
setResourceId
(String resourceId) The unique identifier string for the resource associated with the scaling policy.void
setScalableDimension
(ScalableDimension scalableDimension) The scalable dimension associated with the scaling policy.void
setScalableDimension
(String scalableDimension) The scalable dimension associated with the scaling policy.void
setServiceNamespace
(ServiceNamespace serviceNamespace) The namespace for the AWS service that the scaling policy is associated with.void
setServiceNamespace
(String serviceNamespace) The namespace for the AWS service that the scaling policy is associated with.void
setStepScalingPolicyConfiguration
(StepScalingPolicyConfiguration stepScalingPolicyConfiguration) The configuration for the step scaling policy.toString()
Returns a string representation of this object; useful for testing and debugging.withAlarms
(Alarm... alarms) The CloudWatch alarms that are associated with the scaling policy.withAlarms
(Collection<Alarm> alarms) The CloudWatch alarms that are associated with the scaling policy.withCreationTime
(Date creationTime) The Unix timestamp for when the scaling policy was created.withPolicyARN
(String policyARN) The Amazon Resource Name (ARN) of the scaling policy.withPolicyName
(String policyName) The name of the scaling policy.withPolicyType
(PolicyType policyType) The scaling policy type.withPolicyType
(String policyType) The scaling policy type.withResourceId
(String resourceId) The unique identifier string for the resource associated with the scaling policy.withScalableDimension
(ScalableDimension scalableDimension) The scalable dimension associated with the scaling policy.withScalableDimension
(String scalableDimension) The scalable dimension associated with the scaling policy.withServiceNamespace
(ServiceNamespace serviceNamespace) The namespace for the AWS service that the scaling policy is associated with.withServiceNamespace
(String serviceNamespace) The namespace for the AWS service that the scaling policy is associated with.withStepScalingPolicyConfiguration
(StepScalingPolicyConfiguration stepScalingPolicyConfiguration) The configuration for the step scaling policy.
-
Constructor Details
-
ScalingPolicy
public ScalingPolicy()
-
-
Method Details
-
setPolicyARN
The Amazon Resource Name (ARN) of the scaling policy.
- Parameters:
policyARN
- The Amazon Resource Name (ARN) of the scaling policy.
-
getPolicyARN
The Amazon Resource Name (ARN) of the scaling policy.
- Returns:
- The Amazon Resource Name (ARN) of the scaling policy.
-
withPolicyARN
The Amazon Resource Name (ARN) of the scaling policy.
- Parameters:
policyARN
- The Amazon Resource Name (ARN) of the scaling policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setPolicyName
The name of the scaling policy.
- Parameters:
policyName
- The name of the scaling policy.
-
getPolicyName
The name of the scaling policy.
- Returns:
- The name of the scaling policy.
-
withPolicyName
The name of the scaling policy.
- Parameters:
policyName
- The name of the scaling policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setServiceNamespace
The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.
- Parameters:
serviceNamespace
- The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.- See Also:
-
getServiceNamespace
The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.
- Returns:
- The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.
- See Also:
-
withServiceNamespace
The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.
- Parameters:
serviceNamespace
- The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setServiceNamespace
The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.
- Parameters:
serviceNamespace
- The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.- See Also:
-
withServiceNamespace
The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.
- Parameters:
serviceNamespace
- The namespace for the AWS service that the scaling policy is associated with. For more information, see AWS Service Namespaces in the Amazon Web Services General Reference.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setResourceId
The unique identifier string for the resource associated with the scaling policy. For Amazon ECS services, this value is the resource type, followed by the cluster name and service name, such as
service/default/sample-webapp
.- Parameters:
resourceId
- The unique identifier string for the resource associated with the scaling policy. For Amazon ECS services, this value is the resource type, followed by the cluster name and service name, such asservice/default/sample-webapp
.
-
getResourceId
The unique identifier string for the resource associated with the scaling policy. For Amazon ECS services, this value is the resource type, followed by the cluster name and service name, such as
service/default/sample-webapp
.- Returns:
- The unique identifier string for the resource associated with the
scaling policy. For Amazon ECS services, this value is the
resource type, followed by the cluster name and service name,
such as
service/default/sample-webapp
.
-
withResourceId
The unique identifier string for the resource associated with the scaling policy. For Amazon ECS services, this value is the resource type, followed by the cluster name and service name, such as
service/default/sample-webapp
.- Parameters:
resourceId
- The unique identifier string for the resource associated with the scaling policy. For Amazon ECS services, this value is the resource type, followed by the cluster name and service name, such asservice/default/sample-webapp
.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setScalableDimension
The scalable dimension associated with the scaling policy. 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.- Parameters:
scalableDimension
- The scalable dimension associated with the scaling policy. The scalable dimension contains the service namespace, resource type, and scaling property, such asecs:service:DesiredCount
for the desired task count of an Amazon ECS service.- See Also:
-
getScalableDimension
The scalable dimension associated with the scaling policy. 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.- Returns:
- The scalable dimension associated with the scaling policy. 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. - See Also:
-
withScalableDimension
The scalable dimension associated with the scaling policy. 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.- Parameters:
scalableDimension
- The scalable dimension associated with the scaling policy. The scalable dimension contains the service namespace, resource type, and scaling property, such asecs:service:DesiredCount
for the desired task count of an Amazon ECS service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setScalableDimension
The scalable dimension associated with the scaling policy. 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.- Parameters:
scalableDimension
- The scalable dimension associated with the scaling policy. The scalable dimension contains the service namespace, resource type, and scaling property, such asecs:service:DesiredCount
for the desired task count of an Amazon ECS service.- See Also:
-
withScalableDimension
The scalable dimension associated with the scaling policy. 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.- Parameters:
scalableDimension
- The scalable dimension associated with the scaling policy. The scalable dimension contains the service namespace, resource type, and scaling property, such asecs:service:DesiredCount
for the desired task count of an Amazon ECS service.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setPolicyType
The scaling policy type.
- Parameters:
policyType
- The scaling policy type.- See Also:
-
getPolicyType
The scaling policy type.
- Returns:
- The scaling policy type.
- See Also:
-
withPolicyType
The scaling policy type.
- Parameters:
policyType
- The scaling policy type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setPolicyType
The scaling policy type.
- Parameters:
policyType
- The scaling policy type.- See Also:
-
withPolicyType
The scaling policy type.
- Parameters:
policyType
- The scaling policy type.- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-
setStepScalingPolicyConfiguration
public void setStepScalingPolicyConfiguration(StepScalingPolicyConfiguration stepScalingPolicyConfiguration) The configuration for the step scaling policy.
- Parameters:
stepScalingPolicyConfiguration
- The configuration for the step scaling policy.
-
getStepScalingPolicyConfiguration
The configuration for the step scaling policy.
- Returns:
- The configuration for the step scaling policy.
-
withStepScalingPolicyConfiguration
public ScalingPolicy withStepScalingPolicyConfiguration(StepScalingPolicyConfiguration stepScalingPolicyConfiguration) The configuration for the step scaling policy.
- Parameters:
stepScalingPolicyConfiguration
- The configuration for the step scaling policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getAlarms
The CloudWatch alarms that are associated with the scaling policy.
- Returns:
- The CloudWatch alarms that are associated with the scaling policy.
-
setAlarms
The CloudWatch alarms that are associated with the scaling policy.
- Parameters:
alarms
- The CloudWatch alarms that are associated with the scaling policy.
-
withAlarms
The CloudWatch alarms that are associated with the scaling policy.
NOTE: This method appends the values to the existing list (if any). Use
setAlarms(java.util.Collection)
orwithAlarms(java.util.Collection)
if you want to override the existing values.- Parameters:
alarms
- The CloudWatch alarms that are associated with the scaling policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withAlarms
The CloudWatch alarms that are associated with the scaling policy.
- Parameters:
alarms
- The CloudWatch alarms that are associated with the scaling policy.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setCreationTime
The Unix timestamp for when the scaling policy was created.
- Parameters:
creationTime
- The Unix timestamp for when the scaling policy was created.
-
getCreationTime
The Unix timestamp for when the scaling policy was created.
- Returns:
- The Unix timestamp for when the scaling policy was created.
-
withCreationTime
The Unix timestamp for when the scaling policy was created.
- Parameters:
creationTime
- The Unix timestamp for when the scaling policy was created.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-