/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.applicationautoscaling.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PutScalingPolicyRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name of the scaling policy. *

*

* You cannot change the name of a scaling policy, but you can delete the original scaling policy and create a new * scaling policy with the same settings and a different name. *

*/ private String policyName; /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

*/ private String serviceNamespace; /** *

* The identifier of the resource associated with the scaling policy. This string consists of the resource type and * unique identifier. *

* */ private String resourceId; /** *

* The scalable dimension. This string consists of the service namespace, resource type, and scaling property. *

* */ private String scalableDimension; /** *

* The scaling 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, Amazon MSK, * Amazon ElastiCache, or Neptune. *

*

* For more information, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide. *

*/ private String policyType; /** *

* A step scaling policy. *

*

* This parameter is required if you are creating a policy and the policy type is StepScaling. *

*/ private StepScalingPolicyConfiguration stepScalingPolicyConfiguration; /** *

* A 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 * . *

*/ private TargetTrackingScalingPolicyConfiguration targetTrackingScalingPolicyConfiguration; /** *

* The name of the scaling policy. *

*

* You cannot change the name of a scaling policy, but you can delete the original scaling policy and create a new * scaling policy with the same settings and a different name. *

* * @param policyName * The name of the scaling policy.

*

* You cannot change the name of a scaling policy, but you can delete the original scaling policy and create * a new scaling policy with the same settings and a different name. */ public void setPolicyName(String policyName) { this.policyName = policyName; } /** *

* The name of the scaling policy. *

*

* You cannot change the name of a scaling policy, but you can delete the original scaling policy and create a new * scaling policy with the same settings and a different name. *

* * @return The name of the scaling policy.

*

* You cannot change the name of a scaling policy, but you can delete the original scaling policy and create * a new scaling policy with the same settings and a different name. */ public String getPolicyName() { return this.policyName; } /** *

* The name of the scaling policy. *

*

* You cannot change the name of a scaling policy, but you can delete the original scaling policy and create a new * scaling policy with the same settings and a different name. *

* * @param policyName * The name of the scaling policy.

*

* You cannot change the name of a scaling policy, but you can delete the original scaling policy and create * a new scaling policy with the same settings and a different name. * @return Returns a reference to this object so that method calls can be chained together. */ public PutScalingPolicyRequest withPolicyName(String policyName) { setPolicyName(policyName); return this; } /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource. For a resource provided by * your own application or service, use custom-resource instead. * @see ServiceNamespace */ public void setServiceNamespace(String serviceNamespace) { this.serviceNamespace = serviceNamespace; } /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

* * @return The namespace of the Amazon Web Services service that provides the resource. For a resource provided by * your own application or service, use custom-resource instead. * @see ServiceNamespace */ public String getServiceNamespace() { return this.serviceNamespace; } /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource. For a resource provided by * your own application or service, use custom-resource instead. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceNamespace */ public PutScalingPolicyRequest withServiceNamespace(String serviceNamespace) { setServiceNamespace(serviceNamespace); return this; } /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource. For a resource provided by * your own application or service, use custom-resource instead. * @see ServiceNamespace */ public void setServiceNamespace(ServiceNamespace serviceNamespace) { withServiceNamespace(serviceNamespace); } /** *

* The namespace of the Amazon Web Services service that provides the resource. For a resource provided by your own * application or service, use custom-resource instead. *

* * @param serviceNamespace * The namespace of the Amazon Web Services service that provides the resource. For a resource provided by * your own application or service, use custom-resource instead. * @return Returns a reference to this object so that method calls can be chained together. * @see ServiceNamespace */ public PutScalingPolicyRequest withServiceNamespace(ServiceNamespace serviceNamespace) { this.serviceNamespace = serviceNamespace.toString(); return this; } /** *

* The identifier of the resource associated with the scaling policy. This string consists of the resource type and * unique identifier. *

* * * @param resourceId * The identifier of the resource associated with the scaling policy. This string consists of the resource * type and unique identifier.

*