AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
RotateSecretRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/secretsmanager/SecretsManagerRequest.h>
11#include <aws/secretsmanager/SecretsManager_EXPORTS.h>
12#include <aws/secretsmanager/model/ExternalSecretRotationMetadataItem.h>
13#include <aws/secretsmanager/model/RotationRulesType.h>
14
15#include <utility>
16
17namespace Aws {
18namespace SecretsManager {
19namespace Model {
20
24 public:
25 AWS_SECRETSMANAGER_API RotateSecretRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "RotateSecret"; }
32
33 AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override;
34
35 AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
36
38
44 inline const Aws::String& GetSecretId() const { return m_secretId; }
45 inline bool SecretIdHasBeenSet() const { return m_secretIdHasBeenSet; }
46 template <typename SecretIdT = Aws::String>
47 void SetSecretId(SecretIdT&& value) {
48 m_secretIdHasBeenSet = true;
49 m_secretId = std::forward<SecretIdT>(value);
50 }
51 template <typename SecretIdT = Aws::String>
52 RotateSecretRequest& WithSecretId(SecretIdT&& value) {
53 SetSecretId(std::forward<SecretIdT>(value));
54 return *this;
55 }
57
59
75 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
76 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
77 template <typename ClientRequestTokenT = Aws::String>
78 void SetClientRequestToken(ClientRequestTokenT&& value) {
79 m_clientRequestTokenHasBeenSet = true;
80 m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
81 }
82 template <typename ClientRequestTokenT = Aws::String>
83 RotateSecretRequest& WithClientRequestToken(ClientRequestTokenT&& value) {
84 SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
85 return *this;
86 }
88
90
97 inline const Aws::String& GetRotationLambdaARN() const { return m_rotationLambdaARN; }
98 inline bool RotationLambdaARNHasBeenSet() const { return m_rotationLambdaARNHasBeenSet; }
99 template <typename RotationLambdaARNT = Aws::String>
100 void SetRotationLambdaARN(RotationLambdaARNT&& value) {
101 m_rotationLambdaARNHasBeenSet = true;
102 m_rotationLambdaARN = std::forward<RotationLambdaARNT>(value);
103 }
104 template <typename RotationLambdaARNT = Aws::String>
105 RotateSecretRequest& WithRotationLambdaARN(RotationLambdaARNT&& value) {
106 SetRotationLambdaARN(std::forward<RotationLambdaARNT>(value));
107 return *this;
108 }
110
112
122 inline const RotationRulesType& GetRotationRules() const { return m_rotationRules; }
123 inline bool RotationRulesHasBeenSet() const { return m_rotationRulesHasBeenSet; }
124 template <typename RotationRulesT = RotationRulesType>
125 void SetRotationRules(RotationRulesT&& value) {
126 m_rotationRulesHasBeenSet = true;
127 m_rotationRules = std::forward<RotationRulesT>(value);
128 }
129 template <typename RotationRulesT = RotationRulesType>
130 RotateSecretRequest& WithRotationRules(RotationRulesT&& value) {
131 SetRotationRules(std::forward<RotationRulesT>(value));
132 return *this;
133 }
135
137
145 return m_externalSecretRotationMetadata;
146 }
147 inline bool ExternalSecretRotationMetadataHasBeenSet() const { return m_externalSecretRotationMetadataHasBeenSet; }
148 template <typename ExternalSecretRotationMetadataT = Aws::Vector<ExternalSecretRotationMetadataItem>>
149 void SetExternalSecretRotationMetadata(ExternalSecretRotationMetadataT&& value) {
150 m_externalSecretRotationMetadataHasBeenSet = true;
151 m_externalSecretRotationMetadata = std::forward<ExternalSecretRotationMetadataT>(value);
152 }
153 template <typename ExternalSecretRotationMetadataT = Aws::Vector<ExternalSecretRotationMetadataItem>>
154 RotateSecretRequest& WithExternalSecretRotationMetadata(ExternalSecretRotationMetadataT&& value) {
155 SetExternalSecretRotationMetadata(std::forward<ExternalSecretRotationMetadataT>(value));
156 return *this;
157 }
158 template <typename ExternalSecretRotationMetadataT = ExternalSecretRotationMetadataItem>
159 RotateSecretRequest& AddExternalSecretRotationMetadata(ExternalSecretRotationMetadataT&& value) {
160 m_externalSecretRotationMetadataHasBeenSet = true;
161 m_externalSecretRotationMetadata.emplace_back(std::forward<ExternalSecretRotationMetadataT>(value));
162 return *this;
163 }
165
167
173 inline const Aws::String& GetExternalSecretRotationRoleArn() const { return m_externalSecretRotationRoleArn; }
174 inline bool ExternalSecretRotationRoleArnHasBeenSet() const { return m_externalSecretRotationRoleArnHasBeenSet; }
175 template <typename ExternalSecretRotationRoleArnT = Aws::String>
176 void SetExternalSecretRotationRoleArn(ExternalSecretRotationRoleArnT&& value) {
177 m_externalSecretRotationRoleArnHasBeenSet = true;
178 m_externalSecretRotationRoleArn = std::forward<ExternalSecretRotationRoleArnT>(value);
179 }
180 template <typename ExternalSecretRotationRoleArnT = Aws::String>
181 RotateSecretRequest& WithExternalSecretRotationRoleArn(ExternalSecretRotationRoleArnT&& value) {
182 SetExternalSecretRotationRoleArn(std::forward<ExternalSecretRotationRoleArnT>(value));
183 return *this;
184 }
186
188
210 inline bool GetRotateImmediately() const { return m_rotateImmediately; }
211 inline bool RotateImmediatelyHasBeenSet() const { return m_rotateImmediatelyHasBeenSet; }
212 inline void SetRotateImmediately(bool value) {
213 m_rotateImmediatelyHasBeenSet = true;
214 m_rotateImmediately = value;
215 }
218 return *this;
219 }
221 private:
222 Aws::String m_secretId;
223
224 Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};
225
226 Aws::String m_rotationLambdaARN;
227
228 RotationRulesType m_rotationRules;
229
230 Aws::Vector<ExternalSecretRotationMetadataItem> m_externalSecretRotationMetadata;
231
232 Aws::String m_externalSecretRotationRoleArn;
233
234 bool m_rotateImmediately{false};
235 bool m_secretIdHasBeenSet = false;
236 bool m_clientRequestTokenHasBeenSet = true;
237 bool m_rotationLambdaARNHasBeenSet = false;
238 bool m_rotationRulesHasBeenSet = false;
239 bool m_externalSecretRotationMetadataHasBeenSet = false;
240 bool m_externalSecretRotationRoleArnHasBeenSet = false;
241 bool m_rotateImmediatelyHasBeenSet = false;
242};
243
244} // namespace Model
245} // namespace SecretsManager
246} // namespace Aws
RotateSecretRequest & WithExternalSecretRotationRoleArn(ExternalSecretRotationRoleArnT &&value)
RotateSecretRequest & WithExternalSecretRotationMetadata(ExternalSecretRotationMetadataT &&value)
RotateSecretRequest & AddExternalSecretRotationMetadata(ExternalSecretRotationMetadataT &&value)
const RotationRulesType & GetRotationRules() const
void SetExternalSecretRotationRoleArn(ExternalSecretRotationRoleArnT &&value)
AWS_SECRETSMANAGER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
RotateSecretRequest & WithRotationLambdaARN(RotationLambdaARNT &&value)
virtual const char * GetServiceRequestName() const override
RotateSecretRequest & WithSecretId(SecretIdT &&value)
RotateSecretRequest & WithRotationRules(RotationRulesT &&value)
const Aws::String & GetExternalSecretRotationRoleArn() const
void SetRotationLambdaARN(RotationLambdaARNT &&value)
AWS_SECRETSMANAGER_API RotateSecretRequest()=default
RotateSecretRequest & WithClientRequestToken(ClientRequestTokenT &&value)
void SetClientRequestToken(ClientRequestTokenT &&value)
AWS_SECRETSMANAGER_API Aws::String SerializePayload() const override
const Aws::Vector< ExternalSecretRotationMetadataItem > & GetExternalSecretRotationMetadata() const
void SetExternalSecretRotationMetadata(ExternalSecretRotationMetadataT &&value)
RotateSecretRequest & WithRotateImmediately(bool value)
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector