Support key deletion protection.

This commit is contained in:
sdk-team
2021-06-02 02:33:09 +00:00
parent 216a31ec31
commit 3a2b4a3b0a
39 changed files with 1111 additions and 34 deletions

View File

@@ -129,8 +129,12 @@ set(kms_public_header_model
include/alibabacloud/kms/model/ReEncryptResult.h
include/alibabacloud/kms/model/RestoreSecretRequest.h
include/alibabacloud/kms/model/RestoreSecretResult.h
include/alibabacloud/kms/model/RotateSecretRequest.h
include/alibabacloud/kms/model/RotateSecretResult.h
include/alibabacloud/kms/model/ScheduleKeyDeletionRequest.h
include/alibabacloud/kms/model/ScheduleKeyDeletionResult.h
include/alibabacloud/kms/model/SetDeletionProtectionRequest.h
include/alibabacloud/kms/model/SetDeletionProtectionResult.h
include/alibabacloud/kms/model/TagResourceRequest.h
include/alibabacloud/kms/model/TagResourceResult.h
include/alibabacloud/kms/model/UntagResourceRequest.h
@@ -145,6 +149,8 @@ set(kms_public_header_model
include/alibabacloud/kms/model/UpdateRotationPolicyResult.h
include/alibabacloud/kms/model/UpdateSecretRequest.h
include/alibabacloud/kms/model/UpdateSecretResult.h
include/alibabacloud/kms/model/UpdateSecretRotationPolicyRequest.h
include/alibabacloud/kms/model/UpdateSecretRotationPolicyResult.h
include/alibabacloud/kms/model/UpdateSecretVersionStageRequest.h
include/alibabacloud/kms/model/UpdateSecretVersionStageResult.h
include/alibabacloud/kms/model/UploadCertificateRequest.h
@@ -260,8 +266,12 @@ set(kms_src
src/model/ReEncryptResult.cc
src/model/RestoreSecretRequest.cc
src/model/RestoreSecretResult.cc
src/model/RotateSecretRequest.cc
src/model/RotateSecretResult.cc
src/model/ScheduleKeyDeletionRequest.cc
src/model/ScheduleKeyDeletionResult.cc
src/model/SetDeletionProtectionRequest.cc
src/model/SetDeletionProtectionResult.cc
src/model/TagResourceRequest.cc
src/model/TagResourceResult.cc
src/model/UntagResourceRequest.cc
@@ -276,6 +286,8 @@ set(kms_src
src/model/UpdateRotationPolicyResult.cc
src/model/UpdateSecretRequest.cc
src/model/UpdateSecretResult.cc
src/model/UpdateSecretRotationPolicyRequest.cc
src/model/UpdateSecretRotationPolicyResult.cc
src/model/UpdateSecretVersionStageRequest.cc
src/model/UpdateSecretVersionStageResult.cc
src/model/UploadCertificateRequest.cc

View File

@@ -130,8 +130,12 @@
#include "model/ReEncryptResult.h"
#include "model/RestoreSecretRequest.h"
#include "model/RestoreSecretResult.h"
#include "model/RotateSecretRequest.h"
#include "model/RotateSecretResult.h"
#include "model/ScheduleKeyDeletionRequest.h"
#include "model/ScheduleKeyDeletionResult.h"
#include "model/SetDeletionProtectionRequest.h"
#include "model/SetDeletionProtectionResult.h"
#include "model/TagResourceRequest.h"
#include "model/TagResourceResult.h"
#include "model/UntagResourceRequest.h"
@@ -146,6 +150,8 @@
#include "model/UpdateRotationPolicyResult.h"
#include "model/UpdateSecretRequest.h"
#include "model/UpdateSecretResult.h"
#include "model/UpdateSecretRotationPolicyRequest.h"
#include "model/UpdateSecretRotationPolicyResult.h"
#include "model/UpdateSecretVersionStageRequest.h"
#include "model/UpdateSecretVersionStageResult.h"
#include "model/UploadCertificateRequest.h"
@@ -321,9 +327,15 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::RestoreSecretResult> RestoreSecretOutcome;
typedef std::future<RestoreSecretOutcome> RestoreSecretOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::RestoreSecretRequest&, const RestoreSecretOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RestoreSecretAsyncHandler;
typedef Outcome<Error, Model::RotateSecretResult> RotateSecretOutcome;
typedef std::future<RotateSecretOutcome> RotateSecretOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::RotateSecretRequest&, const RotateSecretOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RotateSecretAsyncHandler;
typedef Outcome<Error, Model::ScheduleKeyDeletionResult> ScheduleKeyDeletionOutcome;
typedef std::future<ScheduleKeyDeletionOutcome> ScheduleKeyDeletionOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::ScheduleKeyDeletionRequest&, const ScheduleKeyDeletionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ScheduleKeyDeletionAsyncHandler;
typedef Outcome<Error, Model::SetDeletionProtectionResult> SetDeletionProtectionOutcome;
typedef std::future<SetDeletionProtectionOutcome> SetDeletionProtectionOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::SetDeletionProtectionRequest&, const SetDeletionProtectionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetDeletionProtectionAsyncHandler;
typedef Outcome<Error, Model::TagResourceResult> TagResourceOutcome;
typedef std::future<TagResourceOutcome> TagResourceOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::TagResourceRequest&, const TagResourceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TagResourceAsyncHandler;
@@ -345,6 +357,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::UpdateSecretResult> UpdateSecretOutcome;
typedef std::future<UpdateSecretOutcome> UpdateSecretOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::UpdateSecretRequest&, const UpdateSecretOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateSecretAsyncHandler;
typedef Outcome<Error, Model::UpdateSecretRotationPolicyResult> UpdateSecretRotationPolicyOutcome;
typedef std::future<UpdateSecretRotationPolicyOutcome> UpdateSecretRotationPolicyOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::UpdateSecretRotationPolicyRequest&, const UpdateSecretRotationPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateSecretRotationPolicyAsyncHandler;
typedef Outcome<Error, Model::UpdateSecretVersionStageResult> UpdateSecretVersionStageOutcome;
typedef std::future<UpdateSecretVersionStageOutcome> UpdateSecretVersionStageOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::UpdateSecretVersionStageRequest&, const UpdateSecretVersionStageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateSecretVersionStageAsyncHandler;
@@ -518,9 +533,15 @@ namespace AlibabaCloud
RestoreSecretOutcome restoreSecret(const Model::RestoreSecretRequest &request)const;
void restoreSecretAsync(const Model::RestoreSecretRequest& request, const RestoreSecretAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RestoreSecretOutcomeCallable restoreSecretCallable(const Model::RestoreSecretRequest& request) const;
RotateSecretOutcome rotateSecret(const Model::RotateSecretRequest &request)const;
void rotateSecretAsync(const Model::RotateSecretRequest& request, const RotateSecretAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
RotateSecretOutcomeCallable rotateSecretCallable(const Model::RotateSecretRequest& request) const;
ScheduleKeyDeletionOutcome scheduleKeyDeletion(const Model::ScheduleKeyDeletionRequest &request)const;
void scheduleKeyDeletionAsync(const Model::ScheduleKeyDeletionRequest& request, const ScheduleKeyDeletionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ScheduleKeyDeletionOutcomeCallable scheduleKeyDeletionCallable(const Model::ScheduleKeyDeletionRequest& request) const;
SetDeletionProtectionOutcome setDeletionProtection(const Model::SetDeletionProtectionRequest &request)const;
void setDeletionProtectionAsync(const Model::SetDeletionProtectionRequest& request, const SetDeletionProtectionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SetDeletionProtectionOutcomeCallable setDeletionProtectionCallable(const Model::SetDeletionProtectionRequest& request) const;
TagResourceOutcome tagResource(const Model::TagResourceRequest &request)const;
void tagResourceAsync(const Model::TagResourceRequest& request, const TagResourceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
TagResourceOutcomeCallable tagResourceCallable(const Model::TagResourceRequest& request) const;
@@ -542,6 +563,9 @@ namespace AlibabaCloud
UpdateSecretOutcome updateSecret(const Model::UpdateSecretRequest &request)const;
void updateSecretAsync(const Model::UpdateSecretRequest& request, const UpdateSecretAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateSecretOutcomeCallable updateSecretCallable(const Model::UpdateSecretRequest& request) const;
UpdateSecretRotationPolicyOutcome updateSecretRotationPolicy(const Model::UpdateSecretRotationPolicyRequest &request)const;
void updateSecretRotationPolicyAsync(const Model::UpdateSecretRotationPolicyRequest& request, const UpdateSecretRotationPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateSecretRotationPolicyOutcomeCallable updateSecretRotationPolicyCallable(const Model::UpdateSecretRotationPolicyRequest& request) const;
UpdateSecretVersionStageOutcome updateSecretVersionStage(const Model::UpdateSecretVersionStageRequest &request)const;
void updateSecretVersionStageAsync(const Model::UpdateSecretVersionStageRequest& request, const UpdateSecretVersionStageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UpdateSecretVersionStageOutcomeCallable updateSecretVersionStageCallable(const Model::UpdateSecretVersionStageRequest& request) const;

View File

@@ -37,6 +37,10 @@ namespace AlibabaCloud
std::string getProtectionLevel()const;
void setProtectionLevel(const std::string& protectionLevel);
bool getExportablePrivateKey()const;
void setExportablePrivateKey(bool exportablePrivateKey);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getSubject()const;
void setSubject(const std::string& subject);
std::map<std::string, std::string> getSubjectAlternativeNames()const;
@@ -46,6 +50,8 @@ namespace AlibabaCloud
private:
std::string protectionLevel_;
bool exportablePrivateKey_;
std::string clientToken_;
std::string subject_;
std::map<std::string, std::string> subjectAlternativeNames_;
std::string keySpec_;

View File

@@ -35,29 +35,41 @@ namespace AlibabaCloud
CreateSecretRequest();
~CreateSecretRequest();
std::string getSecretType()const;
void setSecretType(const std::string& secretType);
std::string getVersionId()const;
void setVersionId(const std::string& versionId);
std::string getSecretData()const;
void setSecretData(const std::string& secretData);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getRotationInterval()const;
void setRotationInterval(const std::string& rotationInterval);
std::string getSecretName()const;
void setSecretName(const std::string& secretName);
bool getEnableAutomaticRotation()const;
void setEnableAutomaticRotation(bool enableAutomaticRotation);
std::string getEncryptionKeyId()const;
void setEncryptionKeyId(const std::string& encryptionKeyId);
std::string getSecretDataType()const;
void setSecretDataType(const std::string& secretDataType);
std::string getTags()const;
void setTags(const std::string& tags);
std::string getExtendedConfig()const;
void setExtendedConfig(const std::string& extendedConfig);
private:
std::string secretType_;
std::string versionId_;
std::string secretData_;
std::string description_;
std::string rotationInterval_;
std::string secretName_;
bool enableAutomaticRotation_;
std::string encryptionKeyId_;
std::string secretDataType_;
std::string tags_;
std::string extendedConfig_;
};
}

View File

@@ -39,14 +39,24 @@ namespace AlibabaCloud
~CreateSecretResult();
std::string getVersionId()const;
std::string getSecretName()const;
std::string getNextRotationDate()const;
std::string getSecretType()const;
std::string getRotationInterval()const;
std::string getExtendedConfig()const;
std::string getArn()const;
std::string getAutomaticRotation()const;
protected:
void parse(const std::string &payload);
private:
std::string versionId_;
std::string secretName_;
std::string nextRotationDate_;
std::string secretType_;
std::string rotationInterval_;
std::string extendedConfig_;
std::string arn_;
std::string automaticRotation_;
};
}

View File

@@ -54,6 +54,7 @@ namespace AlibabaCloud
std::string getArn()const;
std::string getNotBefore()const;
std::string getTags()const;
bool getExportablePrivateKey()const;
protected:
void parse(const std::string &payload);
@@ -75,6 +76,7 @@ namespace AlibabaCloud
std::string arn_;
std::string notBefore_;
std::string tags_;
bool exportablePrivateKey_;
};
}

View File

@@ -45,10 +45,12 @@ namespace AlibabaCloud
std::string keyId;
std::string primaryKeyVersion;
std::string creator;
std::string deletionProtection;
std::string deleteDate;
std::string automaticRotation;
std::string nextRotationDate;
std::string materialExpireTime;
std::string deletionProtectionDescription;
std::string arn;
std::string keyState;
};

View File

@@ -42,11 +42,17 @@ namespace AlibabaCloud
DescribeSecretResult();
explicit DescribeSecretResult(const std::string &payload);
~DescribeSecretResult();
std::string getSecretName()const;
std::string getDescription()const;
std::string getLastRotationDate()const;
std::string getRotationInterval()const;
std::string getSecretType()const;
std::string getCreateTime()const;
std::string getAutomaticRotation()const;
std::string getSecretName()const;
std::string getNextRotationDate()const;
std::string getUpdateTime()const;
std::string getPlannedDeleteTime()const;
std::string getExtendedConfig()const;
std::string getArn()const;
std::vector<Tag> getTags()const;
std::string getEncryptionKeyId()const;
@@ -54,11 +60,17 @@ namespace AlibabaCloud
protected:
void parse(const std::string &payload);
private:
std::string secretName_;
std::string description_;
std::string lastRotationDate_;
std::string rotationInterval_;
std::string secretType_;
std::string createTime_;
std::string automaticRotation_;
std::string secretName_;
std::string nextRotationDate_;
std::string updateTime_;
std::string plannedDeleteTime_;
std::string extendedConfig_;
std::string arn_;
std::vector<Tag> tags_;
std::string encryptionKeyId_;

View File

@@ -41,11 +41,14 @@ namespace AlibabaCloud
void setVersionStage(const std::string& versionStage);
std::string getSecretName()const;
void setSecretName(const std::string& secretName);
bool getFetchExtendedConfig()const;
void setFetchExtendedConfig(bool fetchExtendedConfig);
private:
std::string versionId_;
std::string versionStage_;
std::string secretName_;
bool fetchExtendedConfig_;
};
}

View File

@@ -39,20 +39,32 @@ namespace AlibabaCloud
~GetSecretValueResult();
std::string getSecretName()const;
std::string getVersionId()const;
std::string getNextRotationDate()const;
std::string getRotationInterval()const;
std::string getLastRotationDate()const;
std::string getSecretType()const;
std::string getCreateTime()const;
std::string getSecretDataType()const;
std::string getExtendedConfig()const;
std::string getSecretData()const;
std::vector<std::string> getVersionStages()const;
std::string getAutomaticRotation()const;
protected:
void parse(const std::string &payload);
private:
std::string secretName_;
std::string versionId_;
std::string nextRotationDate_;
std::string rotationInterval_;
std::string lastRotationDate_;
std::string secretType_;
std::string createTime_;
std::string secretDataType_;
std::string extendedConfig_;
std::string secretData_;
std::vector<std::string> versionStages_;
std::string automaticRotation_;
};
}

View File

@@ -34,14 +34,11 @@ namespace AlibabaCloud
public:
struct CertificateSummary
{
std::string status;
std::string protectionLevel;
std::string issuer;
std::string certificateId;
std::string keySpec;
std::string notBefore;
std::string notAfter;
std::string subject;
};
struct Certificate
{
std::string certificateId;
};
@@ -51,6 +48,7 @@ namespace AlibabaCloud
int getPageSize()const;
int getPageNumber()const;
std::vector<CertificateSummary> getCertificateSummaryList()const;
std::vector<Certificate> getCertificates()const;
int getTotalSize()const;
protected:
@@ -59,6 +57,7 @@ namespace AlibabaCloud
int pageSize_;
int pageNumber_;
std::vector<CertificateSummary> certificateSummaryList_;
std::vector<Certificate> certificates_;
int totalSize_;
};

View File

@@ -40,6 +40,7 @@ namespace AlibabaCloud
std::string tagValue;
};
std::string secretName;
std::string secretType;
std::string createTime;
std::string updateTime;
std::string plannedDeleteTime;

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_KMS_MODEL_ROTATESECRETREQUEST_H_
#define ALIBABACLOUD_KMS_MODEL_ROTATESECRETREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/kms/KmsExport.h>
namespace AlibabaCloud
{
namespace Kms
{
namespace Model
{
class ALIBABACLOUD_KMS_EXPORT RotateSecretRequest : public RpcServiceRequest
{
public:
RotateSecretRequest();
~RotateSecretRequest();
std::string getVersionId()const;
void setVersionId(const std::string& versionId);
std::string getSecretName()const;
void setSecretName(const std::string& secretName);
private:
std::string versionId_;
std::string secretName_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_ROTATESECRETREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_KMS_MODEL_ROTATESECRETRESULT_H_
#define ALIBABACLOUD_KMS_MODEL_ROTATESECRETRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/kms/KmsExport.h>
namespace AlibabaCloud
{
namespace Kms
{
namespace Model
{
class ALIBABACLOUD_KMS_EXPORT RotateSecretResult : public ServiceResult
{
public:
RotateSecretResult();
explicit RotateSecretResult(const std::string &payload);
~RotateSecretResult();
std::string getVersionId()const;
std::string getSecretName()const;
std::string getArn()const;
protected:
void parse(const std::string &payload);
private:
std::string versionId_;
std::string secretName_;
std::string arn_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_ROTATESECRETRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_KMS_MODEL_SETDELETIONPROTECTIONREQUEST_H_
#define ALIBABACLOUD_KMS_MODEL_SETDELETIONPROTECTIONREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/kms/KmsExport.h>
namespace AlibabaCloud
{
namespace Kms
{
namespace Model
{
class ALIBABACLOUD_KMS_EXPORT SetDeletionProtectionRequest : public RpcServiceRequest
{
public:
SetDeletionProtectionRequest();
~SetDeletionProtectionRequest();
bool getEnableDeletionProtection()const;
void setEnableDeletionProtection(bool enableDeletionProtection);
std::string getProtectedResourceArn()const;
void setProtectedResourceArn(const std::string& protectedResourceArn);
std::string getDeletionProtectionDescription()const;
void setDeletionProtectionDescription(const std::string& deletionProtectionDescription);
private:
bool enableDeletionProtection_;
std::string protectedResourceArn_;
std::string deletionProtectionDescription_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_SETDELETIONPROTECTIONREQUEST_H_

View File

@@ -0,0 +1,49 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_KMS_MODEL_SETDELETIONPROTECTIONRESULT_H_
#define ALIBABACLOUD_KMS_MODEL_SETDELETIONPROTECTIONRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/kms/KmsExport.h>
namespace AlibabaCloud
{
namespace Kms
{
namespace Model
{
class ALIBABACLOUD_KMS_EXPORT SetDeletionProtectionResult : public ServiceResult
{
public:
SetDeletionProtectionResult();
explicit SetDeletionProtectionResult(const std::string &payload);
~SetDeletionProtectionResult();
protected:
void parse(const std::string &payload);
private:
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_SETDELETIONPROTECTIONRESULT_H_

View File

@@ -39,10 +39,13 @@ namespace AlibabaCloud
void setDescription(const std::string& description);
std::string getSecretName()const;
void setSecretName(const std::string& secretName);
std::string getExtendedConfigCustomData()const;
void setExtendedConfigCustomData(const std::string& extendedConfigCustomData);
private:
std::string description_;
std::string secretName_;
std::string extendedConfigCustomData_;
};
}

View File

@@ -0,0 +1,54 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_KMS_MODEL_UPDATESECRETROTATIONPOLICYREQUEST_H_
#define ALIBABACLOUD_KMS_MODEL_UPDATESECRETROTATIONPOLICYREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/kms/KmsExport.h>
namespace AlibabaCloud
{
namespace Kms
{
namespace Model
{
class ALIBABACLOUD_KMS_EXPORT UpdateSecretRotationPolicyRequest : public RpcServiceRequest
{
public:
UpdateSecretRotationPolicyRequest();
~UpdateSecretRotationPolicyRequest();
std::string getRotationInterval()const;
void setRotationInterval(const std::string& rotationInterval);
std::string getSecretName()const;
void setSecretName(const std::string& secretName);
bool getEnableAutomaticRotation()const;
void setEnableAutomaticRotation(bool enableAutomaticRotation);
private:
std::string rotationInterval_;
std::string secretName_;
bool enableAutomaticRotation_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_UPDATESECRETROTATIONPOLICYREQUEST_H_

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_KMS_MODEL_UPDATESECRETROTATIONPOLICYRESULT_H_
#define ALIBABACLOUD_KMS_MODEL_UPDATESECRETROTATIONPOLICYRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/kms/KmsExport.h>
namespace AlibabaCloud
{
namespace Kms
{
namespace Model
{
class ALIBABACLOUD_KMS_EXPORT UpdateSecretRotationPolicyResult : public ServiceResult
{
public:
UpdateSecretRotationPolicyResult();
explicit UpdateSecretRotationPolicyResult(const std::string &payload);
~UpdateSecretRotationPolicyResult();
std::string getSecretName()const;
protected:
void parse(const std::string &payload);
private:
std::string secretName_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_UPDATESECRETROTATIONPOLICYRESULT_H_

View File

@@ -31,21 +31,21 @@ KmsClient::KmsClient(const Credentials &credentials, const ClientConfiguration &
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms-service");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms");
}
KmsClient::KmsClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms-service");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms");
}
KmsClient::KmsClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms-service");
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "kms");
}
KmsClient::~KmsClient()
@@ -1995,6 +1995,42 @@ KmsClient::RestoreSecretOutcomeCallable KmsClient::restoreSecretCallable(const R
return task->get_future();
}
KmsClient::RotateSecretOutcome KmsClient::rotateSecret(const RotateSecretRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return RotateSecretOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return RotateSecretOutcome(RotateSecretResult(outcome.result()));
else
return RotateSecretOutcome(outcome.error());
}
void KmsClient::rotateSecretAsync(const RotateSecretRequest& request, const RotateSecretAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, rotateSecret(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::RotateSecretOutcomeCallable KmsClient::rotateSecretCallable(const RotateSecretRequest &request) const
{
auto task = std::make_shared<std::packaged_task<RotateSecretOutcome()>>(
[this, request]()
{
return this->rotateSecret(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::ScheduleKeyDeletionOutcome KmsClient::scheduleKeyDeletion(const ScheduleKeyDeletionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2031,6 +2067,42 @@ KmsClient::ScheduleKeyDeletionOutcomeCallable KmsClient::scheduleKeyDeletionCall
return task->get_future();
}
KmsClient::SetDeletionProtectionOutcome KmsClient::setDeletionProtection(const SetDeletionProtectionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SetDeletionProtectionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SetDeletionProtectionOutcome(SetDeletionProtectionResult(outcome.result()));
else
return SetDeletionProtectionOutcome(outcome.error());
}
void KmsClient::setDeletionProtectionAsync(const SetDeletionProtectionRequest& request, const SetDeletionProtectionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, setDeletionProtection(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::SetDeletionProtectionOutcomeCallable KmsClient::setDeletionProtectionCallable(const SetDeletionProtectionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SetDeletionProtectionOutcome()>>(
[this, request]()
{
return this->setDeletionProtection(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::TagResourceOutcome KmsClient::tagResource(const TagResourceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -2283,6 +2355,42 @@ KmsClient::UpdateSecretOutcomeCallable KmsClient::updateSecretCallable(const Upd
return task->get_future();
}
KmsClient::UpdateSecretRotationPolicyOutcome KmsClient::updateSecretRotationPolicy(const UpdateSecretRotationPolicyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateSecretRotationPolicyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateSecretRotationPolicyOutcome(UpdateSecretRotationPolicyResult(outcome.result()));
else
return UpdateSecretRotationPolicyOutcome(outcome.error());
}
void KmsClient::updateSecretRotationPolicyAsync(const UpdateSecretRotationPolicyRequest& request, const UpdateSecretRotationPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateSecretRotationPolicy(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::UpdateSecretRotationPolicyOutcomeCallable KmsClient::updateSecretRotationPolicyCallable(const UpdateSecretRotationPolicyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateSecretRotationPolicyOutcome()>>(
[this, request]()
{
return this->updateSecretRotationPolicy(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::UpdateSecretVersionStageOutcome KmsClient::updateSecretVersionStage(const UpdateSecretVersionStageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -38,6 +38,28 @@ void CreateCertificateRequest::setProtectionLevel(const std::string& protectionL
setParameter("ProtectionLevel", protectionLevel);
}
bool CreateCertificateRequest::getExportablePrivateKey()const
{
return exportablePrivateKey_;
}
void CreateCertificateRequest::setExportablePrivateKey(bool exportablePrivateKey)
{
exportablePrivateKey_ = exportablePrivateKey;
setParameter("ExportablePrivateKey", exportablePrivateKey ? "true" : "false");
}
std::string CreateCertificateRequest::getClientToken()const
{
return clientToken_;
}
void CreateCertificateRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string CreateCertificateRequest::getSubject()const
{
return subject_;

View File

@@ -27,6 +27,17 @@ CreateSecretRequest::CreateSecretRequest() :
CreateSecretRequest::~CreateSecretRequest()
{}
std::string CreateSecretRequest::getSecretType()const
{
return secretType_;
}
void CreateSecretRequest::setSecretType(const std::string& secretType)
{
secretType_ = secretType;
setParameter("SecretType", secretType);
}
std::string CreateSecretRequest::getVersionId()const
{
return versionId_;
@@ -60,6 +71,17 @@ void CreateSecretRequest::setDescription(const std::string& description)
setParameter("Description", description);
}
std::string CreateSecretRequest::getRotationInterval()const
{
return rotationInterval_;
}
void CreateSecretRequest::setRotationInterval(const std::string& rotationInterval)
{
rotationInterval_ = rotationInterval;
setParameter("RotationInterval", rotationInterval);
}
std::string CreateSecretRequest::getSecretName()const
{
return secretName_;
@@ -71,6 +93,17 @@ void CreateSecretRequest::setSecretName(const std::string& secretName)
setParameter("SecretName", secretName);
}
bool CreateSecretRequest::getEnableAutomaticRotation()const
{
return enableAutomaticRotation_;
}
void CreateSecretRequest::setEnableAutomaticRotation(bool enableAutomaticRotation)
{
enableAutomaticRotation_ = enableAutomaticRotation;
setParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
}
std::string CreateSecretRequest::getEncryptionKeyId()const
{
return encryptionKeyId_;
@@ -104,3 +137,14 @@ void CreateSecretRequest::setTags(const std::string& tags)
setParameter("Tags", tags);
}
std::string CreateSecretRequest::getExtendedConfig()const
{
return extendedConfig_;
}
void CreateSecretRequest::setExtendedConfig(const std::string& extendedConfig)
{
extendedConfig_ = extendedConfig;
setParameter("ExtendedConfig", extendedConfig);
}

View File

@@ -45,6 +45,16 @@ void CreateSecretResult::parse(const std::string &payload)
versionId_ = value["VersionId"].asString();
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
if(!value["SecretType"].isNull())
secretType_ = value["SecretType"].asString();
if(!value["AutomaticRotation"].isNull())
automaticRotation_ = value["AutomaticRotation"].asString();
if(!value["RotationInterval"].isNull())
rotationInterval_ = value["RotationInterval"].asString();
if(!value["NextRotationDate"].isNull())
nextRotationDate_ = value["NextRotationDate"].asString();
if(!value["ExtendedConfig"].isNull())
extendedConfig_ = value["ExtendedConfig"].asString();
}
@@ -58,8 +68,33 @@ std::string CreateSecretResult::getSecretName()const
return secretName_;
}
std::string CreateSecretResult::getNextRotationDate()const
{
return nextRotationDate_;
}
std::string CreateSecretResult::getSecretType()const
{
return secretType_;
}
std::string CreateSecretResult::getRotationInterval()const
{
return rotationInterval_;
}
std::string CreateSecretResult::getExtendedConfig()const
{
return extendedConfig_;
}
std::string CreateSecretResult::getArn()const
{
return arn_;
}
std::string CreateSecretResult::getAutomaticRotation()const
{
return automaticRotation_;
}

View File

@@ -48,8 +48,6 @@ void DescribeCertificateResult::parse(const std::string &payload)
arn_ = value["Arn"].asString();
if(!value["KeySpec"].isNull())
keySpec_ = value["KeySpec"].asString();
if(!value["ProtectionLevel"].isNull())
protectionLevel_ = value["ProtectionLevel"].asString();
if(!value["Status"].isNull())
status_ = value["Status"].asString();
if(!value["CreatedAt"].isNull())
@@ -74,6 +72,10 @@ void DescribeCertificateResult::parse(const std::string &payload)
subjectKeyIdentifier_ = value["SubjectKeyIdentifier"].asString();
if(!value["Tags"].isNull())
tags_ = value["Tags"].asString();
if(!value["ExportablePrivateKey"].isNull())
exportablePrivateKey_ = value["ExportablePrivateKey"].asString() == "true";
if(!value["ProtectionLevel"].isNull())
protectionLevel_ = value["ProtectionLevel"].asString();
}
@@ -162,3 +164,8 @@ std::string DescribeCertificateResult::getTags()const
return tags_;
}
bool DescribeCertificateResult::getExportablePrivateKey()const
{
return exportablePrivateKey_;
}

View File

@@ -74,6 +74,10 @@ void DescribeKeyResult::parse(const std::string &payload)
keyMetadata_.nextRotationDate = keyMetadataNode["NextRotationDate"].asString();
if(!keyMetadataNode["KeySpec"].isNull())
keyMetadata_.keySpec = keyMetadataNode["KeySpec"].asString();
if(!keyMetadataNode["DeletionProtection"].isNull())
keyMetadata_.deletionProtection = keyMetadataNode["DeletionProtection"].asString();
if(!keyMetadataNode["DeletionProtectionDescription"].isNull())
keyMetadata_.deletionProtectionDescription = keyMetadataNode["DeletionProtectionDescription"].asString();
}

View File

@@ -63,24 +63,61 @@ void DescribeSecretResult::parse(const std::string &payload)
updateTime_ = value["UpdateTime"].asString();
if(!value["PlannedDeleteTime"].isNull())
plannedDeleteTime_ = value["PlannedDeleteTime"].asString();
if(!value["AutomaticRotation"].isNull())
automaticRotation_ = value["AutomaticRotation"].asString();
if(!value["LastRotationDate"].isNull())
lastRotationDate_ = value["LastRotationDate"].asString();
if(!value["RotationInterval"].isNull())
rotationInterval_ = value["RotationInterval"].asString();
if(!value["NextRotationDate"].isNull())
nextRotationDate_ = value["NextRotationDate"].asString();
if(!value["ExtendedConfig"].isNull())
extendedConfig_ = value["ExtendedConfig"].asString();
if(!value["SecretType"].isNull())
secretType_ = value["SecretType"].asString();
}
std::string DescribeSecretResult::getSecretName()const
{
return secretName_;
}
std::string DescribeSecretResult::getDescription()const
{
return description_;
}
std::string DescribeSecretResult::getLastRotationDate()const
{
return lastRotationDate_;
}
std::string DescribeSecretResult::getRotationInterval()const
{
return rotationInterval_;
}
std::string DescribeSecretResult::getSecretType()const
{
return secretType_;
}
std::string DescribeSecretResult::getCreateTime()const
{
return createTime_;
}
std::string DescribeSecretResult::getAutomaticRotation()const
{
return automaticRotation_;
}
std::string DescribeSecretResult::getSecretName()const
{
return secretName_;
}
std::string DescribeSecretResult::getNextRotationDate()const
{
return nextRotationDate_;
}
std::string DescribeSecretResult::getUpdateTime()const
{
return updateTime_;
@@ -91,6 +128,11 @@ std::string DescribeSecretResult::getPlannedDeleteTime()const
return plannedDeleteTime_;
}
std::string DescribeSecretResult::getExtendedConfig()const
{
return extendedConfig_;
}
std::string DescribeSecretResult::getArn()const
{
return arn_;

View File

@@ -60,3 +60,14 @@ void GetSecretValueRequest::setSecretName(const std::string& secretName)
setParameter("SecretName", secretName);
}
bool GetSecretValueRequest::getFetchExtendedConfig()const
{
return fetchExtendedConfig_;
}
void GetSecretValueRequest::setFetchExtendedConfig(bool fetchExtendedConfig)
{
fetchExtendedConfig_ = fetchExtendedConfig;
setParameter("FetchExtendedConfig", fetchExtendedConfig ? "true" : "false");
}

View File

@@ -52,6 +52,18 @@ void GetSecretValueResult::parse(const std::string &payload)
secretData_ = value["SecretData"].asString();
if(!value["SecretDataType"].isNull())
secretDataType_ = value["SecretDataType"].asString();
if(!value["AutomaticRotation"].isNull())
automaticRotation_ = value["AutomaticRotation"].asString();
if(!value["RotationInterval"].isNull())
rotationInterval_ = value["RotationInterval"].asString();
if(!value["NextRotationDate"].isNull())
nextRotationDate_ = value["NextRotationDate"].asString();
if(!value["ExtendedConfig"].isNull())
extendedConfig_ = value["ExtendedConfig"].asString();
if(!value["LastRotationDate"].isNull())
lastRotationDate_ = value["LastRotationDate"].asString();
if(!value["SecretType"].isNull())
secretType_ = value["SecretType"].asString();
}
@@ -65,6 +77,26 @@ std::string GetSecretValueResult::getVersionId()const
return versionId_;
}
std::string GetSecretValueResult::getNextRotationDate()const
{
return nextRotationDate_;
}
std::string GetSecretValueResult::getRotationInterval()const
{
return rotationInterval_;
}
std::string GetSecretValueResult::getLastRotationDate()const
{
return lastRotationDate_;
}
std::string GetSecretValueResult::getSecretType()const
{
return secretType_;
}
std::string GetSecretValueResult::getCreateTime()const
{
return createTime_;
@@ -75,6 +107,11 @@ std::string GetSecretValueResult::getSecretDataType()const
return secretDataType_;
}
std::string GetSecretValueResult::getExtendedConfig()const
{
return extendedConfig_;
}
std::string GetSecretValueResult::getSecretData()const
{
return secretData_;
@@ -85,3 +122,8 @@ std::vector<std::string> GetSecretValueResult::getVersionStages()const
return versionStages_;
}
std::string GetSecretValueResult::getAutomaticRotation()const
{
return automaticRotation_;
}

View File

@@ -45,22 +45,16 @@ void ListCertificatesResult::parse(const std::string &payload)
CertificateSummary certificateSummaryListObject;
if(!valueCertificateSummaryListCertificateSummary["CertificateId"].isNull())
certificateSummaryListObject.certificateId = valueCertificateSummaryListCertificateSummary["CertificateId"].asString();
if(!valueCertificateSummaryListCertificateSummary["Subject"].isNull())
certificateSummaryListObject.subject = valueCertificateSummaryListCertificateSummary["Subject"].asString();
if(!valueCertificateSummaryListCertificateSummary["Issuer"].isNull())
certificateSummaryListObject.issuer = valueCertificateSummaryListCertificateSummary["Issuer"].asString();
if(!valueCertificateSummaryListCertificateSummary["KeySpec"].isNull())
certificateSummaryListObject.keySpec = valueCertificateSummaryListCertificateSummary["KeySpec"].asString();
if(!valueCertificateSummaryListCertificateSummary["ProtectionLevel"].isNull())
certificateSummaryListObject.protectionLevel = valueCertificateSummaryListCertificateSummary["ProtectionLevel"].asString();
if(!valueCertificateSummaryListCertificateSummary["NotBefore"].isNull())
certificateSummaryListObject.notBefore = valueCertificateSummaryListCertificateSummary["NotBefore"].asString();
if(!valueCertificateSummaryListCertificateSummary["NotAfter"].isNull())
certificateSummaryListObject.notAfter = valueCertificateSummaryListCertificateSummary["NotAfter"].asString();
if(!valueCertificateSummaryListCertificateSummary["Status"].isNull())
certificateSummaryListObject.status = valueCertificateSummaryListCertificateSummary["Status"].asString();
certificateSummaryList_.push_back(certificateSummaryListObject);
}
auto allCertificatesNode = value["Certificates"]["Certificate"];
for (auto valueCertificatesCertificate : allCertificatesNode)
{
Certificate certificatesObject;
if(!valueCertificatesCertificate["CertificateId"].isNull())
certificatesObject.certificateId = valueCertificatesCertificate["CertificateId"].asString();
certificates_.push_back(certificatesObject);
}
if(!value["TotalSize"].isNull())
totalSize_ = std::stoi(value["TotalSize"].asString());
if(!value["PageNumber"].isNull())
@@ -85,6 +79,11 @@ std::vector<ListCertificatesResult::CertificateSummary> ListCertificatesResult::
return certificateSummaryList_;
}
std::vector<ListCertificatesResult::Certificate> ListCertificatesResult::getCertificates()const
{
return certificates_;
}
int ListCertificatesResult::getTotalSize()const
{
return totalSize_;

View File

@@ -51,6 +51,8 @@ void ListSecretsResult::parse(const std::string &payload)
secretListObject.secretName = valueSecretListSecret["SecretName"].asString();
if(!valueSecretListSecret["UpdateTime"].isNull())
secretListObject.updateTime = valueSecretListSecret["UpdateTime"].asString();
if(!valueSecretListSecret["SecretType"].isNull())
secretListObject.secretType = valueSecretListSecret["SecretType"].asString();
auto allTagsNode = valueSecretListSecret["Tags"]["Tag"];
for (auto valueSecretListSecretTagsTag : allTagsNode)
{

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/RotateSecretRequest.h>
using AlibabaCloud::Kms::Model::RotateSecretRequest;
RotateSecretRequest::RotateSecretRequest() :
RpcServiceRequest("kms", "2016-01-20", "RotateSecret")
{
setMethod(HttpRequest::Method::Post);
}
RotateSecretRequest::~RotateSecretRequest()
{}
std::string RotateSecretRequest::getVersionId()const
{
return versionId_;
}
void RotateSecretRequest::setVersionId(const std::string& versionId)
{
versionId_ = versionId;
setParameter("VersionId", versionId);
}
std::string RotateSecretRequest::getSecretName()const
{
return secretName_;
}
void RotateSecretRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}

View File

@@ -0,0 +1,65 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/RotateSecretResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
RotateSecretResult::RotateSecretResult() :
ServiceResult()
{}
RotateSecretResult::RotateSecretResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
RotateSecretResult::~RotateSecretResult()
{}
void RotateSecretResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Arn"].isNull())
arn_ = value["Arn"].asString();
if(!value["VersionId"].isNull())
versionId_ = value["VersionId"].asString();
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
}
std::string RotateSecretResult::getVersionId()const
{
return versionId_;
}
std::string RotateSecretResult::getSecretName()const
{
return secretName_;
}
std::string RotateSecretResult::getArn()const
{
return arn_;
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/SetDeletionProtectionRequest.h>
using AlibabaCloud::Kms::Model::SetDeletionProtectionRequest;
SetDeletionProtectionRequest::SetDeletionProtectionRequest() :
RpcServiceRequest("kms", "2016-01-20", "SetDeletionProtection")
{
setMethod(HttpRequest::Method::Post);
}
SetDeletionProtectionRequest::~SetDeletionProtectionRequest()
{}
bool SetDeletionProtectionRequest::getEnableDeletionProtection()const
{
return enableDeletionProtection_;
}
void SetDeletionProtectionRequest::setEnableDeletionProtection(bool enableDeletionProtection)
{
enableDeletionProtection_ = enableDeletionProtection;
setParameter("EnableDeletionProtection", enableDeletionProtection ? "true" : "false");
}
std::string SetDeletionProtectionRequest::getProtectedResourceArn()const
{
return protectedResourceArn_;
}
void SetDeletionProtectionRequest::setProtectedResourceArn(const std::string& protectedResourceArn)
{
protectedResourceArn_ = protectedResourceArn;
setParameter("ProtectedResourceArn", protectedResourceArn);
}
std::string SetDeletionProtectionRequest::getDeletionProtectionDescription()const
{
return deletionProtectionDescription_;
}
void SetDeletionProtectionRequest::setDeletionProtectionDescription(const std::string& deletionProtectionDescription)
{
deletionProtectionDescription_ = deletionProtectionDescription;
setParameter("DeletionProtectionDescription", deletionProtectionDescription);
}

View File

@@ -0,0 +1,44 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/SetDeletionProtectionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
SetDeletionProtectionResult::SetDeletionProtectionResult() :
ServiceResult()
{}
SetDeletionProtectionResult::SetDeletionProtectionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SetDeletionProtectionResult::~SetDeletionProtectionResult()
{}
void SetDeletionProtectionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
}

View File

@@ -49,3 +49,14 @@ void UpdateSecretRequest::setSecretName(const std::string& secretName)
setParameter("SecretName", secretName);
}
std::string UpdateSecretRequest::getExtendedConfigCustomData()const
{
return extendedConfigCustomData_;
}
void UpdateSecretRequest::setExtendedConfigCustomData(const std::string& extendedConfigCustomData)
{
extendedConfigCustomData_ = extendedConfigCustomData;
setParameter("ExtendedConfigCustomData", extendedConfigCustomData);
}

View File

@@ -0,0 +1,62 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/UpdateSecretRotationPolicyRequest.h>
using AlibabaCloud::Kms::Model::UpdateSecretRotationPolicyRequest;
UpdateSecretRotationPolicyRequest::UpdateSecretRotationPolicyRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateSecretRotationPolicy")
{
setMethod(HttpRequest::Method::Post);
}
UpdateSecretRotationPolicyRequest::~UpdateSecretRotationPolicyRequest()
{}
std::string UpdateSecretRotationPolicyRequest::getRotationInterval()const
{
return rotationInterval_;
}
void UpdateSecretRotationPolicyRequest::setRotationInterval(const std::string& rotationInterval)
{
rotationInterval_ = rotationInterval;
setParameter("RotationInterval", rotationInterval);
}
std::string UpdateSecretRotationPolicyRequest::getSecretName()const
{
return secretName_;
}
void UpdateSecretRotationPolicyRequest::setSecretName(const std::string& secretName)
{
secretName_ = secretName;
setParameter("SecretName", secretName);
}
bool UpdateSecretRotationPolicyRequest::getEnableAutomaticRotation()const
{
return enableAutomaticRotation_;
}
void UpdateSecretRotationPolicyRequest::setEnableAutomaticRotation(bool enableAutomaticRotation)
{
enableAutomaticRotation_ = enableAutomaticRotation;
setParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/kms/model/UpdateSecretRotationPolicyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
UpdateSecretRotationPolicyResult::UpdateSecretRotationPolicyResult() :
ServiceResult()
{}
UpdateSecretRotationPolicyResult::UpdateSecretRotationPolicyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateSecretRotationPolicyResult::~UpdateSecretRotationPolicyResult()
{}
void UpdateSecretRotationPolicyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["SecretName"].isNull())
secretName_ = value["SecretName"].asString();
}
std::string UpdateSecretRotationPolicyResult::getSecretName()const
{
return secretName_;
}