/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::ApplicationAutoScaling::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; PutScalingPolicyRequest::PutScalingPolicyRequest() : m_policyNameHasBeenSet(false), m_serviceNamespace(ServiceNamespace::NOT_SET), m_serviceNamespaceHasBeenSet(false), m_resourceIdHasBeenSet(false), m_scalableDimension(ScalableDimension::NOT_SET), m_scalableDimensionHasBeenSet(false), m_policyType(PolicyType::NOT_SET), m_policyTypeHasBeenSet(false), m_stepScalingPolicyConfigurationHasBeenSet(false), m_targetTrackingScalingPolicyConfigurationHasBeenSet(false) { } Aws::String PutScalingPolicyRequest::SerializePayload() const { JsonValue payload; if(m_policyNameHasBeenSet) { payload.WithString("PolicyName", m_policyName); } if(m_serviceNamespaceHasBeenSet) { payload.WithString("ServiceNamespace", ServiceNamespaceMapper::GetNameForServiceNamespace(m_serviceNamespace)); } if(m_resourceIdHasBeenSet) { payload.WithString("ResourceId", m_resourceId); } if(m_scalableDimensionHasBeenSet) { payload.WithString("ScalableDimension", ScalableDimensionMapper::GetNameForScalableDimension(m_scalableDimension)); } if(m_policyTypeHasBeenSet) { payload.WithString("PolicyType", PolicyTypeMapper::GetNameForPolicyType(m_policyType)); } if(m_stepScalingPolicyConfigurationHasBeenSet) { payload.WithObject("StepScalingPolicyConfiguration", m_stepScalingPolicyConfiguration.Jsonize()); } if(m_targetTrackingScalingPolicyConfigurationHasBeenSet) { payload.WithObject("TargetTrackingScalingPolicyConfiguration", m_targetTrackingScalingPolicyConfiguration.Jsonize()); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection PutScalingPolicyRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AnyScaleFrontendService.PutScalingPolicy")); return headers; }