65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/application-autoscaling/model/DeleteScalingPolicyRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::ApplicationAutoScaling::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
DeleteScalingPolicyRequest::DeleteScalingPolicyRequest() :
|
|
m_policyNameHasBeenSet(false),
|
|
m_serviceNamespace(ServiceNamespace::NOT_SET),
|
|
m_serviceNamespaceHasBeenSet(false),
|
|
m_resourceIdHasBeenSet(false),
|
|
m_scalableDimension(ScalableDimension::NOT_SET),
|
|
m_scalableDimensionHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String DeleteScalingPolicyRequest::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));
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection DeleteScalingPolicyRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AnyScaleFrontendService.DeleteScalingPolicy"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|