51 lines
1.0 KiB
C++
51 lines
1.0 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/logs/model/PutResourcePolicyRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::CloudWatchLogs::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
PutResourcePolicyRequest::PutResourcePolicyRequest() :
|
|
m_policyNameHasBeenSet(false),
|
|
m_policyDocumentHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String PutResourcePolicyRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_policyNameHasBeenSet)
|
|
{
|
|
payload.WithString("policyName", m_policyName);
|
|
|
|
}
|
|
|
|
if(m_policyDocumentHasBeenSet)
|
|
{
|
|
payload.WithString("policyDocument", m_policyDocument);
|
|
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection PutResourcePolicyRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Logs_20140328.PutResourcePolicy"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|