Generated 2016-01-20 for Kms.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2019-10-08 Version 1.36.144
|
||||
- Generated 2016-01-20 for `Kms`.
|
||||
|
||||
2019-09-26 Version 1.36.143
|
||||
- Supported RingConfig for BindAxb,BindAxn,BindAxg,BindAxnExtension.
|
||||
- Add QuerySubsId.
|
||||
|
||||
@@ -35,6 +35,8 @@ set(kms_public_header_model
|
||||
include/alibabacloud/kms/model/DeleteKeyMaterialResult.h
|
||||
include/alibabacloud/kms/model/DescribeKeyRequest.h
|
||||
include/alibabacloud/kms/model/DescribeKeyResult.h
|
||||
include/alibabacloud/kms/model/DescribeKeyVersionRequest.h
|
||||
include/alibabacloud/kms/model/DescribeKeyVersionResult.h
|
||||
include/alibabacloud/kms/model/DescribeRegionsRequest.h
|
||||
include/alibabacloud/kms/model/DescribeRegionsResult.h
|
||||
include/alibabacloud/kms/model/DescribeServiceRequest.h
|
||||
@@ -47,6 +49,8 @@ set(kms_public_header_model
|
||||
include/alibabacloud/kms/model/EncryptResult.h
|
||||
include/alibabacloud/kms/model/GenerateDataKeyRequest.h
|
||||
include/alibabacloud/kms/model/GenerateDataKeyResult.h
|
||||
include/alibabacloud/kms/model/GenerateDataKeyWithoutPlaintextRequest.h
|
||||
include/alibabacloud/kms/model/GenerateDataKeyWithoutPlaintextResult.h
|
||||
include/alibabacloud/kms/model/GetParametersForImportRequest.h
|
||||
include/alibabacloud/kms/model/GetParametersForImportResult.h
|
||||
include/alibabacloud/kms/model/ImportKeyMaterialRequest.h
|
||||
@@ -55,6 +59,8 @@ set(kms_public_header_model
|
||||
include/alibabacloud/kms/model/ListAliasesResult.h
|
||||
include/alibabacloud/kms/model/ListAliasesByKeyIdRequest.h
|
||||
include/alibabacloud/kms/model/ListAliasesByKeyIdResult.h
|
||||
include/alibabacloud/kms/model/ListKeyVersionsRequest.h
|
||||
include/alibabacloud/kms/model/ListKeyVersionsResult.h
|
||||
include/alibabacloud/kms/model/ListKeysRequest.h
|
||||
include/alibabacloud/kms/model/ListKeysResult.h
|
||||
include/alibabacloud/kms/model/ListResourceTagsRequest.h
|
||||
@@ -66,7 +72,11 @@ set(kms_public_header_model
|
||||
include/alibabacloud/kms/model/UntagResourceRequest.h
|
||||
include/alibabacloud/kms/model/UntagResourceResult.h
|
||||
include/alibabacloud/kms/model/UpdateAliasRequest.h
|
||||
include/alibabacloud/kms/model/UpdateAliasResult.h )
|
||||
include/alibabacloud/kms/model/UpdateAliasResult.h
|
||||
include/alibabacloud/kms/model/UpdateKeyDescriptionRequest.h
|
||||
include/alibabacloud/kms/model/UpdateKeyDescriptionResult.h
|
||||
include/alibabacloud/kms/model/UpdateRotationPolicyRequest.h
|
||||
include/alibabacloud/kms/model/UpdateRotationPolicyResult.h )
|
||||
|
||||
set(kms_src
|
||||
src/KmsClient.cc
|
||||
@@ -84,6 +94,8 @@ set(kms_src
|
||||
src/model/DeleteKeyMaterialResult.cc
|
||||
src/model/DescribeKeyRequest.cc
|
||||
src/model/DescribeKeyResult.cc
|
||||
src/model/DescribeKeyVersionRequest.cc
|
||||
src/model/DescribeKeyVersionResult.cc
|
||||
src/model/DescribeRegionsRequest.cc
|
||||
src/model/DescribeRegionsResult.cc
|
||||
src/model/DescribeServiceRequest.cc
|
||||
@@ -96,6 +108,8 @@ set(kms_src
|
||||
src/model/EncryptResult.cc
|
||||
src/model/GenerateDataKeyRequest.cc
|
||||
src/model/GenerateDataKeyResult.cc
|
||||
src/model/GenerateDataKeyWithoutPlaintextRequest.cc
|
||||
src/model/GenerateDataKeyWithoutPlaintextResult.cc
|
||||
src/model/GetParametersForImportRequest.cc
|
||||
src/model/GetParametersForImportResult.cc
|
||||
src/model/ImportKeyMaterialRequest.cc
|
||||
@@ -104,6 +118,8 @@ set(kms_src
|
||||
src/model/ListAliasesResult.cc
|
||||
src/model/ListAliasesByKeyIdRequest.cc
|
||||
src/model/ListAliasesByKeyIdResult.cc
|
||||
src/model/ListKeyVersionsRequest.cc
|
||||
src/model/ListKeyVersionsResult.cc
|
||||
src/model/ListKeysRequest.cc
|
||||
src/model/ListKeysResult.cc
|
||||
src/model/ListResourceTagsRequest.cc
|
||||
@@ -115,7 +131,11 @@ set(kms_src
|
||||
src/model/UntagResourceRequest.cc
|
||||
src/model/UntagResourceResult.cc
|
||||
src/model/UpdateAliasRequest.cc
|
||||
src/model/UpdateAliasResult.cc )
|
||||
src/model/UpdateAliasResult.cc
|
||||
src/model/UpdateKeyDescriptionRequest.cc
|
||||
src/model/UpdateKeyDescriptionResult.cc
|
||||
src/model/UpdateRotationPolicyRequest.cc
|
||||
src/model/UpdateRotationPolicyResult.cc )
|
||||
|
||||
add_library(kms ${LIB_TYPE}
|
||||
${kms_public_header}
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include "model/DeleteKeyMaterialResult.h"
|
||||
#include "model/DescribeKeyRequest.h"
|
||||
#include "model/DescribeKeyResult.h"
|
||||
#include "model/DescribeKeyVersionRequest.h"
|
||||
#include "model/DescribeKeyVersionResult.h"
|
||||
#include "model/DescribeRegionsRequest.h"
|
||||
#include "model/DescribeRegionsResult.h"
|
||||
#include "model/DescribeServiceRequest.h"
|
||||
@@ -48,6 +50,8 @@
|
||||
#include "model/EncryptResult.h"
|
||||
#include "model/GenerateDataKeyRequest.h"
|
||||
#include "model/GenerateDataKeyResult.h"
|
||||
#include "model/GenerateDataKeyWithoutPlaintextRequest.h"
|
||||
#include "model/GenerateDataKeyWithoutPlaintextResult.h"
|
||||
#include "model/GetParametersForImportRequest.h"
|
||||
#include "model/GetParametersForImportResult.h"
|
||||
#include "model/ImportKeyMaterialRequest.h"
|
||||
@@ -56,6 +60,8 @@
|
||||
#include "model/ListAliasesResult.h"
|
||||
#include "model/ListAliasesByKeyIdRequest.h"
|
||||
#include "model/ListAliasesByKeyIdResult.h"
|
||||
#include "model/ListKeyVersionsRequest.h"
|
||||
#include "model/ListKeyVersionsResult.h"
|
||||
#include "model/ListKeysRequest.h"
|
||||
#include "model/ListKeysResult.h"
|
||||
#include "model/ListResourceTagsRequest.h"
|
||||
@@ -68,6 +74,10 @@
|
||||
#include "model/UntagResourceResult.h"
|
||||
#include "model/UpdateAliasRequest.h"
|
||||
#include "model/UpdateAliasResult.h"
|
||||
#include "model/UpdateKeyDescriptionRequest.h"
|
||||
#include "model/UpdateKeyDescriptionResult.h"
|
||||
#include "model/UpdateRotationPolicyRequest.h"
|
||||
#include "model/UpdateRotationPolicyResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
@@ -98,6 +108,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::DescribeKeyResult> DescribeKeyOutcome;
|
||||
typedef std::future<DescribeKeyOutcome> DescribeKeyOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::DescribeKeyRequest&, const DescribeKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeKeyAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeKeyVersionResult> DescribeKeyVersionOutcome;
|
||||
typedef std::future<DescribeKeyVersionOutcome> DescribeKeyVersionOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::DescribeKeyVersionRequest&, const DescribeKeyVersionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeKeyVersionAsyncHandler;
|
||||
typedef Outcome<Error, Model::DescribeRegionsResult> DescribeRegionsOutcome;
|
||||
typedef std::future<DescribeRegionsOutcome> DescribeRegionsOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::DescribeRegionsRequest&, const DescribeRegionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeRegionsAsyncHandler;
|
||||
@@ -116,6 +129,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GenerateDataKeyResult> GenerateDataKeyOutcome;
|
||||
typedef std::future<GenerateDataKeyOutcome> GenerateDataKeyOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::GenerateDataKeyRequest&, const GenerateDataKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenerateDataKeyAsyncHandler;
|
||||
typedef Outcome<Error, Model::GenerateDataKeyWithoutPlaintextResult> GenerateDataKeyWithoutPlaintextOutcome;
|
||||
typedef std::future<GenerateDataKeyWithoutPlaintextOutcome> GenerateDataKeyWithoutPlaintextOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::GenerateDataKeyWithoutPlaintextRequest&, const GenerateDataKeyWithoutPlaintextOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GenerateDataKeyWithoutPlaintextAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetParametersForImportResult> GetParametersForImportOutcome;
|
||||
typedef std::future<GetParametersForImportOutcome> GetParametersForImportOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::GetParametersForImportRequest&, const GetParametersForImportOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetParametersForImportAsyncHandler;
|
||||
@@ -128,6 +144,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListAliasesByKeyIdResult> ListAliasesByKeyIdOutcome;
|
||||
typedef std::future<ListAliasesByKeyIdOutcome> ListAliasesByKeyIdOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::ListAliasesByKeyIdRequest&, const ListAliasesByKeyIdOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListAliasesByKeyIdAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListKeyVersionsResult> ListKeyVersionsOutcome;
|
||||
typedef std::future<ListKeyVersionsOutcome> ListKeyVersionsOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::ListKeyVersionsRequest&, const ListKeyVersionsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListKeyVersionsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListKeysResult> ListKeysOutcome;
|
||||
typedef std::future<ListKeysOutcome> ListKeysOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::ListKeysRequest&, const ListKeysOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListKeysAsyncHandler;
|
||||
@@ -146,6 +165,12 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::UpdateAliasResult> UpdateAliasOutcome;
|
||||
typedef std::future<UpdateAliasOutcome> UpdateAliasOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::UpdateAliasRequest&, const UpdateAliasOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateAliasAsyncHandler;
|
||||
typedef Outcome<Error, Model::UpdateKeyDescriptionResult> UpdateKeyDescriptionOutcome;
|
||||
typedef std::future<UpdateKeyDescriptionOutcome> UpdateKeyDescriptionOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::UpdateKeyDescriptionRequest&, const UpdateKeyDescriptionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateKeyDescriptionAsyncHandler;
|
||||
typedef Outcome<Error, Model::UpdateRotationPolicyResult> UpdateRotationPolicyOutcome;
|
||||
typedef std::future<UpdateRotationPolicyOutcome> UpdateRotationPolicyOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::UpdateRotationPolicyRequest&, const UpdateRotationPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UpdateRotationPolicyAsyncHandler;
|
||||
|
||||
KmsClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
KmsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
@@ -172,6 +197,9 @@ namespace AlibabaCloud
|
||||
DescribeKeyOutcome describeKey(const Model::DescribeKeyRequest &request)const;
|
||||
void describeKeyAsync(const Model::DescribeKeyRequest& request, const DescribeKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeKeyOutcomeCallable describeKeyCallable(const Model::DescribeKeyRequest& request) const;
|
||||
DescribeKeyVersionOutcome describeKeyVersion(const Model::DescribeKeyVersionRequest &request)const;
|
||||
void describeKeyVersionAsync(const Model::DescribeKeyVersionRequest& request, const DescribeKeyVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeKeyVersionOutcomeCallable describeKeyVersionCallable(const Model::DescribeKeyVersionRequest& request) const;
|
||||
DescribeRegionsOutcome describeRegions(const Model::DescribeRegionsRequest &request)const;
|
||||
void describeRegionsAsync(const Model::DescribeRegionsRequest& request, const DescribeRegionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
DescribeRegionsOutcomeCallable describeRegionsCallable(const Model::DescribeRegionsRequest& request) const;
|
||||
@@ -190,6 +218,9 @@ namespace AlibabaCloud
|
||||
GenerateDataKeyOutcome generateDataKey(const Model::GenerateDataKeyRequest &request)const;
|
||||
void generateDataKeyAsync(const Model::GenerateDataKeyRequest& request, const GenerateDataKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GenerateDataKeyOutcomeCallable generateDataKeyCallable(const Model::GenerateDataKeyRequest& request) const;
|
||||
GenerateDataKeyWithoutPlaintextOutcome generateDataKeyWithoutPlaintext(const Model::GenerateDataKeyWithoutPlaintextRequest &request)const;
|
||||
void generateDataKeyWithoutPlaintextAsync(const Model::GenerateDataKeyWithoutPlaintextRequest& request, const GenerateDataKeyWithoutPlaintextAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GenerateDataKeyWithoutPlaintextOutcomeCallable generateDataKeyWithoutPlaintextCallable(const Model::GenerateDataKeyWithoutPlaintextRequest& request) const;
|
||||
GetParametersForImportOutcome getParametersForImport(const Model::GetParametersForImportRequest &request)const;
|
||||
void getParametersForImportAsync(const Model::GetParametersForImportRequest& request, const GetParametersForImportAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetParametersForImportOutcomeCallable getParametersForImportCallable(const Model::GetParametersForImportRequest& request) const;
|
||||
@@ -202,6 +233,9 @@ namespace AlibabaCloud
|
||||
ListAliasesByKeyIdOutcome listAliasesByKeyId(const Model::ListAliasesByKeyIdRequest &request)const;
|
||||
void listAliasesByKeyIdAsync(const Model::ListAliasesByKeyIdRequest& request, const ListAliasesByKeyIdAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListAliasesByKeyIdOutcomeCallable listAliasesByKeyIdCallable(const Model::ListAliasesByKeyIdRequest& request) const;
|
||||
ListKeyVersionsOutcome listKeyVersions(const Model::ListKeyVersionsRequest &request)const;
|
||||
void listKeyVersionsAsync(const Model::ListKeyVersionsRequest& request, const ListKeyVersionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListKeyVersionsOutcomeCallable listKeyVersionsCallable(const Model::ListKeyVersionsRequest& request) const;
|
||||
ListKeysOutcome listKeys(const Model::ListKeysRequest &request)const;
|
||||
void listKeysAsync(const Model::ListKeysRequest& request, const ListKeysAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListKeysOutcomeCallable listKeysCallable(const Model::ListKeysRequest& request) const;
|
||||
@@ -220,6 +254,12 @@ namespace AlibabaCloud
|
||||
UpdateAliasOutcome updateAlias(const Model::UpdateAliasRequest &request)const;
|
||||
void updateAliasAsync(const Model::UpdateAliasRequest& request, const UpdateAliasAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdateAliasOutcomeCallable updateAliasCallable(const Model::UpdateAliasRequest& request) const;
|
||||
UpdateKeyDescriptionOutcome updateKeyDescription(const Model::UpdateKeyDescriptionRequest &request)const;
|
||||
void updateKeyDescriptionAsync(const Model::UpdateKeyDescriptionRequest& request, const UpdateKeyDescriptionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdateKeyDescriptionOutcomeCallable updateKeyDescriptionCallable(const Model::UpdateKeyDescriptionRequest& request) const;
|
||||
UpdateRotationPolicyOutcome updateRotationPolicy(const Model::UpdateRotationPolicyRequest &request)const;
|
||||
void updateRotationPolicyAsync(const Model::UpdateRotationPolicyRequest& request, const UpdateRotationPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UpdateRotationPolicyOutcomeCallable updateRotationPolicyCallable(const Model::UpdateRotationPolicyRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
|
||||
@@ -43,12 +43,18 @@ namespace AlibabaCloud
|
||||
void setOrigin(const std::string& origin);
|
||||
std::string getDescription()const;
|
||||
void setDescription(const std::string& description);
|
||||
std::string getRotationInterval()const;
|
||||
void setRotationInterval(const std::string& rotationInterval);
|
||||
bool getEnableAutomaticRotation()const;
|
||||
void setEnableAutomaticRotation(bool enableAutomaticRotation);
|
||||
|
||||
private:
|
||||
std::string protectionLevel_;
|
||||
std::string keyUsage_;
|
||||
std::string origin_;
|
||||
std::string description_;
|
||||
std::string rotationInterval_;
|
||||
bool enableAutomaticRotation_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -38,13 +38,18 @@ namespace AlibabaCloud
|
||||
std::string creationDate;
|
||||
std::string protectionLevel;
|
||||
std::string description;
|
||||
std::string materialExpireTime;
|
||||
std::string lastRotationDate;
|
||||
std::string rotationInterval;
|
||||
std::string keyUsage;
|
||||
std::string keyId;
|
||||
std::string primaryKeyVersion;
|
||||
std::string creator;
|
||||
std::string deleteDate;
|
||||
std::string automaticRotation;
|
||||
std::string nextRotationDate;
|
||||
std::string materialExpireTime;
|
||||
std::string arn;
|
||||
std::string keyState;
|
||||
std::string deleteDate;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -39,12 +39,14 @@ namespace AlibabaCloud
|
||||
~DecryptResult();
|
||||
std::string getPlaintext()const;
|
||||
std::string getKeyId()const;
|
||||
std::string getKeyVersionId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string plaintext_;
|
||||
std::string keyId_;
|
||||
std::string keyVersionId_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -38,13 +38,18 @@ namespace AlibabaCloud
|
||||
std::string creationDate;
|
||||
std::string protectionLevel;
|
||||
std::string description;
|
||||
std::string materialExpireTime;
|
||||
std::string lastRotationDate;
|
||||
std::string rotationInterval;
|
||||
std::string keyUsage;
|
||||
std::string keyId;
|
||||
std::string primaryKeyVersion;
|
||||
std::string creator;
|
||||
std::string deleteDate;
|
||||
std::string automaticRotation;
|
||||
std::string nextRotationDate;
|
||||
std::string materialExpireTime;
|
||||
std::string arn;
|
||||
std::string keyState;
|
||||
std::string deleteDate;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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_DESCRIBEKEYVERSIONREQUEST_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_DESCRIBEKEYVERSIONREQUEST_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 DescribeKeyVersionRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
DescribeKeyVersionRequest();
|
||||
~DescribeKeyVersionRequest();
|
||||
|
||||
std::string getKeyVersionId()const;
|
||||
void setKeyVersionId(const std::string& keyVersionId);
|
||||
std::string getKeyId()const;
|
||||
void setKeyId(const std::string& keyId);
|
||||
|
||||
private:
|
||||
std::string keyVersionId_;
|
||||
std::string keyId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_DESCRIBEKEYVERSIONREQUEST_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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_DESCRIBEKEYVERSIONRESULT_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_DESCRIBEKEYVERSIONRESULT_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 DescribeKeyVersionResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct KeyVersion
|
||||
{
|
||||
std::string creationDate;
|
||||
std::string keyId;
|
||||
std::string keyVersionId;
|
||||
};
|
||||
|
||||
|
||||
DescribeKeyVersionResult();
|
||||
explicit DescribeKeyVersionResult(const std::string &payload);
|
||||
~DescribeKeyVersionResult();
|
||||
KeyVersion getKeyVersion()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
KeyVersion keyVersion_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_DESCRIBEKEYVERSIONRESULT_H_
|
||||
@@ -39,12 +39,14 @@ namespace AlibabaCloud
|
||||
~EncryptResult();
|
||||
std::string getCiphertextBlob()const;
|
||||
std::string getKeyId()const;
|
||||
std::string getKeyVersionId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string ciphertextBlob_;
|
||||
std::string keyId_;
|
||||
std::string keyVersionId_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace AlibabaCloud
|
||||
std::string getCiphertextBlob()const;
|
||||
std::string getPlaintext()const;
|
||||
std::string getKeyId()const;
|
||||
std::string getKeyVersionId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
@@ -47,6 +48,7 @@ namespace AlibabaCloud
|
||||
std::string ciphertextBlob_;
|
||||
std::string plaintext_;
|
||||
std::string keyId_;
|
||||
std::string keyVersionId_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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_GENERATEDATAKEYWITHOUTPLAINTEXTREQUEST_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_GENERATEDATAKEYWITHOUTPLAINTEXTREQUEST_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 GenerateDataKeyWithoutPlaintextRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GenerateDataKeyWithoutPlaintextRequest();
|
||||
~GenerateDataKeyWithoutPlaintextRequest();
|
||||
|
||||
std::string getEncryptionContext()const;
|
||||
void setEncryptionContext(const std::string& encryptionContext);
|
||||
std::string getKeyId()const;
|
||||
void setKeyId(const std::string& keyId);
|
||||
std::string getKeySpec()const;
|
||||
void setKeySpec(const std::string& keySpec);
|
||||
int getNumberOfBytes()const;
|
||||
void setNumberOfBytes(int numberOfBytes);
|
||||
|
||||
private:
|
||||
std::string encryptionContext_;
|
||||
std::string keyId_;
|
||||
std::string keySpec_;
|
||||
int numberOfBytes_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_GENERATEDATAKEYWITHOUTPLAINTEXTREQUEST_H_
|
||||
@@ -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_GENERATEDATAKEYWITHOUTPLAINTEXTRESULT_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_GENERATEDATAKEYWITHOUTPLAINTEXTRESULT_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 GenerateDataKeyWithoutPlaintextResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GenerateDataKeyWithoutPlaintextResult();
|
||||
explicit GenerateDataKeyWithoutPlaintextResult(const std::string &payload);
|
||||
~GenerateDataKeyWithoutPlaintextResult();
|
||||
std::string getCiphertextBlob()const;
|
||||
std::string getKeyId()const;
|
||||
std::string getKeyVersionId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string ciphertextBlob_;
|
||||
std::string keyId_;
|
||||
std::string keyVersionId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_GENERATEDATAKEYWITHOUTPLAINTEXTRESULT_H_
|
||||
54
kms/include/alibabacloud/kms/model/ListKeyVersionsRequest.h
Normal file
54
kms/include/alibabacloud/kms/model/ListKeyVersionsRequest.h
Normal 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_LISTKEYVERSIONSREQUEST_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_LISTKEYVERSIONSREQUEST_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 ListKeyVersionsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListKeyVersionsRequest();
|
||||
~ListKeyVersionsRequest();
|
||||
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getKeyId()const;
|
||||
void setKeyId(const std::string& keyId);
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
|
||||
private:
|
||||
int pageSize_;
|
||||
std::string keyId_;
|
||||
int pageNumber_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_LISTKEYVERSIONSREQUEST_H_
|
||||
63
kms/include/alibabacloud/kms/model/ListKeyVersionsResult.h
Normal file
63
kms/include/alibabacloud/kms/model/ListKeyVersionsResult.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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_LISTKEYVERSIONSRESULT_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_LISTKEYVERSIONSRESULT_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 ListKeyVersionsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct KeyVersion
|
||||
{
|
||||
std::string creationDate;
|
||||
std::string keyId;
|
||||
std::string keyVersionId;
|
||||
};
|
||||
|
||||
|
||||
ListKeyVersionsResult();
|
||||
explicit ListKeyVersionsResult(const std::string &payload);
|
||||
~ListKeyVersionsResult();
|
||||
std::vector<KeyVersion> getKeyVersions()const;
|
||||
int getTotalCount()const;
|
||||
int getPageSize()const;
|
||||
int getPageNumber()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<KeyVersion> keyVersions_;
|
||||
int totalCount_;
|
||||
int pageSize_;
|
||||
int pageNumber_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_LISTKEYVERSIONSRESULT_H_
|
||||
@@ -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_UPDATEKEYDESCRIPTIONREQUEST_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_UPDATEKEYDESCRIPTIONREQUEST_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 UpdateKeyDescriptionRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
UpdateKeyDescriptionRequest();
|
||||
~UpdateKeyDescriptionRequest();
|
||||
|
||||
std::string getKeyId()const;
|
||||
void setKeyId(const std::string& keyId);
|
||||
std::string getDescription()const;
|
||||
void setDescription(const std::string& description);
|
||||
|
||||
private:
|
||||
std::string keyId_;
|
||||
std::string description_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_UPDATEKEYDESCRIPTIONREQUEST_H_
|
||||
@@ -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_UPDATEKEYDESCRIPTIONRESULT_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_UPDATEKEYDESCRIPTIONRESULT_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 UpdateKeyDescriptionResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
UpdateKeyDescriptionResult();
|
||||
explicit UpdateKeyDescriptionResult(const std::string &payload);
|
||||
~UpdateKeyDescriptionResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_UPDATEKEYDESCRIPTIONRESULT_H_
|
||||
@@ -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_UPDATEROTATIONPOLICYREQUEST_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_UPDATEROTATIONPOLICYREQUEST_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 UpdateRotationPolicyRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
UpdateRotationPolicyRequest();
|
||||
~UpdateRotationPolicyRequest();
|
||||
|
||||
std::string getKeyId()const;
|
||||
void setKeyId(const std::string& keyId);
|
||||
std::string getRotationInterval()const;
|
||||
void setRotationInterval(const std::string& rotationInterval);
|
||||
bool getEnableAutomaticRotation()const;
|
||||
void setEnableAutomaticRotation(bool enableAutomaticRotation);
|
||||
|
||||
private:
|
||||
std::string keyId_;
|
||||
std::string rotationInterval_;
|
||||
bool enableAutomaticRotation_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_UPDATEROTATIONPOLICYREQUEST_H_
|
||||
@@ -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_UPDATEROTATIONPOLICYRESULT_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_UPDATEROTATIONPOLICYRESULT_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 UpdateRotationPolicyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
UpdateRotationPolicyResult();
|
||||
explicit UpdateRotationPolicyResult(const std::string &payload);
|
||||
~UpdateRotationPolicyResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_UPDATEROTATIONPOLICYRESULT_H_
|
||||
@@ -303,6 +303,42 @@ KmsClient::DescribeKeyOutcomeCallable KmsClient::describeKeyCallable(const Descr
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DescribeKeyVersionOutcome KmsClient::describeKeyVersion(const DescribeKeyVersionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeKeyVersionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeKeyVersionOutcome(DescribeKeyVersionResult(outcome.result()));
|
||||
else
|
||||
return DescribeKeyVersionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::describeKeyVersionAsync(const DescribeKeyVersionRequest& request, const DescribeKeyVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeKeyVersion(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::DescribeKeyVersionOutcomeCallable KmsClient::describeKeyVersionCallable(const DescribeKeyVersionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeKeyVersionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeKeyVersion(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::DescribeRegionsOutcome KmsClient::describeRegions(const DescribeRegionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -519,6 +555,42 @@ KmsClient::GenerateDataKeyOutcomeCallable KmsClient::generateDataKeyCallable(con
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GenerateDataKeyWithoutPlaintextOutcome KmsClient::generateDataKeyWithoutPlaintext(const GenerateDataKeyWithoutPlaintextRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GenerateDataKeyWithoutPlaintextOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GenerateDataKeyWithoutPlaintextOutcome(GenerateDataKeyWithoutPlaintextResult(outcome.result()));
|
||||
else
|
||||
return GenerateDataKeyWithoutPlaintextOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::generateDataKeyWithoutPlaintextAsync(const GenerateDataKeyWithoutPlaintextRequest& request, const GenerateDataKeyWithoutPlaintextAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, generateDataKeyWithoutPlaintext(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::GenerateDataKeyWithoutPlaintextOutcomeCallable KmsClient::generateDataKeyWithoutPlaintextCallable(const GenerateDataKeyWithoutPlaintextRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GenerateDataKeyWithoutPlaintextOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->generateDataKeyWithoutPlaintext(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GetParametersForImportOutcome KmsClient::getParametersForImport(const GetParametersForImportRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -663,6 +735,42 @@ KmsClient::ListAliasesByKeyIdOutcomeCallable KmsClient::listAliasesByKeyIdCallab
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ListKeyVersionsOutcome KmsClient::listKeyVersions(const ListKeyVersionsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListKeyVersionsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListKeyVersionsOutcome(ListKeyVersionsResult(outcome.result()));
|
||||
else
|
||||
return ListKeyVersionsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::listKeyVersionsAsync(const ListKeyVersionsRequest& request, const ListKeyVersionsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listKeyVersions(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::ListKeyVersionsOutcomeCallable KmsClient::listKeyVersionsCallable(const ListKeyVersionsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListKeyVersionsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listKeyVersions(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::ListKeysOutcome KmsClient::listKeys(const ListKeysRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -879,3 +987,75 @@ KmsClient::UpdateAliasOutcomeCallable KmsClient::updateAliasCallable(const Updat
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::UpdateKeyDescriptionOutcome KmsClient::updateKeyDescription(const UpdateKeyDescriptionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateKeyDescriptionOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateKeyDescriptionOutcome(UpdateKeyDescriptionResult(outcome.result()));
|
||||
else
|
||||
return UpdateKeyDescriptionOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::updateKeyDescriptionAsync(const UpdateKeyDescriptionRequest& request, const UpdateKeyDescriptionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateKeyDescription(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::UpdateKeyDescriptionOutcomeCallable KmsClient::updateKeyDescriptionCallable(const UpdateKeyDescriptionRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateKeyDescriptionOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateKeyDescription(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::UpdateRotationPolicyOutcome KmsClient::updateRotationPolicy(const UpdateRotationPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpdateRotationPolicyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpdateRotationPolicyOutcome(UpdateRotationPolicyResult(outcome.result()));
|
||||
else
|
||||
return UpdateRotationPolicyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::updateRotationPolicyAsync(const UpdateRotationPolicyRequest& request, const UpdateRotationPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, updateRotationPolicy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::UpdateRotationPolicyOutcomeCallable KmsClient::updateRotationPolicyCallable(const UpdateRotationPolicyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpdateRotationPolicyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->updateRotationPolicy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
|
||||
@@ -69,3 +69,25 @@ void CreateKeyRequest::setDescription(const std::string& description)
|
||||
setCoreParameter("Description", description);
|
||||
}
|
||||
|
||||
std::string CreateKeyRequest::getRotationInterval()const
|
||||
{
|
||||
return rotationInterval_;
|
||||
}
|
||||
|
||||
void CreateKeyRequest::setRotationInterval(const std::string& rotationInterval)
|
||||
{
|
||||
rotationInterval_ = rotationInterval;
|
||||
setCoreParameter("RotationInterval", rotationInterval);
|
||||
}
|
||||
|
||||
bool CreateKeyRequest::getEnableAutomaticRotation()const
|
||||
{
|
||||
return enableAutomaticRotation_;
|
||||
}
|
||||
|
||||
void CreateKeyRequest::setEnableAutomaticRotation(bool enableAutomaticRotation)
|
||||
{
|
||||
enableAutomaticRotation_ = enableAutomaticRotation;
|
||||
setCoreParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,16 @@ void CreateKeyResult::parse(const std::string &payload)
|
||||
keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString();
|
||||
if(!keyMetadataNode["ProtectionLevel"].isNull())
|
||||
keyMetadata_.protectionLevel = keyMetadataNode["ProtectionLevel"].asString();
|
||||
if(!keyMetadataNode["PrimaryKeyVersion"].isNull())
|
||||
keyMetadata_.primaryKeyVersion = keyMetadataNode["PrimaryKeyVersion"].asString();
|
||||
if(!keyMetadataNode["LastRotationDate"].isNull())
|
||||
keyMetadata_.lastRotationDate = keyMetadataNode["LastRotationDate"].asString();
|
||||
if(!keyMetadataNode["AutomaticRotation"].isNull())
|
||||
keyMetadata_.automaticRotation = keyMetadataNode["AutomaticRotation"].asString();
|
||||
if(!keyMetadataNode["RotationInterval"].isNull())
|
||||
keyMetadata_.rotationInterval = keyMetadataNode["RotationInterval"].asString();
|
||||
if(!keyMetadataNode["NextRotationDate"].isNull())
|
||||
keyMetadata_.nextRotationDate = keyMetadataNode["NextRotationDate"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,8 @@ void DecryptResult::parse(const std::string &payload)
|
||||
plaintext_ = value["Plaintext"].asString();
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["KeyVersionId"].isNull())
|
||||
keyVersionId_ = value["KeyVersionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -56,3 +58,8 @@ std::string DecryptResult::getKeyId()const
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
std::string DecryptResult::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,16 @@ void DescribeKeyResult::parse(const std::string &payload)
|
||||
keyMetadata_.materialExpireTime = keyMetadataNode["MaterialExpireTime"].asString();
|
||||
if(!keyMetadataNode["ProtectionLevel"].isNull())
|
||||
keyMetadata_.protectionLevel = keyMetadataNode["ProtectionLevel"].asString();
|
||||
if(!keyMetadataNode["PrimaryKeyVersion"].isNull())
|
||||
keyMetadata_.primaryKeyVersion = keyMetadataNode["PrimaryKeyVersion"].asString();
|
||||
if(!keyMetadataNode["LastRotationDate"].isNull())
|
||||
keyMetadata_.lastRotationDate = keyMetadataNode["LastRotationDate"].asString();
|
||||
if(!keyMetadataNode["AutomaticRotation"].isNull())
|
||||
keyMetadata_.automaticRotation = keyMetadataNode["AutomaticRotation"].asString();
|
||||
if(!keyMetadataNode["RotationInterval"].isNull())
|
||||
keyMetadata_.rotationInterval = keyMetadataNode["RotationInterval"].asString();
|
||||
if(!keyMetadataNode["NextRotationDate"].isNull())
|
||||
keyMetadata_.nextRotationDate = keyMetadataNode["NextRotationDate"].asString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
49
kms/src/model/DescribeKeyVersionRequest.cc
Normal file
49
kms/src/model/DescribeKeyVersionRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/DescribeKeyVersionRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::DescribeKeyVersionRequest;
|
||||
|
||||
DescribeKeyVersionRequest::DescribeKeyVersionRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "DescribeKeyVersion")
|
||||
{}
|
||||
|
||||
DescribeKeyVersionRequest::~DescribeKeyVersionRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeKeyVersionRequest::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
void DescribeKeyVersionRequest::setKeyVersionId(const std::string& keyVersionId)
|
||||
{
|
||||
keyVersionId_ = keyVersionId;
|
||||
setCoreParameter("KeyVersionId", keyVersionId);
|
||||
}
|
||||
|
||||
std::string DescribeKeyVersionRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void DescribeKeyVersionRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
56
kms/src/model/DescribeKeyVersionResult.cc
Normal file
56
kms/src/model/DescribeKeyVersionResult.cc
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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/DescribeKeyVersionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
DescribeKeyVersionResult::DescribeKeyVersionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeKeyVersionResult::DescribeKeyVersionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeKeyVersionResult::~DescribeKeyVersionResult()
|
||||
{}
|
||||
|
||||
void DescribeKeyVersionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto keyVersionNode = value["KeyVersion"];
|
||||
if(!keyVersionNode["KeyId"].isNull())
|
||||
keyVersion_.keyId = keyVersionNode["KeyId"].asString();
|
||||
if(!keyVersionNode["KeyVersionId"].isNull())
|
||||
keyVersion_.keyVersionId = keyVersionNode["KeyVersionId"].asString();
|
||||
if(!keyVersionNode["CreationDate"].isNull())
|
||||
keyVersion_.creationDate = keyVersionNode["CreationDate"].asString();
|
||||
|
||||
}
|
||||
|
||||
DescribeKeyVersionResult::KeyVersion DescribeKeyVersionResult::getKeyVersion()const
|
||||
{
|
||||
return keyVersion_;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,8 @@ void EncryptResult::parse(const std::string &payload)
|
||||
ciphertextBlob_ = value["CiphertextBlob"].asString();
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["KeyVersionId"].isNull())
|
||||
keyVersionId_ = value["KeyVersionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -56,3 +58,8 @@ std::string EncryptResult::getKeyId()const
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
std::string EncryptResult::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ void GenerateDataKeyResult::parse(const std::string &payload)
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["Plaintext"].isNull())
|
||||
plaintext_ = value["Plaintext"].asString();
|
||||
if(!value["KeyVersionId"].isNull())
|
||||
keyVersionId_ = value["KeyVersionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
@@ -63,3 +65,8 @@ std::string GenerateDataKeyResult::getKeyId()const
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyResult::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
|
||||
71
kms/src/model/GenerateDataKeyWithoutPlaintextRequest.cc
Normal file
71
kms/src/model/GenerateDataKeyWithoutPlaintextRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/GenerateDataKeyWithoutPlaintextRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::GenerateDataKeyWithoutPlaintextRequest;
|
||||
|
||||
GenerateDataKeyWithoutPlaintextRequest::GenerateDataKeyWithoutPlaintextRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "GenerateDataKeyWithoutPlaintext")
|
||||
{}
|
||||
|
||||
GenerateDataKeyWithoutPlaintextRequest::~GenerateDataKeyWithoutPlaintextRequest()
|
||||
{}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextRequest::getEncryptionContext()const
|
||||
{
|
||||
return encryptionContext_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextRequest::setEncryptionContext(const std::string& encryptionContext)
|
||||
{
|
||||
encryptionContext_ = encryptionContext;
|
||||
setCoreParameter("EncryptionContext", encryptionContext);
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextRequest::getKeySpec()const
|
||||
{
|
||||
return keySpec_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextRequest::setKeySpec(const std::string& keySpec)
|
||||
{
|
||||
keySpec_ = keySpec;
|
||||
setCoreParameter("KeySpec", keySpec);
|
||||
}
|
||||
|
||||
int GenerateDataKeyWithoutPlaintextRequest::getNumberOfBytes()const
|
||||
{
|
||||
return numberOfBytes_;
|
||||
}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextRequest::setNumberOfBytes(int numberOfBytes)
|
||||
{
|
||||
numberOfBytes_ = numberOfBytes;
|
||||
setCoreParameter("NumberOfBytes", std::to_string(numberOfBytes));
|
||||
}
|
||||
|
||||
65
kms/src/model/GenerateDataKeyWithoutPlaintextResult.cc
Normal file
65
kms/src/model/GenerateDataKeyWithoutPlaintextResult.cc
Normal 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/GenerateDataKeyWithoutPlaintextResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
GenerateDataKeyWithoutPlaintextResult::GenerateDataKeyWithoutPlaintextResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GenerateDataKeyWithoutPlaintextResult::GenerateDataKeyWithoutPlaintextResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GenerateDataKeyWithoutPlaintextResult::~GenerateDataKeyWithoutPlaintextResult()
|
||||
{}
|
||||
|
||||
void GenerateDataKeyWithoutPlaintextResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["CiphertextBlob"].isNull())
|
||||
ciphertextBlob_ = value["CiphertextBlob"].asString();
|
||||
if(!value["KeyId"].isNull())
|
||||
keyId_ = value["KeyId"].asString();
|
||||
if(!value["KeyVersionId"].isNull())
|
||||
keyVersionId_ = value["KeyVersionId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextResult::getCiphertextBlob()const
|
||||
{
|
||||
return ciphertextBlob_;
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextResult::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
std::string GenerateDataKeyWithoutPlaintextResult::getKeyVersionId()const
|
||||
{
|
||||
return keyVersionId_;
|
||||
}
|
||||
|
||||
60
kms/src/model/ListKeyVersionsRequest.cc
Normal file
60
kms/src/model/ListKeyVersionsRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/ListKeyVersionsRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::ListKeyVersionsRequest;
|
||||
|
||||
ListKeyVersionsRequest::ListKeyVersionsRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "ListKeyVersions")
|
||||
{}
|
||||
|
||||
ListKeyVersionsRequest::~ListKeyVersionsRequest()
|
||||
{}
|
||||
|
||||
int ListKeyVersionsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListKeyVersionsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setCoreParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListKeyVersionsRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void ListKeyVersionsRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
int ListKeyVersionsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListKeyVersionsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setCoreParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
82
kms/src/model/ListKeyVersionsResult.cc
Normal file
82
kms/src/model/ListKeyVersionsResult.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/ListKeyVersionsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
ListKeyVersionsResult::ListKeyVersionsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListKeyVersionsResult::ListKeyVersionsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListKeyVersionsResult::~ListKeyVersionsResult()
|
||||
{}
|
||||
|
||||
void ListKeyVersionsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allKeyVersionsNode = value["KeyVersions"]["KeyVersion"];
|
||||
for (auto valueKeyVersionsKeyVersion : allKeyVersionsNode)
|
||||
{
|
||||
KeyVersion keyVersionsObject;
|
||||
if(!valueKeyVersionsKeyVersion["KeyId"].isNull())
|
||||
keyVersionsObject.keyId = valueKeyVersionsKeyVersion["KeyId"].asString();
|
||||
if(!valueKeyVersionsKeyVersion["KeyVersionId"].isNull())
|
||||
keyVersionsObject.keyVersionId = valueKeyVersionsKeyVersion["KeyVersionId"].asString();
|
||||
if(!valueKeyVersionsKeyVersion["CreationDate"].isNull())
|
||||
keyVersionsObject.creationDate = valueKeyVersionsKeyVersion["CreationDate"].asString();
|
||||
keyVersions_.push_back(keyVersionsObject);
|
||||
}
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageNumber"].isNull())
|
||||
pageNumber_ = std::stoi(value["PageNumber"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<ListKeyVersionsResult::KeyVersion> ListKeyVersionsResult::getKeyVersions()const
|
||||
{
|
||||
return keyVersions_;
|
||||
}
|
||||
|
||||
int ListKeyVersionsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int ListKeyVersionsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int ListKeyVersionsResult::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
49
kms/src/model/UpdateKeyDescriptionRequest.cc
Normal file
49
kms/src/model/UpdateKeyDescriptionRequest.cc
Normal 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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/UpdateKeyDescriptionRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::UpdateKeyDescriptionRequest;
|
||||
|
||||
UpdateKeyDescriptionRequest::UpdateKeyDescriptionRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "UpdateKeyDescription")
|
||||
{}
|
||||
|
||||
UpdateKeyDescriptionRequest::~UpdateKeyDescriptionRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateKeyDescriptionRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void UpdateKeyDescriptionRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string UpdateKeyDescriptionRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void UpdateKeyDescriptionRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setCoreParameter("Description", description);
|
||||
}
|
||||
|
||||
44
kms/src/model/UpdateKeyDescriptionResult.cc
Normal file
44
kms/src/model/UpdateKeyDescriptionResult.cc
Normal 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/UpdateKeyDescriptionResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
UpdateKeyDescriptionResult::UpdateKeyDescriptionResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateKeyDescriptionResult::UpdateKeyDescriptionResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateKeyDescriptionResult::~UpdateKeyDescriptionResult()
|
||||
{}
|
||||
|
||||
void UpdateKeyDescriptionResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
60
kms/src/model/UpdateRotationPolicyRequest.cc
Normal file
60
kms/src/model/UpdateRotationPolicyRequest.cc
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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/UpdateRotationPolicyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::UpdateRotationPolicyRequest;
|
||||
|
||||
UpdateRotationPolicyRequest::UpdateRotationPolicyRequest() :
|
||||
RpcServiceRequest("kms", "2016-01-20", "UpdateRotationPolicy")
|
||||
{}
|
||||
|
||||
UpdateRotationPolicyRequest::~UpdateRotationPolicyRequest()
|
||||
{}
|
||||
|
||||
std::string UpdateRotationPolicyRequest::getKeyId()const
|
||||
{
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void UpdateRotationPolicyRequest::setKeyId(const std::string& keyId)
|
||||
{
|
||||
keyId_ = keyId;
|
||||
setCoreParameter("KeyId", keyId);
|
||||
}
|
||||
|
||||
std::string UpdateRotationPolicyRequest::getRotationInterval()const
|
||||
{
|
||||
return rotationInterval_;
|
||||
}
|
||||
|
||||
void UpdateRotationPolicyRequest::setRotationInterval(const std::string& rotationInterval)
|
||||
{
|
||||
rotationInterval_ = rotationInterval;
|
||||
setCoreParameter("RotationInterval", rotationInterval);
|
||||
}
|
||||
|
||||
bool UpdateRotationPolicyRequest::getEnableAutomaticRotation()const
|
||||
{
|
||||
return enableAutomaticRotation_;
|
||||
}
|
||||
|
||||
void UpdateRotationPolicyRequest::setEnableAutomaticRotation(bool enableAutomaticRotation)
|
||||
{
|
||||
enableAutomaticRotation_ = enableAutomaticRotation;
|
||||
setCoreParameter("EnableAutomaticRotation", enableAutomaticRotation ? "true" : "false");
|
||||
}
|
||||
|
||||
44
kms/src/model/UpdateRotationPolicyResult.cc
Normal file
44
kms/src/model/UpdateRotationPolicyResult.cc
Normal 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/UpdateRotationPolicyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
UpdateRotationPolicyResult::UpdateRotationPolicyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpdateRotationPolicyResult::UpdateRotationPolicyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpdateRotationPolicyResult::~UpdateRotationPolicyResult()
|
||||
{}
|
||||
|
||||
void UpdateRotationPolicyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user