Support asymmetric keys.

This commit is contained in:
sdk-team
2019-12-31 14:52:02 +08:00
parent a8e2a1e669
commit e471f55ca6
62 changed files with 1833 additions and 29 deletions

View File

@@ -1,3 +1,6 @@
2019-12-31 Version 1.36.228
- Support asymmetric keys.
2019-12-31 Version 1.36.227
- Add request parameter groupType for OnsGroupCreate.

View File

@@ -1 +1 @@
1.36.227
1.36.228

View File

@@ -21,12 +21,22 @@ set(kms_public_header
include/alibabacloud/kms/KmsExport.h )
set(kms_public_header_model
include/alibabacloud/kms/model/AsymmetricDecryptRequest.h
include/alibabacloud/kms/model/AsymmetricDecryptResult.h
include/alibabacloud/kms/model/AsymmetricEncryptRequest.h
include/alibabacloud/kms/model/AsymmetricEncryptResult.h
include/alibabacloud/kms/model/AsymmetricSignRequest.h
include/alibabacloud/kms/model/AsymmetricSignResult.h
include/alibabacloud/kms/model/AsymmetricVerifyRequest.h
include/alibabacloud/kms/model/AsymmetricVerifyResult.h
include/alibabacloud/kms/model/CancelKeyDeletionRequest.h
include/alibabacloud/kms/model/CancelKeyDeletionResult.h
include/alibabacloud/kms/model/CreateAliasRequest.h
include/alibabacloud/kms/model/CreateAliasResult.h
include/alibabacloud/kms/model/CreateKeyRequest.h
include/alibabacloud/kms/model/CreateKeyResult.h
include/alibabacloud/kms/model/CreateKeyVersionRequest.h
include/alibabacloud/kms/model/CreateKeyVersionResult.h
include/alibabacloud/kms/model/DecryptRequest.h
include/alibabacloud/kms/model/DecryptResult.h
include/alibabacloud/kms/model/DeleteAliasRequest.h
@@ -53,6 +63,8 @@ set(kms_public_header_model
include/alibabacloud/kms/model/GenerateDataKeyWithoutPlaintextResult.h
include/alibabacloud/kms/model/GetParametersForImportRequest.h
include/alibabacloud/kms/model/GetParametersForImportResult.h
include/alibabacloud/kms/model/GetPublicKeyRequest.h
include/alibabacloud/kms/model/GetPublicKeyResult.h
include/alibabacloud/kms/model/ImportKeyMaterialRequest.h
include/alibabacloud/kms/model/ImportKeyMaterialResult.h
include/alibabacloud/kms/model/ListAliasesRequest.h
@@ -80,12 +92,22 @@ set(kms_public_header_model
set(kms_src
src/KmsClient.cc
src/model/AsymmetricDecryptRequest.cc
src/model/AsymmetricDecryptResult.cc
src/model/AsymmetricEncryptRequest.cc
src/model/AsymmetricEncryptResult.cc
src/model/AsymmetricSignRequest.cc
src/model/AsymmetricSignResult.cc
src/model/AsymmetricVerifyRequest.cc
src/model/AsymmetricVerifyResult.cc
src/model/CancelKeyDeletionRequest.cc
src/model/CancelKeyDeletionResult.cc
src/model/CreateAliasRequest.cc
src/model/CreateAliasResult.cc
src/model/CreateKeyRequest.cc
src/model/CreateKeyResult.cc
src/model/CreateKeyVersionRequest.cc
src/model/CreateKeyVersionResult.cc
src/model/DecryptRequest.cc
src/model/DecryptResult.cc
src/model/DeleteAliasRequest.cc
@@ -112,6 +134,8 @@ set(kms_src
src/model/GenerateDataKeyWithoutPlaintextResult.cc
src/model/GetParametersForImportRequest.cc
src/model/GetParametersForImportResult.cc
src/model/GetPublicKeyRequest.cc
src/model/GetPublicKeyResult.cc
src/model/ImportKeyMaterialRequest.cc
src/model/ImportKeyMaterialResult.cc
src/model/ListAliasesRequest.cc

View File

@@ -22,12 +22,22 @@
#include <alibabacloud/core/EndpointProvider.h>
#include <alibabacloud/core/RpcServiceClient.h>
#include "KmsExport.h"
#include "model/AsymmetricDecryptRequest.h"
#include "model/AsymmetricDecryptResult.h"
#include "model/AsymmetricEncryptRequest.h"
#include "model/AsymmetricEncryptResult.h"
#include "model/AsymmetricSignRequest.h"
#include "model/AsymmetricSignResult.h"
#include "model/AsymmetricVerifyRequest.h"
#include "model/AsymmetricVerifyResult.h"
#include "model/CancelKeyDeletionRequest.h"
#include "model/CancelKeyDeletionResult.h"
#include "model/CreateAliasRequest.h"
#include "model/CreateAliasResult.h"
#include "model/CreateKeyRequest.h"
#include "model/CreateKeyResult.h"
#include "model/CreateKeyVersionRequest.h"
#include "model/CreateKeyVersionResult.h"
#include "model/DecryptRequest.h"
#include "model/DecryptResult.h"
#include "model/DeleteAliasRequest.h"
@@ -54,6 +64,8 @@
#include "model/GenerateDataKeyWithoutPlaintextResult.h"
#include "model/GetParametersForImportRequest.h"
#include "model/GetParametersForImportResult.h"
#include "model/GetPublicKeyRequest.h"
#include "model/GetPublicKeyResult.h"
#include "model/ImportKeyMaterialRequest.h"
#include "model/ImportKeyMaterialResult.h"
#include "model/ListAliasesRequest.h"
@@ -87,6 +99,18 @@ namespace AlibabaCloud
class ALIBABACLOUD_KMS_EXPORT KmsClient : public RpcServiceClient
{
public:
typedef Outcome<Error, Model::AsymmetricDecryptResult> AsymmetricDecryptOutcome;
typedef std::future<AsymmetricDecryptOutcome> AsymmetricDecryptOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::AsymmetricDecryptRequest&, const AsymmetricDecryptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AsymmetricDecryptAsyncHandler;
typedef Outcome<Error, Model::AsymmetricEncryptResult> AsymmetricEncryptOutcome;
typedef std::future<AsymmetricEncryptOutcome> AsymmetricEncryptOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::AsymmetricEncryptRequest&, const AsymmetricEncryptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AsymmetricEncryptAsyncHandler;
typedef Outcome<Error, Model::AsymmetricSignResult> AsymmetricSignOutcome;
typedef std::future<AsymmetricSignOutcome> AsymmetricSignOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::AsymmetricSignRequest&, const AsymmetricSignOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AsymmetricSignAsyncHandler;
typedef Outcome<Error, Model::AsymmetricVerifyResult> AsymmetricVerifyOutcome;
typedef std::future<AsymmetricVerifyOutcome> AsymmetricVerifyOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::AsymmetricVerifyRequest&, const AsymmetricVerifyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> AsymmetricVerifyAsyncHandler;
typedef Outcome<Error, Model::CancelKeyDeletionResult> CancelKeyDeletionOutcome;
typedef std::future<CancelKeyDeletionOutcome> CancelKeyDeletionOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::CancelKeyDeletionRequest&, const CancelKeyDeletionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CancelKeyDeletionAsyncHandler;
@@ -96,6 +120,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateKeyResult> CreateKeyOutcome;
typedef std::future<CreateKeyOutcome> CreateKeyOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::CreateKeyRequest&, const CreateKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateKeyAsyncHandler;
typedef Outcome<Error, Model::CreateKeyVersionResult> CreateKeyVersionOutcome;
typedef std::future<CreateKeyVersionOutcome> CreateKeyVersionOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::CreateKeyVersionRequest&, const CreateKeyVersionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateKeyVersionAsyncHandler;
typedef Outcome<Error, Model::DecryptResult> DecryptOutcome;
typedef std::future<DecryptOutcome> DecryptOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::DecryptRequest&, const DecryptOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DecryptAsyncHandler;
@@ -135,6 +162,9 @@ namespace AlibabaCloud
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;
typedef Outcome<Error, Model::GetPublicKeyResult> GetPublicKeyOutcome;
typedef std::future<GetPublicKeyOutcome> GetPublicKeyOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::GetPublicKeyRequest&, const GetPublicKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPublicKeyAsyncHandler;
typedef Outcome<Error, Model::ImportKeyMaterialResult> ImportKeyMaterialOutcome;
typedef std::future<ImportKeyMaterialOutcome> ImportKeyMaterialOutcomeCallable;
typedef std::function<void(const KmsClient*, const Model::ImportKeyMaterialRequest&, const ImportKeyMaterialOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ImportKeyMaterialAsyncHandler;
@@ -176,6 +206,18 @@ namespace AlibabaCloud
KmsClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
KmsClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
~KmsClient();
AsymmetricDecryptOutcome asymmetricDecrypt(const Model::AsymmetricDecryptRequest &request)const;
void asymmetricDecryptAsync(const Model::AsymmetricDecryptRequest& request, const AsymmetricDecryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AsymmetricDecryptOutcomeCallable asymmetricDecryptCallable(const Model::AsymmetricDecryptRequest& request) const;
AsymmetricEncryptOutcome asymmetricEncrypt(const Model::AsymmetricEncryptRequest &request)const;
void asymmetricEncryptAsync(const Model::AsymmetricEncryptRequest& request, const AsymmetricEncryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AsymmetricEncryptOutcomeCallable asymmetricEncryptCallable(const Model::AsymmetricEncryptRequest& request) const;
AsymmetricSignOutcome asymmetricSign(const Model::AsymmetricSignRequest &request)const;
void asymmetricSignAsync(const Model::AsymmetricSignRequest& request, const AsymmetricSignAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AsymmetricSignOutcomeCallable asymmetricSignCallable(const Model::AsymmetricSignRequest& request) const;
AsymmetricVerifyOutcome asymmetricVerify(const Model::AsymmetricVerifyRequest &request)const;
void asymmetricVerifyAsync(const Model::AsymmetricVerifyRequest& request, const AsymmetricVerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
AsymmetricVerifyOutcomeCallable asymmetricVerifyCallable(const Model::AsymmetricVerifyRequest& request) const;
CancelKeyDeletionOutcome cancelKeyDeletion(const Model::CancelKeyDeletionRequest &request)const;
void cancelKeyDeletionAsync(const Model::CancelKeyDeletionRequest& request, const CancelKeyDeletionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CancelKeyDeletionOutcomeCallable cancelKeyDeletionCallable(const Model::CancelKeyDeletionRequest& request) const;
@@ -185,6 +227,9 @@ namespace AlibabaCloud
CreateKeyOutcome createKey(const Model::CreateKeyRequest &request)const;
void createKeyAsync(const Model::CreateKeyRequest& request, const CreateKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateKeyOutcomeCallable createKeyCallable(const Model::CreateKeyRequest& request) const;
CreateKeyVersionOutcome createKeyVersion(const Model::CreateKeyVersionRequest &request)const;
void createKeyVersionAsync(const Model::CreateKeyVersionRequest& request, const CreateKeyVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateKeyVersionOutcomeCallable createKeyVersionCallable(const Model::CreateKeyVersionRequest& request) const;
DecryptOutcome decrypt(const Model::DecryptRequest &request)const;
void decryptAsync(const Model::DecryptRequest& request, const DecryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DecryptOutcomeCallable decryptCallable(const Model::DecryptRequest& request) const;
@@ -224,6 +269,9 @@ namespace AlibabaCloud
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;
GetPublicKeyOutcome getPublicKey(const Model::GetPublicKeyRequest &request)const;
void getPublicKeyAsync(const Model::GetPublicKeyRequest& request, const GetPublicKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetPublicKeyOutcomeCallable getPublicKeyCallable(const Model::GetPublicKeyRequest& request) const;
ImportKeyMaterialOutcome importKeyMaterial(const Model::ImportKeyMaterialRequest &request)const;
void importKeyMaterialAsync(const Model::ImportKeyMaterialRequest& request, const ImportKeyMaterialAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ImportKeyMaterialOutcomeCallable importKeyMaterialCallable(const Model::ImportKeyMaterialRequest& request) const;

View File

@@ -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_ASYMMETRICDECRYPTREQUEST_H_
#define ALIBABACLOUD_KMS_MODEL_ASYMMETRICDECRYPTREQUEST_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 AsymmetricDecryptRequest : public RpcServiceRequest
{
public:
AsymmetricDecryptRequest();
~AsymmetricDecryptRequest();
std::string getKeyVersionId()const;
void setKeyVersionId(const std::string& keyVersionId);
std::string getKeyId()const;
void setKeyId(const std::string& keyId);
std::string getCiphertextBlob()const;
void setCiphertextBlob(const std::string& ciphertextBlob);
std::string getAlgorithm()const;
void setAlgorithm(const std::string& algorithm);
private:
std::string keyVersionId_;
std::string keyId_;
std::string ciphertextBlob_;
std::string algorithm_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_ASYMMETRICDECRYPTREQUEST_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_ASYMMETRICDECRYPTRESULT_H_
#define ALIBABACLOUD_KMS_MODEL_ASYMMETRICDECRYPTRESULT_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 AsymmetricDecryptResult : public ServiceResult
{
public:
AsymmetricDecryptResult();
explicit AsymmetricDecryptResult(const std::string &payload);
~AsymmetricDecryptResult();
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_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_ASYMMETRICDECRYPTRESULT_H_

View File

@@ -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_ASYMMETRICENCRYPTREQUEST_H_
#define ALIBABACLOUD_KMS_MODEL_ASYMMETRICENCRYPTREQUEST_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 AsymmetricEncryptRequest : public RpcServiceRequest
{
public:
AsymmetricEncryptRequest();
~AsymmetricEncryptRequest();
std::string getKeyVersionId()const;
void setKeyVersionId(const std::string& keyVersionId);
std::string getKeyId()const;
void setKeyId(const std::string& keyId);
std::string getPlaintext()const;
void setPlaintext(const std::string& plaintext);
std::string getAlgorithm()const;
void setAlgorithm(const std::string& algorithm);
private:
std::string keyVersionId_;
std::string keyId_;
std::string plaintext_;
std::string algorithm_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_ASYMMETRICENCRYPTREQUEST_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_ASYMMETRICENCRYPTRESULT_H_
#define ALIBABACLOUD_KMS_MODEL_ASYMMETRICENCRYPTRESULT_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 AsymmetricEncryptResult : public ServiceResult
{
public:
AsymmetricEncryptResult();
explicit AsymmetricEncryptResult(const std::string &payload);
~AsymmetricEncryptResult();
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_ASYMMETRICENCRYPTRESULT_H_

View File

@@ -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_ASYMMETRICSIGNREQUEST_H_
#define ALIBABACLOUD_KMS_MODEL_ASYMMETRICSIGNREQUEST_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 AsymmetricSignRequest : public RpcServiceRequest
{
public:
AsymmetricSignRequest();
~AsymmetricSignRequest();
std::string getKeyVersionId()const;
void setKeyVersionId(const std::string& keyVersionId);
std::string getDigest()const;
void setDigest(const std::string& digest);
std::string getKeyId()const;
void setKeyId(const std::string& keyId);
std::string getAlgorithm()const;
void setAlgorithm(const std::string& algorithm);
private:
std::string keyVersionId_;
std::string digest_;
std::string keyId_;
std::string algorithm_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_ASYMMETRICSIGNREQUEST_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_ASYMMETRICSIGNRESULT_H_
#define ALIBABACLOUD_KMS_MODEL_ASYMMETRICSIGNRESULT_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 AsymmetricSignResult : public ServiceResult
{
public:
AsymmetricSignResult();
explicit AsymmetricSignResult(const std::string &payload);
~AsymmetricSignResult();
std::string getValue()const;
std::string getKeyId()const;
std::string getKeyVersionId()const;
protected:
void parse(const std::string &payload);
private:
std::string value_;
std::string keyId_;
std::string keyVersionId_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_ASYMMETRICSIGNRESULT_H_

View 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.
*/
#ifndef ALIBABACLOUD_KMS_MODEL_ASYMMETRICVERIFYREQUEST_H_
#define ALIBABACLOUD_KMS_MODEL_ASYMMETRICVERIFYREQUEST_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 AsymmetricVerifyRequest : public RpcServiceRequest
{
public:
AsymmetricVerifyRequest();
~AsymmetricVerifyRequest();
std::string getKeyVersionId()const;
void setKeyVersionId(const std::string& keyVersionId);
std::string getDigest()const;
void setDigest(const std::string& digest);
std::string getKeyId()const;
void setKeyId(const std::string& keyId);
std::string getValue()const;
void setValue(const std::string& value);
std::string getAlgorithm()const;
void setAlgorithm(const std::string& algorithm);
private:
std::string keyVersionId_;
std::string digest_;
std::string keyId_;
std::string value_;
std::string algorithm_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_ASYMMETRICVERIFYREQUEST_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_ASYMMETRICVERIFYRESULT_H_
#define ALIBABACLOUD_KMS_MODEL_ASYMMETRICVERIFYRESULT_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 AsymmetricVerifyResult : public ServiceResult
{
public:
AsymmetricVerifyResult();
explicit AsymmetricVerifyResult(const std::string &payload);
~AsymmetricVerifyResult();
bool getValue()const;
std::string getKeyId()const;
std::string getKeyVersionId()const;
protected:
void parse(const std::string &payload);
private:
bool value_;
std::string keyId_;
std::string keyVersionId_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_ASYMMETRICVERIFYRESULT_H_

View File

@@ -43,6 +43,8 @@ namespace AlibabaCloud
void setOrigin(const std::string& origin);
std::string getDescription()const;
void setDescription(const std::string& description);
std::string getKeySpec()const;
void setKeySpec(const std::string& keySpec);
std::string getRotationInterval()const;
void setRotationInterval(const std::string& rotationInterval);
bool getEnableAutomaticRotation()const;
@@ -53,6 +55,7 @@ namespace AlibabaCloud
std::string keyUsage_;
std::string origin_;
std::string description_;
std::string keySpec_;
std::string rotationInterval_;
bool enableAutomaticRotation_;

View File

@@ -40,6 +40,7 @@ namespace AlibabaCloud
std::string description;
std::string lastRotationDate;
std::string rotationInterval;
std::string keySpec;
std::string keyUsage;
std::string keyId;
std::string primaryKeyVersion;

View File

@@ -0,0 +1,48 @@
/*
* 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_CREATEKEYVERSIONREQUEST_H_
#define ALIBABACLOUD_KMS_MODEL_CREATEKEYVERSIONREQUEST_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 CreateKeyVersionRequest : public RpcServiceRequest
{
public:
CreateKeyVersionRequest();
~CreateKeyVersionRequest();
std::string getKeyId()const;
void setKeyId(const std::string& keyId);
private:
std::string keyId_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_CREATEKEYVERSIONREQUEST_H_

View File

@@ -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_CREATEKEYVERSIONRESULT_H_
#define ALIBABACLOUD_KMS_MODEL_CREATEKEYVERSIONRESULT_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 CreateKeyVersionResult : public ServiceResult
{
public:
struct KeyVersion
{
std::string creationDate;
std::string keyId;
std::string keyVersionId;
};
CreateKeyVersionResult();
explicit CreateKeyVersionResult(const std::string &payload);
~CreateKeyVersionResult();
KeyVersion getKeyVersion()const;
protected:
void parse(const std::string &payload);
private:
KeyVersion keyVersion_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_CREATEKEYVERSIONRESULT_H_

View File

@@ -40,6 +40,7 @@ namespace AlibabaCloud
std::string description;
std::string lastRotationDate;
std::string rotationInterval;
std::string keySpec;
std::string keyUsage;
std::string keyId;
std::string primaryKeyVersion;

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_GETPUBLICKEYREQUEST_H_
#define ALIBABACLOUD_KMS_MODEL_GETPUBLICKEYREQUEST_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 GetPublicKeyRequest : public RpcServiceRequest
{
public:
GetPublicKeyRequest();
~GetPublicKeyRequest();
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_GETPUBLICKEYREQUEST_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_GETPUBLICKEYRESULT_H_
#define ALIBABACLOUD_KMS_MODEL_GETPUBLICKEYRESULT_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 GetPublicKeyResult : public ServiceResult
{
public:
GetPublicKeyResult();
explicit GetPublicKeyResult(const std::string &payload);
~GetPublicKeyResult();
std::string getPublicKey()const;
std::string getKeyId()const;
std::string getKeyVersionId()const;
protected:
void parse(const std::string &payload);
private:
std::string publicKey_;
std::string keyId_;
std::string keyVersionId_;
};
}
}
}
#endif // !ALIBABACLOUD_KMS_MODEL_GETPUBLICKEYRESULT_H_

View File

@@ -51,6 +51,150 @@ KmsClient::KmsClient(const std::string & accessKeyId, const std::string & access
KmsClient::~KmsClient()
{}
KmsClient::AsymmetricDecryptOutcome KmsClient::asymmetricDecrypt(const AsymmetricDecryptRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AsymmetricDecryptOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AsymmetricDecryptOutcome(AsymmetricDecryptResult(outcome.result()));
else
return AsymmetricDecryptOutcome(outcome.error());
}
void KmsClient::asymmetricDecryptAsync(const AsymmetricDecryptRequest& request, const AsymmetricDecryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, asymmetricDecrypt(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::AsymmetricDecryptOutcomeCallable KmsClient::asymmetricDecryptCallable(const AsymmetricDecryptRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AsymmetricDecryptOutcome()>>(
[this, request]()
{
return this->asymmetricDecrypt(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::AsymmetricEncryptOutcome KmsClient::asymmetricEncrypt(const AsymmetricEncryptRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AsymmetricEncryptOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AsymmetricEncryptOutcome(AsymmetricEncryptResult(outcome.result()));
else
return AsymmetricEncryptOutcome(outcome.error());
}
void KmsClient::asymmetricEncryptAsync(const AsymmetricEncryptRequest& request, const AsymmetricEncryptAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, asymmetricEncrypt(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::AsymmetricEncryptOutcomeCallable KmsClient::asymmetricEncryptCallable(const AsymmetricEncryptRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AsymmetricEncryptOutcome()>>(
[this, request]()
{
return this->asymmetricEncrypt(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::AsymmetricSignOutcome KmsClient::asymmetricSign(const AsymmetricSignRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AsymmetricSignOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AsymmetricSignOutcome(AsymmetricSignResult(outcome.result()));
else
return AsymmetricSignOutcome(outcome.error());
}
void KmsClient::asymmetricSignAsync(const AsymmetricSignRequest& request, const AsymmetricSignAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, asymmetricSign(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::AsymmetricSignOutcomeCallable KmsClient::asymmetricSignCallable(const AsymmetricSignRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AsymmetricSignOutcome()>>(
[this, request]()
{
return this->asymmetricSign(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::AsymmetricVerifyOutcome KmsClient::asymmetricVerify(const AsymmetricVerifyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AsymmetricVerifyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AsymmetricVerifyOutcome(AsymmetricVerifyResult(outcome.result()));
else
return AsymmetricVerifyOutcome(outcome.error());
}
void KmsClient::asymmetricVerifyAsync(const AsymmetricVerifyRequest& request, const AsymmetricVerifyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, asymmetricVerify(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::AsymmetricVerifyOutcomeCallable KmsClient::asymmetricVerifyCallable(const AsymmetricVerifyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AsymmetricVerifyOutcome()>>(
[this, request]()
{
return this->asymmetricVerify(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::CancelKeyDeletionOutcome KmsClient::cancelKeyDeletion(const CancelKeyDeletionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -159,6 +303,42 @@ KmsClient::CreateKeyOutcomeCallable KmsClient::createKeyCallable(const CreateKey
return task->get_future();
}
KmsClient::CreateKeyVersionOutcome KmsClient::createKeyVersion(const CreateKeyVersionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateKeyVersionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateKeyVersionOutcome(CreateKeyVersionResult(outcome.result()));
else
return CreateKeyVersionOutcome(outcome.error());
}
void KmsClient::createKeyVersionAsync(const CreateKeyVersionRequest& request, const CreateKeyVersionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createKeyVersion(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::CreateKeyVersionOutcomeCallable KmsClient::createKeyVersionCallable(const CreateKeyVersionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateKeyVersionOutcome()>>(
[this, request]()
{
return this->createKeyVersion(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::DecryptOutcome KmsClient::decrypt(const DecryptRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -627,6 +807,42 @@ KmsClient::GetParametersForImportOutcomeCallable KmsClient::getParametersForImpo
return task->get_future();
}
KmsClient::GetPublicKeyOutcome KmsClient::getPublicKey(const GetPublicKeyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetPublicKeyOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetPublicKeyOutcome(GetPublicKeyResult(outcome.result()));
else
return GetPublicKeyOutcome(outcome.error());
}
void KmsClient::getPublicKeyAsync(const GetPublicKeyRequest& request, const GetPublicKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getPublicKey(request), context);
};
asyncExecute(new Runnable(fn));
}
KmsClient::GetPublicKeyOutcomeCallable KmsClient::getPublicKeyCallable(const GetPublicKeyRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetPublicKeyOutcome()>>(
[this, request]()
{
return this->getPublicKey(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
KmsClient::ImportKeyMaterialOutcome KmsClient::importKeyMaterial(const ImportKeyMaterialRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,73 @@
/*
* 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/AsymmetricDecryptRequest.h>
using AlibabaCloud::Kms::Model::AsymmetricDecryptRequest;
AsymmetricDecryptRequest::AsymmetricDecryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "AsymmetricDecrypt")
{
setMethod(HttpRequest::Method::Post);
}
AsymmetricDecryptRequest::~AsymmetricDecryptRequest()
{}
std::string AsymmetricDecryptRequest::getKeyVersionId()const
{
return keyVersionId_;
}
void AsymmetricDecryptRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
}
std::string AsymmetricDecryptRequest::getKeyId()const
{
return keyId_;
}
void AsymmetricDecryptRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
}
std::string AsymmetricDecryptRequest::getCiphertextBlob()const
{
return ciphertextBlob_;
}
void AsymmetricDecryptRequest::setCiphertextBlob(const std::string& ciphertextBlob)
{
ciphertextBlob_ = ciphertextBlob;
setCoreParameter("CiphertextBlob", ciphertextBlob);
}
std::string AsymmetricDecryptRequest::getAlgorithm()const
{
return algorithm_;
}
void AsymmetricDecryptRequest::setAlgorithm(const std::string& algorithm)
{
algorithm_ = algorithm;
setCoreParameter("Algorithm", algorithm);
}

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/AsymmetricDecryptResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
AsymmetricDecryptResult::AsymmetricDecryptResult() :
ServiceResult()
{}
AsymmetricDecryptResult::AsymmetricDecryptResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AsymmetricDecryptResult::~AsymmetricDecryptResult()
{}
void AsymmetricDecryptResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Plaintext"].isNull())
plaintext_ = value["Plaintext"].asString();
if(!value["KeyId"].isNull())
keyId_ = value["KeyId"].asString();
if(!value["KeyVersionId"].isNull())
keyVersionId_ = value["KeyVersionId"].asString();
}
std::string AsymmetricDecryptResult::getPlaintext()const
{
return plaintext_;
}
std::string AsymmetricDecryptResult::getKeyId()const
{
return keyId_;
}
std::string AsymmetricDecryptResult::getKeyVersionId()const
{
return keyVersionId_;
}

View File

@@ -0,0 +1,73 @@
/*
* 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/AsymmetricEncryptRequest.h>
using AlibabaCloud::Kms::Model::AsymmetricEncryptRequest;
AsymmetricEncryptRequest::AsymmetricEncryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "AsymmetricEncrypt")
{
setMethod(HttpRequest::Method::Post);
}
AsymmetricEncryptRequest::~AsymmetricEncryptRequest()
{}
std::string AsymmetricEncryptRequest::getKeyVersionId()const
{
return keyVersionId_;
}
void AsymmetricEncryptRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
}
std::string AsymmetricEncryptRequest::getKeyId()const
{
return keyId_;
}
void AsymmetricEncryptRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
}
std::string AsymmetricEncryptRequest::getPlaintext()const
{
return plaintext_;
}
void AsymmetricEncryptRequest::setPlaintext(const std::string& plaintext)
{
plaintext_ = plaintext;
setCoreParameter("Plaintext", plaintext);
}
std::string AsymmetricEncryptRequest::getAlgorithm()const
{
return algorithm_;
}
void AsymmetricEncryptRequest::setAlgorithm(const std::string& algorithm)
{
algorithm_ = algorithm;
setCoreParameter("Algorithm", algorithm);
}

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/AsymmetricEncryptResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
AsymmetricEncryptResult::AsymmetricEncryptResult() :
ServiceResult()
{}
AsymmetricEncryptResult::AsymmetricEncryptResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AsymmetricEncryptResult::~AsymmetricEncryptResult()
{}
void AsymmetricEncryptResult::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 AsymmetricEncryptResult::getCiphertextBlob()const
{
return ciphertextBlob_;
}
std::string AsymmetricEncryptResult::getKeyId()const
{
return keyId_;
}
std::string AsymmetricEncryptResult::getKeyVersionId()const
{
return keyVersionId_;
}

View File

@@ -0,0 +1,73 @@
/*
* 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/AsymmetricSignRequest.h>
using AlibabaCloud::Kms::Model::AsymmetricSignRequest;
AsymmetricSignRequest::AsymmetricSignRequest() :
RpcServiceRequest("kms", "2016-01-20", "AsymmetricSign")
{
setMethod(HttpRequest::Method::Post);
}
AsymmetricSignRequest::~AsymmetricSignRequest()
{}
std::string AsymmetricSignRequest::getKeyVersionId()const
{
return keyVersionId_;
}
void AsymmetricSignRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
}
std::string AsymmetricSignRequest::getDigest()const
{
return digest_;
}
void AsymmetricSignRequest::setDigest(const std::string& digest)
{
digest_ = digest;
setCoreParameter("Digest", digest);
}
std::string AsymmetricSignRequest::getKeyId()const
{
return keyId_;
}
void AsymmetricSignRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
}
std::string AsymmetricSignRequest::getAlgorithm()const
{
return algorithm_;
}
void AsymmetricSignRequest::setAlgorithm(const std::string& algorithm)
{
algorithm_ = algorithm;
setCoreParameter("Algorithm", algorithm);
}

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/AsymmetricSignResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
AsymmetricSignResult::AsymmetricSignResult() :
ServiceResult()
{}
AsymmetricSignResult::AsymmetricSignResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AsymmetricSignResult::~AsymmetricSignResult()
{}
void AsymmetricSignResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Value"].isNull())
value_ = value["Value"].asString();
if(!value["KeyId"].isNull())
keyId_ = value["KeyId"].asString();
if(!value["KeyVersionId"].isNull())
keyVersionId_ = value["KeyVersionId"].asString();
}
std::string AsymmetricSignResult::getValue()const
{
return value_;
}
std::string AsymmetricSignResult::getKeyId()const
{
return keyId_;
}
std::string AsymmetricSignResult::getKeyVersionId()const
{
return keyVersionId_;
}

View File

@@ -0,0 +1,84 @@
/*
* 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/AsymmetricVerifyRequest.h>
using AlibabaCloud::Kms::Model::AsymmetricVerifyRequest;
AsymmetricVerifyRequest::AsymmetricVerifyRequest() :
RpcServiceRequest("kms", "2016-01-20", "AsymmetricVerify")
{
setMethod(HttpRequest::Method::Post);
}
AsymmetricVerifyRequest::~AsymmetricVerifyRequest()
{}
std::string AsymmetricVerifyRequest::getKeyVersionId()const
{
return keyVersionId_;
}
void AsymmetricVerifyRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
}
std::string AsymmetricVerifyRequest::getDigest()const
{
return digest_;
}
void AsymmetricVerifyRequest::setDigest(const std::string& digest)
{
digest_ = digest;
setCoreParameter("Digest", digest);
}
std::string AsymmetricVerifyRequest::getKeyId()const
{
return keyId_;
}
void AsymmetricVerifyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
}
std::string AsymmetricVerifyRequest::getValue()const
{
return value_;
}
void AsymmetricVerifyRequest::setValue(const std::string& value)
{
value_ = value;
setCoreParameter("Value", value);
}
std::string AsymmetricVerifyRequest::getAlgorithm()const
{
return algorithm_;
}
void AsymmetricVerifyRequest::setAlgorithm(const std::string& algorithm)
{
algorithm_ = algorithm;
setCoreParameter("Algorithm", algorithm);
}

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/AsymmetricVerifyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
AsymmetricVerifyResult::AsymmetricVerifyResult() :
ServiceResult()
{}
AsymmetricVerifyResult::AsymmetricVerifyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AsymmetricVerifyResult::~AsymmetricVerifyResult()
{}
void AsymmetricVerifyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Value"].isNull())
value_ = value["Value"].asString() == "true";
if(!value["KeyId"].isNull())
keyId_ = value["KeyId"].asString();
if(!value["KeyVersionId"].isNull())
keyVersionId_ = value["KeyVersionId"].asString();
}
bool AsymmetricVerifyResult::getValue()const
{
return value_;
}
std::string AsymmetricVerifyResult::getKeyId()const
{
return keyId_;
}
std::string AsymmetricVerifyResult::getKeyVersionId()const
{
return keyVersionId_;
}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::CancelKeyDeletionRequest;
CancelKeyDeletionRequest::CancelKeyDeletionRequest() :
RpcServiceRequest("kms", "2016-01-20", "CancelKeyDeletion")
{}
{
setMethod(HttpRequest::Method::Post);
}
CancelKeyDeletionRequest::~CancelKeyDeletionRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::CreateAliasRequest;
CreateAliasRequest::CreateAliasRequest() :
RpcServiceRequest("kms", "2016-01-20", "CreateAlias")
{}
{
setMethod(HttpRequest::Method::Post);
}
CreateAliasRequest::~CreateAliasRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::CreateKeyRequest;
CreateKeyRequest::CreateKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "CreateKey")
{}
{
setMethod(HttpRequest::Method::Post);
}
CreateKeyRequest::~CreateKeyRequest()
{}
@@ -69,6 +71,17 @@ void CreateKeyRequest::setDescription(const std::string& description)
setCoreParameter("Description", description);
}
std::string CreateKeyRequest::getKeySpec()const
{
return keySpec_;
}
void CreateKeyRequest::setKeySpec(const std::string& keySpec)
{
keySpec_ = keySpec;
setCoreParameter("KeySpec", keySpec);
}
std::string CreateKeyRequest::getRotationInterval()const
{
return rotationInterval_;

View File

@@ -72,6 +72,8 @@ void CreateKeyResult::parse(const std::string &payload)
keyMetadata_.rotationInterval = keyMetadataNode["RotationInterval"].asString();
if(!keyMetadataNode["NextRotationDate"].isNull())
keyMetadata_.nextRotationDate = keyMetadataNode["NextRotationDate"].asString();
if(!keyMetadataNode["KeySpec"].isNull())
keyMetadata_.keySpec = keyMetadataNode["KeySpec"].asString();
}

View File

@@ -0,0 +1,40 @@
/*
* 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/CreateKeyVersionRequest.h>
using AlibabaCloud::Kms::Model::CreateKeyVersionRequest;
CreateKeyVersionRequest::CreateKeyVersionRequest() :
RpcServiceRequest("kms", "2016-01-20", "CreateKeyVersion")
{
setMethod(HttpRequest::Method::Post);
}
CreateKeyVersionRequest::~CreateKeyVersionRequest()
{}
std::string CreateKeyVersionRequest::getKeyId()const
{
return keyId_;
}
void CreateKeyVersionRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
}

View 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/CreateKeyVersionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
CreateKeyVersionResult::CreateKeyVersionResult() :
ServiceResult()
{}
CreateKeyVersionResult::CreateKeyVersionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateKeyVersionResult::~CreateKeyVersionResult()
{}
void CreateKeyVersionResult::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();
}
CreateKeyVersionResult::KeyVersion CreateKeyVersionResult::getKeyVersion()const
{
return keyVersion_;
}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::DecryptRequest;
DecryptRequest::DecryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "Decrypt")
{}
{
setMethod(HttpRequest::Method::Post);
}
DecryptRequest::~DecryptRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::DeleteAliasRequest;
DeleteAliasRequest::DeleteAliasRequest() :
RpcServiceRequest("kms", "2016-01-20", "DeleteAlias")
{}
{
setMethod(HttpRequest::Method::Post);
}
DeleteAliasRequest::~DeleteAliasRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::DeleteKeyMaterialRequest;
DeleteKeyMaterialRequest::DeleteKeyMaterialRequest() :
RpcServiceRequest("kms", "2016-01-20", "DeleteKeyMaterial")
{}
{
setMethod(HttpRequest::Method::Post);
}
DeleteKeyMaterialRequest::~DeleteKeyMaterialRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::DescribeKeyRequest;
DescribeKeyRequest::DescribeKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeKey")
{}
{
setMethod(HttpRequest::Method::Post);
}
DescribeKeyRequest::~DescribeKeyRequest()
{}

View File

@@ -72,6 +72,8 @@ void DescribeKeyResult::parse(const std::string &payload)
keyMetadata_.rotationInterval = keyMetadataNode["RotationInterval"].asString();
if(!keyMetadataNode["NextRotationDate"].isNull())
keyMetadata_.nextRotationDate = keyMetadataNode["NextRotationDate"].asString();
if(!keyMetadataNode["KeySpec"].isNull())
keyMetadata_.keySpec = keyMetadataNode["KeySpec"].asString();
}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::DescribeKeyVersionRequest;
DescribeKeyVersionRequest::DescribeKeyVersionRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeKeyVersion")
{}
{
setMethod(HttpRequest::Method::Post);
}
DescribeKeyVersionRequest::~DescribeKeyVersionRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::DescribeRegionsRequest;
DescribeRegionsRequest::DescribeRegionsRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeRegions")
{}
{
setMethod(HttpRequest::Method::Post);
}
DescribeRegionsRequest::~DescribeRegionsRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::DescribeServiceRequest;
DescribeServiceRequest::DescribeServiceRequest() :
RpcServiceRequest("kms", "2016-01-20", "DescribeService")
{}
{
setMethod(HttpRequest::Method::Post);
}
DescribeServiceRequest::~DescribeServiceRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::DisableKeyRequest;
DisableKeyRequest::DisableKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "DisableKey")
{}
{
setMethod(HttpRequest::Method::Post);
}
DisableKeyRequest::~DisableKeyRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::EnableKeyRequest;
EnableKeyRequest::EnableKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "EnableKey")
{}
{
setMethod(HttpRequest::Method::Post);
}
EnableKeyRequest::~EnableKeyRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::EncryptRequest;
EncryptRequest::EncryptRequest() :
RpcServiceRequest("kms", "2016-01-20", "Encrypt")
{}
{
setMethod(HttpRequest::Method::Post);
}
EncryptRequest::~EncryptRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::GenerateDataKeyRequest;
GenerateDataKeyRequest::GenerateDataKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "GenerateDataKey")
{}
{
setMethod(HttpRequest::Method::Post);
}
GenerateDataKeyRequest::~GenerateDataKeyRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::GenerateDataKeyWithoutPlaintextRequest;
GenerateDataKeyWithoutPlaintextRequest::GenerateDataKeyWithoutPlaintextRequest() :
RpcServiceRequest("kms", "2016-01-20", "GenerateDataKeyWithoutPlaintext")
{}
{
setMethod(HttpRequest::Method::Post);
}
GenerateDataKeyWithoutPlaintextRequest::~GenerateDataKeyWithoutPlaintextRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::GetParametersForImportRequest;
GetParametersForImportRequest::GetParametersForImportRequest() :
RpcServiceRequest("kms", "2016-01-20", "GetParametersForImport")
{}
{
setMethod(HttpRequest::Method::Post);
}
GetParametersForImportRequest::~GetParametersForImportRequest()
{}

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/GetPublicKeyRequest.h>
using AlibabaCloud::Kms::Model::GetPublicKeyRequest;
GetPublicKeyRequest::GetPublicKeyRequest() :
RpcServiceRequest("kms", "2016-01-20", "GetPublicKey")
{
setMethod(HttpRequest::Method::Post);
}
GetPublicKeyRequest::~GetPublicKeyRequest()
{}
std::string GetPublicKeyRequest::getKeyVersionId()const
{
return keyVersionId_;
}
void GetPublicKeyRequest::setKeyVersionId(const std::string& keyVersionId)
{
keyVersionId_ = keyVersionId;
setCoreParameter("KeyVersionId", keyVersionId);
}
std::string GetPublicKeyRequest::getKeyId()const
{
return keyId_;
}
void GetPublicKeyRequest::setKeyId(const std::string& keyId)
{
keyId_ = keyId;
setCoreParameter("KeyId", keyId);
}

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/GetPublicKeyResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Kms;
using namespace AlibabaCloud::Kms::Model;
GetPublicKeyResult::GetPublicKeyResult() :
ServiceResult()
{}
GetPublicKeyResult::GetPublicKeyResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetPublicKeyResult::~GetPublicKeyResult()
{}
void GetPublicKeyResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["PublicKey"].isNull())
publicKey_ = value["PublicKey"].asString();
if(!value["KeyId"].isNull())
keyId_ = value["KeyId"].asString();
if(!value["KeyVersionId"].isNull())
keyVersionId_ = value["KeyVersionId"].asString();
}
std::string GetPublicKeyResult::getPublicKey()const
{
return publicKey_;
}
std::string GetPublicKeyResult::getKeyId()const
{
return keyId_;
}
std::string GetPublicKeyResult::getKeyVersionId()const
{
return keyVersionId_;
}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::ImportKeyMaterialRequest;
ImportKeyMaterialRequest::ImportKeyMaterialRequest() :
RpcServiceRequest("kms", "2016-01-20", "ImportKeyMaterial")
{}
{
setMethod(HttpRequest::Method::Post);
}
ImportKeyMaterialRequest::~ImportKeyMaterialRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::ListAliasesByKeyIdRequest;
ListAliasesByKeyIdRequest::ListAliasesByKeyIdRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListAliasesByKeyId")
{}
{
setMethod(HttpRequest::Method::Post);
}
ListAliasesByKeyIdRequest::~ListAliasesByKeyIdRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::ListAliasesRequest;
ListAliasesRequest::ListAliasesRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListAliases")
{}
{
setMethod(HttpRequest::Method::Post);
}
ListAliasesRequest::~ListAliasesRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::ListKeyVersionsRequest;
ListKeyVersionsRequest::ListKeyVersionsRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListKeyVersions")
{}
{
setMethod(HttpRequest::Method::Post);
}
ListKeyVersionsRequest::~ListKeyVersionsRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::ListKeysRequest;
ListKeysRequest::ListKeysRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListKeys")
{}
{
setMethod(HttpRequest::Method::Post);
}
ListKeysRequest::~ListKeysRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::ListResourceTagsRequest;
ListResourceTagsRequest::ListResourceTagsRequest() :
RpcServiceRequest("kms", "2016-01-20", "ListResourceTags")
{}
{
setMethod(HttpRequest::Method::Post);
}
ListResourceTagsRequest::~ListResourceTagsRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::ScheduleKeyDeletionRequest;
ScheduleKeyDeletionRequest::ScheduleKeyDeletionRequest() :
RpcServiceRequest("kms", "2016-01-20", "ScheduleKeyDeletion")
{}
{
setMethod(HttpRequest::Method::Post);
}
ScheduleKeyDeletionRequest::~ScheduleKeyDeletionRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::TagResourceRequest;
TagResourceRequest::TagResourceRequest() :
RpcServiceRequest("kms", "2016-01-20", "TagResource")
{}
{
setMethod(HttpRequest::Method::Post);
}
TagResourceRequest::~TagResourceRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::UntagResourceRequest;
UntagResourceRequest::UntagResourceRequest() :
RpcServiceRequest("kms", "2016-01-20", "UntagResource")
{}
{
setMethod(HttpRequest::Method::Post);
}
UntagResourceRequest::~UntagResourceRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::UpdateAliasRequest;
UpdateAliasRequest::UpdateAliasRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateAlias")
{}
{
setMethod(HttpRequest::Method::Post);
}
UpdateAliasRequest::~UpdateAliasRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::UpdateKeyDescriptionRequest;
UpdateKeyDescriptionRequest::UpdateKeyDescriptionRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateKeyDescription")
{}
{
setMethod(HttpRequest::Method::Post);
}
UpdateKeyDescriptionRequest::~UpdateKeyDescriptionRequest()
{}

View File

@@ -20,7 +20,9 @@ using AlibabaCloud::Kms::Model::UpdateRotationPolicyRequest;
UpdateRotationPolicyRequest::UpdateRotationPolicyRequest() :
RpcServiceRequest("kms", "2016-01-20", "UpdateRotationPolicy")
{}
{
setMethod(HttpRequest::Method::Post);
}
UpdateRotationPolicyRequest::~UpdateRotationPolicyRequest()
{}