Amazon.ApplicationAutoScaling.AmazonApplicationAutoScalingClient.PutScalingPolicy C# (CSharp) Метод

PutScalingPolicy() публичный Метод

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.

/// Concurrent updates caused an exception, for example, if you request an update to an /// Application Auto Scaling resource that already has a pending update. /// /// The service encountered an internal error. /// /// Your account exceeded a limit. This exception is thrown when a per-account resource /// limit is exceeded. For more information, see Application /// Auto Scaling Limits. /// /// The specified object could not be found. For any Put or Register /// API operation, which depends on the existence of a scalable target, this exception /// is thrown if the scalable target with the specified service namespace, resource ID, /// and scalable dimension does not exist. For any Delete or Deregister /// API operation, this exception is thrown if the resource that is to be deleted or deregistered /// cannot be found. /// /// An exception was thrown for a validation issue. Review the available parameters for /// the API request. ///
public PutScalingPolicy ( PutScalingPolicyRequest request ) : PutScalingPolicyResponse
request Amazon.ApplicationAutoScaling.Model.PutScalingPolicyRequest Container for the necessary parameters to execute the PutScalingPolicy service method.
Результат Amazon.ApplicationAutoScaling.Model.PutScalingPolicyResponse
        public PutScalingPolicyResponse PutScalingPolicy(PutScalingPolicyRequest request)
        {
            var marshaller = new PutScalingPolicyRequestMarshaller();
            var unmarshaller = PutScalingPolicyResponseUnmarshaller.Instance;

            return Invoke<PutScalingPolicyRequest,PutScalingPolicyResponse>(request, marshaller, unmarshaller);
        }