Support key policy and secret policy OpenAPI.
This commit is contained in:
@@ -113,6 +113,8 @@ set(kms_public_header_model
|
||||
include/alibabacloud/kms/model/GetCertificateResult.h
|
||||
include/alibabacloud/kms/model/GetClientKeyRequest.h
|
||||
include/alibabacloud/kms/model/GetClientKeyResult.h
|
||||
include/alibabacloud/kms/model/GetKeyPolicyRequest.h
|
||||
include/alibabacloud/kms/model/GetKeyPolicyResult.h
|
||||
include/alibabacloud/kms/model/GetKmsInstanceRequest.h
|
||||
include/alibabacloud/kms/model/GetKmsInstanceResult.h
|
||||
include/alibabacloud/kms/model/GetParametersForImportRequest.h
|
||||
@@ -121,6 +123,8 @@ set(kms_public_header_model
|
||||
include/alibabacloud/kms/model/GetPublicKeyResult.h
|
||||
include/alibabacloud/kms/model/GetRandomPasswordRequest.h
|
||||
include/alibabacloud/kms/model/GetRandomPasswordResult.h
|
||||
include/alibabacloud/kms/model/GetSecretPolicyRequest.h
|
||||
include/alibabacloud/kms/model/GetSecretPolicyResult.h
|
||||
include/alibabacloud/kms/model/GetSecretValueRequest.h
|
||||
include/alibabacloud/kms/model/GetSecretValueResult.h
|
||||
include/alibabacloud/kms/model/ImportKeyMaterialRequest.h
|
||||
@@ -165,6 +169,10 @@ set(kms_public_header_model
|
||||
include/alibabacloud/kms/model/ScheduleKeyDeletionResult.h
|
||||
include/alibabacloud/kms/model/SetDeletionProtectionRequest.h
|
||||
include/alibabacloud/kms/model/SetDeletionProtectionResult.h
|
||||
include/alibabacloud/kms/model/SetKeyPolicyRequest.h
|
||||
include/alibabacloud/kms/model/SetKeyPolicyResult.h
|
||||
include/alibabacloud/kms/model/SetSecretPolicyRequest.h
|
||||
include/alibabacloud/kms/model/SetSecretPolicyResult.h
|
||||
include/alibabacloud/kms/model/TagResourceRequest.h
|
||||
include/alibabacloud/kms/model/TagResourceResult.h
|
||||
include/alibabacloud/kms/model/TagResourcesRequest.h
|
||||
@@ -292,6 +300,8 @@ set(kms_src
|
||||
src/model/GetCertificateResult.cc
|
||||
src/model/GetClientKeyRequest.cc
|
||||
src/model/GetClientKeyResult.cc
|
||||
src/model/GetKeyPolicyRequest.cc
|
||||
src/model/GetKeyPolicyResult.cc
|
||||
src/model/GetKmsInstanceRequest.cc
|
||||
src/model/GetKmsInstanceResult.cc
|
||||
src/model/GetParametersForImportRequest.cc
|
||||
@@ -300,6 +310,8 @@ set(kms_src
|
||||
src/model/GetPublicKeyResult.cc
|
||||
src/model/GetRandomPasswordRequest.cc
|
||||
src/model/GetRandomPasswordResult.cc
|
||||
src/model/GetSecretPolicyRequest.cc
|
||||
src/model/GetSecretPolicyResult.cc
|
||||
src/model/GetSecretValueRequest.cc
|
||||
src/model/GetSecretValueResult.cc
|
||||
src/model/ImportKeyMaterialRequest.cc
|
||||
@@ -344,6 +356,10 @@ set(kms_src
|
||||
src/model/ScheduleKeyDeletionResult.cc
|
||||
src/model/SetDeletionProtectionRequest.cc
|
||||
src/model/SetDeletionProtectionResult.cc
|
||||
src/model/SetKeyPolicyRequest.cc
|
||||
src/model/SetKeyPolicyResult.cc
|
||||
src/model/SetSecretPolicyRequest.cc
|
||||
src/model/SetSecretPolicyResult.cc
|
||||
src/model/TagResourceRequest.cc
|
||||
src/model/TagResourceResult.cc
|
||||
src/model/TagResourcesRequest.cc
|
||||
|
||||
@@ -114,6 +114,8 @@
|
||||
#include "model/GetCertificateResult.h"
|
||||
#include "model/GetClientKeyRequest.h"
|
||||
#include "model/GetClientKeyResult.h"
|
||||
#include "model/GetKeyPolicyRequest.h"
|
||||
#include "model/GetKeyPolicyResult.h"
|
||||
#include "model/GetKmsInstanceRequest.h"
|
||||
#include "model/GetKmsInstanceResult.h"
|
||||
#include "model/GetParametersForImportRequest.h"
|
||||
@@ -122,6 +124,8 @@
|
||||
#include "model/GetPublicKeyResult.h"
|
||||
#include "model/GetRandomPasswordRequest.h"
|
||||
#include "model/GetRandomPasswordResult.h"
|
||||
#include "model/GetSecretPolicyRequest.h"
|
||||
#include "model/GetSecretPolicyResult.h"
|
||||
#include "model/GetSecretValueRequest.h"
|
||||
#include "model/GetSecretValueResult.h"
|
||||
#include "model/ImportKeyMaterialRequest.h"
|
||||
@@ -166,6 +170,10 @@
|
||||
#include "model/ScheduleKeyDeletionResult.h"
|
||||
#include "model/SetDeletionProtectionRequest.h"
|
||||
#include "model/SetDeletionProtectionResult.h"
|
||||
#include "model/SetKeyPolicyRequest.h"
|
||||
#include "model/SetKeyPolicyResult.h"
|
||||
#include "model/SetSecretPolicyRequest.h"
|
||||
#include "model/SetSecretPolicyResult.h"
|
||||
#include "model/TagResourceRequest.h"
|
||||
#include "model/TagResourceResult.h"
|
||||
#include "model/TagResourcesRequest.h"
|
||||
@@ -345,6 +353,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetClientKeyResult> GetClientKeyOutcome;
|
||||
typedef std::future<GetClientKeyOutcome> GetClientKeyOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::GetClientKeyRequest&, const GetClientKeyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetClientKeyAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetKeyPolicyResult> GetKeyPolicyOutcome;
|
||||
typedef std::future<GetKeyPolicyOutcome> GetKeyPolicyOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::GetKeyPolicyRequest&, const GetKeyPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetKeyPolicyAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetKmsInstanceResult> GetKmsInstanceOutcome;
|
||||
typedef std::future<GetKmsInstanceOutcome> GetKmsInstanceOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::GetKmsInstanceRequest&, const GetKmsInstanceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetKmsInstanceAsyncHandler;
|
||||
@@ -357,6 +368,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetRandomPasswordResult> GetRandomPasswordOutcome;
|
||||
typedef std::future<GetRandomPasswordOutcome> GetRandomPasswordOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::GetRandomPasswordRequest&, const GetRandomPasswordOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetRandomPasswordAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetSecretPolicyResult> GetSecretPolicyOutcome;
|
||||
typedef std::future<GetSecretPolicyOutcome> GetSecretPolicyOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::GetSecretPolicyRequest&, const GetSecretPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetSecretPolicyAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetSecretValueResult> GetSecretValueOutcome;
|
||||
typedef std::future<GetSecretValueOutcome> GetSecretValueOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::GetSecretValueRequest&, const GetSecretValueOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetSecretValueAsyncHandler;
|
||||
@@ -423,6 +437,12 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::SetDeletionProtectionResult> SetDeletionProtectionOutcome;
|
||||
typedef std::future<SetDeletionProtectionOutcome> SetDeletionProtectionOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::SetDeletionProtectionRequest&, const SetDeletionProtectionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetDeletionProtectionAsyncHandler;
|
||||
typedef Outcome<Error, Model::SetKeyPolicyResult> SetKeyPolicyOutcome;
|
||||
typedef std::future<SetKeyPolicyOutcome> SetKeyPolicyOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::SetKeyPolicyRequest&, const SetKeyPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetKeyPolicyAsyncHandler;
|
||||
typedef Outcome<Error, Model::SetSecretPolicyResult> SetSecretPolicyOutcome;
|
||||
typedef std::future<SetSecretPolicyOutcome> SetSecretPolicyOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::SetSecretPolicyRequest&, const SetSecretPolicyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SetSecretPolicyAsyncHandler;
|
||||
typedef Outcome<Error, Model::TagResourceResult> TagResourceOutcome;
|
||||
typedef std::future<TagResourceOutcome> TagResourceOutcomeCallable;
|
||||
typedef std::function<void(const KmsClient*, const Model::TagResourceRequest&, const TagResourceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> TagResourceAsyncHandler;
|
||||
@@ -614,6 +634,9 @@ namespace AlibabaCloud
|
||||
GetClientKeyOutcome getClientKey(const Model::GetClientKeyRequest &request)const;
|
||||
void getClientKeyAsync(const Model::GetClientKeyRequest& request, const GetClientKeyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetClientKeyOutcomeCallable getClientKeyCallable(const Model::GetClientKeyRequest& request) const;
|
||||
GetKeyPolicyOutcome getKeyPolicy(const Model::GetKeyPolicyRequest &request)const;
|
||||
void getKeyPolicyAsync(const Model::GetKeyPolicyRequest& request, const GetKeyPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetKeyPolicyOutcomeCallable getKeyPolicyCallable(const Model::GetKeyPolicyRequest& request) const;
|
||||
GetKmsInstanceOutcome getKmsInstance(const Model::GetKmsInstanceRequest &request)const;
|
||||
void getKmsInstanceAsync(const Model::GetKmsInstanceRequest& request, const GetKmsInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetKmsInstanceOutcomeCallable getKmsInstanceCallable(const Model::GetKmsInstanceRequest& request) const;
|
||||
@@ -626,6 +649,9 @@ namespace AlibabaCloud
|
||||
GetRandomPasswordOutcome getRandomPassword(const Model::GetRandomPasswordRequest &request)const;
|
||||
void getRandomPasswordAsync(const Model::GetRandomPasswordRequest& request, const GetRandomPasswordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetRandomPasswordOutcomeCallable getRandomPasswordCallable(const Model::GetRandomPasswordRequest& request) const;
|
||||
GetSecretPolicyOutcome getSecretPolicy(const Model::GetSecretPolicyRequest &request)const;
|
||||
void getSecretPolicyAsync(const Model::GetSecretPolicyRequest& request, const GetSecretPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetSecretPolicyOutcomeCallable getSecretPolicyCallable(const Model::GetSecretPolicyRequest& request) const;
|
||||
GetSecretValueOutcome getSecretValue(const Model::GetSecretValueRequest &request)const;
|
||||
void getSecretValueAsync(const Model::GetSecretValueRequest& request, const GetSecretValueAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetSecretValueOutcomeCallable getSecretValueCallable(const Model::GetSecretValueRequest& request) const;
|
||||
@@ -692,6 +718,12 @@ namespace AlibabaCloud
|
||||
SetDeletionProtectionOutcome setDeletionProtection(const Model::SetDeletionProtectionRequest &request)const;
|
||||
void setDeletionProtectionAsync(const Model::SetDeletionProtectionRequest& request, const SetDeletionProtectionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SetDeletionProtectionOutcomeCallable setDeletionProtectionCallable(const Model::SetDeletionProtectionRequest& request) const;
|
||||
SetKeyPolicyOutcome setKeyPolicy(const Model::SetKeyPolicyRequest &request)const;
|
||||
void setKeyPolicyAsync(const Model::SetKeyPolicyRequest& request, const SetKeyPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SetKeyPolicyOutcomeCallable setKeyPolicyCallable(const Model::SetKeyPolicyRequest& request) const;
|
||||
SetSecretPolicyOutcome setSecretPolicy(const Model::SetSecretPolicyRequest &request)const;
|
||||
void setSecretPolicyAsync(const Model::SetSecretPolicyRequest& request, const SetSecretPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SetSecretPolicyOutcomeCallable setSecretPolicyCallable(const Model::SetSecretPolicyRequest& request) const;
|
||||
TagResourceOutcome tagResource(const Model::TagResourceRequest &request)const;
|
||||
void tagResourceAsync(const Model::TagResourceRequest& request, const TagResourceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
TagResourceOutcomeCallable tagResourceCallable(const Model::TagResourceRequest& request) const;
|
||||
|
||||
@@ -48,6 +48,8 @@ public:
|
||||
void setKeyUsage(const std::string &keyUsage);
|
||||
std::string getDKMSInstanceId() const;
|
||||
void setDKMSInstanceId(const std::string &dKMSInstanceId);
|
||||
std::string getPolicy() const;
|
||||
void setPolicy(const std::string &policy);
|
||||
|
||||
private:
|
||||
std::string origin_;
|
||||
@@ -59,6 +61,7 @@ private:
|
||||
std::string protectionLevel_;
|
||||
std::string keyUsage_;
|
||||
std::string dKMSInstanceId_;
|
||||
std::string policy_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Kms
|
||||
|
||||
@@ -54,6 +54,8 @@ public:
|
||||
void setSecretName(const std::string &secretName);
|
||||
std::string getSecretDataType() const;
|
||||
void setSecretDataType(const std::string &secretDataType);
|
||||
std::string getPolicy() const;
|
||||
void setPolicy(const std::string &policy);
|
||||
|
||||
private:
|
||||
std::string secretType_;
|
||||
@@ -68,6 +70,7 @@ private:
|
||||
std::string secretData_;
|
||||
std::string secretName_;
|
||||
std::string secretDataType_;
|
||||
std::string policy_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Kms
|
||||
|
||||
45
kms/include/alibabacloud/kms/model/GetKeyPolicyRequest.h
Normal file
45
kms/include/alibabacloud/kms/model/GetKeyPolicyRequest.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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_GETKEYPOLICYREQUEST_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_GETKEYPOLICYREQUEST_H_
|
||||
|
||||
#include <alibabacloud/kms/KmsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Kms {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_KMS_EXPORT GetKeyPolicyRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GetKeyPolicyRequest();
|
||||
~GetKeyPolicyRequest();
|
||||
std::string getKeyId() const;
|
||||
void setKeyId(const std::string &keyId);
|
||||
std::string getPolicyName() const;
|
||||
void setPolicyName(const std::string &policyName);
|
||||
|
||||
private:
|
||||
std::string keyId_;
|
||||
std::string policyName_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Kms
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_GETKEYPOLICYREQUEST_H_
|
||||
51
kms/include/alibabacloud/kms/model/GetKeyPolicyResult.h
Normal file
51
kms/include/alibabacloud/kms/model/GetKeyPolicyResult.h
Normal 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_GETKEYPOLICYRESULT_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_GETKEYPOLICYRESULT_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 GetKeyPolicyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GetKeyPolicyResult();
|
||||
explicit GetKeyPolicyResult(const std::string &payload);
|
||||
~GetKeyPolicyResult();
|
||||
std::string getPolicy()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string policy_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_GETKEYPOLICYRESULT_H_
|
||||
45
kms/include/alibabacloud/kms/model/GetSecretPolicyRequest.h
Normal file
45
kms/include/alibabacloud/kms/model/GetSecretPolicyRequest.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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_GETSECRETPOLICYREQUEST_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_GETSECRETPOLICYREQUEST_H_
|
||||
|
||||
#include <alibabacloud/kms/KmsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Kms {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_KMS_EXPORT GetSecretPolicyRequest : public RpcServiceRequest {
|
||||
public:
|
||||
GetSecretPolicyRequest();
|
||||
~GetSecretPolicyRequest();
|
||||
std::string getPolicyName() const;
|
||||
void setPolicyName(const std::string &policyName);
|
||||
std::string getSecretName() const;
|
||||
void setSecretName(const std::string &secretName);
|
||||
|
||||
private:
|
||||
std::string policyName_;
|
||||
std::string secretName_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Kms
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_GETSECRETPOLICYREQUEST_H_
|
||||
51
kms/include/alibabacloud/kms/model/GetSecretPolicyResult.h
Normal file
51
kms/include/alibabacloud/kms/model/GetSecretPolicyResult.h
Normal 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_GETSECRETPOLICYRESULT_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_GETSECRETPOLICYRESULT_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 GetSecretPolicyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GetSecretPolicyResult();
|
||||
explicit GetSecretPolicyResult(const std::string &payload);
|
||||
~GetSecretPolicyResult();
|
||||
std::string getPolicy()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string policy_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_GETSECRETPOLICYRESULT_H_
|
||||
48
kms/include/alibabacloud/kms/model/SetKeyPolicyRequest.h
Normal file
48
kms/include/alibabacloud/kms/model/SetKeyPolicyRequest.h
Normal 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_SETKEYPOLICYREQUEST_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_SETKEYPOLICYREQUEST_H_
|
||||
|
||||
#include <alibabacloud/kms/KmsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Kms {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_KMS_EXPORT SetKeyPolicyRequest : public RpcServiceRequest {
|
||||
public:
|
||||
SetKeyPolicyRequest();
|
||||
~SetKeyPolicyRequest();
|
||||
std::string getKeyId() const;
|
||||
void setKeyId(const std::string &keyId);
|
||||
std::string getPolicyName() const;
|
||||
void setPolicyName(const std::string &policyName);
|
||||
std::string getPolicy() const;
|
||||
void setPolicy(const std::string &policy);
|
||||
|
||||
private:
|
||||
std::string keyId_;
|
||||
std::string policyName_;
|
||||
std::string policy_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Kms
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_SETKEYPOLICYREQUEST_H_
|
||||
49
kms/include/alibabacloud/kms/model/SetKeyPolicyResult.h
Normal file
49
kms/include/alibabacloud/kms/model/SetKeyPolicyResult.h
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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_KMS_MODEL_SETKEYPOLICYRESULT_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_SETKEYPOLICYRESULT_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 SetKeyPolicyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
SetKeyPolicyResult();
|
||||
explicit SetKeyPolicyResult(const std::string &payload);
|
||||
~SetKeyPolicyResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_SETKEYPOLICYRESULT_H_
|
||||
48
kms/include/alibabacloud/kms/model/SetSecretPolicyRequest.h
Normal file
48
kms/include/alibabacloud/kms/model/SetSecretPolicyRequest.h
Normal 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_SETSECRETPOLICYREQUEST_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_SETSECRETPOLICYREQUEST_H_
|
||||
|
||||
#include <alibabacloud/kms/KmsExport.h>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace AlibabaCloud {
|
||||
namespace Kms {
|
||||
namespace Model {
|
||||
class ALIBABACLOUD_KMS_EXPORT SetSecretPolicyRequest : public RpcServiceRequest {
|
||||
public:
|
||||
SetSecretPolicyRequest();
|
||||
~SetSecretPolicyRequest();
|
||||
std::string getPolicyName() const;
|
||||
void setPolicyName(const std::string &policyName);
|
||||
std::string getSecretName() const;
|
||||
void setSecretName(const std::string &secretName);
|
||||
std::string getPolicy() const;
|
||||
void setPolicy(const std::string &policy);
|
||||
|
||||
private:
|
||||
std::string policyName_;
|
||||
std::string secretName_;
|
||||
std::string policy_;
|
||||
};
|
||||
} // namespace Model
|
||||
} // namespace Kms
|
||||
} // namespace AlibabaCloud
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_SETSECRETPOLICYREQUEST_H_
|
||||
49
kms/include/alibabacloud/kms/model/SetSecretPolicyResult.h
Normal file
49
kms/include/alibabacloud/kms/model/SetSecretPolicyResult.h
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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_KMS_MODEL_SETSECRETPOLICYRESULT_H_
|
||||
#define ALIBABACLOUD_KMS_MODEL_SETSECRETPOLICYRESULT_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 SetSecretPolicyResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
SetSecretPolicyResult();
|
||||
explicit SetSecretPolicyResult(const std::string &payload);
|
||||
~SetSecretPolicyResult();
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_KMS_MODEL_SETSECRETPOLICYRESULT_H_
|
||||
@@ -1707,6 +1707,42 @@ KmsClient::GetClientKeyOutcomeCallable KmsClient::getClientKeyCallable(const Get
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GetKeyPolicyOutcome KmsClient::getKeyPolicy(const GetKeyPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetKeyPolicyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetKeyPolicyOutcome(GetKeyPolicyResult(outcome.result()));
|
||||
else
|
||||
return GetKeyPolicyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::getKeyPolicyAsync(const GetKeyPolicyRequest& request, const GetKeyPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getKeyPolicy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::GetKeyPolicyOutcomeCallable KmsClient::getKeyPolicyCallable(const GetKeyPolicyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetKeyPolicyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getKeyPolicy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GetKmsInstanceOutcome KmsClient::getKmsInstance(const GetKmsInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -1851,6 +1887,42 @@ KmsClient::GetRandomPasswordOutcomeCallable KmsClient::getRandomPasswordCallable
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GetSecretPolicyOutcome KmsClient::getSecretPolicy(const GetSecretPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetSecretPolicyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetSecretPolicyOutcome(GetSecretPolicyResult(outcome.result()));
|
||||
else
|
||||
return GetSecretPolicyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::getSecretPolicyAsync(const GetSecretPolicyRequest& request, const GetSecretPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getSecretPolicy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::GetSecretPolicyOutcomeCallable KmsClient::getSecretPolicyCallable(const GetSecretPolicyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetSecretPolicyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getSecretPolicy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::GetSecretValueOutcome KmsClient::getSecretValue(const GetSecretValueRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2643,6 +2715,78 @@ KmsClient::SetDeletionProtectionOutcomeCallable KmsClient::setDeletionProtection
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::SetKeyPolicyOutcome KmsClient::setKeyPolicy(const SetKeyPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SetKeyPolicyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SetKeyPolicyOutcome(SetKeyPolicyResult(outcome.result()));
|
||||
else
|
||||
return SetKeyPolicyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::setKeyPolicyAsync(const SetKeyPolicyRequest& request, const SetKeyPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, setKeyPolicy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::SetKeyPolicyOutcomeCallable KmsClient::setKeyPolicyCallable(const SetKeyPolicyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SetKeyPolicyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->setKeyPolicy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::SetSecretPolicyOutcome KmsClient::setSecretPolicy(const SetSecretPolicyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return SetSecretPolicyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return SetSecretPolicyOutcome(SetSecretPolicyResult(outcome.result()));
|
||||
else
|
||||
return SetSecretPolicyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void KmsClient::setSecretPolicyAsync(const SetSecretPolicyRequest& request, const SetSecretPolicyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, setSecretPolicy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
KmsClient::SetSecretPolicyOutcomeCallable KmsClient::setSecretPolicyCallable(const SetSecretPolicyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<SetSecretPolicyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->setSecretPolicy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
KmsClient::TagResourceOutcome KmsClient::tagResource(const TagResourceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -106,3 +106,12 @@ void CreateKeyRequest::setDKMSInstanceId(const std::string &dKMSInstanceId) {
|
||||
setParameter(std::string("DKMSInstanceId"), dKMSInstanceId);
|
||||
}
|
||||
|
||||
std::string CreateKeyRequest::getPolicy() const {
|
||||
return policy_;
|
||||
}
|
||||
|
||||
void CreateKeyRequest::setPolicy(const std::string &policy) {
|
||||
policy_ = policy;
|
||||
setParameter(std::string("Policy"), policy);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,3 +133,12 @@ void CreateSecretRequest::setSecretDataType(const std::string &secretDataType) {
|
||||
setParameter(std::string("SecretDataType"), secretDataType);
|
||||
}
|
||||
|
||||
std::string CreateSecretRequest::getPolicy() const {
|
||||
return policy_;
|
||||
}
|
||||
|
||||
void CreateSecretRequest::setPolicy(const std::string &policy) {
|
||||
policy_ = policy;
|
||||
setParameter(std::string("Policy"), policy);
|
||||
}
|
||||
|
||||
|
||||
45
kms/src/model/GetKeyPolicyRequest.cc
Normal file
45
kms/src/model/GetKeyPolicyRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/GetKeyPolicyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::GetKeyPolicyRequest;
|
||||
|
||||
GetKeyPolicyRequest::GetKeyPolicyRequest()
|
||||
: RpcServiceRequest("kms", "2016-01-20", "GetKeyPolicy") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetKeyPolicyRequest::~GetKeyPolicyRequest() {}
|
||||
|
||||
std::string GetKeyPolicyRequest::getKeyId() const {
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void GetKeyPolicyRequest::setKeyId(const std::string &keyId) {
|
||||
keyId_ = keyId;
|
||||
setParameter(std::string("KeyId"), keyId);
|
||||
}
|
||||
|
||||
std::string GetKeyPolicyRequest::getPolicyName() const {
|
||||
return policyName_;
|
||||
}
|
||||
|
||||
void GetKeyPolicyRequest::setPolicyName(const std::string &policyName) {
|
||||
policyName_ = policyName;
|
||||
setParameter(std::string("PolicyName"), policyName);
|
||||
}
|
||||
|
||||
51
kms/src/model/GetKeyPolicyResult.cc
Normal file
51
kms/src/model/GetKeyPolicyResult.cc
Normal 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/GetKeyPolicyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
GetKeyPolicyResult::GetKeyPolicyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetKeyPolicyResult::GetKeyPolicyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetKeyPolicyResult::~GetKeyPolicyResult()
|
||||
{}
|
||||
|
||||
void GetKeyPolicyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Policy"].isNull())
|
||||
policy_ = value["Policy"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetKeyPolicyResult::getPolicy()const
|
||||
{
|
||||
return policy_;
|
||||
}
|
||||
|
||||
45
kms/src/model/GetSecretPolicyRequest.cc
Normal file
45
kms/src/model/GetSecretPolicyRequest.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/GetSecretPolicyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::GetSecretPolicyRequest;
|
||||
|
||||
GetSecretPolicyRequest::GetSecretPolicyRequest()
|
||||
: RpcServiceRequest("kms", "2016-01-20", "GetSecretPolicy") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetSecretPolicyRequest::~GetSecretPolicyRequest() {}
|
||||
|
||||
std::string GetSecretPolicyRequest::getPolicyName() const {
|
||||
return policyName_;
|
||||
}
|
||||
|
||||
void GetSecretPolicyRequest::setPolicyName(const std::string &policyName) {
|
||||
policyName_ = policyName;
|
||||
setParameter(std::string("PolicyName"), policyName);
|
||||
}
|
||||
|
||||
std::string GetSecretPolicyRequest::getSecretName() const {
|
||||
return secretName_;
|
||||
}
|
||||
|
||||
void GetSecretPolicyRequest::setSecretName(const std::string &secretName) {
|
||||
secretName_ = secretName;
|
||||
setParameter(std::string("SecretName"), secretName);
|
||||
}
|
||||
|
||||
51
kms/src/model/GetSecretPolicyResult.cc
Normal file
51
kms/src/model/GetSecretPolicyResult.cc
Normal 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/GetSecretPolicyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
GetSecretPolicyResult::GetSecretPolicyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetSecretPolicyResult::GetSecretPolicyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetSecretPolicyResult::~GetSecretPolicyResult()
|
||||
{}
|
||||
|
||||
void GetSecretPolicyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Policy"].isNull())
|
||||
policy_ = value["Policy"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetSecretPolicyResult::getPolicy()const
|
||||
{
|
||||
return policy_;
|
||||
}
|
||||
|
||||
54
kms/src/model/SetKeyPolicyRequest.cc
Normal file
54
kms/src/model/SetKeyPolicyRequest.cc
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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/SetKeyPolicyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::SetKeyPolicyRequest;
|
||||
|
||||
SetKeyPolicyRequest::SetKeyPolicyRequest()
|
||||
: RpcServiceRequest("kms", "2016-01-20", "SetKeyPolicy") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SetKeyPolicyRequest::~SetKeyPolicyRequest() {}
|
||||
|
||||
std::string SetKeyPolicyRequest::getKeyId() const {
|
||||
return keyId_;
|
||||
}
|
||||
|
||||
void SetKeyPolicyRequest::setKeyId(const std::string &keyId) {
|
||||
keyId_ = keyId;
|
||||
setParameter(std::string("KeyId"), keyId);
|
||||
}
|
||||
|
||||
std::string SetKeyPolicyRequest::getPolicyName() const {
|
||||
return policyName_;
|
||||
}
|
||||
|
||||
void SetKeyPolicyRequest::setPolicyName(const std::string &policyName) {
|
||||
policyName_ = policyName;
|
||||
setParameter(std::string("PolicyName"), policyName);
|
||||
}
|
||||
|
||||
std::string SetKeyPolicyRequest::getPolicy() const {
|
||||
return policy_;
|
||||
}
|
||||
|
||||
void SetKeyPolicyRequest::setPolicy(const std::string &policy) {
|
||||
policy_ = policy;
|
||||
setParameter(std::string("Policy"), policy);
|
||||
}
|
||||
|
||||
44
kms/src/model/SetKeyPolicyResult.cc
Normal file
44
kms/src/model/SetKeyPolicyResult.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/SetKeyPolicyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
SetKeyPolicyResult::SetKeyPolicyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SetKeyPolicyResult::SetKeyPolicyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SetKeyPolicyResult::~SetKeyPolicyResult()
|
||||
{}
|
||||
|
||||
void SetKeyPolicyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
54
kms/src/model/SetSecretPolicyRequest.cc
Normal file
54
kms/src/model/SetSecretPolicyRequest.cc
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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/kms/model/SetSecretPolicyRequest.h>
|
||||
|
||||
using AlibabaCloud::Kms::Model::SetSecretPolicyRequest;
|
||||
|
||||
SetSecretPolicyRequest::SetSecretPolicyRequest()
|
||||
: RpcServiceRequest("kms", "2016-01-20", "SetSecretPolicy") {
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
SetSecretPolicyRequest::~SetSecretPolicyRequest() {}
|
||||
|
||||
std::string SetSecretPolicyRequest::getPolicyName() const {
|
||||
return policyName_;
|
||||
}
|
||||
|
||||
void SetSecretPolicyRequest::setPolicyName(const std::string &policyName) {
|
||||
policyName_ = policyName;
|
||||
setParameter(std::string("PolicyName"), policyName);
|
||||
}
|
||||
|
||||
std::string SetSecretPolicyRequest::getSecretName() const {
|
||||
return secretName_;
|
||||
}
|
||||
|
||||
void SetSecretPolicyRequest::setSecretName(const std::string &secretName) {
|
||||
secretName_ = secretName;
|
||||
setParameter(std::string("SecretName"), secretName);
|
||||
}
|
||||
|
||||
std::string SetSecretPolicyRequest::getPolicy() const {
|
||||
return policy_;
|
||||
}
|
||||
|
||||
void SetSecretPolicyRequest::setPolicy(const std::string &policy) {
|
||||
policy_ = policy;
|
||||
setParameter(std::string("Policy"), policy);
|
||||
}
|
||||
|
||||
44
kms/src/model/SetSecretPolicyResult.cc
Normal file
44
kms/src/model/SetSecretPolicyResult.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/SetSecretPolicyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Kms;
|
||||
using namespace AlibabaCloud::Kms::Model;
|
||||
|
||||
SetSecretPolicyResult::SetSecretPolicyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
SetSecretPolicyResult::SetSecretPolicyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
SetSecretPolicyResult::~SetSecretPolicyResult()
|
||||
{}
|
||||
|
||||
void SetSecretPolicyResult::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