This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-secretsmanager/source/model/UpdateSecretRequest.cpp

80 lines
1.7 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/secretsmanager/model/UpdateSecretRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/HashingUtils.h>
#include <utility>
using namespace Aws::SecretsManager::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
UpdateSecretRequest::UpdateSecretRequest() :
m_secretIdHasBeenSet(false),
m_clientRequestToken(Aws::Utils::UUID::RandomUUID()),
m_clientRequestTokenHasBeenSet(true),
m_descriptionHasBeenSet(false),
m_kmsKeyIdHasBeenSet(false),
m_secretBinaryHasBeenSet(false),
m_secretStringHasBeenSet(false)
{
}
Aws::String UpdateSecretRequest::SerializePayload() const
{
JsonValue payload;
if(m_secretIdHasBeenSet)
{
payload.WithString("SecretId", m_secretId);
}
if(m_clientRequestTokenHasBeenSet)
{
payload.WithString("ClientRequestToken", m_clientRequestToken);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_kmsKeyIdHasBeenSet)
{
payload.WithString("KmsKeyId", m_kmsKeyId);
}
if(m_secretBinaryHasBeenSet)
{
payload.WithString("SecretBinary", HashingUtils::Base64Encode(m_secretBinary));
}
if(m_secretStringHasBeenSet)
{
payload.WithString("SecretString", m_secretString);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection UpdateSecretRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "secretsmanager.UpdateSecret"));
return headers;
}