public class ScalingPolicy
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
An object representing a scaling policy.
Modifier and Type | Field and Description |
---|---|
private java.util.List<Alarm> |
alarms
The CloudWatch alarms that are associated with the scaling policy.
|
private java.util.Date |
creationTime
The Unix timestamp for when the scaling policy was created.
|
private java.lang.String |
policyARN
The Amazon Resource Name (ARN) of the scaling policy.
|
private java.lang.String |
policyName
The name of the scaling policy.
|
private java.lang.String |
policyType
The scaling policy type.
|
private java.lang.String |
resourceId
The unique identifier string for the resource associated with the scaling
policy.
|
private java.lang.String |
scalableDimension
The scalable dimension associated with the scaling policy.
|
private java.lang.String |
serviceNamespace
The namespace for the AWS service that the scaling policy is associated
with.
|
private StepScalingPolicyConfiguration |
stepScalingPolicyConfiguration
The configuration for the step scaling policy.
|
Constructor and Description |
---|
ScalingPolicy() |
Modifier and Type | Method and Description |
---|---|
ScalingPolicy |
clone() |
boolean |
equals(java.lang.Object obj) |
java.util.List<Alarm> |
getAlarms()
The CloudWatch alarms that are associated with the scaling policy.
|
java.util.Date |
getCreationTime()
The Unix timestamp for when the scaling policy was created.
|
java.lang.String |
getPolicyARN()
The Amazon Resource Name (ARN) of the scaling policy.
|
java.lang.String |
getPolicyName()
The name of the scaling policy.
|
java.lang.String |
getPolicyType()
The scaling policy type.
|
java.lang.String |
getResourceId()
The unique identifier string for the resource associated with the scaling
policy.
|
java.lang.String |
getScalableDimension()
The scalable dimension associated with the scaling policy.
|
java.lang.String |
getServiceNamespace()
The namespace for the AWS service that the scaling policy is associated
with.
|
StepScalingPolicyConfiguration |
getStepScalingPolicyConfiguration()
The configuration for the step scaling policy.
|
int |
hashCode() |
void |
setAlarms(java.util.Collection<Alarm> alarms)
The CloudWatch alarms that are associated with the scaling policy.
|
void |
setCreationTime(java.util.Date creationTime)
The Unix timestamp for when the scaling policy was created.
|
void |
setPolicyARN(java.lang.String policyARN)
The Amazon Resource Name (ARN) of the scaling policy.
|
void |
setPolicyName(java.lang.String policyName)
The name of the scaling policy.
|
void |
setPolicyType(PolicyType policyType)
The scaling policy type.
|
void |
setPolicyType(java.lang.String policyType)
The scaling policy type.
|
void |
setResourceId(java.lang.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(java.lang.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(java.lang.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.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
ScalingPolicy |
withAlarms(Alarm... alarms)
The CloudWatch alarms that are associated with the scaling policy.
|
ScalingPolicy |
withAlarms(java.util.Collection<Alarm> alarms)
The CloudWatch alarms that are associated with the scaling policy.
|
ScalingPolicy |
withCreationTime(java.util.Date creationTime)
The Unix timestamp for when the scaling policy was created.
|
ScalingPolicy |
withPolicyARN(java.lang.String policyARN)
The Amazon Resource Name (ARN) of the scaling policy.
|
ScalingPolicy |
withPolicyName(java.lang.String policyName)
The name of the scaling policy.
|
ScalingPolicy |
withPolicyType(PolicyType policyType)
The scaling policy type.
|
ScalingPolicy |
withPolicyType(java.lang.String policyType)
The scaling policy type.
|
ScalingPolicy |
withResourceId(java.lang.String resourceId)
The unique identifier string for the resource associated with the scaling
policy.
|
ScalingPolicy |
withScalableDimension(ScalableDimension scalableDimension)
The scalable dimension associated with the scaling policy.
|
ScalingPolicy |
withScalableDimension(java.lang.String scalableDimension)
The scalable dimension associated with the scaling policy.
|
ScalingPolicy |
withServiceNamespace(ServiceNamespace serviceNamespace)
The namespace for the AWS service that the scaling policy is associated
with.
|
ScalingPolicy |
withServiceNamespace(java.lang.String serviceNamespace)
The namespace for the AWS service that the scaling policy is associated
with.
|
ScalingPolicy |
withStepScalingPolicyConfiguration(StepScalingPolicyConfiguration stepScalingPolicyConfiguration)
The configuration for the step scaling policy.
|
private java.lang.String policyARN
The Amazon Resource Name (ARN) of the scaling policy.
private java.lang.String policyName
The name of the scaling policy.
private java.lang.String 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.
private java.lang.String 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 as
service/default/sample-webapp
.
private java.lang.String scalableDimension
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.
private java.lang.String policyType
The scaling policy type.
private StepScalingPolicyConfiguration stepScalingPolicyConfiguration
The configuration for the step scaling policy.
private java.util.List<Alarm> alarms
The CloudWatch alarms that are associated with the scaling policy.
private java.util.Date creationTime
The Unix timestamp for when the scaling policy was created.
public void setPolicyARN(java.lang.String policyARN)
The Amazon Resource Name (ARN) of the scaling policy.
policyARN
- The Amazon Resource Name (ARN) of the scaling policy.public java.lang.String getPolicyARN()
The Amazon Resource Name (ARN) of the scaling policy.
public ScalingPolicy withPolicyARN(java.lang.String policyARN)
The Amazon Resource Name (ARN) of the scaling policy.
policyARN
- The Amazon Resource Name (ARN) of the scaling policy.public void setPolicyName(java.lang.String policyName)
The name of the scaling policy.
policyName
- The name of the scaling policy.public java.lang.String getPolicyName()
The name of the scaling policy.
public ScalingPolicy withPolicyName(java.lang.String policyName)
The name of the scaling policy.
policyName
- The name of the scaling policy.public void setServiceNamespace(java.lang.String 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.
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.ServiceNamespace
public java.lang.String 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.
ServiceNamespace
public ScalingPolicy withServiceNamespace(java.lang.String 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.
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.ServiceNamespace
public void setServiceNamespace(ServiceNamespace 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.
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.ServiceNamespace
public ScalingPolicy withServiceNamespace(ServiceNamespace 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.
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.ServiceNamespace
public void setResourceId(java.lang.String 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 as
service/default/sample-webapp
.
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
as service/default/sample-webapp
.public java.lang.String 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
.
service/default/sample-webapp
.public ScalingPolicy withResourceId(java.lang.String 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 as
service/default/sample-webapp
.
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
as service/default/sample-webapp
.public void setScalableDimension(java.lang.String scalableDimension)
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.
scalableDimension
- 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.ScalableDimension
public java.lang.String 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.
ecs:service:DesiredCount
for the desired task count
of an Amazon ECS service.ScalableDimension
public ScalingPolicy withScalableDimension(java.lang.String scalableDimension)
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.
scalableDimension
- 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.ScalableDimension
public void setScalableDimension(ScalableDimension scalableDimension)
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.
scalableDimension
- 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.ScalableDimension
public ScalingPolicy withScalableDimension(ScalableDimension scalableDimension)
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.
scalableDimension
- 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.ScalableDimension
public void setPolicyType(java.lang.String policyType)
The scaling policy type.
policyType
- The scaling policy type.PolicyType
public java.lang.String getPolicyType()
The scaling policy type.
PolicyType
public ScalingPolicy withPolicyType(java.lang.String policyType)
The scaling policy type.
policyType
- The scaling policy type.PolicyType
public void setPolicyType(PolicyType policyType)
The scaling policy type.
policyType
- The scaling policy type.PolicyType
public ScalingPolicy withPolicyType(PolicyType policyType)
The scaling policy type.
policyType
- The scaling policy type.PolicyType
public void setStepScalingPolicyConfiguration(StepScalingPolicyConfiguration stepScalingPolicyConfiguration)
The configuration for the step scaling policy.
stepScalingPolicyConfiguration
- The configuration for the step scaling policy.public StepScalingPolicyConfiguration getStepScalingPolicyConfiguration()
The configuration for the step scaling policy.
public ScalingPolicy withStepScalingPolicyConfiguration(StepScalingPolicyConfiguration stepScalingPolicyConfiguration)
The configuration for the step scaling policy.
stepScalingPolicyConfiguration
- The configuration for the step scaling policy.public java.util.List<Alarm> getAlarms()
The CloudWatch alarms that are associated with the scaling policy.
public void setAlarms(java.util.Collection<Alarm> alarms)
The CloudWatch alarms that are associated with the scaling policy.
alarms
- The CloudWatch alarms that are associated with the scaling policy.public ScalingPolicy withAlarms(Alarm... alarms)
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)
or
withAlarms(java.util.Collection)
if you want to override the
existing values.
alarms
- The CloudWatch alarms that are associated with the scaling policy.public ScalingPolicy withAlarms(java.util.Collection<Alarm> alarms)
The CloudWatch alarms that are associated with the scaling policy.
alarms
- The CloudWatch alarms that are associated with the scaling policy.public void setCreationTime(java.util.Date creationTime)
The Unix timestamp for when the scaling policy was created.
creationTime
- The Unix timestamp for when the scaling policy was created.public java.util.Date getCreationTime()
The Unix timestamp for when the scaling policy was created.
public ScalingPolicy withCreationTime(java.util.Date creationTime)
The Unix timestamp for when the scaling policy was created.
creationTime
- The Unix timestamp for when the scaling policy was created.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public ScalingPolicy clone()
clone
in class java.lang.Object