Lesson 35 - Get Compute Auth Token Working

This commit is contained in:
Norman Lansing
2026-02-28 12:32:28 -05:00
parent 1d477ee42a
commit 4fde462bce
7743 changed files with 1397833 additions and 18 deletions

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/client/GenericClientConfiguration.h>
#include <aws/core/endpoint/DefaultEndpointProvider.h>
#include <aws/core/endpoint/EndpointParameter.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/secretsmanager/SecretsManagerEndpointRules.h>
namespace Aws
{
namespace SecretsManager
{
namespace Endpoint
{
using EndpointParameters = Aws::Endpoint::EndpointParameters;
using Aws::Endpoint::EndpointProviderBase;
using Aws::Endpoint::DefaultEndpointProvider;
using SecretsManagerClientContextParameters = Aws::Endpoint::ClientContextParameters;
using SecretsManagerClientConfiguration = Aws::Client::GenericClientConfiguration;
using SecretsManagerBuiltInParameters = Aws::Endpoint::BuiltInParameters;
/**
* The type for the SecretsManager Client Endpoint Provider.
* Inherit from this Base class / "Interface" should you want to provide a custom endpoint provider.
* The SDK must use service-specific type for each service per specification.
*/
using SecretsManagerEndpointProviderBase =
EndpointProviderBase<SecretsManagerClientConfiguration, SecretsManagerBuiltInParameters, SecretsManagerClientContextParameters>;
using SecretsManagerDefaultEpProviderBase =
DefaultEndpointProvider<SecretsManagerClientConfiguration, SecretsManagerBuiltInParameters, SecretsManagerClientContextParameters>;
/**
* Default endpoint provider used for this service
*/
class AWS_SECRETSMANAGER_API SecretsManagerEndpointProvider : public SecretsManagerDefaultEpProviderBase
{
public:
using SecretsManagerResolveEndpointOutcome = Aws::Endpoint::ResolveEndpointOutcome;
SecretsManagerEndpointProvider()
: SecretsManagerDefaultEpProviderBase(Aws::SecretsManager::SecretsManagerEndpointRules::GetRulesBlob(), Aws::SecretsManager::SecretsManagerEndpointRules::RulesBlobSize)
{}
~SecretsManagerEndpointProvider()
{
}
};
} // namespace Endpoint
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <cstddef>
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
namespace Aws
{
namespace SecretsManager
{
class SecretsManagerEndpointRules
{
public:
static const size_t RulesBlobStrLen;
static const size_t RulesBlobSize;
static const char* GetRulesBlob();
};
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_SECRETSMANAGER_API SecretsManagerErrorMarshaller : public Aws::Client::JsonErrorMarshaller
{
public:
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override;
};
} // namespace Client
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/core/client/AWSError.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
namespace Aws
{
namespace SecretsManager
{
enum class SecretsManagerErrors
{
//From Core//
//////////////////////////////////////////////////////////////////////////////////////////
INCOMPLETE_SIGNATURE = 0,
INTERNAL_FAILURE = 1,
INVALID_ACTION = 2,
INVALID_CLIENT_TOKEN_ID = 3,
INVALID_PARAMETER_COMBINATION = 4,
INVALID_QUERY_PARAMETER = 5,
INVALID_PARAMETER_VALUE = 6,
MISSING_ACTION = 7, // SDK should never allow
MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
MISSING_PARAMETER = 9, // SDK should never allow
OPT_IN_REQUIRED = 10,
REQUEST_EXPIRED = 11,
SERVICE_UNAVAILABLE = 12,
THROTTLING = 13,
VALIDATION = 14,
ACCESS_DENIED = 15,
RESOURCE_NOT_FOUND = 16,
UNRECOGNIZED_CLIENT = 17,
MALFORMED_QUERY_STRING = 18,
SLOW_DOWN = 19,
REQUEST_TIME_TOO_SKEWED = 20,
INVALID_SIGNATURE = 21,
SIGNATURE_DOES_NOT_MATCH = 22,
INVALID_ACCESS_KEY_ID = 23,
REQUEST_TIMEOUT = 24,
NETWORK_CONNECTION = 99,
UNKNOWN = 100,
///////////////////////////////////////////////////////////////////////////////////////////
DECRYPTION_FAILURE= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
ENCRYPTION_FAILURE,
INTERNAL_SERVICE,
INVALID_NEXT_TOKEN,
INVALID_PARAMETER,
INVALID_REQUEST,
LIMIT_EXCEEDED,
MALFORMED_POLICY_DOCUMENT,
PRECONDITION_NOT_MET,
PUBLIC_POLICY,
RESOURCE_EXISTS
};
class AWS_SECRETSMANAGER_API SecretsManagerError : public Aws::Client::AWSError<SecretsManagerErrors>
{
public:
SecretsManagerError() {}
SecretsManagerError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<SecretsManagerErrors>(rhs) {}
SecretsManagerError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<SecretsManagerErrors>(rhs) {}
SecretsManagerError(const Aws::Client::AWSError<SecretsManagerErrors>& rhs) : Aws::Client::AWSError<SecretsManagerErrors>(rhs) {}
SecretsManagerError(Aws::Client::AWSError<SecretsManagerErrors>&& rhs) : Aws::Client::AWSError<SecretsManagerErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace SecretsManagerErrorMapper
{
AWS_SECRETSMANAGER_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/endpoint/AWSEndpoint.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace SecretsManager
{
class AWS_SECRETSMANAGER_API SecretsManagerRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
using EndpointParameter = Aws::Endpoint::EndpointParameter;
using EndpointParameters = Aws::Endpoint::EndpointParameters;
virtual ~SecretsManagerRequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_1 ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2017-10-17"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,192 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
/* Generic header includes */
#include <aws/secretsmanager/SecretsManagerErrors.h>
#include <aws/core/client/GenericClientConfiguration.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <aws/secretsmanager/SecretsManagerEndpointProvider.h>
#include <future>
#include <functional>
/* End of generic header includes */
/* Service model headers required in SecretsManagerClient header */
#include <aws/secretsmanager/model/BatchGetSecretValueResult.h>
#include <aws/secretsmanager/model/CancelRotateSecretResult.h>
#include <aws/secretsmanager/model/CreateSecretResult.h>
#include <aws/secretsmanager/model/DeleteResourcePolicyResult.h>
#include <aws/secretsmanager/model/DeleteSecretResult.h>
#include <aws/secretsmanager/model/DescribeSecretResult.h>
#include <aws/secretsmanager/model/GetRandomPasswordResult.h>
#include <aws/secretsmanager/model/GetResourcePolicyResult.h>
#include <aws/secretsmanager/model/GetSecretValueResult.h>
#include <aws/secretsmanager/model/ListSecretVersionIdsResult.h>
#include <aws/secretsmanager/model/ListSecretsResult.h>
#include <aws/secretsmanager/model/PutResourcePolicyResult.h>
#include <aws/secretsmanager/model/PutSecretValueResult.h>
#include <aws/secretsmanager/model/RemoveRegionsFromReplicationResult.h>
#include <aws/secretsmanager/model/ReplicateSecretToRegionsResult.h>
#include <aws/secretsmanager/model/RestoreSecretResult.h>
#include <aws/secretsmanager/model/RotateSecretResult.h>
#include <aws/secretsmanager/model/StopReplicationToReplicaResult.h>
#include <aws/secretsmanager/model/UpdateSecretResult.h>
#include <aws/secretsmanager/model/UpdateSecretVersionStageResult.h>
#include <aws/secretsmanager/model/ValidateResourcePolicyResult.h>
#include <aws/secretsmanager/model/ListSecretsRequest.h>
#include <aws/secretsmanager/model/GetRandomPasswordRequest.h>
#include <aws/secretsmanager/model/BatchGetSecretValueRequest.h>
#include <aws/core/NoResult.h>
/* End of service model headers required in SecretsManagerClient header */
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace SecretsManager
{
using SecretsManagerClientConfiguration = Aws::Client::GenericClientConfiguration;
using SecretsManagerEndpointProviderBase = Aws::SecretsManager::Endpoint::SecretsManagerEndpointProviderBase;
using SecretsManagerEndpointProvider = Aws::SecretsManager::Endpoint::SecretsManagerEndpointProvider;
namespace Model
{
/* Service model forward declarations required in SecretsManagerClient header */
class BatchGetSecretValueRequest;
class CancelRotateSecretRequest;
class CreateSecretRequest;
class DeleteResourcePolicyRequest;
class DeleteSecretRequest;
class DescribeSecretRequest;
class GetRandomPasswordRequest;
class GetResourcePolicyRequest;
class GetSecretValueRequest;
class ListSecretVersionIdsRequest;
class ListSecretsRequest;
class PutResourcePolicyRequest;
class PutSecretValueRequest;
class RemoveRegionsFromReplicationRequest;
class ReplicateSecretToRegionsRequest;
class RestoreSecretRequest;
class RotateSecretRequest;
class StopReplicationToReplicaRequest;
class TagResourceRequest;
class UntagResourceRequest;
class UpdateSecretRequest;
class UpdateSecretVersionStageRequest;
class ValidateResourcePolicyRequest;
/* End of service model forward declarations required in SecretsManagerClient header */
/* Service model Outcome class definitions */
typedef Aws::Utils::Outcome<BatchGetSecretValueResult, SecretsManagerError> BatchGetSecretValueOutcome;
typedef Aws::Utils::Outcome<CancelRotateSecretResult, SecretsManagerError> CancelRotateSecretOutcome;
typedef Aws::Utils::Outcome<CreateSecretResult, SecretsManagerError> CreateSecretOutcome;
typedef Aws::Utils::Outcome<DeleteResourcePolicyResult, SecretsManagerError> DeleteResourcePolicyOutcome;
typedef Aws::Utils::Outcome<DeleteSecretResult, SecretsManagerError> DeleteSecretOutcome;
typedef Aws::Utils::Outcome<DescribeSecretResult, SecretsManagerError> DescribeSecretOutcome;
typedef Aws::Utils::Outcome<GetRandomPasswordResult, SecretsManagerError> GetRandomPasswordOutcome;
typedef Aws::Utils::Outcome<GetResourcePolicyResult, SecretsManagerError> GetResourcePolicyOutcome;
typedef Aws::Utils::Outcome<GetSecretValueResult, SecretsManagerError> GetSecretValueOutcome;
typedef Aws::Utils::Outcome<ListSecretVersionIdsResult, SecretsManagerError> ListSecretVersionIdsOutcome;
typedef Aws::Utils::Outcome<ListSecretsResult, SecretsManagerError> ListSecretsOutcome;
typedef Aws::Utils::Outcome<PutResourcePolicyResult, SecretsManagerError> PutResourcePolicyOutcome;
typedef Aws::Utils::Outcome<PutSecretValueResult, SecretsManagerError> PutSecretValueOutcome;
typedef Aws::Utils::Outcome<RemoveRegionsFromReplicationResult, SecretsManagerError> RemoveRegionsFromReplicationOutcome;
typedef Aws::Utils::Outcome<ReplicateSecretToRegionsResult, SecretsManagerError> ReplicateSecretToRegionsOutcome;
typedef Aws::Utils::Outcome<RestoreSecretResult, SecretsManagerError> RestoreSecretOutcome;
typedef Aws::Utils::Outcome<RotateSecretResult, SecretsManagerError> RotateSecretOutcome;
typedef Aws::Utils::Outcome<StopReplicationToReplicaResult, SecretsManagerError> StopReplicationToReplicaOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, SecretsManagerError> TagResourceOutcome;
typedef Aws::Utils::Outcome<Aws::NoResult, SecretsManagerError> UntagResourceOutcome;
typedef Aws::Utils::Outcome<UpdateSecretResult, SecretsManagerError> UpdateSecretOutcome;
typedef Aws::Utils::Outcome<UpdateSecretVersionStageResult, SecretsManagerError> UpdateSecretVersionStageOutcome;
typedef Aws::Utils::Outcome<ValidateResourcePolicyResult, SecretsManagerError> ValidateResourcePolicyOutcome;
/* End of service model Outcome class definitions */
/* Service model Outcome callable definitions */
typedef std::future<BatchGetSecretValueOutcome> BatchGetSecretValueOutcomeCallable;
typedef std::future<CancelRotateSecretOutcome> CancelRotateSecretOutcomeCallable;
typedef std::future<CreateSecretOutcome> CreateSecretOutcomeCallable;
typedef std::future<DeleteResourcePolicyOutcome> DeleteResourcePolicyOutcomeCallable;
typedef std::future<DeleteSecretOutcome> DeleteSecretOutcomeCallable;
typedef std::future<DescribeSecretOutcome> DescribeSecretOutcomeCallable;
typedef std::future<GetRandomPasswordOutcome> GetRandomPasswordOutcomeCallable;
typedef std::future<GetResourcePolicyOutcome> GetResourcePolicyOutcomeCallable;
typedef std::future<GetSecretValueOutcome> GetSecretValueOutcomeCallable;
typedef std::future<ListSecretVersionIdsOutcome> ListSecretVersionIdsOutcomeCallable;
typedef std::future<ListSecretsOutcome> ListSecretsOutcomeCallable;
typedef std::future<PutResourcePolicyOutcome> PutResourcePolicyOutcomeCallable;
typedef std::future<PutSecretValueOutcome> PutSecretValueOutcomeCallable;
typedef std::future<RemoveRegionsFromReplicationOutcome> RemoveRegionsFromReplicationOutcomeCallable;
typedef std::future<ReplicateSecretToRegionsOutcome> ReplicateSecretToRegionsOutcomeCallable;
typedef std::future<RestoreSecretOutcome> RestoreSecretOutcomeCallable;
typedef std::future<RotateSecretOutcome> RotateSecretOutcomeCallable;
typedef std::future<StopReplicationToReplicaOutcome> StopReplicationToReplicaOutcomeCallable;
typedef std::future<TagResourceOutcome> TagResourceOutcomeCallable;
typedef std::future<UntagResourceOutcome> UntagResourceOutcomeCallable;
typedef std::future<UpdateSecretOutcome> UpdateSecretOutcomeCallable;
typedef std::future<UpdateSecretVersionStageOutcome> UpdateSecretVersionStageOutcomeCallable;
typedef std::future<ValidateResourcePolicyOutcome> ValidateResourcePolicyOutcomeCallable;
/* End of service model Outcome callable definitions */
} // namespace Model
class SecretsManagerClient;
/* Service model async handlers definitions */
typedef std::function<void(const SecretsManagerClient*, const Model::BatchGetSecretValueRequest&, const Model::BatchGetSecretValueOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > BatchGetSecretValueResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::CancelRotateSecretRequest&, const Model::CancelRotateSecretOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CancelRotateSecretResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::CreateSecretRequest&, const Model::CreateSecretOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > CreateSecretResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::DeleteResourcePolicyRequest&, const Model::DeleteResourcePolicyOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteResourcePolicyResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::DeleteSecretRequest&, const Model::DeleteSecretOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DeleteSecretResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::DescribeSecretRequest&, const Model::DescribeSecretOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > DescribeSecretResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::GetRandomPasswordRequest&, const Model::GetRandomPasswordOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetRandomPasswordResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::GetResourcePolicyRequest&, const Model::GetResourcePolicyOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetResourcePolicyResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::GetSecretValueRequest&, const Model::GetSecretValueOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetSecretValueResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::ListSecretVersionIdsRequest&, const Model::ListSecretVersionIdsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListSecretVersionIdsResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::ListSecretsRequest&, const Model::ListSecretsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ListSecretsResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::PutResourcePolicyRequest&, const Model::PutResourcePolicyOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutResourcePolicyResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::PutSecretValueRequest&, const Model::PutSecretValueOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > PutSecretValueResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::RemoveRegionsFromReplicationRequest&, const Model::RemoveRegionsFromReplicationOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RemoveRegionsFromReplicationResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::ReplicateSecretToRegionsRequest&, const Model::ReplicateSecretToRegionsOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ReplicateSecretToRegionsResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::RestoreSecretRequest&, const Model::RestoreSecretOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RestoreSecretResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::RotateSecretRequest&, const Model::RotateSecretOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > RotateSecretResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::StopReplicationToReplicaRequest&, const Model::StopReplicationToReplicaOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > StopReplicationToReplicaResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::TagResourceRequest&, const Model::TagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > TagResourceResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::UntagResourceRequest&, const Model::UntagResourceOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UntagResourceResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::UpdateSecretRequest&, const Model::UpdateSecretOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateSecretResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::UpdateSecretVersionStageRequest&, const Model::UpdateSecretVersionStageOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > UpdateSecretVersionStageResponseReceivedHandler;
typedef std::function<void(const SecretsManagerClient*, const Model::ValidateResourcePolicyRequest&, const Model::ValidateResourcePolicyOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > ValidateResourcePolicyResponseReceivedHandler;
/* End of service model async handlers definitions */
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,32 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_SECRETSMANAGER_EXPORTS
#define AWS_SECRETSMANAGER_API __declspec(dllexport)
#else
#define AWS_SECRETSMANAGER_API __declspec(dllimport)
#endif /* AWS_SECRETSMANAGER_EXPORTS */
#define AWS_SECRETSMANAGER_EXTERN
#else
#define AWS_SECRETSMANAGER_API
#define AWS_SECRETSMANAGER_EXTERN extern
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_SECRETSMANAGER_API
#define AWS_SECRETSMANAGER_EXTERN extern
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,100 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>The error Secrets Manager encountered while retrieving an individual secret
* as part of <a>BatchGetSecretValue</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/APIErrorType">AWS
* API Reference</a></p>
*/
class APIErrorType
{
public:
AWS_SECRETSMANAGER_API APIErrorType();
AWS_SECRETSMANAGER_API APIErrorType(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API APIErrorType& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>The ARN or name of the secret.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline APIErrorType& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline APIErrorType& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline APIErrorType& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>The error Secrets Manager encountered while retrieving an individual secret
* as part of <a>BatchGetSecretValue</a>, for example
* <code>ResourceNotFoundException</code>,<code>InvalidParameterException</code>,
* <code>InvalidRequestException</code>, <code>DecryptionFailure</code>, or
* <code>AccessDeniedException</code>.</p>
*/
inline const Aws::String& GetErrorCode() const{ return m_errorCode; }
inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
inline void SetErrorCode(const Aws::String& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; }
inline void SetErrorCode(Aws::String&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::move(value); }
inline void SetErrorCode(const char* value) { m_errorCodeHasBeenSet = true; m_errorCode.assign(value); }
inline APIErrorType& WithErrorCode(const Aws::String& value) { SetErrorCode(value); return *this;}
inline APIErrorType& WithErrorCode(Aws::String&& value) { SetErrorCode(std::move(value)); return *this;}
inline APIErrorType& WithErrorCode(const char* value) { SetErrorCode(value); return *this;}
///@}
///@{
/**
* <p>A message describing the error.</p>
*/
inline const Aws::String& GetMessage() const{ return m_message; }
inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; }
inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; }
inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); }
inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); }
inline APIErrorType& WithMessage(const Aws::String& value) { SetMessage(value); return *this;}
inline APIErrorType& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;}
inline APIErrorType& WithMessage(const char* value) { SetMessage(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::String m_errorCode;
bool m_errorCodeHasBeenSet = false;
Aws::String m_message;
bool m_messageHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,117 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/model/Filter.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class BatchGetSecretValueRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API BatchGetSecretValueRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "BatchGetSecretValue"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or names of the secrets to retrieve. You must include
* <code>Filters</code> or <code>SecretIdList</code>, but not both.</p>
*/
inline const Aws::Vector<Aws::String>& GetSecretIdList() const{ return m_secretIdList; }
inline bool SecretIdListHasBeenSet() const { return m_secretIdListHasBeenSet; }
inline void SetSecretIdList(const Aws::Vector<Aws::String>& value) { m_secretIdListHasBeenSet = true; m_secretIdList = value; }
inline void SetSecretIdList(Aws::Vector<Aws::String>&& value) { m_secretIdListHasBeenSet = true; m_secretIdList = std::move(value); }
inline BatchGetSecretValueRequest& WithSecretIdList(const Aws::Vector<Aws::String>& value) { SetSecretIdList(value); return *this;}
inline BatchGetSecretValueRequest& WithSecretIdList(Aws::Vector<Aws::String>&& value) { SetSecretIdList(std::move(value)); return *this;}
inline BatchGetSecretValueRequest& AddSecretIdList(const Aws::String& value) { m_secretIdListHasBeenSet = true; m_secretIdList.push_back(value); return *this; }
inline BatchGetSecretValueRequest& AddSecretIdList(Aws::String&& value) { m_secretIdListHasBeenSet = true; m_secretIdList.push_back(std::move(value)); return *this; }
inline BatchGetSecretValueRequest& AddSecretIdList(const char* value) { m_secretIdListHasBeenSet = true; m_secretIdList.push_back(value); return *this; }
///@}
///@{
/**
* <p>The filters to choose which secrets to retrieve. You must include
* <code>Filters</code> or <code>SecretIdList</code>, but not both.</p>
*/
inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }
inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
inline BatchGetSecretValueRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}
inline BatchGetSecretValueRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(std::move(value)); return *this;}
inline BatchGetSecretValueRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
inline BatchGetSecretValueRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>The number of results to include in the response.</p> <p>If there are more
* results available, in the response, Secrets Manager includes
* <code>NextToken</code>. To get the next results, call
* <code>BatchGetSecretValue</code> again with the value from
* <code>NextToken</code>. To use this parameter, you must also use the
* <code>Filters</code> parameter.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
inline BatchGetSecretValueRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
///@}
///@{
/**
* <p>A token that indicates where the output should continue from, if a previous
* call did not show all results. To get the next results, call
* <code>BatchGetSecretValue</code> again with this value.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
inline BatchGetSecretValueRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline BatchGetSecretValueRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline BatchGetSecretValueRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
///@}
private:
Aws::Vector<Aws::String> m_secretIdList;
bool m_secretIdListHasBeenSet = false;
Aws::Vector<Filter> m_filters;
bool m_filtersHasBeenSet = false;
int m_maxResults;
bool m_maxResultsHasBeenSet = false;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/model/SecretValueEntry.h>
#include <aws/secretsmanager/model/APIErrorType.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class BatchGetSecretValueResult
{
public:
AWS_SECRETSMANAGER_API BatchGetSecretValueResult();
AWS_SECRETSMANAGER_API BatchGetSecretValueResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API BatchGetSecretValueResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>A list of secret values.</p>
*/
inline const Aws::Vector<SecretValueEntry>& GetSecretValues() const{ return m_secretValues; }
inline void SetSecretValues(const Aws::Vector<SecretValueEntry>& value) { m_secretValues = value; }
inline void SetSecretValues(Aws::Vector<SecretValueEntry>&& value) { m_secretValues = std::move(value); }
inline BatchGetSecretValueResult& WithSecretValues(const Aws::Vector<SecretValueEntry>& value) { SetSecretValues(value); return *this;}
inline BatchGetSecretValueResult& WithSecretValues(Aws::Vector<SecretValueEntry>&& value) { SetSecretValues(std::move(value)); return *this;}
inline BatchGetSecretValueResult& AddSecretValues(const SecretValueEntry& value) { m_secretValues.push_back(value); return *this; }
inline BatchGetSecretValueResult& AddSecretValues(SecretValueEntry&& value) { m_secretValues.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>Secrets Manager includes this value if there's more output available than
* what is included in the current response. This can occur even when the response
* includes no values at all, such as when you ask for a filtered view of a long
* list. To get the next results, call <code>BatchGetSecretValue</code> again with
* this value.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
inline BatchGetSecretValueResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline BatchGetSecretValueResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline BatchGetSecretValueResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
///@}
///@{
/**
* <p>A list of errors Secrets Manager encountered while attempting to retrieve
* individual secrets.</p>
*/
inline const Aws::Vector<APIErrorType>& GetErrors() const{ return m_errors; }
inline void SetErrors(const Aws::Vector<APIErrorType>& value) { m_errors = value; }
inline void SetErrors(Aws::Vector<APIErrorType>&& value) { m_errors = std::move(value); }
inline BatchGetSecretValueResult& WithErrors(const Aws::Vector<APIErrorType>& value) { SetErrors(value); return *this;}
inline BatchGetSecretValueResult& WithErrors(Aws::Vector<APIErrorType>&& value) { SetErrors(std::move(value)); return *this;}
inline BatchGetSecretValueResult& AddErrors(const APIErrorType& value) { m_errors.push_back(value); return *this; }
inline BatchGetSecretValueResult& AddErrors(APIErrorType&& value) { m_errors.push_back(std::move(value)); return *this; }
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline BatchGetSecretValueResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline BatchGetSecretValueResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline BatchGetSecretValueResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::Vector<SecretValueEntry> m_secretValues;
Aws::String m_nextToken;
Aws::Vector<APIErrorType> m_errors;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class CancelRotateSecretRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API CancelRotateSecretRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "CancelRotateSecret"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret.</p> <p>For an ARN, we recommend that you
* specify a complete ARN rather than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline CancelRotateSecretRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline CancelRotateSecretRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline CancelRotateSecretRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,102 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class CancelRotateSecretResult
{
public:
AWS_SECRETSMANAGER_API CancelRotateSecretResult();
AWS_SECRETSMANAGER_API CancelRotateSecretResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API CancelRotateSecretResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline CancelRotateSecretResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline CancelRotateSecretResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline CancelRotateSecretResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline CancelRotateSecretResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline CancelRotateSecretResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline CancelRotateSecretResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>The unique identifier of the version of the secret created during the
* rotation. This version might not be complete, and should be evaluated for
* possible deletion. We recommend that you remove the <code>VersionStage</code>
* value <code>AWSPENDING</code> from this version so that Secrets Manager can
* delete it. Failing to clean up a cancelled rotation can block you from starting
* future rotations.</p>
*/
inline const Aws::String& GetVersionId() const{ return m_versionId; }
inline void SetVersionId(const Aws::String& value) { m_versionId = value; }
inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); }
inline void SetVersionId(const char* value) { m_versionId.assign(value); }
inline CancelRotateSecretResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
inline CancelRotateSecretResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
inline CancelRotateSecretResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline CancelRotateSecretResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline CancelRotateSecretResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline CancelRotateSecretResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_versionId;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,274 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/Array.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/secretsmanager/model/Tag.h>
#include <aws/secretsmanager/model/ReplicaRegionType.h>
#include <utility>
#include <aws/core/utils/UUID.h>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class CreateSecretRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API CreateSecretRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "CreateSecret"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The name of the new secret.</p> <p>The secret name can contain ASCII letters,
* numbers, and the following characters: /_+=.@-</p> <p>Do not end your secret
* name with a hyphen followed by six characters. If you do so, you risk confusion
* and unexpected results when searching for a secret by partial ARN. Secrets
* Manager automatically adds a hyphen and six random characters after the secret
* name at the end of the ARN.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
inline CreateSecretRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
inline CreateSecretRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline CreateSecretRequest& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>If you include <code>SecretString</code> or <code>SecretBinary</code>, then
* Secrets Manager creates an initial version for the secret, and this parameter
* specifies the unique identifier for the new version. </p> <p>If you use
* the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this
* operation, then you can leave this parameter empty. The CLI or SDK generates a
* random UUID for you and includes it as the value for this parameter in the
* request. </p> <p>If you generate a raw HTTP request to the Secrets
* Manager service endpoint, then you must generate a
* <code>ClientRequestToken</code> and include it in the request.</p> <p>This value
* helps ensure idempotency. Secrets Manager uses this value to prevent the
* accidental creation of duplicate versions if there are failures and retries
* during a rotation. We recommend that you generate a <a
* href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a>
* value to ensure uniqueness of your versions within the specified secret. </p>
* <ul> <li> <p>If the <code>ClientRequestToken</code> value isn't already
* associated with a version of the secret then a new version of the secret is
* created. </p> </li> <li> <p>If a version with this value already exists and the
* version <code>SecretString</code> and <code>SecretBinary</code> values are the
* same as those in the request, then the request is ignored.</p> </li> <li> <p>If
* a version with this value already exists and that version's
* <code>SecretString</code> and <code>SecretBinary</code> values are different
* from those in the request, then the request fails because you cannot modify an
* existing version. Instead, use <a>PutSecretValue</a> to create a new
* version.</p> </li> </ul> <p>This value becomes the <code>VersionId</code> of the
* new version.</p>
*/
inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; }
inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; }
inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); }
inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); }
inline CreateSecretRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;}
inline CreateSecretRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;}
inline CreateSecretRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;}
///@}
///@{
/**
* <p>The description of the secret.</p>
*/
inline const Aws::String& GetDescription() const{ return m_description; }
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
inline CreateSecretRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
inline CreateSecretRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
inline CreateSecretRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
///@}
///@{
/**
* <p>The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt
* the secret value in the secret. An alias is always prefixed by
* <code>alias/</code>, for example <code>alias/aws/secretsmanager</code>. For more
* information, see <a
* href="https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html">About
* aliases</a>.</p> <p>To use a KMS key in a different account, use the key ARN or
* the alias ARN.</p> <p>If you don't specify this value, then Secrets Manager uses
* the key <code>aws/secretsmanager</code>. If that key doesn't yet exist, then
* Secrets Manager creates it for you automatically the first time it encrypts the
* secret value.</p> <p>If the secret is in a different Amazon Web Services account
* from the credentials calling the API, then you can't use
* <code>aws/secretsmanager</code> to encrypt the secret, and you must create and
* use a customer managed KMS key. </p>
*/
inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }
inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
inline CreateSecretRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
inline CreateSecretRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}
inline CreateSecretRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
///@}
///@{
/**
* <p>The binary data to encrypt and store in the new version of the secret. We
* recommend that you store your binary data in a file and then pass the contents
* of the file as a parameter.</p> <p>Either <code>SecretString</code> or
* <code>SecretBinary</code> must have a value, but not both.</p> <p>This parameter
* is not available in the Secrets Manager console.</p> <p>Sensitive: This field
* contains sensitive information, so the service does not include it in CloudTrail
* log entries. If you create your own log entries, you must also avoid logging the
* information in this field.</p>
*/
inline const Aws::Utils::CryptoBuffer& GetSecretBinary() const{ return m_secretBinary; }
inline bool SecretBinaryHasBeenSet() const { return m_secretBinaryHasBeenSet; }
inline void SetSecretBinary(const Aws::Utils::CryptoBuffer& value) { m_secretBinaryHasBeenSet = true; m_secretBinary = value; }
inline void SetSecretBinary(Aws::Utils::CryptoBuffer&& value) { m_secretBinaryHasBeenSet = true; m_secretBinary = std::move(value); }
inline CreateSecretRequest& WithSecretBinary(const Aws::Utils::CryptoBuffer& value) { SetSecretBinary(value); return *this;}
inline CreateSecretRequest& WithSecretBinary(Aws::Utils::CryptoBuffer&& value) { SetSecretBinary(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The text data to encrypt and store in this new version of the secret. We
* recommend you use a JSON structure of key/value pairs for your secret value.</p>
* <p>Either <code>SecretString</code> or <code>SecretBinary</code> must have a
* value, but not both.</p> <p>If you create a secret by using the Secrets Manager
* console then Secrets Manager puts the protected secret text in only the
* <code>SecretString</code> parameter. The Secrets Manager console stores the
* information as a JSON structure of key/value pairs that a Lambda rotation
* function can parse.</p> <p>Sensitive: This field contains sensitive information,
* so the service does not include it in CloudTrail log entries. If you create your
* own log entries, you must also avoid logging the information in this field.</p>
*/
inline const Aws::String& GetSecretString() const{ return m_secretString; }
inline bool SecretStringHasBeenSet() const { return m_secretStringHasBeenSet; }
inline void SetSecretString(const Aws::String& value) { m_secretStringHasBeenSet = true; m_secretString = value; }
inline void SetSecretString(Aws::String&& value) { m_secretStringHasBeenSet = true; m_secretString = std::move(value); }
inline void SetSecretString(const char* value) { m_secretStringHasBeenSet = true; m_secretString.assign(value); }
inline CreateSecretRequest& WithSecretString(const Aws::String& value) { SetSecretString(value); return *this;}
inline CreateSecretRequest& WithSecretString(Aws::String&& value) { SetSecretString(std::move(value)); return *this;}
inline CreateSecretRequest& WithSecretString(const char* value) { SetSecretString(value); return *this;}
///@}
///@{
/**
* <p>A list of tags to attach to the secret. Each tag is a key and value pair of
* strings in a JSON text string, for example:</p> <p>
* <code>[{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}]</code>
* </p> <p>Secrets Manager tag key names are case sensitive. A tag with the key
* "ABC" is a different tag from one with key "abc".</p> <p>If you check tags in
* permissions policies as part of your security strategy, then adding or removing
* a tag can change permissions. If the completion of this operation would result
* in you losing your permissions for this secret, then Secrets Manager blocks the
* operation and returns an <code>Access Denied</code> error. For more information,
* see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#tag-secrets-abac">Control
* access to secrets using tags</a> and <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_tags2">Limit
* access to identities with tags that match secrets' tags</a>.</p> <p>For
* information about how to format a JSON parameter for the various command line
* tool environments, see <a
* href="https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json">Using
* JSON for Parameters</a>. If your command-line tool or SDK requires quotation
* marks around the parameter, you should use single quotes to avoid confusion with
* the double quotes required in the JSON text.</p> <p>For tag quotas and naming
* restrictions, see <a
* href="https://docs.aws.amazon.com/general/latest/gr/arg.html#taged-reference-quotas">Service
* quotas for Tagging</a> in the <i>Amazon Web Services General Reference
* guide</i>.</p>
*/
inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
inline CreateSecretRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
inline CreateSecretRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
inline CreateSecretRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
inline CreateSecretRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>A list of Regions and KMS keys to replicate secrets.</p>
*/
inline const Aws::Vector<ReplicaRegionType>& GetAddReplicaRegions() const{ return m_addReplicaRegions; }
inline bool AddReplicaRegionsHasBeenSet() const { return m_addReplicaRegionsHasBeenSet; }
inline void SetAddReplicaRegions(const Aws::Vector<ReplicaRegionType>& value) { m_addReplicaRegionsHasBeenSet = true; m_addReplicaRegions = value; }
inline void SetAddReplicaRegions(Aws::Vector<ReplicaRegionType>&& value) { m_addReplicaRegionsHasBeenSet = true; m_addReplicaRegions = std::move(value); }
inline CreateSecretRequest& WithAddReplicaRegions(const Aws::Vector<ReplicaRegionType>& value) { SetAddReplicaRegions(value); return *this;}
inline CreateSecretRequest& WithAddReplicaRegions(Aws::Vector<ReplicaRegionType>&& value) { SetAddReplicaRegions(std::move(value)); return *this;}
inline CreateSecretRequest& AddAddReplicaRegions(const ReplicaRegionType& value) { m_addReplicaRegionsHasBeenSet = true; m_addReplicaRegions.push_back(value); return *this; }
inline CreateSecretRequest& AddAddReplicaRegions(ReplicaRegionType&& value) { m_addReplicaRegionsHasBeenSet = true; m_addReplicaRegions.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>Specifies whether to overwrite a secret with the same name in the destination
* Region. By default, secrets aren't overwritten.</p>
*/
inline bool GetForceOverwriteReplicaSecret() const{ return m_forceOverwriteReplicaSecret; }
inline bool ForceOverwriteReplicaSecretHasBeenSet() const { return m_forceOverwriteReplicaSecretHasBeenSet; }
inline void SetForceOverwriteReplicaSecret(bool value) { m_forceOverwriteReplicaSecretHasBeenSet = true; m_forceOverwriteReplicaSecret = value; }
inline CreateSecretRequest& WithForceOverwriteReplicaSecret(bool value) { SetForceOverwriteReplicaSecret(value); return *this;}
///@}
private:
Aws::String m_name;
bool m_nameHasBeenSet = false;
Aws::String m_clientRequestToken;
bool m_clientRequestTokenHasBeenSet = false;
Aws::String m_description;
bool m_descriptionHasBeenSet = false;
Aws::String m_kmsKeyId;
bool m_kmsKeyIdHasBeenSet = false;
Aws::Utils::CryptoBuffer m_secretBinary;
bool m_secretBinaryHasBeenSet = false;
Aws::String m_secretString;
bool m_secretStringHasBeenSet = false;
Aws::Vector<Tag> m_tags;
bool m_tagsHasBeenSet = false;
Aws::Vector<ReplicaRegionType> m_addReplicaRegions;
bool m_addReplicaRegionsHasBeenSet = false;
bool m_forceOverwriteReplicaSecret;
bool m_forceOverwriteReplicaSecretHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,121 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/secretsmanager/model/ReplicationStatusType.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class CreateSecretResult
{
public:
AWS_SECRETSMANAGER_API CreateSecretResult();
AWS_SECRETSMANAGER_API CreateSecretResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API CreateSecretResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the new secret. The ARN includes the name of the secret followed
* by six random characters. This ensures that if you create a new secret with the
* same name as a deleted secret, then users with access to the old secret don't
* get access to the new secret because the ARNs are different.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline CreateSecretResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline CreateSecretResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline CreateSecretResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the new secret.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline CreateSecretResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline CreateSecretResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline CreateSecretResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>The unique identifier associated with the version of the new secret.</p>
*/
inline const Aws::String& GetVersionId() const{ return m_versionId; }
inline void SetVersionId(const Aws::String& value) { m_versionId = value; }
inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); }
inline void SetVersionId(const char* value) { m_versionId.assign(value); }
inline CreateSecretResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
inline CreateSecretResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
inline CreateSecretResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
///@}
///@{
/**
* <p>A list of the replicas of this secret and their status:</p> <ul> <li> <p>
* <code>Failed</code>, which indicates that the replica was not created.</p> </li>
* <li> <p> <code>InProgress</code>, which indicates that Secrets Manager is in the
* process of creating the replica.</p> </li> <li> <p> <code>InSync</code>, which
* indicates that the replica was created.</p> </li> </ul>
*/
inline const Aws::Vector<ReplicationStatusType>& GetReplicationStatus() const{ return m_replicationStatus; }
inline void SetReplicationStatus(const Aws::Vector<ReplicationStatusType>& value) { m_replicationStatus = value; }
inline void SetReplicationStatus(Aws::Vector<ReplicationStatusType>&& value) { m_replicationStatus = std::move(value); }
inline CreateSecretResult& WithReplicationStatus(const Aws::Vector<ReplicationStatusType>& value) { SetReplicationStatus(value); return *this;}
inline CreateSecretResult& WithReplicationStatus(Aws::Vector<ReplicationStatusType>&& value) { SetReplicationStatus(std::move(value)); return *this;}
inline CreateSecretResult& AddReplicationStatus(const ReplicationStatusType& value) { m_replicationStatus.push_back(value); return *this; }
inline CreateSecretResult& AddReplicationStatus(ReplicationStatusType&& value) { m_replicationStatus.push_back(std::move(value)); return *this; }
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline CreateSecretResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline CreateSecretResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline CreateSecretResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_versionId;
Aws::Vector<ReplicationStatusType> m_replicationStatus;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class DeleteResourcePolicyRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API DeleteResourcePolicyRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DeleteResourcePolicy"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret to delete the attached resource-based policy
* for.</p> <p>For an ARN, we recommend that you specify a complete ARN rather than
* a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline DeleteResourcePolicyRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline DeleteResourcePolicyRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline DeleteResourcePolicyRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class DeleteResourcePolicyResult
{
public:
AWS_SECRETSMANAGER_API DeleteResourcePolicyResult();
AWS_SECRETSMANAGER_API DeleteResourcePolicyResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API DeleteResourcePolicyResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret that the resource-based policy was deleted for.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline DeleteResourcePolicyResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline DeleteResourcePolicyResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline DeleteResourcePolicyResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret that the resource-based policy was deleted for.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline DeleteResourcePolicyResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline DeleteResourcePolicyResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline DeleteResourcePolicyResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline DeleteResourcePolicyResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline DeleteResourcePolicyResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline DeleteResourcePolicyResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class DeleteSecretRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API DeleteSecretRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DeleteSecret"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret to delete.</p> <p>For an ARN, we recommend that
* you specify a complete ARN rather than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline DeleteSecretRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline DeleteSecretRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline DeleteSecretRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>The number of days from 7 to 30 that Secrets Manager waits before permanently
* deleting the secret. You can't use both this parameter and
* <code>ForceDeleteWithoutRecovery</code> in the same call. If you don't use
* either, then by default Secrets Manager uses a 30 day recovery window.</p>
*/
inline long long GetRecoveryWindowInDays() const{ return m_recoveryWindowInDays; }
inline bool RecoveryWindowInDaysHasBeenSet() const { return m_recoveryWindowInDaysHasBeenSet; }
inline void SetRecoveryWindowInDays(long long value) { m_recoveryWindowInDaysHasBeenSet = true; m_recoveryWindowInDays = value; }
inline DeleteSecretRequest& WithRecoveryWindowInDays(long long value) { SetRecoveryWindowInDays(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether to delete the secret without any recovery window. You can't
* use both this parameter and <code>RecoveryWindowInDays</code> in the same call.
* If you don't use either, then by default Secrets Manager uses a 30 day recovery
* window.</p> <p>Secrets Manager performs the actual deletion with an asynchronous
* background process, so there might be a short delay before the secret is
* permanently deleted. If you delete a secret and then immediately create a secret
* with the same name, use appropriate back off and retry logic.</p> <p>If you
* forcibly delete an already deleted or nonexistent secret, the operation does not
* return <code>ResourceNotFoundException</code>.</p> <p>Use this
* parameter with caution. This parameter causes the operation to skip the normal
* recovery window before the permanent deletion that Secrets Manager would
* normally impose with the <code>RecoveryWindowInDays</code> parameter. If you
* delete a secret with the <code>ForceDeleteWithoutRecovery</code> parameter, then
* you have no opportunity to recover the secret. You lose the secret
* permanently.</p>
*/
inline bool GetForceDeleteWithoutRecovery() const{ return m_forceDeleteWithoutRecovery; }
inline bool ForceDeleteWithoutRecoveryHasBeenSet() const { return m_forceDeleteWithoutRecoveryHasBeenSet; }
inline void SetForceDeleteWithoutRecovery(bool value) { m_forceDeleteWithoutRecoveryHasBeenSet = true; m_forceDeleteWithoutRecovery = value; }
inline DeleteSecretRequest& WithForceDeleteWithoutRecovery(bool value) { SetForceDeleteWithoutRecovery(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
long long m_recoveryWindowInDays;
bool m_recoveryWindowInDaysHasBeenSet = false;
bool m_forceDeleteWithoutRecovery;
bool m_forceDeleteWithoutRecoveryHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,99 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class DeleteSecretResult
{
public:
AWS_SECRETSMANAGER_API DeleteSecretResult();
AWS_SECRETSMANAGER_API DeleteSecretResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API DeleteSecretResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline DeleteSecretResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline DeleteSecretResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline DeleteSecretResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline DeleteSecretResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline DeleteSecretResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline DeleteSecretResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>The date and time after which this secret Secrets Manager can permanently
* delete this secret, and it can no longer be restored. This value is the date and
* time of the delete request plus the number of days in
* <code>RecoveryWindowInDays</code>.</p>
*/
inline const Aws::Utils::DateTime& GetDeletionDate() const{ return m_deletionDate; }
inline void SetDeletionDate(const Aws::Utils::DateTime& value) { m_deletionDate = value; }
inline void SetDeletionDate(Aws::Utils::DateTime&& value) { m_deletionDate = std::move(value); }
inline DeleteSecretResult& WithDeletionDate(const Aws::Utils::DateTime& value) { SetDeletionDate(value); return *this;}
inline DeleteSecretResult& WithDeletionDate(Aws::Utils::DateTime&& value) { SetDeletionDate(std::move(value)); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline DeleteSecretResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline DeleteSecretResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline DeleteSecretResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::Utils::DateTime m_deletionDate;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class DescribeSecretRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API DescribeSecretRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "DescribeSecret"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret. </p> <p>For an ARN, we recommend that you
* specify a complete ARN rather than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline DescribeSecretRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline DescribeSecretRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline DescribeSecretRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,363 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/model/RotationRulesType.h>
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/secretsmanager/model/Tag.h>
#include <aws/secretsmanager/model/ReplicationStatusType.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class DescribeSecretResult
{
public:
AWS_SECRETSMANAGER_API DescribeSecretResult();
AWS_SECRETSMANAGER_API DescribeSecretResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API DescribeSecretResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline DescribeSecretResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline DescribeSecretResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline DescribeSecretResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline DescribeSecretResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline DescribeSecretResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline DescribeSecretResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>The description of the secret.</p>
*/
inline const Aws::String& GetDescription() const{ return m_description; }
inline void SetDescription(const Aws::String& value) { m_description = value; }
inline void SetDescription(Aws::String&& value) { m_description = std::move(value); }
inline void SetDescription(const char* value) { m_description.assign(value); }
inline DescribeSecretResult& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
inline DescribeSecretResult& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
inline DescribeSecretResult& WithDescription(const char* value) { SetDescription(value); return *this;}
///@}
///@{
/**
* <p>The key ID or alias ARN of the KMS key that Secrets Manager uses to encrypt
* the secret value. If the secret is encrypted with the Amazon Web Services
* managed key <code>aws/secretsmanager</code>, this field is omitted. Secrets
* created using the console use an KMS key ID.</p>
*/
inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyId = value; }
inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyId = std::move(value); }
inline void SetKmsKeyId(const char* value) { m_kmsKeyId.assign(value); }
inline DescribeSecretResult& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
inline DescribeSecretResult& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}
inline DescribeSecretResult& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether automatic rotation is turned on for this secret. If the
* secret has never been configured for rotation, Secrets Manager returns null.</p>
* <p>To turn on rotation, use <a>RotateSecret</a>. To turn off rotation, use
* <a>CancelRotateSecret</a>.</p>
*/
inline bool GetRotationEnabled() const{ return m_rotationEnabled; }
inline void SetRotationEnabled(bool value) { m_rotationEnabled = value; }
inline DescribeSecretResult& WithRotationEnabled(bool value) { SetRotationEnabled(value); return *this;}
///@}
///@{
/**
* <p>The ARN of the Lambda function that Secrets Manager invokes to rotate the
* secret. </p>
*/
inline const Aws::String& GetRotationLambdaARN() const{ return m_rotationLambdaARN; }
inline void SetRotationLambdaARN(const Aws::String& value) { m_rotationLambdaARN = value; }
inline void SetRotationLambdaARN(Aws::String&& value) { m_rotationLambdaARN = std::move(value); }
inline void SetRotationLambdaARN(const char* value) { m_rotationLambdaARN.assign(value); }
inline DescribeSecretResult& WithRotationLambdaARN(const Aws::String& value) { SetRotationLambdaARN(value); return *this;}
inline DescribeSecretResult& WithRotationLambdaARN(Aws::String&& value) { SetRotationLambdaARN(std::move(value)); return *this;}
inline DescribeSecretResult& WithRotationLambdaARN(const char* value) { SetRotationLambdaARN(value); return *this;}
///@}
///@{
/**
* <p>The rotation schedule and Lambda function for this secret. If the secret
* previously had rotation turned on, but it is now turned off, this field shows
* the previous rotation schedule and rotation function. If the secret never had
* rotation turned on, this field is omitted.</p>
*/
inline const RotationRulesType& GetRotationRules() const{ return m_rotationRules; }
inline void SetRotationRules(const RotationRulesType& value) { m_rotationRules = value; }
inline void SetRotationRules(RotationRulesType&& value) { m_rotationRules = std::move(value); }
inline DescribeSecretResult& WithRotationRules(const RotationRulesType& value) { SetRotationRules(value); return *this;}
inline DescribeSecretResult& WithRotationRules(RotationRulesType&& value) { SetRotationRules(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The last date and time that Secrets Manager rotated the secret. If the secret
* isn't configured for rotation or rotation has been disabled, Secrets Manager
* returns null.</p>
*/
inline const Aws::Utils::DateTime& GetLastRotatedDate() const{ return m_lastRotatedDate; }
inline void SetLastRotatedDate(const Aws::Utils::DateTime& value) { m_lastRotatedDate = value; }
inline void SetLastRotatedDate(Aws::Utils::DateTime&& value) { m_lastRotatedDate = std::move(value); }
inline DescribeSecretResult& WithLastRotatedDate(const Aws::Utils::DateTime& value) { SetLastRotatedDate(value); return *this;}
inline DescribeSecretResult& WithLastRotatedDate(Aws::Utils::DateTime&& value) { SetLastRotatedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The last date and time that this secret was modified in any way.</p>
*/
inline const Aws::Utils::DateTime& GetLastChangedDate() const{ return m_lastChangedDate; }
inline void SetLastChangedDate(const Aws::Utils::DateTime& value) { m_lastChangedDate = value; }
inline void SetLastChangedDate(Aws::Utils::DateTime&& value) { m_lastChangedDate = std::move(value); }
inline DescribeSecretResult& WithLastChangedDate(const Aws::Utils::DateTime& value) { SetLastChangedDate(value); return *this;}
inline DescribeSecretResult& WithLastChangedDate(Aws::Utils::DateTime&& value) { SetLastChangedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The date that the secret was last accessed in the Region. This field is
* omitted if the secret has never been retrieved in the Region.</p>
*/
inline const Aws::Utils::DateTime& GetLastAccessedDate() const{ return m_lastAccessedDate; }
inline void SetLastAccessedDate(const Aws::Utils::DateTime& value) { m_lastAccessedDate = value; }
inline void SetLastAccessedDate(Aws::Utils::DateTime&& value) { m_lastAccessedDate = std::move(value); }
inline DescribeSecretResult& WithLastAccessedDate(const Aws::Utils::DateTime& value) { SetLastAccessedDate(value); return *this;}
inline DescribeSecretResult& WithLastAccessedDate(Aws::Utils::DateTime&& value) { SetLastAccessedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The date the secret is scheduled for deletion. If it is not scheduled for
* deletion, this field is omitted. When you delete a secret, Secrets Manager
* requires a recovery window of at least 7 days before deleting the secret. Some
* time after the deleted date, Secrets Manager deletes the secret, including all
* of its versions.</p> <p>If a secret is scheduled for deletion, then its details,
* including the encrypted secret value, is not accessible. To cancel a scheduled
* deletion and restore access to the secret, use <a>RestoreSecret</a>.</p>
*/
inline const Aws::Utils::DateTime& GetDeletedDate() const{ return m_deletedDate; }
inline void SetDeletedDate(const Aws::Utils::DateTime& value) { m_deletedDate = value; }
inline void SetDeletedDate(Aws::Utils::DateTime&& value) { m_deletedDate = std::move(value); }
inline DescribeSecretResult& WithDeletedDate(const Aws::Utils::DateTime& value) { SetDeletedDate(value); return *this;}
inline DescribeSecretResult& WithDeletedDate(Aws::Utils::DateTime&& value) { SetDeletedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The next rotation is scheduled to occur on or before this date. If the secret
* isn't configured for rotation or rotation has been disabled, Secrets Manager
* returns null. If rotation fails, Secrets Manager retries the entire rotation
* process multiple times. If rotation is unsuccessful, this date may be in the
* past.</p> <p>This date represents the latest date that rotation will occur, but
* it is not an approximate rotation date. In some cases, for example if you turn
* off automatic rotation and then turn it back on, the next rotation may occur
* much sooner than this date.</p>
*/
inline const Aws::Utils::DateTime& GetNextRotationDate() const{ return m_nextRotationDate; }
inline void SetNextRotationDate(const Aws::Utils::DateTime& value) { m_nextRotationDate = value; }
inline void SetNextRotationDate(Aws::Utils::DateTime&& value) { m_nextRotationDate = std::move(value); }
inline DescribeSecretResult& WithNextRotationDate(const Aws::Utils::DateTime& value) { SetNextRotationDate(value); return *this;}
inline DescribeSecretResult& WithNextRotationDate(Aws::Utils::DateTime&& value) { SetNextRotationDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The list of tags attached to the secret. To add tags to a secret, use
* <a>TagResource</a>. To remove tags, use <a>UntagResource</a>.</p>
*/
inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
inline void SetTags(const Aws::Vector<Tag>& value) { m_tags = value; }
inline void SetTags(Aws::Vector<Tag>&& value) { m_tags = std::move(value); }
inline DescribeSecretResult& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
inline DescribeSecretResult& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
inline DescribeSecretResult& AddTags(const Tag& value) { m_tags.push_back(value); return *this; }
inline DescribeSecretResult& AddTags(Tag&& value) { m_tags.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>A list of the versions of the secret that have staging labels attached.
* Versions that don't have staging labels are considered deprecated and Secrets
* Manager can delete them.</p> <p>Secrets Manager uses staging labels to indicate
* the status of a secret version during rotation. The three staging labels for
* rotation are: </p> <ul> <li> <p> <code>AWSCURRENT</code>, which indicates the
* current version of the secret.</p> </li> <li> <p> <code>AWSPENDING</code>, which
* indicates the version of the secret that contains new secret information that
* will become the next current version when rotation finishes.</p> <p>During
* rotation, Secrets Manager creates an <code>AWSPENDING</code> version ID before
* creating the new secret version. To check if a secret version exists, call
* <a>GetSecretValue</a>.</p> </li> <li> <p> <code>AWSPREVIOUS</code>, which
* indicates the previous current version of the secret. You can use this as the
* <i>last known good</i> version.</p> </li> </ul> <p>For more information about
* rotation and staging labels, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html">How
* rotation works</a>.</p>
*/
inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetVersionIdsToStages() const{ return m_versionIdsToStages; }
inline void SetVersionIdsToStages(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { m_versionIdsToStages = value; }
inline void SetVersionIdsToStages(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { m_versionIdsToStages = std::move(value); }
inline DescribeSecretResult& WithVersionIdsToStages(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { SetVersionIdsToStages(value); return *this;}
inline DescribeSecretResult& WithVersionIdsToStages(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { SetVersionIdsToStages(std::move(value)); return *this;}
inline DescribeSecretResult& AddVersionIdsToStages(const Aws::String& key, const Aws::Vector<Aws::String>& value) { m_versionIdsToStages.emplace(key, value); return *this; }
inline DescribeSecretResult& AddVersionIdsToStages(Aws::String&& key, const Aws::Vector<Aws::String>& value) { m_versionIdsToStages.emplace(std::move(key), value); return *this; }
inline DescribeSecretResult& AddVersionIdsToStages(const Aws::String& key, Aws::Vector<Aws::String>&& value) { m_versionIdsToStages.emplace(key, std::move(value)); return *this; }
inline DescribeSecretResult& AddVersionIdsToStages(Aws::String&& key, Aws::Vector<Aws::String>&& value) { m_versionIdsToStages.emplace(std::move(key), std::move(value)); return *this; }
inline DescribeSecretResult& AddVersionIdsToStages(const char* key, Aws::Vector<Aws::String>&& value) { m_versionIdsToStages.emplace(key, std::move(value)); return *this; }
inline DescribeSecretResult& AddVersionIdsToStages(const char* key, const Aws::Vector<Aws::String>& value) { m_versionIdsToStages.emplace(key, value); return *this; }
///@}
///@{
/**
* <p>The ID of the service that created this secret. For more information, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html">Secrets
* managed by other Amazon Web Services services</a>.</p>
*/
inline const Aws::String& GetOwningService() const{ return m_owningService; }
inline void SetOwningService(const Aws::String& value) { m_owningService = value; }
inline void SetOwningService(Aws::String&& value) { m_owningService = std::move(value); }
inline void SetOwningService(const char* value) { m_owningService.assign(value); }
inline DescribeSecretResult& WithOwningService(const Aws::String& value) { SetOwningService(value); return *this;}
inline DescribeSecretResult& WithOwningService(Aws::String&& value) { SetOwningService(std::move(value)); return *this;}
inline DescribeSecretResult& WithOwningService(const char* value) { SetOwningService(value); return *this;}
///@}
///@{
/**
* <p>The date the secret was created.</p>
*/
inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; }
inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDate = value; }
inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDate = std::move(value); }
inline DescribeSecretResult& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;}
inline DescribeSecretResult& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The Region the secret is in. If a secret is replicated to other Regions, the
* replicas are listed in <code>ReplicationStatus</code>. </p>
*/
inline const Aws::String& GetPrimaryRegion() const{ return m_primaryRegion; }
inline void SetPrimaryRegion(const Aws::String& value) { m_primaryRegion = value; }
inline void SetPrimaryRegion(Aws::String&& value) { m_primaryRegion = std::move(value); }
inline void SetPrimaryRegion(const char* value) { m_primaryRegion.assign(value); }
inline DescribeSecretResult& WithPrimaryRegion(const Aws::String& value) { SetPrimaryRegion(value); return *this;}
inline DescribeSecretResult& WithPrimaryRegion(Aws::String&& value) { SetPrimaryRegion(std::move(value)); return *this;}
inline DescribeSecretResult& WithPrimaryRegion(const char* value) { SetPrimaryRegion(value); return *this;}
///@}
///@{
/**
* <p>A list of the replicas of this secret and their status: </p> <ul> <li> <p>
* <code>Failed</code>, which indicates that the replica was not created.</p> </li>
* <li> <p> <code>InProgress</code>, which indicates that Secrets Manager is in the
* process of creating the replica.</p> </li> <li> <p> <code>InSync</code>, which
* indicates that the replica was created.</p> </li> </ul>
*/
inline const Aws::Vector<ReplicationStatusType>& GetReplicationStatus() const{ return m_replicationStatus; }
inline void SetReplicationStatus(const Aws::Vector<ReplicationStatusType>& value) { m_replicationStatus = value; }
inline void SetReplicationStatus(Aws::Vector<ReplicationStatusType>&& value) { m_replicationStatus = std::move(value); }
inline DescribeSecretResult& WithReplicationStatus(const Aws::Vector<ReplicationStatusType>& value) { SetReplicationStatus(value); return *this;}
inline DescribeSecretResult& WithReplicationStatus(Aws::Vector<ReplicationStatusType>&& value) { SetReplicationStatus(std::move(value)); return *this;}
inline DescribeSecretResult& AddReplicationStatus(const ReplicationStatusType& value) { m_replicationStatus.push_back(value); return *this; }
inline DescribeSecretResult& AddReplicationStatus(ReplicationStatusType&& value) { m_replicationStatus.push_back(std::move(value)); return *this; }
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline DescribeSecretResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline DescribeSecretResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline DescribeSecretResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_description;
Aws::String m_kmsKeyId;
bool m_rotationEnabled;
Aws::String m_rotationLambdaARN;
RotationRulesType m_rotationRules;
Aws::Utils::DateTime m_lastRotatedDate;
Aws::Utils::DateTime m_lastChangedDate;
Aws::Utils::DateTime m_lastAccessedDate;
Aws::Utils::DateTime m_deletedDate;
Aws::Utils::DateTime m_nextRotationDate;
Aws::Vector<Tag> m_tags;
Aws::Map<Aws::String, Aws::Vector<Aws::String>> m_versionIdsToStages;
Aws::String m_owningService;
Aws::Utils::DateTime m_createdDate;
Aws::String m_primaryRegion;
Aws::Vector<ReplicationStatusType> m_replicationStatus;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/model/FilterNameStringType.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>Allows you to add filters when you use the search function in Secrets
* Manager. For more information, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_search-secret.html">Find
* secrets in Secrets Manager</a>.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/Filter">AWS
* API Reference</a></p>
*/
class Filter
{
public:
AWS_SECRETSMANAGER_API Filter();
AWS_SECRETSMANAGER_API Filter(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Filter& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>The following are keys you can use:</p> <ul> <li> <p> <b>description</b>:
* Prefix match, not case-sensitive.</p> </li> <li> <p> <b>name</b>: Prefix match,
* case-sensitive.</p> </li> <li> <p> <b>tag-key</b>: Prefix match,
* case-sensitive.</p> </li> <li> <p> <b>tag-value</b>: Prefix match,
* case-sensitive.</p> </li> <li> <p> <b>primary-region</b>: Prefix match,
* case-sensitive.</p> </li> <li> <p> <b>owning-service</b>: Prefix match,
* case-sensitive.</p> </li> <li> <p> <b>all</b>: Breaks the filter value string
* into words and then searches all attributes for matches. Not case-sensitive.</p>
* </li> </ul>
*/
inline const FilterNameStringType& GetKey() const{ return m_key; }
inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
inline void SetKey(const FilterNameStringType& value) { m_keyHasBeenSet = true; m_key = value; }
inline void SetKey(FilterNameStringType&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
inline Filter& WithKey(const FilterNameStringType& value) { SetKey(value); return *this;}
inline Filter& WithKey(FilterNameStringType&& value) { SetKey(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The keyword to filter for.</p> <p>You can prefix your search value with an
* exclamation mark (<code>!</code>) in order to perform negation filters. </p>
*/
inline const Aws::Vector<Aws::String>& GetValues() const{ return m_values; }
inline bool ValuesHasBeenSet() const { return m_valuesHasBeenSet; }
inline void SetValues(const Aws::Vector<Aws::String>& value) { m_valuesHasBeenSet = true; m_values = value; }
inline void SetValues(Aws::Vector<Aws::String>&& value) { m_valuesHasBeenSet = true; m_values = std::move(value); }
inline Filter& WithValues(const Aws::Vector<Aws::String>& value) { SetValues(value); return *this;}
inline Filter& WithValues(Aws::Vector<Aws::String>&& value) { SetValues(std::move(value)); return *this;}
inline Filter& AddValues(const Aws::String& value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
inline Filter& AddValues(Aws::String&& value) { m_valuesHasBeenSet = true; m_values.push_back(std::move(value)); return *this; }
inline Filter& AddValues(const char* value) { m_valuesHasBeenSet = true; m_values.push_back(value); return *this; }
///@}
private:
FilterNameStringType m_key;
bool m_keyHasBeenSet = false;
Aws::Vector<Aws::String> m_values;
bool m_valuesHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,36 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
enum class FilterNameStringType
{
NOT_SET,
description,
name,
tag_key,
tag_value,
primary_region,
owning_service,
all
};
namespace FilterNameStringTypeMapper
{
AWS_SECRETSMANAGER_API FilterNameStringType GetFilterNameStringTypeForName(const Aws::String& name);
AWS_SECRETSMANAGER_API Aws::String GetNameForFilterNameStringType(FilterNameStringType value);
} // namespace FilterNameStringTypeMapper
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,159 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class GetRandomPasswordRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API GetRandomPasswordRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetRandomPassword"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The length of the password. If you don't include this parameter, the default
* length is 32 characters.</p>
*/
inline long long GetPasswordLength() const{ return m_passwordLength; }
inline bool PasswordLengthHasBeenSet() const { return m_passwordLengthHasBeenSet; }
inline void SetPasswordLength(long long value) { m_passwordLengthHasBeenSet = true; m_passwordLength = value; }
inline GetRandomPasswordRequest& WithPasswordLength(long long value) { SetPasswordLength(value); return *this;}
///@}
///@{
/**
* <p>A string of the characters that you don't want in the password.</p>
*/
inline const Aws::String& GetExcludeCharacters() const{ return m_excludeCharacters; }
inline bool ExcludeCharactersHasBeenSet() const { return m_excludeCharactersHasBeenSet; }
inline void SetExcludeCharacters(const Aws::String& value) { m_excludeCharactersHasBeenSet = true; m_excludeCharacters = value; }
inline void SetExcludeCharacters(Aws::String&& value) { m_excludeCharactersHasBeenSet = true; m_excludeCharacters = std::move(value); }
inline void SetExcludeCharacters(const char* value) { m_excludeCharactersHasBeenSet = true; m_excludeCharacters.assign(value); }
inline GetRandomPasswordRequest& WithExcludeCharacters(const Aws::String& value) { SetExcludeCharacters(value); return *this;}
inline GetRandomPasswordRequest& WithExcludeCharacters(Aws::String&& value) { SetExcludeCharacters(std::move(value)); return *this;}
inline GetRandomPasswordRequest& WithExcludeCharacters(const char* value) { SetExcludeCharacters(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether to exclude numbers from the password. If you don't include
* this switch, the password can contain numbers.</p>
*/
inline bool GetExcludeNumbers() const{ return m_excludeNumbers; }
inline bool ExcludeNumbersHasBeenSet() const { return m_excludeNumbersHasBeenSet; }
inline void SetExcludeNumbers(bool value) { m_excludeNumbersHasBeenSet = true; m_excludeNumbers = value; }
inline GetRandomPasswordRequest& WithExcludeNumbers(bool value) { SetExcludeNumbers(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether to exclude the following punctuation characters from the
* password: <code>! " # $ % &amp; ' ( ) * + , - . / : ; &lt; = &gt; ? @ [ \ ] ^ _
* ` { | } ~</code>. If you don't include this switch, the password can contain
* punctuation.</p>
*/
inline bool GetExcludePunctuation() const{ return m_excludePunctuation; }
inline bool ExcludePunctuationHasBeenSet() const { return m_excludePunctuationHasBeenSet; }
inline void SetExcludePunctuation(bool value) { m_excludePunctuationHasBeenSet = true; m_excludePunctuation = value; }
inline GetRandomPasswordRequest& WithExcludePunctuation(bool value) { SetExcludePunctuation(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether to exclude uppercase letters from the password. If you
* don't include this switch, the password can contain uppercase letters.</p>
*/
inline bool GetExcludeUppercase() const{ return m_excludeUppercase; }
inline bool ExcludeUppercaseHasBeenSet() const { return m_excludeUppercaseHasBeenSet; }
inline void SetExcludeUppercase(bool value) { m_excludeUppercaseHasBeenSet = true; m_excludeUppercase = value; }
inline GetRandomPasswordRequest& WithExcludeUppercase(bool value) { SetExcludeUppercase(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether to exclude lowercase letters from the password. If you
* don't include this switch, the password can contain lowercase letters.</p>
*/
inline bool GetExcludeLowercase() const{ return m_excludeLowercase; }
inline bool ExcludeLowercaseHasBeenSet() const { return m_excludeLowercaseHasBeenSet; }
inline void SetExcludeLowercase(bool value) { m_excludeLowercaseHasBeenSet = true; m_excludeLowercase = value; }
inline GetRandomPasswordRequest& WithExcludeLowercase(bool value) { SetExcludeLowercase(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether to include the space character. If you include this switch,
* the password can contain space characters.</p>
*/
inline bool GetIncludeSpace() const{ return m_includeSpace; }
inline bool IncludeSpaceHasBeenSet() const { return m_includeSpaceHasBeenSet; }
inline void SetIncludeSpace(bool value) { m_includeSpaceHasBeenSet = true; m_includeSpace = value; }
inline GetRandomPasswordRequest& WithIncludeSpace(bool value) { SetIncludeSpace(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether to include at least one upper and lowercase letter, one
* number, and one punctuation. If you don't include this switch, the password
* contains at least one of every character type.</p>
*/
inline bool GetRequireEachIncludedType() const{ return m_requireEachIncludedType; }
inline bool RequireEachIncludedTypeHasBeenSet() const { return m_requireEachIncludedTypeHasBeenSet; }
inline void SetRequireEachIncludedType(bool value) { m_requireEachIncludedTypeHasBeenSet = true; m_requireEachIncludedType = value; }
inline GetRandomPasswordRequest& WithRequireEachIncludedType(bool value) { SetRequireEachIncludedType(value); return *this;}
///@}
private:
long long m_passwordLength;
bool m_passwordLengthHasBeenSet = false;
Aws::String m_excludeCharacters;
bool m_excludeCharactersHasBeenSet = false;
bool m_excludeNumbers;
bool m_excludeNumbersHasBeenSet = false;
bool m_excludePunctuation;
bool m_excludePunctuationHasBeenSet = false;
bool m_excludeUppercase;
bool m_excludeUppercaseHasBeenSet = false;
bool m_excludeLowercase;
bool m_excludeLowercaseHasBeenSet = false;
bool m_includeSpace;
bool m_includeSpaceHasBeenSet = false;
bool m_requireEachIncludedType;
bool m_requireEachIncludedTypeHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,67 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class GetRandomPasswordResult
{
public:
AWS_SECRETSMANAGER_API GetRandomPasswordResult();
AWS_SECRETSMANAGER_API GetRandomPasswordResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API GetRandomPasswordResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>A string with the password.</p>
*/
inline const Aws::String& GetRandomPassword() const{ return m_randomPassword; }
inline void SetRandomPassword(const Aws::String& value) { m_randomPassword = value; }
inline void SetRandomPassword(Aws::String&& value) { m_randomPassword = std::move(value); }
inline void SetRandomPassword(const char* value) { m_randomPassword.assign(value); }
inline GetRandomPasswordResult& WithRandomPassword(const Aws::String& value) { SetRandomPassword(value); return *this;}
inline GetRandomPasswordResult& WithRandomPassword(Aws::String&& value) { SetRandomPassword(std::move(value)); return *this;}
inline GetRandomPasswordResult& WithRandomPassword(const char* value) { SetRandomPassword(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline GetRandomPasswordResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline GetRandomPasswordResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline GetRandomPasswordResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_randomPassword;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class GetResourcePolicyRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API GetResourcePolicyRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetResourcePolicy"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret to retrieve the attached resource-based policy
* for.</p> <p>For an ARN, we recommend that you specify a complete ARN rather than
* a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline GetResourcePolicyRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline GetResourcePolicyRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline GetResourcePolicyRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,100 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class GetResourcePolicyResult
{
public:
AWS_SECRETSMANAGER_API GetResourcePolicyResult();
AWS_SECRETSMANAGER_API GetResourcePolicyResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API GetResourcePolicyResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret that the resource-based policy was retrieved for.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline GetResourcePolicyResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline GetResourcePolicyResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline GetResourcePolicyResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret that the resource-based policy was retrieved for.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline GetResourcePolicyResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline GetResourcePolicyResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline GetResourcePolicyResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>A JSON-formatted string that contains the permissions policy attached to the
* secret. For more information about permissions policies, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html">Authentication
* and access control for Secrets Manager</a>.</p>
*/
inline const Aws::String& GetResourcePolicy() const{ return m_resourcePolicy; }
inline void SetResourcePolicy(const Aws::String& value) { m_resourcePolicy = value; }
inline void SetResourcePolicy(Aws::String&& value) { m_resourcePolicy = std::move(value); }
inline void SetResourcePolicy(const char* value) { m_resourcePolicy.assign(value); }
inline GetResourcePolicyResult& WithResourcePolicy(const Aws::String& value) { SetResourcePolicy(value); return *this;}
inline GetResourcePolicyResult& WithResourcePolicy(Aws::String&& value) { SetResourcePolicy(std::move(value)); return *this;}
inline GetResourcePolicyResult& WithResourcePolicy(const char* value) { SetResourcePolicy(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline GetResourcePolicyResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline GetResourcePolicyResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline GetResourcePolicyResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_resourcePolicy;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,107 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class GetSecretValueRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API GetSecretValueRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "GetSecretValue"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret to retrieve. To retrieve a secret from another
* account, you must use an ARN.</p> <p>For an ARN, we recommend that you specify a
* complete ARN rather than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline GetSecretValueRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline GetSecretValueRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline GetSecretValueRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>The unique identifier of the version of the secret to retrieve. If you
* include both this parameter and <code>VersionStage</code>, the two parameters
* must refer to the same secret version. If you don't specify either a
* <code>VersionStage</code> or <code>VersionId</code>, then Secrets Manager
* returns the <code>AWSCURRENT</code> version.</p> <p>This value is typically a <a
* href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a>
* value with 32 hexadecimal digits.</p>
*/
inline const Aws::String& GetVersionId() const{ return m_versionId; }
inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
inline GetSecretValueRequest& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
inline GetSecretValueRequest& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
inline GetSecretValueRequest& WithVersionId(const char* value) { SetVersionId(value); return *this;}
///@}
///@{
/**
* <p>The staging label of the version of the secret to retrieve. </p> <p>Secrets
* Manager uses staging labels to keep track of different versions during the
* rotation process. If you include both this parameter and <code>VersionId</code>,
* the two parameters must refer to the same secret version. If you don't specify
* either a <code>VersionStage</code> or <code>VersionId</code>, Secrets Manager
* returns the <code>AWSCURRENT</code> version.</p>
*/
inline const Aws::String& GetVersionStage() const{ return m_versionStage; }
inline bool VersionStageHasBeenSet() const { return m_versionStageHasBeenSet; }
inline void SetVersionStage(const Aws::String& value) { m_versionStageHasBeenSet = true; m_versionStage = value; }
inline void SetVersionStage(Aws::String&& value) { m_versionStageHasBeenSet = true; m_versionStage = std::move(value); }
inline void SetVersionStage(const char* value) { m_versionStageHasBeenSet = true; m_versionStage.assign(value); }
inline GetSecretValueRequest& WithVersionStage(const Aws::String& value) { SetVersionStage(value); return *this;}
inline GetSecretValueRequest& WithVersionStage(Aws::String&& value) { SetVersionStage(std::move(value)); return *this;}
inline GetSecretValueRequest& WithVersionStage(const char* value) { SetVersionStage(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::String m_versionId;
bool m_versionIdHasBeenSet = false;
Aws::String m_versionStage;
bool m_versionStageHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,175 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/Array.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class GetSecretValueResult
{
public:
AWS_SECRETSMANAGER_API GetSecretValueResult();
AWS_SECRETSMANAGER_API GetSecretValueResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API GetSecretValueResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline GetSecretValueResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline GetSecretValueResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline GetSecretValueResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The friendly name of the secret.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline GetSecretValueResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline GetSecretValueResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline GetSecretValueResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>The unique identifier of this version of the secret.</p>
*/
inline const Aws::String& GetVersionId() const{ return m_versionId; }
inline void SetVersionId(const Aws::String& value) { m_versionId = value; }
inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); }
inline void SetVersionId(const char* value) { m_versionId.assign(value); }
inline GetSecretValueResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
inline GetSecretValueResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
inline GetSecretValueResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
///@}
///@{
/**
* <p>The decrypted secret value, if the secret value was originally provided as
* binary data in the form of a byte array. When you retrieve a
* <code>SecretBinary</code> using the HTTP API, the Python SDK, or the Amazon Web
* Services CLI, the value is Base64-encoded. Otherwise, it is not encoded.</p>
* <p>If the secret was created by using the Secrets Manager console, or if the
* secret value was originally provided as a string, then this field is omitted.
* The secret value appears in <code>SecretString</code> instead.</p> <p>Sensitive:
* This field contains sensitive information, so the service does not include it in
* CloudTrail log entries. If you create your own log entries, you must also avoid
* logging the information in this field.</p>
*/
inline const Aws::Utils::CryptoBuffer& GetSecretBinary() const{ return m_secretBinary; }
inline void SetSecretBinary(const Aws::Utils::CryptoBuffer& value) { m_secretBinary = value; }
inline void SetSecretBinary(Aws::Utils::CryptoBuffer&& value) { m_secretBinary = std::move(value); }
inline GetSecretValueResult& WithSecretBinary(const Aws::Utils::CryptoBuffer& value) { SetSecretBinary(value); return *this;}
inline GetSecretValueResult& WithSecretBinary(Aws::Utils::CryptoBuffer&& value) { SetSecretBinary(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The decrypted secret value, if the secret value was originally provided as a
* string or through the Secrets Manager console.</p> <p>If this secret was created
* by using the console, then Secrets Manager stores the information as a JSON
* structure of key/value pairs. </p> <p>Sensitive: This field contains sensitive
* information, so the service does not include it in CloudTrail log entries. If
* you create your own log entries, you must also avoid logging the information in
* this field.</p>
*/
inline const Aws::String& GetSecretString() const{ return m_secretString; }
inline void SetSecretString(const Aws::String& value) { m_secretString = value; }
inline void SetSecretString(Aws::String&& value) { m_secretString = std::move(value); }
inline void SetSecretString(const char* value) { m_secretString.assign(value); }
inline GetSecretValueResult& WithSecretString(const Aws::String& value) { SetSecretString(value); return *this;}
inline GetSecretValueResult& WithSecretString(Aws::String&& value) { SetSecretString(std::move(value)); return *this;}
inline GetSecretValueResult& WithSecretString(const char* value) { SetSecretString(value); return *this;}
///@}
///@{
/**
* <p>A list of all of the staging labels currently attached to this version of the
* secret.</p>
*/
inline const Aws::Vector<Aws::String>& GetVersionStages() const{ return m_versionStages; }
inline void SetVersionStages(const Aws::Vector<Aws::String>& value) { m_versionStages = value; }
inline void SetVersionStages(Aws::Vector<Aws::String>&& value) { m_versionStages = std::move(value); }
inline GetSecretValueResult& WithVersionStages(const Aws::Vector<Aws::String>& value) { SetVersionStages(value); return *this;}
inline GetSecretValueResult& WithVersionStages(Aws::Vector<Aws::String>&& value) { SetVersionStages(std::move(value)); return *this;}
inline GetSecretValueResult& AddVersionStages(const Aws::String& value) { m_versionStages.push_back(value); return *this; }
inline GetSecretValueResult& AddVersionStages(Aws::String&& value) { m_versionStages.push_back(std::move(value)); return *this; }
inline GetSecretValueResult& AddVersionStages(const char* value) { m_versionStages.push_back(value); return *this; }
///@}
///@{
/**
* <p>The date and time that this version of the secret was created. If you don't
* specify which version in <code>VersionId</code> or <code>VersionStage</code>,
* then Secrets Manager uses the <code>AWSCURRENT</code> version.</p>
*/
inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; }
inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDate = value; }
inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDate = std::move(value); }
inline GetSecretValueResult& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;}
inline GetSecretValueResult& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline GetSecretValueResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline GetSecretValueResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline GetSecretValueResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_versionId;
Aws::Utils::CryptoBuffer m_secretBinary;
Aws::String m_secretString;
Aws::Vector<Aws::String> m_versionStages;
Aws::Utils::DateTime m_createdDate;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,114 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class ListSecretVersionIdsRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API ListSecretVersionIdsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListSecretVersionIds"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret whose versions you want to list.</p> <p>For an
* ARN, we recommend that you specify a complete ARN rather than a partial ARN. See
* <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline ListSecretVersionIdsRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline ListSecretVersionIdsRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline ListSecretVersionIdsRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>The number of results to include in the response.</p> <p>If there are more
* results available, in the response, Secrets Manager includes
* <code>NextToken</code>. To get the next results, call
* <code>ListSecretVersionIds</code> again with the value from
* <code>NextToken</code>. </p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
inline ListSecretVersionIdsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
///@}
///@{
/**
* <p>A token that indicates where the output should continue from, if a previous
* call did not show all results. To get the next results, call
* <code>ListSecretVersionIds</code> again with this value.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
inline ListSecretVersionIdsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline ListSecretVersionIdsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline ListSecretVersionIdsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether to include versions of secrets that don't have any staging
* labels attached to them. Versions without staging labels are considered
* deprecated and are subject to deletion by Secrets Manager. By default, versions
* without staging labels aren't included.</p>
*/
inline bool GetIncludeDeprecated() const{ return m_includeDeprecated; }
inline bool IncludeDeprecatedHasBeenSet() const { return m_includeDeprecatedHasBeenSet; }
inline void SetIncludeDeprecated(bool value) { m_includeDeprecatedHasBeenSet = true; m_includeDeprecated = value; }
inline ListSecretVersionIdsRequest& WithIncludeDeprecated(bool value) { SetIncludeDeprecated(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
int m_maxResults;
bool m_maxResultsHasBeenSet = false;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet = false;
bool m_includeDeprecated;
bool m_includeDeprecatedHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,118 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/model/SecretVersionsListEntry.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class ListSecretVersionIdsResult
{
public:
AWS_SECRETSMANAGER_API ListSecretVersionIdsResult();
AWS_SECRETSMANAGER_API ListSecretVersionIdsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API ListSecretVersionIdsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>A list of the versions of the secret.</p>
*/
inline const Aws::Vector<SecretVersionsListEntry>& GetVersions() const{ return m_versions; }
inline void SetVersions(const Aws::Vector<SecretVersionsListEntry>& value) { m_versions = value; }
inline void SetVersions(Aws::Vector<SecretVersionsListEntry>&& value) { m_versions = std::move(value); }
inline ListSecretVersionIdsResult& WithVersions(const Aws::Vector<SecretVersionsListEntry>& value) { SetVersions(value); return *this;}
inline ListSecretVersionIdsResult& WithVersions(Aws::Vector<SecretVersionsListEntry>&& value) { SetVersions(std::move(value)); return *this;}
inline ListSecretVersionIdsResult& AddVersions(const SecretVersionsListEntry& value) { m_versions.push_back(value); return *this; }
inline ListSecretVersionIdsResult& AddVersions(SecretVersionsListEntry&& value) { m_versions.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>Secrets Manager includes this value if there's more output available than
* what is included in the current response. This can occur even when the response
* includes no values at all, such as when you ask for a filtered view of a long
* list. To get the next results, call <code>ListSecretVersionIds</code> again with
* this value. </p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
inline ListSecretVersionIdsResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline ListSecretVersionIdsResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline ListSecretVersionIdsResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
///@}
///@{
/**
* <p>The ARN of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline ListSecretVersionIdsResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline ListSecretVersionIdsResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline ListSecretVersionIdsResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline ListSecretVersionIdsResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline ListSecretVersionIdsResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline ListSecretVersionIdsResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline ListSecretVersionIdsResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline ListSecretVersionIdsResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline ListSecretVersionIdsResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::Vector<SecretVersionsListEntry> m_versions;
Aws::String m_nextToken;
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,125 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/secretsmanager/model/SortOrderType.h>
#include <aws/secretsmanager/model/Filter.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class ListSecretsRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API ListSecretsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ListSecrets"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>Specifies whether to include secrets scheduled for deletion. By default,
* secrets scheduled for deletion aren't included.</p>
*/
inline bool GetIncludePlannedDeletion() const{ return m_includePlannedDeletion; }
inline bool IncludePlannedDeletionHasBeenSet() const { return m_includePlannedDeletionHasBeenSet; }
inline void SetIncludePlannedDeletion(bool value) { m_includePlannedDeletionHasBeenSet = true; m_includePlannedDeletion = value; }
inline ListSecretsRequest& WithIncludePlannedDeletion(bool value) { SetIncludePlannedDeletion(value); return *this;}
///@}
///@{
/**
* <p>The number of results to include in the response.</p> <p>If there are more
* results available, in the response, Secrets Manager includes
* <code>NextToken</code>. To get the next results, call <code>ListSecrets</code>
* again with the value from <code>NextToken</code>.</p>
*/
inline int GetMaxResults() const{ return m_maxResults; }
inline bool MaxResultsHasBeenSet() const { return m_maxResultsHasBeenSet; }
inline void SetMaxResults(int value) { m_maxResultsHasBeenSet = true; m_maxResults = value; }
inline ListSecretsRequest& WithMaxResults(int value) { SetMaxResults(value); return *this;}
///@}
///@{
/**
* <p>A token that indicates where the output should continue from, if a previous
* call did not show all results. To get the next results, call
* <code>ListSecrets</code> again with this value.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline bool NextTokenHasBeenSet() const { return m_nextTokenHasBeenSet; }
inline void SetNextToken(const Aws::String& value) { m_nextTokenHasBeenSet = true; m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextTokenHasBeenSet = true; m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextTokenHasBeenSet = true; m_nextToken.assign(value); }
inline ListSecretsRequest& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline ListSecretsRequest& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline ListSecretsRequest& WithNextToken(const char* value) { SetNextToken(value); return *this;}
///@}
///@{
/**
* <p>The filters to apply to the list of secrets.</p>
*/
inline const Aws::Vector<Filter>& GetFilters() const{ return m_filters; }
inline bool FiltersHasBeenSet() const { return m_filtersHasBeenSet; }
inline void SetFilters(const Aws::Vector<Filter>& value) { m_filtersHasBeenSet = true; m_filters = value; }
inline void SetFilters(Aws::Vector<Filter>&& value) { m_filtersHasBeenSet = true; m_filters = std::move(value); }
inline ListSecretsRequest& WithFilters(const Aws::Vector<Filter>& value) { SetFilters(value); return *this;}
inline ListSecretsRequest& WithFilters(Aws::Vector<Filter>&& value) { SetFilters(std::move(value)); return *this;}
inline ListSecretsRequest& AddFilters(const Filter& value) { m_filtersHasBeenSet = true; m_filters.push_back(value); return *this; }
inline ListSecretsRequest& AddFilters(Filter&& value) { m_filtersHasBeenSet = true; m_filters.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>Secrets are listed by <code>CreatedDate</code>. </p>
*/
inline const SortOrderType& GetSortOrder() const{ return m_sortOrder; }
inline bool SortOrderHasBeenSet() const { return m_sortOrderHasBeenSet; }
inline void SetSortOrder(const SortOrderType& value) { m_sortOrderHasBeenSet = true; m_sortOrder = value; }
inline void SetSortOrder(SortOrderType&& value) { m_sortOrderHasBeenSet = true; m_sortOrder = std::move(value); }
inline ListSecretsRequest& WithSortOrder(const SortOrderType& value) { SetSortOrder(value); return *this;}
inline ListSecretsRequest& WithSortOrder(SortOrderType&& value) { SetSortOrder(std::move(value)); return *this;}
///@}
private:
bool m_includePlannedDeletion;
bool m_includePlannedDeletionHasBeenSet = false;
int m_maxResults;
bool m_maxResultsHasBeenSet = false;
Aws::String m_nextToken;
bool m_nextTokenHasBeenSet = false;
Aws::Vector<Filter> m_filters;
bool m_filtersHasBeenSet = false;
SortOrderType m_sortOrder;
bool m_sortOrderHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,88 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/model/SecretListEntry.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class ListSecretsResult
{
public:
AWS_SECRETSMANAGER_API ListSecretsResult();
AWS_SECRETSMANAGER_API ListSecretsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API ListSecretsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>A list of the secrets in the account.</p>
*/
inline const Aws::Vector<SecretListEntry>& GetSecretList() const{ return m_secretList; }
inline void SetSecretList(const Aws::Vector<SecretListEntry>& value) { m_secretList = value; }
inline void SetSecretList(Aws::Vector<SecretListEntry>&& value) { m_secretList = std::move(value); }
inline ListSecretsResult& WithSecretList(const Aws::Vector<SecretListEntry>& value) { SetSecretList(value); return *this;}
inline ListSecretsResult& WithSecretList(Aws::Vector<SecretListEntry>&& value) { SetSecretList(std::move(value)); return *this;}
inline ListSecretsResult& AddSecretList(const SecretListEntry& value) { m_secretList.push_back(value); return *this; }
inline ListSecretsResult& AddSecretList(SecretListEntry&& value) { m_secretList.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>Secrets Manager includes this value if there's more output available than
* what is included in the current response. This can occur even when the response
* includes no values at all, such as when you ask for a filtered view of a long
* list. To get the next results, call <code>ListSecrets</code> again with this
* value.</p>
*/
inline const Aws::String& GetNextToken() const{ return m_nextToken; }
inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }
inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }
inline void SetNextToken(const char* value) { m_nextToken.assign(value); }
inline ListSecretsResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}
inline ListSecretsResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}
inline ListSecretsResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline ListSecretsResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline ListSecretsResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline ListSecretsResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::Vector<SecretListEntry> m_secretList;
Aws::String m_nextToken;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,108 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class PutResourcePolicyRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API PutResourcePolicyRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "PutResourcePolicy"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret to attach the resource-based policy.</p> <p>For
* an ARN, we recommend that you specify a complete ARN rather than a partial ARN.
* See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline PutResourcePolicyRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline PutResourcePolicyRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline PutResourcePolicyRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>A JSON-formatted string for an Amazon Web Services resource-based policy. For
* example policies, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html">Permissions
* policy examples</a>.</p>
*/
inline const Aws::String& GetResourcePolicy() const{ return m_resourcePolicy; }
inline bool ResourcePolicyHasBeenSet() const { return m_resourcePolicyHasBeenSet; }
inline void SetResourcePolicy(const Aws::String& value) { m_resourcePolicyHasBeenSet = true; m_resourcePolicy = value; }
inline void SetResourcePolicy(Aws::String&& value) { m_resourcePolicyHasBeenSet = true; m_resourcePolicy = std::move(value); }
inline void SetResourcePolicy(const char* value) { m_resourcePolicyHasBeenSet = true; m_resourcePolicy.assign(value); }
inline PutResourcePolicyRequest& WithResourcePolicy(const Aws::String& value) { SetResourcePolicy(value); return *this;}
inline PutResourcePolicyRequest& WithResourcePolicy(Aws::String&& value) { SetResourcePolicy(std::move(value)); return *this;}
inline PutResourcePolicyRequest& WithResourcePolicy(const char* value) { SetResourcePolicy(value); return *this;}
///@}
///@{
/**
* <p>Specifies whether to block resource-based policies that allow broad access to
* the secret, for example those that use a wildcard for the principal. By default,
* public policies aren't blocked.</p> <p>Resource policy validation
* and the BlockPublicPolicy parameter help protect your resources by preventing
* public access from being granted through the resource policies that are directly
* attached to your secrets. In addition to using these features, carefully inspect
* the following policies to confirm that they do not grant public access:</p> <ul>
* <li> <p>Identity-based policies attached to associated Amazon Web Services
* principals (for example, IAM roles)</p> </li> <li> <p>Resource-based policies
* attached to associated Amazon Web Services resources (for example, Key
* Management Service (KMS) keys)</p> </li> </ul> <p>To review permissions to your
* secrets, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/determine-acccess_examine-iam-policies.html">Determine
* who has permissions to your secrets</a>.</p>
*/
inline bool GetBlockPublicPolicy() const{ return m_blockPublicPolicy; }
inline bool BlockPublicPolicyHasBeenSet() const { return m_blockPublicPolicyHasBeenSet; }
inline void SetBlockPublicPolicy(bool value) { m_blockPublicPolicyHasBeenSet = true; m_blockPublicPolicy = value; }
inline PutResourcePolicyRequest& WithBlockPublicPolicy(bool value) { SetBlockPublicPolicy(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::String m_resourcePolicy;
bool m_resourcePolicyHasBeenSet = false;
bool m_blockPublicPolicy;
bool m_blockPublicPolicyHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class PutResourcePolicyResult
{
public:
AWS_SECRETSMANAGER_API PutResourcePolicyResult();
AWS_SECRETSMANAGER_API PutResourcePolicyResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API PutResourcePolicyResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline PutResourcePolicyResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline PutResourcePolicyResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline PutResourcePolicyResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline PutResourcePolicyResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline PutResourcePolicyResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline PutResourcePolicyResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline PutResourcePolicyResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline PutResourcePolicyResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline PutResourcePolicyResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,201 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/Array.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
#include <aws/core/utils/UUID.h>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class PutSecretValueRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API PutSecretValueRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "PutSecretValue"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret to add a new version to.</p> <p>For an ARN, we
* recommend that you specify a complete ARN rather than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p> <p>If the secret doesn't already exist, use
* <code>CreateSecret</code> instead.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline PutSecretValueRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline PutSecretValueRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline PutSecretValueRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>A unique identifier for the new version of the secret. </p> <p>If you
* use the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call
* this operation, then you can leave this parameter empty. The CLI or SDK
* generates a random UUID for you and includes it as the value for this parameter
* in the request. </p> <p>If you generate a raw HTTP request to the
* Secrets Manager service endpoint, then you must generate a
* <code>ClientRequestToken</code> and include it in the request.</p> <p>This value
* helps ensure idempotency. Secrets Manager uses this value to prevent the
* accidental creation of duplicate versions if there are failures and retries
* during a rotation. We recommend that you generate a <a
* href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a>
* value to ensure uniqueness of your versions within the specified secret. </p>
* <ul> <li> <p>If the <code>ClientRequestToken</code> value isn't already
* associated with a version of the secret then a new version of the secret is
* created. </p> </li> <li> <p>If a version with this value already exists and that
* version's <code>SecretString</code> or <code>SecretBinary</code> values are the
* same as those in the request then the request is ignored. The operation is
* idempotent. </p> </li> <li> <p>If a version with this value already exists and
* the version of the <code>SecretString</code> and <code>SecretBinary</code>
* values are different from those in the request, then the request fails because
* you can't modify a secret version. You can only create new versions to store new
* secret values.</p> </li> </ul> <p>This value becomes the <code>VersionId</code>
* of the new version.</p>
*/
inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; }
inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; }
inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); }
inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); }
inline PutSecretValueRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;}
inline PutSecretValueRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;}
inline PutSecretValueRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;}
///@}
///@{
/**
* <p>The binary data to encrypt and store in the new version of the secret. To use
* this parameter in the command-line tools, we recommend that you store your
* binary data in a file and then pass the contents of the file as a parameter.
* </p> <p>You must include <code>SecretBinary</code> or <code>SecretString</code>,
* but not both.</p> <p>You can't access this value from the Secrets Manager
* console.</p> <p>Sensitive: This field contains sensitive information, so the
* service does not include it in CloudTrail log entries. If you create your own
* log entries, you must also avoid logging the information in this field.</p>
*/
inline const Aws::Utils::CryptoBuffer& GetSecretBinary() const{ return m_secretBinary; }
inline bool SecretBinaryHasBeenSet() const { return m_secretBinaryHasBeenSet; }
inline void SetSecretBinary(const Aws::Utils::CryptoBuffer& value) { m_secretBinaryHasBeenSet = true; m_secretBinary = value; }
inline void SetSecretBinary(Aws::Utils::CryptoBuffer&& value) { m_secretBinaryHasBeenSet = true; m_secretBinary = std::move(value); }
inline PutSecretValueRequest& WithSecretBinary(const Aws::Utils::CryptoBuffer& value) { SetSecretBinary(value); return *this;}
inline PutSecretValueRequest& WithSecretBinary(Aws::Utils::CryptoBuffer&& value) { SetSecretBinary(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The text to encrypt and store in the new version of the secret. </p> <p>You
* must include <code>SecretBinary</code> or <code>SecretString</code>, but not
* both.</p> <p>We recommend you create the secret string as JSON key/value pairs,
* as shown in the example.</p> <p>Sensitive: This field contains sensitive
* information, so the service does not include it in CloudTrail log entries. If
* you create your own log entries, you must also avoid logging the information in
* this field.</p>
*/
inline const Aws::String& GetSecretString() const{ return m_secretString; }
inline bool SecretStringHasBeenSet() const { return m_secretStringHasBeenSet; }
inline void SetSecretString(const Aws::String& value) { m_secretStringHasBeenSet = true; m_secretString = value; }
inline void SetSecretString(Aws::String&& value) { m_secretStringHasBeenSet = true; m_secretString = std::move(value); }
inline void SetSecretString(const char* value) { m_secretStringHasBeenSet = true; m_secretString.assign(value); }
inline PutSecretValueRequest& WithSecretString(const Aws::String& value) { SetSecretString(value); return *this;}
inline PutSecretValueRequest& WithSecretString(Aws::String&& value) { SetSecretString(std::move(value)); return *this;}
inline PutSecretValueRequest& WithSecretString(const char* value) { SetSecretString(value); return *this;}
///@}
///@{
/**
* <p>A list of staging labels to attach to this version of the secret. Secrets
* Manager uses staging labels to track versions of a secret through the rotation
* process.</p> <p>If you specify a staging label that's already associated with a
* different version of the same secret, then Secrets Manager removes the label
* from the other version and attaches it to this version. If you specify
* <code>AWSCURRENT</code>, and it is already attached to another version, then
* Secrets Manager also moves the staging label <code>AWSPREVIOUS</code> to the
* version that <code>AWSCURRENT</code> was removed from.</p> <p>If you don't
* include <code>VersionStages</code>, then Secrets Manager automatically moves the
* staging label <code>AWSCURRENT</code> to this version.</p>
*/
inline const Aws::Vector<Aws::String>& GetVersionStages() const{ return m_versionStages; }
inline bool VersionStagesHasBeenSet() const { return m_versionStagesHasBeenSet; }
inline void SetVersionStages(const Aws::Vector<Aws::String>& value) { m_versionStagesHasBeenSet = true; m_versionStages = value; }
inline void SetVersionStages(Aws::Vector<Aws::String>&& value) { m_versionStagesHasBeenSet = true; m_versionStages = std::move(value); }
inline PutSecretValueRequest& WithVersionStages(const Aws::Vector<Aws::String>& value) { SetVersionStages(value); return *this;}
inline PutSecretValueRequest& WithVersionStages(Aws::Vector<Aws::String>&& value) { SetVersionStages(std::move(value)); return *this;}
inline PutSecretValueRequest& AddVersionStages(const Aws::String& value) { m_versionStagesHasBeenSet = true; m_versionStages.push_back(value); return *this; }
inline PutSecretValueRequest& AddVersionStages(Aws::String&& value) { m_versionStagesHasBeenSet = true; m_versionStages.push_back(std::move(value)); return *this; }
inline PutSecretValueRequest& AddVersionStages(const char* value) { m_versionStagesHasBeenSet = true; m_versionStages.push_back(value); return *this; }
///@}
///@{
/**
* <p>A unique identifier that indicates the source of the request. For
* cross-account rotation (when you rotate a secret in one account by using a
* Lambda rotation function in another account) and the Lambda rotation function
* assumes an IAM role to call Secrets Manager, Secrets Manager validates the
* identity with the rotation token. For more information, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html">How
* rotation works</a>.</p> <p>Sensitive: This field contains sensitive information,
* so the service does not include it in CloudTrail log entries. If you create your
* own log entries, you must also avoid logging the information in this field.</p>
*/
inline const Aws::String& GetRotationToken() const{ return m_rotationToken; }
inline bool RotationTokenHasBeenSet() const { return m_rotationTokenHasBeenSet; }
inline void SetRotationToken(const Aws::String& value) { m_rotationTokenHasBeenSet = true; m_rotationToken = value; }
inline void SetRotationToken(Aws::String&& value) { m_rotationTokenHasBeenSet = true; m_rotationToken = std::move(value); }
inline void SetRotationToken(const char* value) { m_rotationTokenHasBeenSet = true; m_rotationToken.assign(value); }
inline PutSecretValueRequest& WithRotationToken(const Aws::String& value) { SetRotationToken(value); return *this;}
inline PutSecretValueRequest& WithRotationToken(Aws::String&& value) { SetRotationToken(std::move(value)); return *this;}
inline PutSecretValueRequest& WithRotationToken(const char* value) { SetRotationToken(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::String m_clientRequestToken;
bool m_clientRequestTokenHasBeenSet = false;
Aws::Utils::CryptoBuffer m_secretBinary;
bool m_secretBinaryHasBeenSet = false;
Aws::String m_secretString;
bool m_secretStringHasBeenSet = false;
Aws::Vector<Aws::String> m_versionStages;
bool m_versionStagesHasBeenSet = false;
Aws::String m_rotationToken;
bool m_rotationTokenHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,116 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class PutSecretValueResult
{
public:
AWS_SECRETSMANAGER_API PutSecretValueResult();
AWS_SECRETSMANAGER_API PutSecretValueResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API PutSecretValueResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline PutSecretValueResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline PutSecretValueResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline PutSecretValueResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline PutSecretValueResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline PutSecretValueResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline PutSecretValueResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>The unique identifier of the version of the secret.</p>
*/
inline const Aws::String& GetVersionId() const{ return m_versionId; }
inline void SetVersionId(const Aws::String& value) { m_versionId = value; }
inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); }
inline void SetVersionId(const char* value) { m_versionId.assign(value); }
inline PutSecretValueResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
inline PutSecretValueResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
inline PutSecretValueResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
///@}
///@{
/**
* <p>The list of staging labels that are currently attached to this version of the
* secret. Secrets Manager uses staging labels to track a version as it progresses
* through the secret rotation process.</p>
*/
inline const Aws::Vector<Aws::String>& GetVersionStages() const{ return m_versionStages; }
inline void SetVersionStages(const Aws::Vector<Aws::String>& value) { m_versionStages = value; }
inline void SetVersionStages(Aws::Vector<Aws::String>&& value) { m_versionStages = std::move(value); }
inline PutSecretValueResult& WithVersionStages(const Aws::Vector<Aws::String>& value) { SetVersionStages(value); return *this;}
inline PutSecretValueResult& WithVersionStages(Aws::Vector<Aws::String>&& value) { SetVersionStages(std::move(value)); return *this;}
inline PutSecretValueResult& AddVersionStages(const Aws::String& value) { m_versionStages.push_back(value); return *this; }
inline PutSecretValueResult& AddVersionStages(Aws::String&& value) { m_versionStages.push_back(std::move(value)); return *this; }
inline PutSecretValueResult& AddVersionStages(const char* value) { m_versionStages.push_back(value); return *this; }
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline PutSecretValueResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline PutSecretValueResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline PutSecretValueResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_versionId;
Aws::Vector<Aws::String> m_versionStages;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class RemoveRegionsFromReplicationRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API RemoveRegionsFromReplicationRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "RemoveRegionsFromReplication"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline RemoveRegionsFromReplicationRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline RemoveRegionsFromReplicationRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline RemoveRegionsFromReplicationRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>The Regions of the replicas to remove.</p>
*/
inline const Aws::Vector<Aws::String>& GetRemoveReplicaRegions() const{ return m_removeReplicaRegions; }
inline bool RemoveReplicaRegionsHasBeenSet() const { return m_removeReplicaRegionsHasBeenSet; }
inline void SetRemoveReplicaRegions(const Aws::Vector<Aws::String>& value) { m_removeReplicaRegionsHasBeenSet = true; m_removeReplicaRegions = value; }
inline void SetRemoveReplicaRegions(Aws::Vector<Aws::String>&& value) { m_removeReplicaRegionsHasBeenSet = true; m_removeReplicaRegions = std::move(value); }
inline RemoveRegionsFromReplicationRequest& WithRemoveReplicaRegions(const Aws::Vector<Aws::String>& value) { SetRemoveReplicaRegions(value); return *this;}
inline RemoveRegionsFromReplicationRequest& WithRemoveReplicaRegions(Aws::Vector<Aws::String>&& value) { SetRemoveReplicaRegions(std::move(value)); return *this;}
inline RemoveRegionsFromReplicationRequest& AddRemoveReplicaRegions(const Aws::String& value) { m_removeReplicaRegionsHasBeenSet = true; m_removeReplicaRegions.push_back(value); return *this; }
inline RemoveRegionsFromReplicationRequest& AddRemoveReplicaRegions(Aws::String&& value) { m_removeReplicaRegionsHasBeenSet = true; m_removeReplicaRegions.push_back(std::move(value)); return *this; }
inline RemoveRegionsFromReplicationRequest& AddRemoveReplicaRegions(const char* value) { m_removeReplicaRegionsHasBeenSet = true; m_removeReplicaRegions.push_back(value); return *this; }
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::Vector<Aws::String> m_removeReplicaRegions;
bool m_removeReplicaRegionsHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/secretsmanager/model/ReplicationStatusType.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class RemoveRegionsFromReplicationResult
{
public:
AWS_SECRETSMANAGER_API RemoveRegionsFromReplicationResult();
AWS_SECRETSMANAGER_API RemoveRegionsFromReplicationResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API RemoveRegionsFromReplicationResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the primary secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline RemoveRegionsFromReplicationResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline RemoveRegionsFromReplicationResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline RemoveRegionsFromReplicationResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The status of replicas for this secret after you remove Regions.</p>
*/
inline const Aws::Vector<ReplicationStatusType>& GetReplicationStatus() const{ return m_replicationStatus; }
inline void SetReplicationStatus(const Aws::Vector<ReplicationStatusType>& value) { m_replicationStatus = value; }
inline void SetReplicationStatus(Aws::Vector<ReplicationStatusType>&& value) { m_replicationStatus = std::move(value); }
inline RemoveRegionsFromReplicationResult& WithReplicationStatus(const Aws::Vector<ReplicationStatusType>& value) { SetReplicationStatus(value); return *this;}
inline RemoveRegionsFromReplicationResult& WithReplicationStatus(Aws::Vector<ReplicationStatusType>&& value) { SetReplicationStatus(std::move(value)); return *this;}
inline RemoveRegionsFromReplicationResult& AddReplicationStatus(const ReplicationStatusType& value) { m_replicationStatus.push_back(value); return *this; }
inline RemoveRegionsFromReplicationResult& AddReplicationStatus(ReplicationStatusType&& value) { m_replicationStatus.push_back(std::move(value)); return *this; }
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline RemoveRegionsFromReplicationResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline RemoveRegionsFromReplicationResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline RemoveRegionsFromReplicationResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::Vector<ReplicationStatusType> m_replicationStatus;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>A custom type that specifies a <code>Region</code> and the
* <code>KmsKeyId</code> for a replica secret.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicaRegionType">AWS
* API Reference</a></p>
*/
class ReplicaRegionType
{
public:
AWS_SECRETSMANAGER_API ReplicaRegionType();
AWS_SECRETSMANAGER_API ReplicaRegionType(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API ReplicaRegionType& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>A Region code. For a list of Region codes, see <a
* href="https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints">Name
* and code of Regions</a>.</p>
*/
inline const Aws::String& GetRegion() const{ return m_region; }
inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; }
inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); }
inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); }
inline ReplicaRegionType& WithRegion(const Aws::String& value) { SetRegion(value); return *this;}
inline ReplicaRegionType& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;}
inline ReplicaRegionType& WithRegion(const char* value) { SetRegion(value); return *this;}
///@}
///@{
/**
* <p>The ARN, key ID, or alias of the KMS key to encrypt the secret. If you don't
* include this field, Secrets Manager uses <code>aws/secretsmanager</code>.</p>
*/
inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }
inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
inline ReplicaRegionType& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
inline ReplicaRegionType& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}
inline ReplicaRegionType& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
///@}
private:
Aws::String m_region;
bool m_regionHasBeenSet = false;
Aws::String m_kmsKeyId;
bool m_kmsKeyIdHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/secretsmanager/model/ReplicaRegionType.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class ReplicateSecretToRegionsRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API ReplicateSecretToRegionsRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ReplicateSecretToRegions"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret to replicate.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline ReplicateSecretToRegionsRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline ReplicateSecretToRegionsRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline ReplicateSecretToRegionsRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>A list of Regions in which to replicate the secret.</p>
*/
inline const Aws::Vector<ReplicaRegionType>& GetAddReplicaRegions() const{ return m_addReplicaRegions; }
inline bool AddReplicaRegionsHasBeenSet() const { return m_addReplicaRegionsHasBeenSet; }
inline void SetAddReplicaRegions(const Aws::Vector<ReplicaRegionType>& value) { m_addReplicaRegionsHasBeenSet = true; m_addReplicaRegions = value; }
inline void SetAddReplicaRegions(Aws::Vector<ReplicaRegionType>&& value) { m_addReplicaRegionsHasBeenSet = true; m_addReplicaRegions = std::move(value); }
inline ReplicateSecretToRegionsRequest& WithAddReplicaRegions(const Aws::Vector<ReplicaRegionType>& value) { SetAddReplicaRegions(value); return *this;}
inline ReplicateSecretToRegionsRequest& WithAddReplicaRegions(Aws::Vector<ReplicaRegionType>&& value) { SetAddReplicaRegions(std::move(value)); return *this;}
inline ReplicateSecretToRegionsRequest& AddAddReplicaRegions(const ReplicaRegionType& value) { m_addReplicaRegionsHasBeenSet = true; m_addReplicaRegions.push_back(value); return *this; }
inline ReplicateSecretToRegionsRequest& AddAddReplicaRegions(ReplicaRegionType&& value) { m_addReplicaRegionsHasBeenSet = true; m_addReplicaRegions.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>Specifies whether to overwrite a secret with the same name in the destination
* Region. By default, secrets aren't overwritten.</p>
*/
inline bool GetForceOverwriteReplicaSecret() const{ return m_forceOverwriteReplicaSecret; }
inline bool ForceOverwriteReplicaSecretHasBeenSet() const { return m_forceOverwriteReplicaSecretHasBeenSet; }
inline void SetForceOverwriteReplicaSecret(bool value) { m_forceOverwriteReplicaSecretHasBeenSet = true; m_forceOverwriteReplicaSecret = value; }
inline ReplicateSecretToRegionsRequest& WithForceOverwriteReplicaSecret(bool value) { SetForceOverwriteReplicaSecret(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::Vector<ReplicaRegionType> m_addReplicaRegions;
bool m_addReplicaRegionsHasBeenSet = false;
bool m_forceOverwriteReplicaSecret;
bool m_forceOverwriteReplicaSecretHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/secretsmanager/model/ReplicationStatusType.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class ReplicateSecretToRegionsResult
{
public:
AWS_SECRETSMANAGER_API ReplicateSecretToRegionsResult();
AWS_SECRETSMANAGER_API ReplicateSecretToRegionsResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API ReplicateSecretToRegionsResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the primary secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline ReplicateSecretToRegionsResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline ReplicateSecretToRegionsResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline ReplicateSecretToRegionsResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The status of replication.</p>
*/
inline const Aws::Vector<ReplicationStatusType>& GetReplicationStatus() const{ return m_replicationStatus; }
inline void SetReplicationStatus(const Aws::Vector<ReplicationStatusType>& value) { m_replicationStatus = value; }
inline void SetReplicationStatus(Aws::Vector<ReplicationStatusType>&& value) { m_replicationStatus = std::move(value); }
inline ReplicateSecretToRegionsResult& WithReplicationStatus(const Aws::Vector<ReplicationStatusType>& value) { SetReplicationStatus(value); return *this;}
inline ReplicateSecretToRegionsResult& WithReplicationStatus(Aws::Vector<ReplicationStatusType>&& value) { SetReplicationStatus(std::move(value)); return *this;}
inline ReplicateSecretToRegionsResult& AddReplicationStatus(const ReplicationStatusType& value) { m_replicationStatus.push_back(value); return *this; }
inline ReplicateSecretToRegionsResult& AddReplicationStatus(ReplicationStatusType&& value) { m_replicationStatus.push_back(std::move(value)); return *this; }
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline ReplicateSecretToRegionsResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline ReplicateSecretToRegionsResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline ReplicateSecretToRegionsResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::Vector<ReplicationStatusType> m_replicationStatus;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,132 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/model/StatusType.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>A replication object consisting of a <code>RegionReplicationStatus</code>
* object and includes a Region, KMSKeyId, status, and status
* message.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ReplicationStatusType">AWS
* API Reference</a></p>
*/
class ReplicationStatusType
{
public:
AWS_SECRETSMANAGER_API ReplicationStatusType();
AWS_SECRETSMANAGER_API ReplicationStatusType(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API ReplicationStatusType& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>The Region where replication occurs.</p>
*/
inline const Aws::String& GetRegion() const{ return m_region; }
inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
inline void SetRegion(const Aws::String& value) { m_regionHasBeenSet = true; m_region = value; }
inline void SetRegion(Aws::String&& value) { m_regionHasBeenSet = true; m_region = std::move(value); }
inline void SetRegion(const char* value) { m_regionHasBeenSet = true; m_region.assign(value); }
inline ReplicationStatusType& WithRegion(const Aws::String& value) { SetRegion(value); return *this;}
inline ReplicationStatusType& WithRegion(Aws::String&& value) { SetRegion(std::move(value)); return *this;}
inline ReplicationStatusType& WithRegion(const char* value) { SetRegion(value); return *this;}
///@}
///@{
/**
* <p>Can be an <code>ARN</code>, <code>Key ID</code>, or <code>Alias</code>. </p>
*/
inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }
inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
inline ReplicationStatusType& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
inline ReplicationStatusType& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}
inline ReplicationStatusType& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
///@}
///@{
/**
* <p>The status can be <code>InProgress</code>, <code>Failed</code>, or
* <code>InSync</code>.</p>
*/
inline const StatusType& GetStatus() const{ return m_status; }
inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
inline void SetStatus(const StatusType& value) { m_statusHasBeenSet = true; m_status = value; }
inline void SetStatus(StatusType&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
inline ReplicationStatusType& WithStatus(const StatusType& value) { SetStatus(value); return *this;}
inline ReplicationStatusType& WithStatus(StatusType&& value) { SetStatus(std::move(value)); return *this;}
///@}
///@{
/**
* <p>Status message such as "<i>Secret with this name already exists in this
* region</i>".</p>
*/
inline const Aws::String& GetStatusMessage() const{ return m_statusMessage; }
inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; }
inline void SetStatusMessage(const Aws::String& value) { m_statusMessageHasBeenSet = true; m_statusMessage = value; }
inline void SetStatusMessage(Aws::String&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::move(value); }
inline void SetStatusMessage(const char* value) { m_statusMessageHasBeenSet = true; m_statusMessage.assign(value); }
inline ReplicationStatusType& WithStatusMessage(const Aws::String& value) { SetStatusMessage(value); return *this;}
inline ReplicationStatusType& WithStatusMessage(Aws::String&& value) { SetStatusMessage(std::move(value)); return *this;}
inline ReplicationStatusType& WithStatusMessage(const char* value) { SetStatusMessage(value); return *this;}
///@}
///@{
/**
* <p>The date that the secret was last accessed in the Region. This field is
* omitted if the secret has never been retrieved in the Region.</p>
*/
inline const Aws::Utils::DateTime& GetLastAccessedDate() const{ return m_lastAccessedDate; }
inline bool LastAccessedDateHasBeenSet() const { return m_lastAccessedDateHasBeenSet; }
inline void SetLastAccessedDate(const Aws::Utils::DateTime& value) { m_lastAccessedDateHasBeenSet = true; m_lastAccessedDate = value; }
inline void SetLastAccessedDate(Aws::Utils::DateTime&& value) { m_lastAccessedDateHasBeenSet = true; m_lastAccessedDate = std::move(value); }
inline ReplicationStatusType& WithLastAccessedDate(const Aws::Utils::DateTime& value) { SetLastAccessedDate(value); return *this;}
inline ReplicationStatusType& WithLastAccessedDate(Aws::Utils::DateTime&& value) { SetLastAccessedDate(std::move(value)); return *this;}
///@}
private:
Aws::String m_region;
bool m_regionHasBeenSet = false;
Aws::String m_kmsKeyId;
bool m_kmsKeyIdHasBeenSet = false;
StatusType m_status;
bool m_statusHasBeenSet = false;
Aws::String m_statusMessage;
bool m_statusMessageHasBeenSet = false;
Aws::Utils::DateTime m_lastAccessedDate;
bool m_lastAccessedDateHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,61 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class RestoreSecretRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API RestoreSecretRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "RestoreSecret"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret to restore.</p> <p>For an ARN, we recommend
* that you specify a complete ARN rather than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline RestoreSecretRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline RestoreSecretRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline RestoreSecretRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class RestoreSecretResult
{
public:
AWS_SECRETSMANAGER_API RestoreSecretResult();
AWS_SECRETSMANAGER_API RestoreSecretResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API RestoreSecretResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret that was restored.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline RestoreSecretResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline RestoreSecretResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline RestoreSecretResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret that was restored.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline RestoreSecretResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline RestoreSecretResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline RestoreSecretResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline RestoreSecretResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline RestoreSecretResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline RestoreSecretResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,150 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/model/RotationRulesType.h>
#include <utility>
#include <aws/core/utils/UUID.h>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class RotateSecretRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API RotateSecretRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "RotateSecret"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret to rotate.</p> <p>For an ARN, we recommend that
* you specify a complete ARN rather than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline RotateSecretRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline RotateSecretRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline RotateSecretRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>A unique identifier for the new version of the secret. You only need to
* specify this value if you implement your own retry logic and you want to ensure
* that Secrets Manager doesn't attempt to create a secret version twice.</p>
* <p>If you use the Amazon Web Services CLI or one of the Amazon Web
* Services SDKs to call this operation, then you can leave this parameter empty.
* The CLI or SDK generates a random UUID for you and includes it as the value for
* this parameter in the request. </p> <p>If you generate a raw HTTP
* request to the Secrets Manager service endpoint, then you must generate a
* <code>ClientRequestToken</code> and include it in the request.</p> <p>This value
* helps ensure idempotency. Secrets Manager uses this value to prevent the
* accidental creation of duplicate versions if there are failures and retries
* during a rotation. We recommend that you generate a <a
* href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a>
* value to ensure uniqueness of your versions within the specified secret. </p>
*/
inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; }
inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; }
inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); }
inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); }
inline RotateSecretRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;}
inline RotateSecretRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;}
inline RotateSecretRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;}
///@}
///@{
/**
* <p>For secrets that use a Lambda rotation function to rotate, the ARN of the
* Lambda rotation function. </p> <p>For secrets that use <i>managed rotation</i>,
* omit this field. For more information, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_managed.html">Managed
* rotation</a> in the <i>Secrets Manager User Guide</i>.</p>
*/
inline const Aws::String& GetRotationLambdaARN() const{ return m_rotationLambdaARN; }
inline bool RotationLambdaARNHasBeenSet() const { return m_rotationLambdaARNHasBeenSet; }
inline void SetRotationLambdaARN(const Aws::String& value) { m_rotationLambdaARNHasBeenSet = true; m_rotationLambdaARN = value; }
inline void SetRotationLambdaARN(Aws::String&& value) { m_rotationLambdaARNHasBeenSet = true; m_rotationLambdaARN = std::move(value); }
inline void SetRotationLambdaARN(const char* value) { m_rotationLambdaARNHasBeenSet = true; m_rotationLambdaARN.assign(value); }
inline RotateSecretRequest& WithRotationLambdaARN(const Aws::String& value) { SetRotationLambdaARN(value); return *this;}
inline RotateSecretRequest& WithRotationLambdaARN(Aws::String&& value) { SetRotationLambdaARN(std::move(value)); return *this;}
inline RotateSecretRequest& WithRotationLambdaARN(const char* value) { SetRotationLambdaARN(value); return *this;}
///@}
///@{
/**
* <p>A structure that defines the rotation configuration for this secret.</p>
*/
inline const RotationRulesType& GetRotationRules() const{ return m_rotationRules; }
inline bool RotationRulesHasBeenSet() const { return m_rotationRulesHasBeenSet; }
inline void SetRotationRules(const RotationRulesType& value) { m_rotationRulesHasBeenSet = true; m_rotationRules = value; }
inline void SetRotationRules(RotationRulesType&& value) { m_rotationRulesHasBeenSet = true; m_rotationRules = std::move(value); }
inline RotateSecretRequest& WithRotationRules(const RotationRulesType& value) { SetRotationRules(value); return *this;}
inline RotateSecretRequest& WithRotationRules(RotationRulesType&& value) { SetRotationRules(std::move(value)); return *this;}
///@}
///@{
/**
* <p>Specifies whether to rotate the secret immediately or wait until the next
* scheduled rotation window. The rotation schedule is defined in
* <a>RotateSecretRequest$RotationRules</a>.</p> <p>For secrets that use a Lambda
* rotation function to rotate, if you don't immediately rotate the secret, Secrets
* Manager tests the rotation configuration by running the <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_lambda-functions.html#rotate-secrets_lambda-functions-code">
* <code>testSecret</code> step</a> of the Lambda rotation function. The test
* creates an <code>AWSPENDING</code> version of the secret and then removes
* it.</p> <p>By default, Secrets Manager rotates the secret immediately.</p>
*/
inline bool GetRotateImmediately() const{ return m_rotateImmediately; }
inline bool RotateImmediatelyHasBeenSet() const { return m_rotateImmediatelyHasBeenSet; }
inline void SetRotateImmediately(bool value) { m_rotateImmediatelyHasBeenSet = true; m_rotateImmediately = value; }
inline RotateSecretRequest& WithRotateImmediately(bool value) { SetRotateImmediately(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::String m_clientRequestToken;
bool m_clientRequestTokenHasBeenSet = false;
Aws::String m_rotationLambdaARN;
bool m_rotationLambdaARNHasBeenSet = false;
RotationRulesType m_rotationRules;
bool m_rotationRulesHasBeenSet = false;
bool m_rotateImmediately;
bool m_rotateImmediatelyHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,97 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class RotateSecretResult
{
public:
AWS_SECRETSMANAGER_API RotateSecretResult();
AWS_SECRETSMANAGER_API RotateSecretResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API RotateSecretResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline RotateSecretResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline RotateSecretResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline RotateSecretResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline RotateSecretResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline RotateSecretResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline RotateSecretResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>The ID of the new version of the secret.</p>
*/
inline const Aws::String& GetVersionId() const{ return m_versionId; }
inline void SetVersionId(const Aws::String& value) { m_versionId = value; }
inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); }
inline void SetVersionId(const char* value) { m_versionId.assign(value); }
inline RotateSecretResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
inline RotateSecretResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
inline RotateSecretResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline RotateSecretResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline RotateSecretResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline RotateSecretResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_versionId;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,135 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>A structure that defines the rotation configuration for the
* secret.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/RotationRulesType">AWS
* API Reference</a></p>
*/
class RotationRulesType
{
public:
AWS_SECRETSMANAGER_API RotationRulesType();
AWS_SECRETSMANAGER_API RotationRulesType(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API RotationRulesType& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>The number of days between rotations of the secret. You can use this value to
* check that your secret meets your compliance guidelines for how often secrets
* must be rotated. If you use this field to set the rotation schedule, Secrets
* Manager calculates the next rotation date based on the previous rotation.
* Manually updating the secret value by calling <code>PutSecretValue</code> or
* <code>UpdateSecret</code> is considered a valid rotation.</p> <p>In
* <code>DescribeSecret</code> and <code>ListSecrets</code>, this value is
* calculated from the rotation schedule after every successful rotation. In
* <code>RotateSecret</code>, you can set the rotation schedule in
* <code>RotationRules</code> with <code>AutomaticallyAfterDays</code> or
* <code>ScheduleExpression</code>, but not both. To set a rotation schedule in
* hours, use <code>ScheduleExpression</code>.</p>
*/
inline long long GetAutomaticallyAfterDays() const{ return m_automaticallyAfterDays; }
inline bool AutomaticallyAfterDaysHasBeenSet() const { return m_automaticallyAfterDaysHasBeenSet; }
inline void SetAutomaticallyAfterDays(long long value) { m_automaticallyAfterDaysHasBeenSet = true; m_automaticallyAfterDays = value; }
inline RotationRulesType& WithAutomaticallyAfterDays(long long value) { SetAutomaticallyAfterDays(value); return *this;}
///@}
///@{
/**
* <p>The length of the rotation window in hours, for example <code>3h</code> for a
* three hour window. Secrets Manager rotates your secret at any time during this
* window. The window must not extend into the next rotation window or the next UTC
* day. The window starts according to the <code>ScheduleExpression</code>. If you
* don't specify a <code>Duration</code>, for a <code>ScheduleExpression</code> in
* hours, the window automatically closes after one hour. For a
* <code>ScheduleExpression</code> in days, the window automatically closes at the
* end of the UTC day. For more information, including examples, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html">Schedule
* expressions in Secrets Manager rotation</a> in the <i>Secrets Manager Users
* Guide</i>.</p>
*/
inline const Aws::String& GetDuration() const{ return m_duration; }
inline bool DurationHasBeenSet() const { return m_durationHasBeenSet; }
inline void SetDuration(const Aws::String& value) { m_durationHasBeenSet = true; m_duration = value; }
inline void SetDuration(Aws::String&& value) { m_durationHasBeenSet = true; m_duration = std::move(value); }
inline void SetDuration(const char* value) { m_durationHasBeenSet = true; m_duration.assign(value); }
inline RotationRulesType& WithDuration(const Aws::String& value) { SetDuration(value); return *this;}
inline RotationRulesType& WithDuration(Aws::String&& value) { SetDuration(std::move(value)); return *this;}
inline RotationRulesType& WithDuration(const char* value) { SetDuration(value); return *this;}
///@}
///@{
/**
* <p>A <code>cron()</code> or <code>rate()</code> expression that defines the
* schedule for rotating your secret. Secrets Manager rotation schedules use UTC
* time zone. Secrets Manager rotates your secret any time during a rotation
* window.</p> <p>Secrets Manager <code>rate()</code> expressions represent the
* interval in hours or days that you want to rotate your secret, for example
* <code>rate(12 hours)</code> or <code>rate(10 days)</code>. You can rotate a
* secret as often as every four hours. If you use a <code>rate()</code>
* expression, the rotation window starts at midnight. For a rate in hours, the
* default rotation window closes after one hour. For a rate in days, the default
* rotation window closes at the end of the day. You can set the
* <code>Duration</code> to change the rotation window. The rotation window must
* not extend into the next UTC day or into the next rotation window.</p> <p>You
* can use a <code>cron()</code> expression to create a rotation schedule that is
* more detailed than a rotation interval. For more information, including
* examples, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html">Schedule
* expressions in Secrets Manager rotation</a> in the <i>Secrets Manager Users
* Guide</i>. For a cron expression that represents a schedule in hours, the
* default rotation window closes after one hour. For a cron expression that
* represents a schedule in days, the default rotation window closes at the end of
* the day. You can set the <code>Duration</code> to change the rotation window.
* The rotation window must not extend into the next UTC day or into the next
* rotation window.</p>
*/
inline const Aws::String& GetScheduleExpression() const{ return m_scheduleExpression; }
inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
inline void SetScheduleExpression(const Aws::String& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = value; }
inline void SetScheduleExpression(Aws::String&& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = std::move(value); }
inline void SetScheduleExpression(const char* value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression.assign(value); }
inline RotationRulesType& WithScheduleExpression(const Aws::String& value) { SetScheduleExpression(value); return *this;}
inline RotationRulesType& WithScheduleExpression(Aws::String&& value) { SetScheduleExpression(std::move(value)); return *this;}
inline RotationRulesType& WithScheduleExpression(const char* value) { SetScheduleExpression(value); return *this;}
///@}
private:
long long m_automaticallyAfterDays;
bool m_automaticallyAfterDaysHasBeenSet = false;
Aws::String m_duration;
bool m_durationHasBeenSet = false;
Aws::String m_scheduleExpression;
bool m_scheduleExpressionHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,355 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/model/RotationRulesType.h>
#include <aws/core/utils/DateTime.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/secretsmanager/model/Tag.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>A structure that contains the details about a secret. It does not include the
* encrypted <code>SecretString</code> and <code>SecretBinary</code> values. To get
* those values, use <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html">GetSecretValue</a>
* .</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/SecretListEntry">AWS
* API Reference</a></p>
*/
class SecretListEntry
{
public:
AWS_SECRETSMANAGER_API SecretListEntry();
AWS_SECRETSMANAGER_API SecretListEntry(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API SecretListEntry& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>The Amazon Resource Name (ARN) of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline bool ARNHasBeenSet() const { return m_aRNHasBeenSet; }
inline void SetARN(const Aws::String& value) { m_aRNHasBeenSet = true; m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRNHasBeenSet = true; m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRNHasBeenSet = true; m_aRN.assign(value); }
inline SecretListEntry& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline SecretListEntry& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline SecretListEntry& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The friendly name of the secret. </p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
inline SecretListEntry& WithName(const Aws::String& value) { SetName(value); return *this;}
inline SecretListEntry& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline SecretListEntry& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>The user-provided description of the secret.</p>
*/
inline const Aws::String& GetDescription() const{ return m_description; }
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
inline SecretListEntry& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
inline SecretListEntry& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
inline SecretListEntry& WithDescription(const char* value) { SetDescription(value); return *this;}
///@}
///@{
/**
* <p>The ARN of the KMS key that Secrets Manager uses to encrypt the secret value.
* If the secret is encrypted with the Amazon Web Services managed key
* <code>aws/secretsmanager</code>, this field is omitted.</p>
*/
inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }
inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
inline SecretListEntry& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
inline SecretListEntry& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}
inline SecretListEntry& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
///@}
///@{
/**
* <p>Indicates whether automatic, scheduled rotation is enabled for this
* secret.</p>
*/
inline bool GetRotationEnabled() const{ return m_rotationEnabled; }
inline bool RotationEnabledHasBeenSet() const { return m_rotationEnabledHasBeenSet; }
inline void SetRotationEnabled(bool value) { m_rotationEnabledHasBeenSet = true; m_rotationEnabled = value; }
inline SecretListEntry& WithRotationEnabled(bool value) { SetRotationEnabled(value); return *this;}
///@}
///@{
/**
* <p>The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager
* to rotate and expire the secret either automatically per the schedule or
* manually by a call to <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_RotateSecret.html">
* <code>RotateSecret</code> </a>.</p>
*/
inline const Aws::String& GetRotationLambdaARN() const{ return m_rotationLambdaARN; }
inline bool RotationLambdaARNHasBeenSet() const { return m_rotationLambdaARNHasBeenSet; }
inline void SetRotationLambdaARN(const Aws::String& value) { m_rotationLambdaARNHasBeenSet = true; m_rotationLambdaARN = value; }
inline void SetRotationLambdaARN(Aws::String&& value) { m_rotationLambdaARNHasBeenSet = true; m_rotationLambdaARN = std::move(value); }
inline void SetRotationLambdaARN(const char* value) { m_rotationLambdaARNHasBeenSet = true; m_rotationLambdaARN.assign(value); }
inline SecretListEntry& WithRotationLambdaARN(const Aws::String& value) { SetRotationLambdaARN(value); return *this;}
inline SecretListEntry& WithRotationLambdaARN(Aws::String&& value) { SetRotationLambdaARN(std::move(value)); return *this;}
inline SecretListEntry& WithRotationLambdaARN(const char* value) { SetRotationLambdaARN(value); return *this;}
///@}
///@{
/**
* <p>A structure that defines the rotation configuration for the secret.</p>
*/
inline const RotationRulesType& GetRotationRules() const{ return m_rotationRules; }
inline bool RotationRulesHasBeenSet() const { return m_rotationRulesHasBeenSet; }
inline void SetRotationRules(const RotationRulesType& value) { m_rotationRulesHasBeenSet = true; m_rotationRules = value; }
inline void SetRotationRules(RotationRulesType&& value) { m_rotationRulesHasBeenSet = true; m_rotationRules = std::move(value); }
inline SecretListEntry& WithRotationRules(const RotationRulesType& value) { SetRotationRules(value); return *this;}
inline SecretListEntry& WithRotationRules(RotationRulesType&& value) { SetRotationRules(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The most recent date and time that the Secrets Manager rotation process was
* successfully completed. This value is null if the secret hasn't ever
* rotated.</p>
*/
inline const Aws::Utils::DateTime& GetLastRotatedDate() const{ return m_lastRotatedDate; }
inline bool LastRotatedDateHasBeenSet() const { return m_lastRotatedDateHasBeenSet; }
inline void SetLastRotatedDate(const Aws::Utils::DateTime& value) { m_lastRotatedDateHasBeenSet = true; m_lastRotatedDate = value; }
inline void SetLastRotatedDate(Aws::Utils::DateTime&& value) { m_lastRotatedDateHasBeenSet = true; m_lastRotatedDate = std::move(value); }
inline SecretListEntry& WithLastRotatedDate(const Aws::Utils::DateTime& value) { SetLastRotatedDate(value); return *this;}
inline SecretListEntry& WithLastRotatedDate(Aws::Utils::DateTime&& value) { SetLastRotatedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The last date and time that this secret was modified in any way.</p>
*/
inline const Aws::Utils::DateTime& GetLastChangedDate() const{ return m_lastChangedDate; }
inline bool LastChangedDateHasBeenSet() const { return m_lastChangedDateHasBeenSet; }
inline void SetLastChangedDate(const Aws::Utils::DateTime& value) { m_lastChangedDateHasBeenSet = true; m_lastChangedDate = value; }
inline void SetLastChangedDate(Aws::Utils::DateTime&& value) { m_lastChangedDateHasBeenSet = true; m_lastChangedDate = std::move(value); }
inline SecretListEntry& WithLastChangedDate(const Aws::Utils::DateTime& value) { SetLastChangedDate(value); return *this;}
inline SecretListEntry& WithLastChangedDate(Aws::Utils::DateTime&& value) { SetLastChangedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The date that the secret was last accessed in the Region. This field is
* omitted if the secret has never been retrieved in the Region.</p>
*/
inline const Aws::Utils::DateTime& GetLastAccessedDate() const{ return m_lastAccessedDate; }
inline bool LastAccessedDateHasBeenSet() const { return m_lastAccessedDateHasBeenSet; }
inline void SetLastAccessedDate(const Aws::Utils::DateTime& value) { m_lastAccessedDateHasBeenSet = true; m_lastAccessedDate = value; }
inline void SetLastAccessedDate(Aws::Utils::DateTime&& value) { m_lastAccessedDateHasBeenSet = true; m_lastAccessedDate = std::move(value); }
inline SecretListEntry& WithLastAccessedDate(const Aws::Utils::DateTime& value) { SetLastAccessedDate(value); return *this;}
inline SecretListEntry& WithLastAccessedDate(Aws::Utils::DateTime&& value) { SetLastAccessedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The date and time the deletion of the secret occurred. Not present on active
* secrets. The secret can be recovered until the number of days in the recovery
* window has passed, as specified in the <code>RecoveryWindowInDays</code>
* parameter of the <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html">
* <code>DeleteSecret</code> </a> operation.</p>
*/
inline const Aws::Utils::DateTime& GetDeletedDate() const{ return m_deletedDate; }
inline bool DeletedDateHasBeenSet() const { return m_deletedDateHasBeenSet; }
inline void SetDeletedDate(const Aws::Utils::DateTime& value) { m_deletedDateHasBeenSet = true; m_deletedDate = value; }
inline void SetDeletedDate(Aws::Utils::DateTime&& value) { m_deletedDateHasBeenSet = true; m_deletedDate = std::move(value); }
inline SecretListEntry& WithDeletedDate(const Aws::Utils::DateTime& value) { SetDeletedDate(value); return *this;}
inline SecretListEntry& WithDeletedDate(Aws::Utils::DateTime&& value) { SetDeletedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The next rotation is scheduled to occur on or before this date. If the secret
* isn't configured for rotation or rotation has been disabled, Secrets Manager
* returns null.</p>
*/
inline const Aws::Utils::DateTime& GetNextRotationDate() const{ return m_nextRotationDate; }
inline bool NextRotationDateHasBeenSet() const { return m_nextRotationDateHasBeenSet; }
inline void SetNextRotationDate(const Aws::Utils::DateTime& value) { m_nextRotationDateHasBeenSet = true; m_nextRotationDate = value; }
inline void SetNextRotationDate(Aws::Utils::DateTime&& value) { m_nextRotationDateHasBeenSet = true; m_nextRotationDate = std::move(value); }
inline SecretListEntry& WithNextRotationDate(const Aws::Utils::DateTime& value) { SetNextRotationDate(value); return *this;}
inline SecretListEntry& WithNextRotationDate(Aws::Utils::DateTime&& value) { SetNextRotationDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The list of user-defined tags associated with the secret. To add tags to a
* secret, use <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_TagResource.html">
* <code>TagResource</code> </a>. To remove tags, use <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_UntagResource.html">
* <code>UntagResource</code> </a>.</p>
*/
inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
inline SecretListEntry& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
inline SecretListEntry& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
inline SecretListEntry& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
inline SecretListEntry& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
///@}
///@{
/**
* <p>A list of all of the currently assigned <code>SecretVersionStage</code>
* staging labels and the <code>SecretVersionId</code> attached to each one.
* Staging labels are used to keep track of the different versions during the
* rotation process.</p> <p>A version that does not have any
* <code>SecretVersionStage</code> is considered deprecated and subject to
* deletion. Such versions are not included in this list.</p>
*/
inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetSecretVersionsToStages() const{ return m_secretVersionsToStages; }
inline bool SecretVersionsToStagesHasBeenSet() const { return m_secretVersionsToStagesHasBeenSet; }
inline void SetSecretVersionsToStages(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { m_secretVersionsToStagesHasBeenSet = true; m_secretVersionsToStages = value; }
inline void SetSecretVersionsToStages(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { m_secretVersionsToStagesHasBeenSet = true; m_secretVersionsToStages = std::move(value); }
inline SecretListEntry& WithSecretVersionsToStages(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { SetSecretVersionsToStages(value); return *this;}
inline SecretListEntry& WithSecretVersionsToStages(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { SetSecretVersionsToStages(std::move(value)); return *this;}
inline SecretListEntry& AddSecretVersionsToStages(const Aws::String& key, const Aws::Vector<Aws::String>& value) { m_secretVersionsToStagesHasBeenSet = true; m_secretVersionsToStages.emplace(key, value); return *this; }
inline SecretListEntry& AddSecretVersionsToStages(Aws::String&& key, const Aws::Vector<Aws::String>& value) { m_secretVersionsToStagesHasBeenSet = true; m_secretVersionsToStages.emplace(std::move(key), value); return *this; }
inline SecretListEntry& AddSecretVersionsToStages(const Aws::String& key, Aws::Vector<Aws::String>&& value) { m_secretVersionsToStagesHasBeenSet = true; m_secretVersionsToStages.emplace(key, std::move(value)); return *this; }
inline SecretListEntry& AddSecretVersionsToStages(Aws::String&& key, Aws::Vector<Aws::String>&& value) { m_secretVersionsToStagesHasBeenSet = true; m_secretVersionsToStages.emplace(std::move(key), std::move(value)); return *this; }
inline SecretListEntry& AddSecretVersionsToStages(const char* key, Aws::Vector<Aws::String>&& value) { m_secretVersionsToStagesHasBeenSet = true; m_secretVersionsToStages.emplace(key, std::move(value)); return *this; }
inline SecretListEntry& AddSecretVersionsToStages(const char* key, const Aws::Vector<Aws::String>& value) { m_secretVersionsToStagesHasBeenSet = true; m_secretVersionsToStages.emplace(key, value); return *this; }
///@}
///@{
/**
* <p>Returns the name of the service that created the secret.</p>
*/
inline const Aws::String& GetOwningService() const{ return m_owningService; }
inline bool OwningServiceHasBeenSet() const { return m_owningServiceHasBeenSet; }
inline void SetOwningService(const Aws::String& value) { m_owningServiceHasBeenSet = true; m_owningService = value; }
inline void SetOwningService(Aws::String&& value) { m_owningServiceHasBeenSet = true; m_owningService = std::move(value); }
inline void SetOwningService(const char* value) { m_owningServiceHasBeenSet = true; m_owningService.assign(value); }
inline SecretListEntry& WithOwningService(const Aws::String& value) { SetOwningService(value); return *this;}
inline SecretListEntry& WithOwningService(Aws::String&& value) { SetOwningService(std::move(value)); return *this;}
inline SecretListEntry& WithOwningService(const char* value) { SetOwningService(value); return *this;}
///@}
///@{
/**
* <p>The date and time when a secret was created.</p>
*/
inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; }
inline bool CreatedDateHasBeenSet() const { return m_createdDateHasBeenSet; }
inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDateHasBeenSet = true; m_createdDate = value; }
inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDateHasBeenSet = true; m_createdDate = std::move(value); }
inline SecretListEntry& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;}
inline SecretListEntry& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The Region where Secrets Manager originated the secret.</p>
*/
inline const Aws::String& GetPrimaryRegion() const{ return m_primaryRegion; }
inline bool PrimaryRegionHasBeenSet() const { return m_primaryRegionHasBeenSet; }
inline void SetPrimaryRegion(const Aws::String& value) { m_primaryRegionHasBeenSet = true; m_primaryRegion = value; }
inline void SetPrimaryRegion(Aws::String&& value) { m_primaryRegionHasBeenSet = true; m_primaryRegion = std::move(value); }
inline void SetPrimaryRegion(const char* value) { m_primaryRegionHasBeenSet = true; m_primaryRegion.assign(value); }
inline SecretListEntry& WithPrimaryRegion(const Aws::String& value) { SetPrimaryRegion(value); return *this;}
inline SecretListEntry& WithPrimaryRegion(Aws::String&& value) { SetPrimaryRegion(std::move(value)); return *this;}
inline SecretListEntry& WithPrimaryRegion(const char* value) { SetPrimaryRegion(value); return *this;}
///@}
private:
Aws::String m_aRN;
bool m_aRNHasBeenSet = false;
Aws::String m_name;
bool m_nameHasBeenSet = false;
Aws::String m_description;
bool m_descriptionHasBeenSet = false;
Aws::String m_kmsKeyId;
bool m_kmsKeyIdHasBeenSet = false;
bool m_rotationEnabled;
bool m_rotationEnabledHasBeenSet = false;
Aws::String m_rotationLambdaARN;
bool m_rotationLambdaARNHasBeenSet = false;
RotationRulesType m_rotationRules;
bool m_rotationRulesHasBeenSet = false;
Aws::Utils::DateTime m_lastRotatedDate;
bool m_lastRotatedDateHasBeenSet = false;
Aws::Utils::DateTime m_lastChangedDate;
bool m_lastChangedDateHasBeenSet = false;
Aws::Utils::DateTime m_lastAccessedDate;
bool m_lastAccessedDateHasBeenSet = false;
Aws::Utils::DateTime m_deletedDate;
bool m_deletedDateHasBeenSet = false;
Aws::Utils::DateTime m_nextRotationDate;
bool m_nextRotationDateHasBeenSet = false;
Aws::Vector<Tag> m_tags;
bool m_tagsHasBeenSet = false;
Aws::Map<Aws::String, Aws::Vector<Aws::String>> m_secretVersionsToStages;
bool m_secretVersionsToStagesHasBeenSet = false;
Aws::String m_owningService;
bool m_owningServiceHasBeenSet = false;
Aws::Utils::DateTime m_createdDate;
bool m_createdDateHasBeenSet = false;
Aws::String m_primaryRegion;
bool m_primaryRegionHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,170 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/Array.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>A structure that contains the secret value and other details for a
* secret.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/SecretValueEntry">AWS
* API Reference</a></p>
*/
class SecretValueEntry
{
public:
AWS_SECRETSMANAGER_API SecretValueEntry();
AWS_SECRETSMANAGER_API SecretValueEntry(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API SecretValueEntry& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>The Amazon Resource Name (ARN) of the secret.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline bool ARNHasBeenSet() const { return m_aRNHasBeenSet; }
inline void SetARN(const Aws::String& value) { m_aRNHasBeenSet = true; m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRNHasBeenSet = true; m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRNHasBeenSet = true; m_aRN.assign(value); }
inline SecretValueEntry& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline SecretValueEntry& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline SecretValueEntry& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The friendly name of the secret. </p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
inline SecretValueEntry& WithName(const Aws::String& value) { SetName(value); return *this;}
inline SecretValueEntry& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline SecretValueEntry& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>The unique version identifier of this version of the secret.</p>
*/
inline const Aws::String& GetVersionId() const{ return m_versionId; }
inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
inline SecretValueEntry& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
inline SecretValueEntry& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
inline SecretValueEntry& WithVersionId(const char* value) { SetVersionId(value); return *this;}
///@}
///@{
/**
* <p>The decrypted secret value, if the secret value was originally provided as
* binary data in the form of a byte array. The parameter represents the binary
* data as a <a
* href="https://tools.ietf.org/html/rfc4648#section-4">base64-encoded</a>
* string.</p>
*/
inline const Aws::Utils::CryptoBuffer& GetSecretBinary() const{ return m_secretBinary; }
inline bool SecretBinaryHasBeenSet() const { return m_secretBinaryHasBeenSet; }
inline void SetSecretBinary(const Aws::Utils::CryptoBuffer& value) { m_secretBinaryHasBeenSet = true; m_secretBinary = value; }
inline void SetSecretBinary(Aws::Utils::CryptoBuffer&& value) { m_secretBinaryHasBeenSet = true; m_secretBinary = std::move(value); }
inline SecretValueEntry& WithSecretBinary(const Aws::Utils::CryptoBuffer& value) { SetSecretBinary(value); return *this;}
inline SecretValueEntry& WithSecretBinary(Aws::Utils::CryptoBuffer&& value) { SetSecretBinary(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The decrypted secret value, if the secret value was originally provided as a
* string or through the Secrets Manager console.</p>
*/
inline const Aws::String& GetSecretString() const{ return m_secretString; }
inline bool SecretStringHasBeenSet() const { return m_secretStringHasBeenSet; }
inline void SetSecretString(const Aws::String& value) { m_secretStringHasBeenSet = true; m_secretString = value; }
inline void SetSecretString(Aws::String&& value) { m_secretStringHasBeenSet = true; m_secretString = std::move(value); }
inline void SetSecretString(const char* value) { m_secretStringHasBeenSet = true; m_secretString.assign(value); }
inline SecretValueEntry& WithSecretString(const Aws::String& value) { SetSecretString(value); return *this;}
inline SecretValueEntry& WithSecretString(Aws::String&& value) { SetSecretString(std::move(value)); return *this;}
inline SecretValueEntry& WithSecretString(const char* value) { SetSecretString(value); return *this;}
///@}
///@{
/**
* <p>A list of all of the staging labels currently attached to this version of the
* secret.</p>
*/
inline const Aws::Vector<Aws::String>& GetVersionStages() const{ return m_versionStages; }
inline bool VersionStagesHasBeenSet() const { return m_versionStagesHasBeenSet; }
inline void SetVersionStages(const Aws::Vector<Aws::String>& value) { m_versionStagesHasBeenSet = true; m_versionStages = value; }
inline void SetVersionStages(Aws::Vector<Aws::String>&& value) { m_versionStagesHasBeenSet = true; m_versionStages = std::move(value); }
inline SecretValueEntry& WithVersionStages(const Aws::Vector<Aws::String>& value) { SetVersionStages(value); return *this;}
inline SecretValueEntry& WithVersionStages(Aws::Vector<Aws::String>&& value) { SetVersionStages(std::move(value)); return *this;}
inline SecretValueEntry& AddVersionStages(const Aws::String& value) { m_versionStagesHasBeenSet = true; m_versionStages.push_back(value); return *this; }
inline SecretValueEntry& AddVersionStages(Aws::String&& value) { m_versionStagesHasBeenSet = true; m_versionStages.push_back(std::move(value)); return *this; }
inline SecretValueEntry& AddVersionStages(const char* value) { m_versionStagesHasBeenSet = true; m_versionStages.push_back(value); return *this; }
///@}
///@{
/**
* <p>The date the secret was created.</p>
*/
inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; }
inline bool CreatedDateHasBeenSet() const { return m_createdDateHasBeenSet; }
inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDateHasBeenSet = true; m_createdDate = value; }
inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDateHasBeenSet = true; m_createdDate = std::move(value); }
inline SecretValueEntry& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;}
inline SecretValueEntry& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;}
///@}
private:
Aws::String m_aRN;
bool m_aRNHasBeenSet = false;
Aws::String m_name;
bool m_nameHasBeenSet = false;
Aws::String m_versionId;
bool m_versionIdHasBeenSet = false;
Aws::Utils::CryptoBuffer m_secretBinary;
bool m_secretBinaryHasBeenSet = false;
Aws::String m_secretString;
bool m_secretStringHasBeenSet = false;
Aws::Vector<Aws::String> m_versionStages;
bool m_versionStagesHasBeenSet = false;
Aws::Utils::DateTime m_createdDate;
bool m_createdDateHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,132 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>A structure that contains information about one version of a
* secret.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/SecretVersionsListEntry">AWS
* API Reference</a></p>
*/
class SecretVersionsListEntry
{
public:
AWS_SECRETSMANAGER_API SecretVersionsListEntry();
AWS_SECRETSMANAGER_API SecretVersionsListEntry(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API SecretVersionsListEntry& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>The unique version identifier of this version of the secret.</p>
*/
inline const Aws::String& GetVersionId() const{ return m_versionId; }
inline bool VersionIdHasBeenSet() const { return m_versionIdHasBeenSet; }
inline void SetVersionId(const Aws::String& value) { m_versionIdHasBeenSet = true; m_versionId = value; }
inline void SetVersionId(Aws::String&& value) { m_versionIdHasBeenSet = true; m_versionId = std::move(value); }
inline void SetVersionId(const char* value) { m_versionIdHasBeenSet = true; m_versionId.assign(value); }
inline SecretVersionsListEntry& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
inline SecretVersionsListEntry& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
inline SecretVersionsListEntry& WithVersionId(const char* value) { SetVersionId(value); return *this;}
///@}
///@{
/**
* <p>An array of staging labels that are currently associated with this version of
* the secret.</p>
*/
inline const Aws::Vector<Aws::String>& GetVersionStages() const{ return m_versionStages; }
inline bool VersionStagesHasBeenSet() const { return m_versionStagesHasBeenSet; }
inline void SetVersionStages(const Aws::Vector<Aws::String>& value) { m_versionStagesHasBeenSet = true; m_versionStages = value; }
inline void SetVersionStages(Aws::Vector<Aws::String>&& value) { m_versionStagesHasBeenSet = true; m_versionStages = std::move(value); }
inline SecretVersionsListEntry& WithVersionStages(const Aws::Vector<Aws::String>& value) { SetVersionStages(value); return *this;}
inline SecretVersionsListEntry& WithVersionStages(Aws::Vector<Aws::String>&& value) { SetVersionStages(std::move(value)); return *this;}
inline SecretVersionsListEntry& AddVersionStages(const Aws::String& value) { m_versionStagesHasBeenSet = true; m_versionStages.push_back(value); return *this; }
inline SecretVersionsListEntry& AddVersionStages(Aws::String&& value) { m_versionStagesHasBeenSet = true; m_versionStages.push_back(std::move(value)); return *this; }
inline SecretVersionsListEntry& AddVersionStages(const char* value) { m_versionStagesHasBeenSet = true; m_versionStages.push_back(value); return *this; }
///@}
///@{
/**
* <p>The date that this version of the secret was last accessed. Note that the
* resolution of this field is at the date level and does not include the time.</p>
*/
inline const Aws::Utils::DateTime& GetLastAccessedDate() const{ return m_lastAccessedDate; }
inline bool LastAccessedDateHasBeenSet() const { return m_lastAccessedDateHasBeenSet; }
inline void SetLastAccessedDate(const Aws::Utils::DateTime& value) { m_lastAccessedDateHasBeenSet = true; m_lastAccessedDate = value; }
inline void SetLastAccessedDate(Aws::Utils::DateTime&& value) { m_lastAccessedDateHasBeenSet = true; m_lastAccessedDate = std::move(value); }
inline SecretVersionsListEntry& WithLastAccessedDate(const Aws::Utils::DateTime& value) { SetLastAccessedDate(value); return *this;}
inline SecretVersionsListEntry& WithLastAccessedDate(Aws::Utils::DateTime&& value) { SetLastAccessedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The date and time this version of the secret was created.</p>
*/
inline const Aws::Utils::DateTime& GetCreatedDate() const{ return m_createdDate; }
inline bool CreatedDateHasBeenSet() const { return m_createdDateHasBeenSet; }
inline void SetCreatedDate(const Aws::Utils::DateTime& value) { m_createdDateHasBeenSet = true; m_createdDate = value; }
inline void SetCreatedDate(Aws::Utils::DateTime&& value) { m_createdDateHasBeenSet = true; m_createdDate = std::move(value); }
inline SecretVersionsListEntry& WithCreatedDate(const Aws::Utils::DateTime& value) { SetCreatedDate(value); return *this;}
inline SecretVersionsListEntry& WithCreatedDate(Aws::Utils::DateTime&& value) { SetCreatedDate(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The KMS keys used to encrypt the secret version.</p>
*/
inline const Aws::Vector<Aws::String>& GetKmsKeyIds() const{ return m_kmsKeyIds; }
inline bool KmsKeyIdsHasBeenSet() const { return m_kmsKeyIdsHasBeenSet; }
inline void SetKmsKeyIds(const Aws::Vector<Aws::String>& value) { m_kmsKeyIdsHasBeenSet = true; m_kmsKeyIds = value; }
inline void SetKmsKeyIds(Aws::Vector<Aws::String>&& value) { m_kmsKeyIdsHasBeenSet = true; m_kmsKeyIds = std::move(value); }
inline SecretVersionsListEntry& WithKmsKeyIds(const Aws::Vector<Aws::String>& value) { SetKmsKeyIds(value); return *this;}
inline SecretVersionsListEntry& WithKmsKeyIds(Aws::Vector<Aws::String>&& value) { SetKmsKeyIds(std::move(value)); return *this;}
inline SecretVersionsListEntry& AddKmsKeyIds(const Aws::String& value) { m_kmsKeyIdsHasBeenSet = true; m_kmsKeyIds.push_back(value); return *this; }
inline SecretVersionsListEntry& AddKmsKeyIds(Aws::String&& value) { m_kmsKeyIdsHasBeenSet = true; m_kmsKeyIds.push_back(std::move(value)); return *this; }
inline SecretVersionsListEntry& AddKmsKeyIds(const char* value) { m_kmsKeyIdsHasBeenSet = true; m_kmsKeyIds.push_back(value); return *this; }
///@}
private:
Aws::String m_versionId;
bool m_versionIdHasBeenSet = false;
Aws::Vector<Aws::String> m_versionStages;
bool m_versionStagesHasBeenSet = false;
Aws::Utils::DateTime m_lastAccessedDate;
bool m_lastAccessedDateHasBeenSet = false;
Aws::Utils::DateTime m_createdDate;
bool m_createdDateHasBeenSet = false;
Aws::Vector<Aws::String> m_kmsKeyIds;
bool m_kmsKeyIdsHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
enum class SortOrderType
{
NOT_SET,
asc,
desc
};
namespace SortOrderTypeMapper
{
AWS_SECRETSMANAGER_API SortOrderType GetSortOrderTypeForName(const Aws::String& name);
AWS_SECRETSMANAGER_API Aws::String GetNameForSortOrderType(SortOrderType value);
} // namespace SortOrderTypeMapper
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,32 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
enum class StatusType
{
NOT_SET,
InSync,
Failed,
InProgress
};
namespace StatusTypeMapper
{
AWS_SECRETSMANAGER_API StatusType GetStatusTypeForName(const Aws::String& name);
AWS_SECRETSMANAGER_API Aws::String GetNameForStatusType(StatusType value);
} // namespace StatusTypeMapper
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class StopReplicationToReplicaRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API StopReplicationToReplicaRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "StopReplicationToReplica"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN of the primary secret. </p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline StopReplicationToReplicaRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline StopReplicationToReplicaRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline StopReplicationToReplicaRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,68 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class StopReplicationToReplicaResult
{
public:
AWS_SECRETSMANAGER_API StopReplicationToReplicaResult();
AWS_SECRETSMANAGER_API StopReplicationToReplicaResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API StopReplicationToReplicaResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the promoted secret. The ARN is the same as the original primary
* secret except the Region is changed.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline StopReplicationToReplicaResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline StopReplicationToReplicaResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline StopReplicationToReplicaResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline StopReplicationToReplicaResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline StopReplicationToReplicaResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline StopReplicationToReplicaResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,79 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>A structure that contains information about a tag.</p><p><h3>See Also:</h3>
* <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/Tag">AWS
* API Reference</a></p>
*/
class Tag
{
public:
AWS_SECRETSMANAGER_API Tag();
AWS_SECRETSMANAGER_API Tag(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Tag& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>The key identifier, or name, of the tag.</p>
*/
inline const Aws::String& GetKey() const{ return m_key; }
inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
inline Tag& WithKey(const Aws::String& value) { SetKey(value); return *this;}
inline Tag& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
inline Tag& WithKey(const char* value) { SetKey(value); return *this;}
///@}
///@{
/**
* <p>The string value associated with the key of the tag.</p>
*/
inline const Aws::String& GetValue() const{ return m_value; }
inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
inline Tag& WithValue(const Aws::String& value) { SetValue(value); return *this;}
inline Tag& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
inline Tag& WithValue(const char* value) { SetValue(value); return *this;}
///@}
private:
Aws::String m_key;
bool m_keyHasBeenSet = false;
Aws::String m_value;
bool m_valueHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,88 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/secretsmanager/model/Tag.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class TagResourceRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API TagResourceRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The identifier for the secret to attach tags to. You can specify either the
* Amazon Resource Name (ARN) or the friendly name of the secret.</p> <p>For an
* ARN, we recommend that you specify a complete ARN rather than a partial ARN. See
* <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline TagResourceRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline TagResourceRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline TagResourceRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>The tags to attach to the secret as a JSON text string argument. Each element
* in the list consists of a <code>Key</code> and a <code>Value</code>.</p> <p>For
* storing multiple values, we recommend that you use a JSON text string argument
* and specify key/value pairs. For more information, see <a
* href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
* parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
* CLI User Guide.</p>
*/
inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::Vector<Tag> m_tags;
bool m_tagsHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,87 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class UntagResourceRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API UntagResourceRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "UntagResource"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret.</p> <p>For an ARN, we recommend that you
* specify a complete ARN rather than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline UntagResourceRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline UntagResourceRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline UntagResourceRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>A list of tag key names to remove from the secret. You don't specify the
* value. Both the key and its associated value are removed.</p> <p>This parameter
* requires a JSON text string argument.</p> <p>For storing multiple values, we
* recommend that you use a JSON text string argument and specify key/value pairs.
* For more information, see <a
* href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html">Specifying
* parameter values for the Amazon Web Services CLI</a> in the Amazon Web Services
* CLI User Guide.</p>
*/
inline const Aws::Vector<Aws::String>& GetTagKeys() const{ return m_tagKeys; }
inline bool TagKeysHasBeenSet() const { return m_tagKeysHasBeenSet; }
inline void SetTagKeys(const Aws::Vector<Aws::String>& value) { m_tagKeysHasBeenSet = true; m_tagKeys = value; }
inline void SetTagKeys(Aws::Vector<Aws::String>&& value) { m_tagKeysHasBeenSet = true; m_tagKeys = std::move(value); }
inline UntagResourceRequest& WithTagKeys(const Aws::Vector<Aws::String>& value) { SetTagKeys(value); return *this;}
inline UntagResourceRequest& WithTagKeys(Aws::Vector<Aws::String>&& value) { SetTagKeys(std::move(value)); return *this;}
inline UntagResourceRequest& AddTagKeys(const Aws::String& value) { m_tagKeysHasBeenSet = true; m_tagKeys.push_back(value); return *this; }
inline UntagResourceRequest& AddTagKeys(Aws::String&& value) { m_tagKeysHasBeenSet = true; m_tagKeys.push_back(std::move(value)); return *this; }
inline UntagResourceRequest& AddTagKeys(const char* value) { m_tagKeysHasBeenSet = true; m_tagKeys.push_back(value); return *this; }
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::Vector<Aws::String> m_tagKeys;
bool m_tagKeysHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,194 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/Array.h>
#include <utility>
#include <aws/core/utils/UUID.h>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class UpdateSecretRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API UpdateSecretRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "UpdateSecret"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret.</p> <p>For an ARN, we recommend that you
* specify a complete ARN rather than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline UpdateSecretRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline UpdateSecretRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline UpdateSecretRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>If you include <code>SecretString</code> or <code>SecretBinary</code>, then
* Secrets Manager creates a new version for the secret, and this parameter
* specifies the unique identifier for the new version.</p> <p>If you use
* the Amazon Web Services CLI or one of the Amazon Web Services SDKs to call this
* operation, then you can leave this parameter empty. The CLI or SDK generates a
* random UUID for you and includes it as the value for this parameter in the
* request. </p> <p>If you generate a raw HTTP request to the Secrets
* Manager service endpoint, then you must generate a
* <code>ClientRequestToken</code> and include it in the request.</p> <p>This value
* helps ensure idempotency. Secrets Manager uses this value to prevent the
* accidental creation of duplicate versions if there are failures and retries
* during a rotation. We recommend that you generate a <a
* href="https://wikipedia.org/wiki/Universally_unique_identifier">UUID-type</a>
* value to ensure uniqueness of your versions within the specified secret. </p>
*/
inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; }
inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; }
inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); }
inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); }
inline UpdateSecretRequest& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;}
inline UpdateSecretRequest& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;}
inline UpdateSecretRequest& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;}
///@}
///@{
/**
* <p>The description of the secret.</p>
*/
inline const Aws::String& GetDescription() const{ return m_description; }
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
inline UpdateSecretRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
inline UpdateSecretRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
inline UpdateSecretRequest& WithDescription(const char* value) { SetDescription(value); return *this;}
///@}
///@{
/**
* <p>The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt
* new secret versions as well as any existing versions with the staging labels
* <code>AWSCURRENT</code>, <code>AWSPENDING</code>, or <code>AWSPREVIOUS</code>.
* If you don't have <code>kms:Encrypt</code> permission to the new key, Secrets
* Manager does not re-encrypt existing secret versions with the new key. For more
* information about versions and staging labels, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version">Concepts:
* Version</a>.</p> <p>A key alias is always prefixed by <code>alias/</code>, for
* example <code>alias/aws/secretsmanager</code>. For more information, see <a
* href="https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html">About
* aliases</a>.</p> <p>If you set this to an empty string, Secrets Manager uses the
* Amazon Web Services managed key <code>aws/secretsmanager</code>. If this key
* doesn't already exist in your account, then Secrets Manager creates it for you
* automatically. All users and roles in the Amazon Web Services account
* automatically have access to use <code>aws/secretsmanager</code>. Creating
* <code>aws/secretsmanager</code> can result in a one-time significant delay in
* returning the result. </p> <p>You can only use the Amazon Web
* Services managed key <code>aws/secretsmanager</code> if you call this operation
* using credentials from the same Amazon Web Services account that owns the
* secret. If the secret is in a different account, then you must use a customer
* managed key and provide the ARN of that KMS key in this field. The user making
* the call must have permissions to both the secret and the KMS key in their
* respective accounts.</p>
*/
inline const Aws::String& GetKmsKeyId() const{ return m_kmsKeyId; }
inline bool KmsKeyIdHasBeenSet() const { return m_kmsKeyIdHasBeenSet; }
inline void SetKmsKeyId(const Aws::String& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = value; }
inline void SetKmsKeyId(Aws::String&& value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId = std::move(value); }
inline void SetKmsKeyId(const char* value) { m_kmsKeyIdHasBeenSet = true; m_kmsKeyId.assign(value); }
inline UpdateSecretRequest& WithKmsKeyId(const Aws::String& value) { SetKmsKeyId(value); return *this;}
inline UpdateSecretRequest& WithKmsKeyId(Aws::String&& value) { SetKmsKeyId(std::move(value)); return *this;}
inline UpdateSecretRequest& WithKmsKeyId(const char* value) { SetKmsKeyId(value); return *this;}
///@}
///@{
/**
* <p>The binary data to encrypt and store in the new version of the secret. We
* recommend that you store your binary data in a file and then pass the contents
* of the file as a parameter. </p> <p>Either <code>SecretBinary</code> or
* <code>SecretString</code> must have a value, but not both.</p> <p>You can't
* access this parameter in the Secrets Manager console.</p> <p>Sensitive: This
* field contains sensitive information, so the service does not include it in
* CloudTrail log entries. If you create your own log entries, you must also avoid
* logging the information in this field.</p>
*/
inline const Aws::Utils::CryptoBuffer& GetSecretBinary() const{ return m_secretBinary; }
inline bool SecretBinaryHasBeenSet() const { return m_secretBinaryHasBeenSet; }
inline void SetSecretBinary(const Aws::Utils::CryptoBuffer& value) { m_secretBinaryHasBeenSet = true; m_secretBinary = value; }
inline void SetSecretBinary(Aws::Utils::CryptoBuffer&& value) { m_secretBinaryHasBeenSet = true; m_secretBinary = std::move(value); }
inline UpdateSecretRequest& WithSecretBinary(const Aws::Utils::CryptoBuffer& value) { SetSecretBinary(value); return *this;}
inline UpdateSecretRequest& WithSecretBinary(Aws::Utils::CryptoBuffer&& value) { SetSecretBinary(std::move(value)); return *this;}
///@}
///@{
/**
* <p>The text data to encrypt and store in the new version of the secret. We
* recommend you use a JSON structure of key/value pairs for your secret value.
* </p> <p>Either <code>SecretBinary</code> or <code>SecretString</code> must have
* a value, but not both. </p> <p>Sensitive: This field contains sensitive
* information, so the service does not include it in CloudTrail log entries. If
* you create your own log entries, you must also avoid logging the information in
* this field.</p>
*/
inline const Aws::String& GetSecretString() const{ return m_secretString; }
inline bool SecretStringHasBeenSet() const { return m_secretStringHasBeenSet; }
inline void SetSecretString(const Aws::String& value) { m_secretStringHasBeenSet = true; m_secretString = value; }
inline void SetSecretString(Aws::String&& value) { m_secretStringHasBeenSet = true; m_secretString = std::move(value); }
inline void SetSecretString(const char* value) { m_secretStringHasBeenSet = true; m_secretString.assign(value); }
inline UpdateSecretRequest& WithSecretString(const Aws::String& value) { SetSecretString(value); return *this;}
inline UpdateSecretRequest& WithSecretString(Aws::String&& value) { SetSecretString(std::move(value)); return *this;}
inline UpdateSecretRequest& WithSecretString(const char* value) { SetSecretString(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::String m_clientRequestToken;
bool m_clientRequestTokenHasBeenSet = false;
Aws::String m_description;
bool m_descriptionHasBeenSet = false;
Aws::String m_kmsKeyId;
bool m_kmsKeyIdHasBeenSet = false;
Aws::Utils::CryptoBuffer m_secretBinary;
bool m_secretBinaryHasBeenSet = false;
Aws::String m_secretString;
bool m_secretStringHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,99 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class UpdateSecretResult
{
public:
AWS_SECRETSMANAGER_API UpdateSecretResult();
AWS_SECRETSMANAGER_API UpdateSecretResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API UpdateSecretResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret that was updated.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline UpdateSecretResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline UpdateSecretResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline UpdateSecretResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret that was updated.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline UpdateSecretResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline UpdateSecretResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline UpdateSecretResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
/**
* <p>If Secrets Manager created a new version of the secret during this operation,
* then <code>VersionId</code> contains the unique identifier of the new
* version.</p>
*/
inline const Aws::String& GetVersionId() const{ return m_versionId; }
inline void SetVersionId(const Aws::String& value) { m_versionId = value; }
inline void SetVersionId(Aws::String&& value) { m_versionId = std::move(value); }
inline void SetVersionId(const char* value) { m_versionId.assign(value); }
inline UpdateSecretResult& WithVersionId(const Aws::String& value) { SetVersionId(value); return *this;}
inline UpdateSecretResult& WithVersionId(Aws::String&& value) { SetVersionId(std::move(value)); return *this;}
inline UpdateSecretResult& WithVersionId(const char* value) { SetVersionId(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline UpdateSecretResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline UpdateSecretResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline UpdateSecretResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_versionId;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,121 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class UpdateSecretVersionStageRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API UpdateSecretVersionStageRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "UpdateSecretVersionStage"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or the name of the secret with the version and staging labelsto
* modify.</p> <p>For an ARN, we recommend that you specify a complete ARN rather
* than a partial ARN. See <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen">Finding
* a secret from a partial ARN</a>.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline UpdateSecretVersionStageRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline UpdateSecretVersionStageRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline UpdateSecretVersionStageRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>The staging label to add to this version.</p>
*/
inline const Aws::String& GetVersionStage() const{ return m_versionStage; }
inline bool VersionStageHasBeenSet() const { return m_versionStageHasBeenSet; }
inline void SetVersionStage(const Aws::String& value) { m_versionStageHasBeenSet = true; m_versionStage = value; }
inline void SetVersionStage(Aws::String&& value) { m_versionStageHasBeenSet = true; m_versionStage = std::move(value); }
inline void SetVersionStage(const char* value) { m_versionStageHasBeenSet = true; m_versionStage.assign(value); }
inline UpdateSecretVersionStageRequest& WithVersionStage(const Aws::String& value) { SetVersionStage(value); return *this;}
inline UpdateSecretVersionStageRequest& WithVersionStage(Aws::String&& value) { SetVersionStage(std::move(value)); return *this;}
inline UpdateSecretVersionStageRequest& WithVersionStage(const char* value) { SetVersionStage(value); return *this;}
///@}
///@{
/**
* <p>The ID of the version that the staging label is to be removed from. If the
* staging label you are trying to attach to one version is already attached to a
* different version, then you must include this parameter and specify the version
* that the label is to be removed from. If the label is attached and you either do
* not specify this parameter, or the version ID does not match, then the operation
* fails.</p>
*/
inline const Aws::String& GetRemoveFromVersionId() const{ return m_removeFromVersionId; }
inline bool RemoveFromVersionIdHasBeenSet() const { return m_removeFromVersionIdHasBeenSet; }
inline void SetRemoveFromVersionId(const Aws::String& value) { m_removeFromVersionIdHasBeenSet = true; m_removeFromVersionId = value; }
inline void SetRemoveFromVersionId(Aws::String&& value) { m_removeFromVersionIdHasBeenSet = true; m_removeFromVersionId = std::move(value); }
inline void SetRemoveFromVersionId(const char* value) { m_removeFromVersionIdHasBeenSet = true; m_removeFromVersionId.assign(value); }
inline UpdateSecretVersionStageRequest& WithRemoveFromVersionId(const Aws::String& value) { SetRemoveFromVersionId(value); return *this;}
inline UpdateSecretVersionStageRequest& WithRemoveFromVersionId(Aws::String&& value) { SetRemoveFromVersionId(std::move(value)); return *this;}
inline UpdateSecretVersionStageRequest& WithRemoveFromVersionId(const char* value) { SetRemoveFromVersionId(value); return *this;}
///@}
///@{
/**
* <p>The ID of the version to add the staging label to. To remove a label from a
* version, then do not specify this parameter.</p> <p>If the staging label is
* already attached to a different version of the secret, then you must also
* specify the <code>RemoveFromVersionId</code> parameter. </p>
*/
inline const Aws::String& GetMoveToVersionId() const{ return m_moveToVersionId; }
inline bool MoveToVersionIdHasBeenSet() const { return m_moveToVersionIdHasBeenSet; }
inline void SetMoveToVersionId(const Aws::String& value) { m_moveToVersionIdHasBeenSet = true; m_moveToVersionId = value; }
inline void SetMoveToVersionId(Aws::String&& value) { m_moveToVersionIdHasBeenSet = true; m_moveToVersionId = std::move(value); }
inline void SetMoveToVersionId(const char* value) { m_moveToVersionIdHasBeenSet = true; m_moveToVersionId.assign(value); }
inline UpdateSecretVersionStageRequest& WithMoveToVersionId(const Aws::String& value) { SetMoveToVersionId(value); return *this;}
inline UpdateSecretVersionStageRequest& WithMoveToVersionId(Aws::String&& value) { SetMoveToVersionId(std::move(value)); return *this;}
inline UpdateSecretVersionStageRequest& WithMoveToVersionId(const char* value) { SetMoveToVersionId(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::String m_versionStage;
bool m_versionStageHasBeenSet = false;
Aws::String m_removeFromVersionId;
bool m_removeFromVersionIdHasBeenSet = false;
Aws::String m_moveToVersionId;
bool m_moveToVersionIdHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class UpdateSecretVersionStageResult
{
public:
AWS_SECRETSMANAGER_API UpdateSecretVersionStageResult();
AWS_SECRETSMANAGER_API UpdateSecretVersionStageResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API UpdateSecretVersionStageResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>The ARN of the secret that was updated.</p>
*/
inline const Aws::String& GetARN() const{ return m_aRN; }
inline void SetARN(const Aws::String& value) { m_aRN = value; }
inline void SetARN(Aws::String&& value) { m_aRN = std::move(value); }
inline void SetARN(const char* value) { m_aRN.assign(value); }
inline UpdateSecretVersionStageResult& WithARN(const Aws::String& value) { SetARN(value); return *this;}
inline UpdateSecretVersionStageResult& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
inline UpdateSecretVersionStageResult& WithARN(const char* value) { SetARN(value); return *this;}
///@}
///@{
/**
* <p>The name of the secret that was updated.</p>
*/
inline const Aws::String& GetName() const{ return m_name; }
inline void SetName(const Aws::String& value) { m_name = value; }
inline void SetName(Aws::String&& value) { m_name = std::move(value); }
inline void SetName(const char* value) { m_name.assign(value); }
inline UpdateSecretVersionStageResult& WithName(const Aws::String& value) { SetName(value); return *this;}
inline UpdateSecretVersionStageResult& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
inline UpdateSecretVersionStageResult& WithName(const char* value) { SetName(value); return *this;}
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline UpdateSecretVersionStageResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline UpdateSecretVersionStageResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline UpdateSecretVersionStageResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
Aws::String m_aRN;
Aws::String m_name;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,80 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/secretsmanager/SecretsManagerRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace SecretsManager
{
namespace Model
{
/**
*/
class ValidateResourcePolicyRequest : public SecretsManagerRequest
{
public:
AWS_SECRETSMANAGER_API ValidateResourcePolicyRequest();
// Service request name is the Operation name which will send this request out,
// each operation should has unique request name, so that we can get operation's name from this request.
// Note: this is not true for response, multiple operations may have the same response name,
// so we can not get operation's name from response.
inline virtual const char* GetServiceRequestName() const override { return "ValidateResourcePolicy"; }
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
///@{
/**
* <p>The ARN or name of the secret with the resource-based policy you want to
* validate.</p>
*/
inline const Aws::String& GetSecretId() const{ return m_secretId; }
inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
inline void SetSecretId(const Aws::String& value) { m_secretIdHasBeenSet = true; m_secretId = value; }
inline void SetSecretId(Aws::String&& value) { m_secretIdHasBeenSet = true; m_secretId = std::move(value); }
inline void SetSecretId(const char* value) { m_secretIdHasBeenSet = true; m_secretId.assign(value); }
inline ValidateResourcePolicyRequest& WithSecretId(const Aws::String& value) { SetSecretId(value); return *this;}
inline ValidateResourcePolicyRequest& WithSecretId(Aws::String&& value) { SetSecretId(std::move(value)); return *this;}
inline ValidateResourcePolicyRequest& WithSecretId(const char* value) { SetSecretId(value); return *this;}
///@}
///@{
/**
* <p>A JSON-formatted string that contains an Amazon Web Services resource-based
* policy. The policy in the string identifies who can access or manage this secret
* and its versions. For example policies, see <a
* href="https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html">Permissions
* policy examples</a>.</p>
*/
inline const Aws::String& GetResourcePolicy() const{ return m_resourcePolicy; }
inline bool ResourcePolicyHasBeenSet() const { return m_resourcePolicyHasBeenSet; }
inline void SetResourcePolicy(const Aws::String& value) { m_resourcePolicyHasBeenSet = true; m_resourcePolicy = value; }
inline void SetResourcePolicy(Aws::String&& value) { m_resourcePolicyHasBeenSet = true; m_resourcePolicy = std::move(value); }
inline void SetResourcePolicy(const char* value) { m_resourcePolicyHasBeenSet = true; m_resourcePolicy.assign(value); }
inline ValidateResourcePolicyRequest& WithResourcePolicy(const Aws::String& value) { SetResourcePolicy(value); return *this;}
inline ValidateResourcePolicyRequest& WithResourcePolicy(Aws::String&& value) { SetResourcePolicy(std::move(value)); return *this;}
inline ValidateResourcePolicyRequest& WithResourcePolicy(const char* value) { SetResourcePolicy(value); return *this;}
///@}
private:
Aws::String m_secretId;
bool m_secretIdHasBeenSet = false;
Aws::String m_resourcePolicy;
bool m_resourcePolicyHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,80 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/secretsmanager/model/ValidationErrorsEntry.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
class ValidateResourcePolicyResult
{
public:
AWS_SECRETSMANAGER_API ValidateResourcePolicyResult();
AWS_SECRETSMANAGER_API ValidateResourcePolicyResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
AWS_SECRETSMANAGER_API ValidateResourcePolicyResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
///@{
/**
* <p>True if your policy passes validation, otherwise false.</p>
*/
inline bool GetPolicyValidationPassed() const{ return m_policyValidationPassed; }
inline void SetPolicyValidationPassed(bool value) { m_policyValidationPassed = value; }
inline ValidateResourcePolicyResult& WithPolicyValidationPassed(bool value) { SetPolicyValidationPassed(value); return *this;}
///@}
///@{
/**
* <p>Validation errors if your policy didn't pass validation.</p>
*/
inline const Aws::Vector<ValidationErrorsEntry>& GetValidationErrors() const{ return m_validationErrors; }
inline void SetValidationErrors(const Aws::Vector<ValidationErrorsEntry>& value) { m_validationErrors = value; }
inline void SetValidationErrors(Aws::Vector<ValidationErrorsEntry>&& value) { m_validationErrors = std::move(value); }
inline ValidateResourcePolicyResult& WithValidationErrors(const Aws::Vector<ValidationErrorsEntry>& value) { SetValidationErrors(value); return *this;}
inline ValidateResourcePolicyResult& WithValidationErrors(Aws::Vector<ValidationErrorsEntry>&& value) { SetValidationErrors(std::move(value)); return *this;}
inline ValidateResourcePolicyResult& AddValidationErrors(const ValidationErrorsEntry& value) { m_validationErrors.push_back(value); return *this; }
inline ValidateResourcePolicyResult& AddValidationErrors(ValidationErrorsEntry&& value) { m_validationErrors.push_back(std::move(value)); return *this; }
///@}
///@{
inline const Aws::String& GetRequestId() const{ return m_requestId; }
inline void SetRequestId(const Aws::String& value) { m_requestId = value; }
inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); }
inline void SetRequestId(const char* value) { m_requestId.assign(value); }
inline ValidateResourcePolicyResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;}
inline ValidateResourcePolicyResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;}
inline ValidateResourcePolicyResult& WithRequestId(const char* value) { SetRequestId(value); return *this;}
///@}
private:
bool m_policyValidationPassed;
Aws::Vector<ValidationErrorsEntry> m_validationErrors;
Aws::String m_requestId;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws

View File

@@ -0,0 +1,80 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace SecretsManager
{
namespace Model
{
/**
* <p>Displays errors that occurred during validation of the resource
* policy.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/secretsmanager-2017-10-17/ValidationErrorsEntry">AWS
* API Reference</a></p>
*/
class ValidationErrorsEntry
{
public:
AWS_SECRETSMANAGER_API ValidationErrorsEntry();
AWS_SECRETSMANAGER_API ValidationErrorsEntry(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API ValidationErrorsEntry& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_SECRETSMANAGER_API Aws::Utils::Json::JsonValue Jsonize() const;
///@{
/**
* <p>Checks the name of the policy.</p>
*/
inline const Aws::String& GetCheckName() const{ return m_checkName; }
inline bool CheckNameHasBeenSet() const { return m_checkNameHasBeenSet; }
inline void SetCheckName(const Aws::String& value) { m_checkNameHasBeenSet = true; m_checkName = value; }
inline void SetCheckName(Aws::String&& value) { m_checkNameHasBeenSet = true; m_checkName = std::move(value); }
inline void SetCheckName(const char* value) { m_checkNameHasBeenSet = true; m_checkName.assign(value); }
inline ValidationErrorsEntry& WithCheckName(const Aws::String& value) { SetCheckName(value); return *this;}
inline ValidationErrorsEntry& WithCheckName(Aws::String&& value) { SetCheckName(std::move(value)); return *this;}
inline ValidationErrorsEntry& WithCheckName(const char* value) { SetCheckName(value); return *this;}
///@}
///@{
/**
* <p>Displays error messages if validation encounters problems during validation
* of the resource policy.</p>
*/
inline const Aws::String& GetErrorMessage() const{ return m_errorMessage; }
inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; }
inline void SetErrorMessage(const Aws::String& value) { m_errorMessageHasBeenSet = true; m_errorMessage = value; }
inline void SetErrorMessage(Aws::String&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::move(value); }
inline void SetErrorMessage(const char* value) { m_errorMessageHasBeenSet = true; m_errorMessage.assign(value); }
inline ValidationErrorsEntry& WithErrorMessage(const Aws::String& value) { SetErrorMessage(value); return *this;}
inline ValidationErrorsEntry& WithErrorMessage(Aws::String&& value) { SetErrorMessage(std::move(value)); return *this;}
inline ValidationErrorsEntry& WithErrorMessage(const char* value) { SetErrorMessage(value); return *this;}
///@}
private:
Aws::String m_checkName;
bool m_checkNameHasBeenSet = false;
Aws::String m_errorMessage;
bool m_errorMessageHasBeenSet = false;
};
} // namespace Model
} // namespace SecretsManager
} // namespace Aws