From fa9c1782ac59835f4a7e82f792890797b7efaa79 Mon Sep 17 00:00:00 2001 From: dinghh Date: Sun, 8 Oct 2023 17:51:41 +0800 Subject: [PATCH 01/10] [1] iam policy c++ sdk --- .../include/aws/iam/IAMClient.h | 9 + .../model/UpdatePolicyDescriptionRequest.h | 180 ++++++++++++++++++ .../aws-cpp-sdk-iam/source/IAMClient.cpp | 28 +++ .../model/UpdatePolicyDescriptionRequest.cpp | 41 ++++ update_policy_description.cpp | 46 +++++ 5 files changed, 304 insertions(+) create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/UpdatePolicyDescriptionRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/UpdatePolicyDescriptionRequest.cpp create mode 100644 update_policy_description.cpp diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h index 111bfb93d..0a0e5da6a 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h @@ -180,6 +180,7 @@ namespace Model class DeleteLoginProfileRequest; class DeleteOpenIDConnectProviderRequest; class DeletePolicyRequest; + class UpdatePolicyDescriptionRequest; class DeletePolicyVersionRequest; class DeleteRoleRequest; class DeleteRolePermissionsBoundaryRequest; @@ -344,6 +345,7 @@ namespace Model typedef Aws::Utils::Outcome DeleteLoginProfileOutcome; typedef Aws::Utils::Outcome DeleteOpenIDConnectProviderOutcome; typedef Aws::Utils::Outcome DeletePolicyOutcome; + typedef Aws::Utils::Outcome UpdatePolicyDescriptionOutcome; typedef Aws::Utils::Outcome DeletePolicyVersionOutcome; typedef Aws::Utils::Outcome DeleteRoleOutcome; typedef Aws::Utils::Outcome DeleteRolePermissionsBoundaryOutcome; @@ -508,6 +510,7 @@ namespace Model typedef std::future DeleteLoginProfileOutcomeCallable; typedef std::future DeleteOpenIDConnectProviderOutcomeCallable; typedef std::future DeletePolicyOutcomeCallable; + typedef std::future UpdatePolicyDescriptionOutcomeCallable; typedef std::future DeletePolicyVersionOutcomeCallable; typedef std::future DeleteRoleOutcomeCallable; typedef std::future DeleteRolePermissionsBoundaryOutcomeCallable; @@ -676,6 +679,7 @@ namespace Model typedef std::function&) > DeleteLoginProfileResponseReceivedHandler; typedef std::function&) > DeleteOpenIDConnectProviderResponseReceivedHandler; typedef std::function&) > DeletePolicyResponseReceivedHandler; + typedef std::function&) > UpdatePolicyDescriptionResponseReceivedHandler; typedef std::function&) > DeletePolicyVersionResponseReceivedHandler; typedef std::function&) > DeleteRoleResponseReceivedHandler; typedef std::function&) > DeleteRolePermissionsBoundaryResponseReceivedHandler; @@ -2388,6 +2392,10 @@ namespace Model */ virtual void DeletePolicyAsync(const Model::DeletePolicyRequest& request, const DeletePolicyResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + virtual Model::UpdatePolicyDescriptionOutcome UpdatePolicyDescription(const Model::UpdatePolicyDescriptionRequest& request) const; + virtual Model::DeletePolicyOutcomeCallable UpdatePolicyDescriptionCallable(const Model::UpdatePolicyDescriptionRequest& request) const; + virtual void UpdatePolicyDescriptionAsync(const Model::UpdatePolicyDescriptionRequest& request, const UpdatePolicyDescriptionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + /** *

Deletes the specified version from the specified managed policy.

You * cannot delete the default version from a policy using this operation. To delete @@ -9598,6 +9606,7 @@ namespace Model void DeleteLoginProfileAsyncHelper(const Model::DeleteLoginProfileRequest& request, const DeleteLoginProfileResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeleteOpenIDConnectProviderAsyncHelper(const Model::DeleteOpenIDConnectProviderRequest& request, const DeleteOpenIDConnectProviderResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeletePolicyAsyncHelper(const Model::DeletePolicyRequest& request, const DeletePolicyResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void UpdatePolicyDescriptionAsyncHelper(const Model::UpdatePolicyDescriptionRequest& request, const UpdatePolicyDescriptionResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeletePolicyVersionAsyncHelper(const Model::DeletePolicyVersionRequest& request, const DeletePolicyVersionResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeleteRoleAsyncHelper(const Model::DeleteRoleRequest& request, const DeleteRoleResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeleteRolePermissionsBoundaryAsyncHelper(const Model::DeleteRolePermissionsBoundaryRequest& request, const DeleteRolePermissionsBoundaryResponseReceivedHandler& handler, const std::shared_ptr& context) const; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/UpdatePolicyDescriptionRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/UpdatePolicyDescriptionRequest.h new file mode 100644 index 000000000..aaf034702 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/UpdatePolicyDescriptionRequest.h @@ -0,0 +1,180 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API UpdatePolicyDescriptionRequest : public IAMRequest + { + public: + UpdatePolicyDescriptionRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "UpdatePolicyDescription"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + + /** + *

The friendly name of the policy.

IAM user, group, role, and policy + * names must be unique within the account. Names are not distinguished by case. + * For example, you cannot create resources named both "MyResource" and + * "myresource".

+ */ + inline const Aws::String& GetPolicyName() const{ return m_policyName; } + + /** + *

The friendly name of the policy.

IAM user, group, role, and policy + * names must be unique within the account. Names are not distinguished by case. + * For example, you cannot create resources named both "MyResource" and + * "myresource".

+ */ + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } + + /** + *

The friendly name of the policy.

IAM user, group, role, and policy + * names must be unique within the account. Names are not distinguished by case. + * For example, you cannot create resources named both "MyResource" and + * "myresource".

+ */ + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } + + /** + *

The friendly name of the policy.

IAM user, group, role, and policy + * names must be unique within the account. Names are not distinguished by case. + * For example, you cannot create resources named both "MyResource" and + * "myresource".

+ */ + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } + + /** + *

The friendly name of the policy.

IAM user, group, role, and policy + * names must be unique within the account. Names are not distinguished by case. + * For example, you cannot create resources named both "MyResource" and + * "myresource".

+ */ + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } + + /** + *

The friendly name of the policy.

IAM user, group, role, and policy + * names must be unique within the account. Names are not distinguished by case. + * For example, you cannot create resources named both "MyResource" and + * "myresource".

+ */ + inline UpdatePolicyDescriptionRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} + + /** + *

The friendly name of the policy.

IAM user, group, role, and policy + * names must be unique within the account. Names are not distinguished by case. + * For example, you cannot create resources named both "MyResource" and + * "myresource".

+ */ + inline UpdatePolicyDescriptionRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} + + /** + *

The friendly name of the policy.

IAM user, group, role, and policy + * names must be unique within the account. Names are not distinguished by case. + * For example, you cannot create resources named both "MyResource" and + * "myresource".

+ */ + inline UpdatePolicyDescriptionRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} + + /** + *

A friendly description of the policy.

Typically used to store + * information about the permissions defined in the policy. For example, "Grants + * access to production DynamoDB tables."

The policy description is + * immutable. After a value is assigned, it cannot be changed.

+ */ + inline const Aws::String& GetDescription() const{ return m_description; } + + /** + *

A friendly description of the policy.

Typically used to store + * information about the permissions defined in the policy. For example, "Grants + * access to production DynamoDB tables."

The policy description is + * immutable. After a value is assigned, it cannot be changed.

+ */ + inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } + + /** + *

A friendly description of the policy.

Typically used to store + * information about the permissions defined in the policy. For example, "Grants + * access to production DynamoDB tables."

The policy description is + * immutable. After a value is assigned, it cannot be changed.

+ */ + inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } + + /** + *

A friendly description of the policy.

Typically used to store + * information about the permissions defined in the policy. For example, "Grants + * access to production DynamoDB tables."

The policy description is + * immutable. After a value is assigned, it cannot be changed.

+ */ + inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } + + /** + *

A friendly description of the policy.

Typically used to store + * information about the permissions defined in the policy. For example, "Grants + * access to production DynamoDB tables."

The policy description is + * immutable. After a value is assigned, it cannot be changed.

+ */ + inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } + + /** + *

A friendly description of the policy.

Typically used to store + * information about the permissions defined in the policy. For example, "Grants + * access to production DynamoDB tables."

The policy description is + * immutable. After a value is assigned, it cannot be changed.

+ */ + inline UpdatePolicyDescriptionRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} + + /** + *

A friendly description of the policy.

Typically used to store + * information about the permissions defined in the policy. For example, "Grants + * access to production DynamoDB tables."

The policy description is + * immutable. After a value is assigned, it cannot be changed.

+ */ + inline UpdatePolicyDescriptionRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} + + /** + *

A friendly description of the policy.

Typically used to store + * information about the permissions defined in the policy. For example, "Grants + * access to production DynamoDB tables."

The policy description is + * immutable. After a value is assigned, it cannot be changed.

+ */ + inline UpdatePolicyDescriptionRequest& WithDescription(const char* value) { SetDescription(value); return *this;} + + private: + + Aws::String m_policyName; + bool m_policyNameHasBeenSet; + + Aws::String m_description; + bool m_descriptionHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp index 6b385871a..eadb746f2 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp @@ -185,6 +185,7 @@ #include #include #include +#include using namespace Aws; using namespace Aws::Auth; @@ -1139,6 +1140,33 @@ void IAMClient::DeletePolicyAsyncHelper(const DeletePolicyRequest& request, cons handler(this, request, DeletePolicy(request), context); } +UpdatePolicyDescriptionOutcome IAMClient::UpdatePolicyDescription(const UpdatePolicyDescriptionRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return UpdatePolicyDescriptionOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +UpdatePolicyDescriptionOutcomeCallable IAMClient::UpdatePolicyDescriptionCallable(const UpdatePolicyDescriptionRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< UpdatePolicyDescriptionOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->UpdatePolicyDescription(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::UpdatePolicyDescriptionAsync(const UpdatePolicyDescriptionRequest& request, const UpdatePolicyDescriptionResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->UpdatePolicyDescriptionAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::UpdatePolicyDescriptionAsyncHelper(const UpdatePolicyDescriptionRequest& request, const UpdatePolicyDescriptionResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, UpdatePolicyDescription(request), context); +} + DeletePolicyVersionOutcome IAMClient::DeletePolicyVersion(const DeletePolicyVersionRequest& request) const { Aws::Http::URI uri = m_uri; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/UpdatePolicyDescriptionRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/UpdatePolicyDescriptionRequest.cpp new file mode 100644 index 000000000..bb003b7c1 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/UpdatePolicyDescriptionRequest.cpp @@ -0,0 +1,41 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +UpdatePolicyDescriptionRequest::UpdatePolicyDescriptionRequest() : + m_policyNameHasBeenSet(false), + m_descriptionHasBeenSet(false) +{ +} + +Aws::String UpdatePolicyDescriptionRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=UpdatePolicyDescription&"; + if(m_policyNameHasBeenSet) + { + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; + } + + if(m_descriptionHasBeenSet) + { + ss << "Description=" << StringUtils::URLEncode(m_description.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void UpdatePolicyDescriptionRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/update_policy_description.cpp b/update_policy_description.cpp new file mode 100644 index 000000000..5c08f11e5 --- /dev/null +++ b/update_policy_description.cpp @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::UpdatePolicyDescriptionRequest request; + + request.SetPolicyName("C_policy1"); + request.SetDescription("update_description"); + + UpdatePolicyDescriptionOutcome outcome = iamClient.UpdatePolicyDescription(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: UpdatePolicyDescription: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + ; + } + + std::cout << "success" << std::endl; + + Aws::ShutdownAPI(options); + + return 0; +} -- Gitee From ccedee4ba7569350f7885d85e5997e2b9dd2b515 Mon Sep 17 00:00:00 2001 From: dinghh Date: Mon, 9 Oct 2023 09:38:25 +0800 Subject: [PATCH 02/10] [1] iam policy c++ sdk attach --- attach_group_policy.cpp | 46 +++++++++++++++++++ attach_user_policy.cpp | 46 +++++++++++++++++++ .../aws/iam/model/AttachGroupPolicyRequest.h | 20 ++++---- .../aws/iam/model/AttachUserPolicyRequest.h | 20 ++++---- .../aws/iam/model/DetachGroupPolicyRequest.h | 20 ++++---- .../aws/iam/model/DetachUserPolicyRequest.h | 20 ++++---- .../source/model/AttachGroupPolicyRequest.cpp | 6 +-- .../source/model/AttachUserPolicyRequest.cpp | 6 +-- .../source/model/DetachGroupPolicyRequest.cpp | 6 +-- .../source/model/DetachUserPolicyRequest.cpp | 6 +-- detach_group_policy.cpp | 46 +++++++++++++++++++ detach_user_policy.cpp | 46 +++++++++++++++++++ 12 files changed, 236 insertions(+), 52 deletions(-) create mode 100644 attach_group_policy.cpp create mode 100644 attach_user_policy.cpp create mode 100644 detach_group_policy.cpp create mode 100644 detach_user_policy.cpp diff --git a/attach_group_policy.cpp b/attach_group_policy.cpp new file mode 100644 index 000000000..a546247f9 --- /dev/null +++ b/attach_group_policy.cpp @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::AttachGroupPolicyRequest request; + + request.SetPolicyName("policy1"); + request.SetGroupName("group1"); + + AttachGroupPolicyOutcome outcome = iamClient.AttachGroupPolicy(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: CreatePolicy: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + ; + } + + std::cout << "success" << std::endl; + + Aws::ShutdownAPI(options); + + return 0; +} diff --git a/attach_user_policy.cpp b/attach_user_policy.cpp new file mode 100644 index 000000000..a83e8be90 --- /dev/null +++ b/attach_user_policy.cpp @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::AttachUserPolicyRequest request; + + request.SetPolicyName("policy1"); + request.SetUserName("user1"); + + AttachUserPolicyOutcome outcome = iamClient.AttachUserPolicy(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: AttachUserPolicy: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + ; + } + + std::cout << "success" << std::endl; + + Aws::ShutdownAPI(options); + + return 0; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachGroupPolicyRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachGroupPolicyRequest.h index 5a2b5b0e1..3c99161e1 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachGroupPolicyRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachGroupPolicyRequest.h @@ -115,7 +115,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline const Aws::String& GetPolicyArn() const{ return m_policyArn; } + inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -123,7 +123,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -131,7 +131,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -139,7 +139,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -147,7 +147,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -155,7 +155,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline AttachGroupPolicyRequest& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} + inline AttachGroupPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -163,7 +163,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline AttachGroupPolicyRequest& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} + inline AttachGroupPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -171,15 +171,15 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline AttachGroupPolicyRequest& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} + inline AttachGroupPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} private: Aws::String m_groupName; bool m_groupNameHasBeenSet; - Aws::String m_policyArn; - bool m_policyArnHasBeenSet; + Aws::String m_policyName; + bool m_policyNameHasBeenSet; }; } // namespace Model diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachUserPolicyRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachUserPolicyRequest.h index 32e820f4b..2aac6f3af 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachUserPolicyRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachUserPolicyRequest.h @@ -115,7 +115,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline const Aws::String& GetPolicyArn() const{ return m_policyArn; } + inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -123,7 +123,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -131,7 +131,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -139,7 +139,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -147,7 +147,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -155,7 +155,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline AttachUserPolicyRequest& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} + inline AttachUserPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -163,7 +163,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline AttachUserPolicyRequest& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} + inline AttachUserPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy you want to attach.

@@ -171,15 +171,15 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline AttachUserPolicyRequest& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} + inline AttachUserPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} private: Aws::String m_userName; bool m_userNameHasBeenSet; - Aws::String m_policyArn; - bool m_policyArnHasBeenSet; + Aws::String m_policyName; + bool m_policyNameHasBeenSet; }; } // namespace Model diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/DetachGroupPolicyRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/DetachGroupPolicyRequest.h index 8ab132c72..0fbc42345 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/DetachGroupPolicyRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/DetachGroupPolicyRequest.h @@ -115,7 +115,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline const Aws::String& GetPolicyArn() const{ return m_policyArn; } + inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -123,7 +123,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -131,7 +131,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -139,7 +139,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -147,7 +147,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -155,7 +155,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline DetachGroupPolicyRequest& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} + inline DetachGroupPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -163,7 +163,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline DetachGroupPolicyRequest& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} + inline DetachGroupPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -171,15 +171,15 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline DetachGroupPolicyRequest& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} + inline DetachGroupPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} private: Aws::String m_groupName; bool m_groupNameHasBeenSet; - Aws::String m_policyArn; - bool m_policyArnHasBeenSet; + Aws::String m_policyName; + bool m_policyNameHasBeenSet; }; } // namespace Model diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/DetachUserPolicyRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/DetachUserPolicyRequest.h index abb86f802..d38878069 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/DetachUserPolicyRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/DetachUserPolicyRequest.h @@ -115,7 +115,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline const Aws::String& GetPolicyArn() const{ return m_policyArn; } + inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -123,7 +123,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -131,7 +131,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -139,7 +139,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -147,7 +147,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -155,7 +155,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline DetachUserPolicyRequest& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} + inline DetachUserPolicyRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -163,7 +163,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline DetachUserPolicyRequest& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} + inline DetachUserPolicyRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy you want to detach.

@@ -171,15 +171,15 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline DetachUserPolicyRequest& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} + inline DetachUserPolicyRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} private: Aws::String m_userName; bool m_userNameHasBeenSet; - Aws::String m_policyArn; - bool m_policyArnHasBeenSet; + Aws::String m_policyName; + bool m_policyNameHasBeenSet; }; } // namespace Model diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachGroupPolicyRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachGroupPolicyRequest.cpp index de35ecd96..12b39cbec 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachGroupPolicyRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachGroupPolicyRequest.cpp @@ -12,7 +12,7 @@ using namespace Aws::Utils; AttachGroupPolicyRequest::AttachGroupPolicyRequest() : m_groupNameHasBeenSet(false), - m_policyArnHasBeenSet(false) + m_policyNameHasBeenSet(false) { } @@ -25,9 +25,9 @@ Aws::String AttachGroupPolicyRequest::SerializePayload() const ss << "GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; } - if(m_policyArnHasBeenSet) + if(m_policyNameHasBeenSet) { - ss << "PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&"; + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; } ss << "Version=2010-05-08"; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachUserPolicyRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachUserPolicyRequest.cpp index a25d3be46..5b0936ae4 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachUserPolicyRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachUserPolicyRequest.cpp @@ -12,7 +12,7 @@ using namespace Aws::Utils; AttachUserPolicyRequest::AttachUserPolicyRequest() : m_userNameHasBeenSet(false), - m_policyArnHasBeenSet(false) + m_policyNameHasBeenSet(false) { } @@ -25,9 +25,9 @@ Aws::String AttachUserPolicyRequest::SerializePayload() const ss << "UserName=" << StringUtils::URLEncode(m_userName.c_str()) << "&"; } - if(m_policyArnHasBeenSet) + if(m_policyNameHasBeenSet) { - ss << "PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&"; + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; } ss << "Version=2010-05-08"; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DetachGroupPolicyRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DetachGroupPolicyRequest.cpp index 4aba85f03..ed4c45fd8 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DetachGroupPolicyRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DetachGroupPolicyRequest.cpp @@ -12,7 +12,7 @@ using namespace Aws::Utils; DetachGroupPolicyRequest::DetachGroupPolicyRequest() : m_groupNameHasBeenSet(false), - m_policyArnHasBeenSet(false) + m_policyNameHasBeenSet(false) { } @@ -25,9 +25,9 @@ Aws::String DetachGroupPolicyRequest::SerializePayload() const ss << "GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; } - if(m_policyArnHasBeenSet) + if(m_policyNameHasBeenSet) { - ss << "PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&"; + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; } ss << "Version=2010-05-08"; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DetachUserPolicyRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DetachUserPolicyRequest.cpp index eddd221e0..8a271362a 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DetachUserPolicyRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/DetachUserPolicyRequest.cpp @@ -12,7 +12,7 @@ using namespace Aws::Utils; DetachUserPolicyRequest::DetachUserPolicyRequest() : m_userNameHasBeenSet(false), - m_policyArnHasBeenSet(false) + m_policyNameHasBeenSet(false) { } @@ -25,9 +25,9 @@ Aws::String DetachUserPolicyRequest::SerializePayload() const ss << "UserName=" << StringUtils::URLEncode(m_userName.c_str()) << "&"; } - if(m_policyArnHasBeenSet) + if(m_policyNameHasBeenSet) { - ss << "PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&"; + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; } ss << "Version=2010-05-08"; diff --git a/detach_group_policy.cpp b/detach_group_policy.cpp new file mode 100644 index 000000000..352bcc5aa --- /dev/null +++ b/detach_group_policy.cpp @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::DetachGroupPolicyRequest request; + + request.SetPolicyName("policy1"); + request.SetGroupName("group1"); + + DetachGroupPolicyOutcome outcome = iamClient.DetachGroupPolicy(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: DetachGroupPolicy: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + ; + } + + std::cout << "success" << std::endl; + + Aws::ShutdownAPI(options); + + return 0; +} diff --git a/detach_user_policy.cpp b/detach_user_policy.cpp new file mode 100644 index 000000000..af3c94afe --- /dev/null +++ b/detach_user_policy.cpp @@ -0,0 +1,46 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::DetachUserPolicyRequest request; + + request.SetPolicyName("policy1"); + request.SetUserName("user1"); + + DetachUserPolicyOutcome outcome = iamClient.DetachUserPolicy(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: DetachUserPolicy: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + ; + } + + std::cout << "success" << std::endl; + + Aws::ShutdownAPI(options); + + return 0; +} -- Gitee From 6b73e69bf1031148882337de9fd75455321f1c7e Mon Sep 17 00:00:00 2001 From: dinghh Date: Mon, 9 Oct 2023 19:11:32 +0800 Subject: [PATCH 03/10] [1] iam policy c++ sdk batch_delete_policies --- .../include/aws/iam/IAMClient.h | 13 +- .../iam/model/BatchDeletePoliciesRequest.h | 127 +++++++++ .../aws/iam/model/BatchDeletePoliciesResult.h | 249 ++++++++++++++++++ .../include/aws/iam/model/BatchHandlePolicy.h | 185 +++++++++++++ .../aws/iam/model/BatchHandlePolicyError.h | 226 ++++++++++++++++ .../aws-cpp-sdk-iam/source/IAMClient.cpp | 30 +++ .../model/BatchDeletePoliciesRequest.cpp | 35 +++ .../model/BatchDeletePoliciesResult.cpp | 82 ++++++ .../source/model/BatchHandlePolicy.cpp | 108 ++++++++ .../source/model/BatchHandlePolicyError.cpp | 148 +++++++++++ batch_delete_policies.cpp | 64 +++++ 11 files changed, 1266 insertions(+), 1 deletion(-) create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDeletePoliciesRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDeletePoliciesResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchHandlePolicy.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchHandlePolicyError.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDeletePoliciesRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDeletePoliciesResult.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchHandlePolicy.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchHandlePolicyError.cpp create mode 100644 batch_delete_policies.cpp diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h index 045974489..0969cd9d5 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h @@ -108,6 +108,7 @@ #include #include #include +#include namespace Aws { @@ -184,6 +185,7 @@ namespace Model class DeleteOpenIDConnectProviderRequest; class DeletePolicyRequest; class UpdatePolicyDescriptionRequest; + class BatchDeletePoliciesRequest; class DeletePolicyVersionRequest; class DeleteRoleRequest; class DeleteRolePermissionsBoundaryRequest; @@ -354,6 +356,7 @@ namespace Model typedef Aws::Utils::Outcome DeleteOpenIDConnectProviderOutcome; typedef Aws::Utils::Outcome DeletePolicyOutcome; typedef Aws::Utils::Outcome UpdatePolicyDescriptionOutcome; + typedef Aws::Utils::Outcome BatchDeletePoliciesOutcome; typedef Aws::Utils::Outcome DeletePolicyVersionOutcome; typedef Aws::Utils::Outcome DeleteRoleOutcome; typedef Aws::Utils::Outcome DeleteRolePermissionsBoundaryOutcome; @@ -524,6 +527,7 @@ namespace Model typedef std::future DeleteOpenIDConnectProviderOutcomeCallable; typedef std::future DeletePolicyOutcomeCallable; typedef std::future UpdatePolicyDescriptionOutcomeCallable; + typedef std::future BatchDeletePoliciesOutcomeCallable; typedef std::future DeletePolicyVersionOutcomeCallable; typedef std::future DeleteRoleOutcomeCallable; typedef std::future DeleteRolePermissionsBoundaryOutcomeCallable; @@ -698,6 +702,7 @@ namespace Model typedef std::function&) > DeleteOpenIDConnectProviderResponseReceivedHandler; typedef std::function&) > DeletePolicyResponseReceivedHandler; typedef std::function&) > UpdatePolicyDescriptionResponseReceivedHandler; + typedef std::function&) > BatchDeletePoliciesResponseReceivedHandler; typedef std::function&) > DeletePolicyVersionResponseReceivedHandler; typedef std::function&) > DeleteRoleResponseReceivedHandler; typedef std::function&) > DeleteRolePermissionsBoundaryResponseReceivedHandler; @@ -2427,9 +2432,14 @@ namespace Model virtual void DeletePolicyAsync(const Model::DeletePolicyRequest& request, const DeletePolicyResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; virtual Model::UpdatePolicyDescriptionOutcome UpdatePolicyDescription(const Model::UpdatePolicyDescriptionRequest& request) const; - virtual Model::DeletePolicyOutcomeCallable UpdatePolicyDescriptionCallable(const Model::UpdatePolicyDescriptionRequest& request) const; + virtual Model::UpdatePolicyDescriptionOutcomeCallable UpdatePolicyDescriptionCallable(const Model::UpdatePolicyDescriptionRequest& request) const; virtual void UpdatePolicyDescriptionAsync(const Model::UpdatePolicyDescriptionRequest& request, const UpdatePolicyDescriptionResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual Model::BatchDeletePoliciesOutcome BatchDeletePolicies(const Model::BatchDeletePoliciesRequest& request) const; + virtual Model::BatchDeletePoliciesOutcomeCallable BatchDeletePoliciesCallable(const Model::BatchDeletePoliciesRequest& request) const; + virtual void BatchDeletePoliciesAsync(const Model::BatchDeletePoliciesRequest& request, const BatchDeletePoliciesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + /** *

Deletes the specified version from the specified managed policy.

You * cannot delete the default version from a policy using this operation. To delete @@ -9658,6 +9668,7 @@ namespace Model void DeleteOpenIDConnectProviderAsyncHelper(const Model::DeleteOpenIDConnectProviderRequest& request, const DeleteOpenIDConnectProviderResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeletePolicyAsyncHelper(const Model::DeletePolicyRequest& request, const DeletePolicyResponseReceivedHandler& handler, const std::shared_ptr& context) const; void UpdatePolicyDescriptionAsyncHelper(const Model::UpdatePolicyDescriptionRequest& request, const UpdatePolicyDescriptionResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void BatchDeletePoliciesAsyncHelper(const Model::BatchDeletePoliciesRequest& request, const BatchDeletePoliciesResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeletePolicyVersionAsyncHelper(const Model::DeletePolicyVersionRequest& request, const DeletePolicyVersionResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeleteRoleAsyncHelper(const Model::DeleteRoleRequest& request, const DeleteRoleResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeleteRolePermissionsBoundaryAsyncHelper(const Model::DeleteRolePermissionsBoundaryRequest& request, const DeleteRolePermissionsBoundaryResponseReceivedHandler& handler, const std::shared_ptr& context) const; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDeletePoliciesRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDeletePoliciesRequest.h new file mode 100644 index 000000000..edc4e5973 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDeletePoliciesRequest.h @@ -0,0 +1,127 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API BatchDeletePoliciesRequest : public IAMRequest + { + public: + BatchDeletePoliciesRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "BatchDeletePolicies"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + + /** + *

The name of the user to get information about.

This parameter is + * optional. If it is not included, it defaults to the user making the request. + * This parameter allows (through its regex pattern) a string of characters + * consisting of upper and lowercase alphanumeric characters with no spaces. You + * can also include any of the following characters: _+=,.@-

+ */ + inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; } + + /** + *

The name of the user to get information about.

This parameter is + * optional. If it is not included, it defaults to the user making the request. + * This parameter allows (through its regex pattern) a string of characters + * consisting of upper and lowercase alphanumeric characters with no spaces. You + * can also include any of the following characters: _+=,.@-

+ */ + inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; } + + /** + *

The name of the user to get information about.

This parameter is + * optional. If it is not included, it defaults to the user making the request. + * This parameter allows (through its regex pattern) a string of characters + * consisting of upper and lowercase alphanumeric characters with no spaces. You + * can also include any of the following characters: _+=,.@-

+ */ + inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; } + + /** + *

The name of the user to get information about.

This parameter is + * optional. If it is not included, it defaults to the user making the request. + * This parameter allows (through its regex pattern) a string of characters + * consisting of upper and lowercase alphanumeric characters with no spaces. You + * can also include any of the following characters: _+=,.@-

+ */ + inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); } + + /** + *

The name of the user to get information about.

This parameter is + * optional. If it is not included, it defaults to the user making the request. + * This parameter allows (through its regex pattern) a string of characters + * consisting of upper and lowercase alphanumeric characters with no spaces. You + * can also include any of the following characters: _+=,.@-

+ */ + inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); } + + /** + *

The name of the user to get information about.

This parameter is + * optional. If it is not included, it defaults to the user making the request. + * This parameter allows (through its regex pattern) a string of characters + * consisting of upper and lowercase alphanumeric characters with no spaces. You + * can also include any of the following characters: _+=,.@-

+ */ + inline BatchDeletePoliciesRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;} + + /** + *

The name of the user to get information about.

This parameter is + * optional. If it is not included, it defaults to the user making the request. + * This parameter allows (through its regex pattern) a string of characters + * consisting of upper and lowercase alphanumeric characters with no spaces. You + * can also include any of the following characters: _+=,.@-

+ */ + inline BatchDeletePoliciesRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;} + + /** + *

The name of the user to get information about.

This parameter is + * optional. If it is not included, it defaults to the user making the request. + * This parameter allows (through its regex pattern) a string of characters + * consisting of upper and lowercase alphanumeric characters with no spaces. You + * can also include any of the following characters: _+=,.@-

+ */ + inline BatchDeletePoliciesRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;} + + private: + + Aws::String m_policyDocument; + bool m_policyDocumentHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDeletePoliciesResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDeletePoliciesResult.h new file mode 100644 index 000000000..b163fdd3a --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDeletePoliciesResult.h @@ -0,0 +1,249 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace Utils +{ +namespace Xml +{ + class XmlDocument; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + /** + *

Contains the response to a successful GetUser request.

See + * Also:

AWS + * API Reference

+ */ + class AWS_IAM_API BatchDeletePoliciesResult + { + public: + BatchDeletePoliciesResult(); + BatchDeletePoliciesResult(const Aws::AmazonWebServiceResult& result); + BatchDeletePoliciesResult& operator=(const Aws::AmazonWebServiceResult& result); + + + inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } + + + inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } + + + inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } + + + inline BatchDeletePoliciesResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} + + + inline BatchDeletePoliciesResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline const Account& GetAccount() const{ return m_account; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(const Account& value) { m_account = value; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDeletePoliciesResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDeletePoliciesResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyDeleted() const{ return m_policyDeleted; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDeleted(const Aws::Vector& value) { m_policyDeleted = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDeleted(Aws::Vector&& value) { m_policyDeleted = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDeletePoliciesResult& WithPolicyDeleted(const Aws::Vector& value) { SetPolicyDeleted(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDeletePoliciesResult& WithPolicyDeleted(Aws::Vector&& value) { SetPolicyDeleted(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDeletePoliciesResult& AddPolicyDeleted(const BatchHandlePolicy& value) { m_policyDeleted.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDeletePoliciesResult& AddPolicyDeleted(BatchHandlePolicy&& value) { m_policyDeleted.push_back(std::move(value)); return *this; } + + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyError() const{ return m_policyError; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(const Aws::Vector& value) { m_policyError = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(Aws::Vector&& value) { m_policyError = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDeletePoliciesResult& WithPolicyError(const Aws::Vector& value) { SetPolicyError(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDeletePoliciesResult& WithPolicyError(Aws::Vector&& value) { SetPolicyError(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDeletePoliciesResult& AddPolicyError(const BatchHandlePolicyError& value) { m_policyError.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDeletePoliciesResult& AddPolicyError(BatchHandlePolicyError&& value) { m_policyError.push_back(std::move(value)); return *this; } + + private: + + private: + + Aws::Vector m_policyDeleted; + + Aws::Vector m_policyError; + + Account m_account; + + ResponseMetadata m_responseMetadata; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchHandlePolicy.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchHandlePolicy.h new file mode 100644 index 000000000..f1ae77f40 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchHandlePolicy.h @@ -0,0 +1,185 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +namespace Utils +{ +namespace Xml +{ + class XmlNode; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + + /** + *

Contains information about a managed policy.

This data type is used as + * a response element in the CreatePolicy, GetPolicy, and + * ListPolicies operations.

For more information about managed + * policies, refer to Managed + * policies and inline policies in the IAM User Guide.

See + * Also:

AWS API + * Reference

+ */ + class AWS_IAM_API BatchHandlePolicy + { + public: + BatchHandlePolicy(); + BatchHandlePolicy(const Aws::Utils::Xml::XmlNode& xmlNode); + BatchHandlePolicy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); + + void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; + void OutputToStream(Aws::OStream& oStream, const char* location) const; + + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline const Aws::String& GetPolicyName() const{ return m_policyName; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} + + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline const Aws::String& GetUserName() const{ return m_userName; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetUserName(const Aws::String& value) { m_userNameHasBeenSet = true; m_userName = value; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetUserName(Aws::String&& value) { m_userNameHasBeenSet = true; m_userName = std::move(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetUserName(const char* value) { m_userNameHasBeenSet = true; m_userName.assign(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicy& WithUserName(const Aws::String& value) { SetUserName(value); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicy& WithUserName(Aws::String&& value) { SetUserName(std::move(value)); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicy& WithUserName(const char* value) { SetUserName(value); return *this;} + + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline const Aws::String& GetGroupName() const{ return m_groupName; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicy& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicy& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicy& WithGroupName(const char* value) { SetGroupName(value); return *this;} + + private: + Aws::String m_policyName; + bool m_policyNameHasBeenSet; + + Aws::String m_userName; + bool m_userNameHasBeenSet; + + Aws::String m_groupName; + bool m_groupNameHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchHandlePolicyError.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchHandlePolicyError.h new file mode 100644 index 000000000..e50b741ea --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchHandlePolicyError.h @@ -0,0 +1,226 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +namespace Utils +{ +namespace Xml +{ + class XmlNode; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + + /** + *

Contains information about a managed policy.

This data type is used as + * a response element in the CreatePolicy, GetPolicy, and + * ListPolicies operations.

For more information about managed + * policies, refer to Managed + * policies and inline policies in the IAM User Guide.

See + * Also:

AWS API + * Reference

+ */ + class AWS_IAM_API BatchHandlePolicyError + { + public: + BatchHandlePolicyError(); + BatchHandlePolicyError(const Aws::Utils::Xml::XmlNode& xmlNode); + BatchHandlePolicyError& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); + + void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; + void OutputToStream(Aws::OStream& oStream, const char* location) const; + + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline const Aws::String& GetPolicyName() const{ return m_policyName; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicyError& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicyError& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicyError& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} + + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline const Aws::String& GetUserName() const{ return m_userName; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetUserName(const Aws::String& value) { m_userNameHasBeenSet = true; m_userName = value; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetUserName(Aws::String&& value) { m_userNameHasBeenSet = true; m_userName = std::move(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetUserName(const char* value) { m_userNameHasBeenSet = true; m_userName.assign(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicyError& WithUserName(const Aws::String& value) { SetUserName(value); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicyError& WithUserName(Aws::String&& value) { SetUserName(std::move(value)); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicyError& WithUserName(const char* value) { SetUserName(value); return *this;} + + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline const Aws::String& GetGroupName() const{ return m_groupName; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicyError& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicyError& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} + + /** + *

The friendly name (not ARN) identifying the policy.

+ */ + inline BatchHandlePolicyError& WithGroupName(const char* value) { SetGroupName(value); return *this;} + + + inline const Aws::String& GetCode() const{ return m_code; } + + inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } + + inline void SetCode(const Aws::String& value) { m_codeHasBeenSet = true; m_code = value; } + + inline void SetCode(Aws::String&& value) { m_codeHasBeenSet = true; m_code = std::move(value); } + + inline void SetCode(const char* value) { m_codeHasBeenSet = true; m_code.assign(value); } + + inline BatchHandlePolicyError& WithCode(const Aws::String& value) { SetCode(value); return *this;} + + inline BatchHandlePolicyError& WithCode(Aws::String&& value) { SetCode(std::move(value)); return *this;} + + inline BatchHandlePolicyError& WithCode(const char* value) { SetCode(value); return *this;} + + + + inline const Aws::String& GetMessage() const{ return m_message; } + + inline bool MessageHasBeenSet() const { return m_messageHasBeenSet; } + + inline void SetMessage(const Aws::String& value) { m_messageHasBeenSet = true; m_message = value; } + + inline void SetMessage(Aws::String&& value) { m_messageHasBeenSet = true; m_message = std::move(value); } + + inline void SetMessage(const char* value) { m_messageHasBeenSet = true; m_message.assign(value); } + + inline BatchHandlePolicyError& WithMessage(const Aws::String& value) { SetMessage(value); return *this;} + + inline BatchHandlePolicyError& WithMessage(Aws::String&& value) { SetMessage(std::move(value)); return *this;} + + inline BatchHandlePolicyError& WithMessage(const char* value) { SetMessage(value); return *this;} + + private: + Aws::String m_policyName; + bool m_policyNameHasBeenSet; + + Aws::String m_userName; + bool m_userNameHasBeenSet; + + Aws::String m_groupName; + bool m_groupNameHasBeenSet; + + Aws::String m_message; + bool m_messageHasBeenSet; + + Aws::String m_code; + bool m_codeHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp index 79f8665f1..077abece6 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp @@ -192,6 +192,7 @@ #include #include #include +#include using namespace Aws; using namespace Aws::Auth; @@ -1233,6 +1234,35 @@ void IAMClient::UpdatePolicyDescriptionAsyncHelper(const UpdatePolicyDescription handler(this, request, UpdatePolicyDescription(request), context); } + +BatchDeletePoliciesOutcome IAMClient::BatchDeletePolicies(const BatchDeletePoliciesRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return BatchDeletePoliciesOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +BatchDeletePoliciesOutcomeCallable IAMClient::BatchDeletePoliciesCallable(const BatchDeletePoliciesRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< BatchDeletePoliciesOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchDeletePolicies(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::BatchDeletePoliciesAsync(const BatchDeletePoliciesRequest& request, const BatchDeletePoliciesResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->BatchDeletePoliciesAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::BatchDeletePoliciesAsyncHelper(const BatchDeletePoliciesRequest& request, const BatchDeletePoliciesResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, BatchDeletePolicies(request), context); +} + + DeletePolicyVersionOutcome IAMClient::DeletePolicyVersion(const DeletePolicyVersionRequest& request) const { Aws::Http::URI uri = m_uri; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDeletePoliciesRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDeletePoliciesRequest.cpp new file mode 100644 index 000000000..7ccc91ff1 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDeletePoliciesRequest.cpp @@ -0,0 +1,35 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +BatchDeletePoliciesRequest::BatchDeletePoliciesRequest() : + m_policyDocumentHasBeenSet(false) +{ +} + +Aws::String BatchDeletePoliciesRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=BatchDeletePolicies&"; + if(m_policyDocumentHasBeenSet) + { + ss << "PolicyDocument=" << StringUtils::URLEncode(m_policyDocument.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void BatchDeletePoliciesRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDeletePoliciesResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDeletePoliciesResult.cpp new file mode 100644 index 000000000..0ca27e046 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDeletePoliciesResult.cpp @@ -0,0 +1,82 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils::Logging; +using namespace Aws::Utils; +using namespace Aws; + +BatchDeletePoliciesResult::BatchDeletePoliciesResult() +{ +} + +BatchDeletePoliciesResult::BatchDeletePoliciesResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +BatchDeletePoliciesResult& BatchDeletePoliciesResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode rootNode = xmlDocument.GetRootElement(); + XmlNode resultNode = rootNode; + if (!rootNode.IsNull() && (rootNode.GetName() != "BatchDeletePoliciesResult")) + { + resultNode = rootNode.FirstChild("BatchDeletePoliciesResult"); + } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyDeletedNode = resultNode.FirstChild("Deleted"); + if(!policyDeletedNode.IsNull()) + { + XmlNode policyDeletedMember = policyDeletedNode.FirstChild("member"); + while(!policyDeletedMember.IsNull()) + { + m_policyDeleted.push_back(policyDeletedMember); + policyDeletedMember = policyDeletedMember.NextNode("member"); + } + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyErrorNode = resultNode.FirstChild("Error"); + if(!policyErrorNode.IsNull()) + { + XmlNode policyErrorMember = policyErrorNode.FirstChild("member"); + while(!policyErrorMember.IsNull()) + { + m_policyError.push_back(policyErrorMember); + policyErrorMember = policyErrorMember.NextNode("member"); + } + } + } + + if (!rootNode.IsNull()) { + XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata"); + m_responseMetadata = responseMetadataNode; + AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetUserResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() ); + } + return *this; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchHandlePolicy.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchHandlePolicy.cpp new file mode 100644 index 000000000..33e5d12ec --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchHandlePolicy.cpp @@ -0,0 +1,108 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include + +#include + +using namespace Aws::Utils::Xml; +using namespace Aws::Utils; + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + +BatchHandlePolicy::BatchHandlePolicy() : + m_policyNameHasBeenSet(false), + m_userNameHasBeenSet(false), + m_groupNameHasBeenSet(false) +{ +} + +BatchHandlePolicy::BatchHandlePolicy(const XmlNode& xmlNode) : + m_policyNameHasBeenSet(false), + m_userNameHasBeenSet(false), + m_groupNameHasBeenSet(false) +{ + *this = xmlNode; +} + +BatchHandlePolicy& BatchHandlePolicy::operator =(const XmlNode& xmlNode) +{ + XmlNode resultNode = xmlNode; + + if(!resultNode.IsNull()) + { + XmlNode policyNameNode = resultNode.FirstChild("PolicyName"); + if(!policyNameNode.IsNull()) + { + m_policyName = Aws::Utils::Xml::DecodeEscapedXmlText(policyNameNode.GetText()); + m_policyNameHasBeenSet = true; + } + + XmlNode userNameNode = resultNode.FirstChild("UserName"); + if(!userNameNode.IsNull()) + { + m_userName = Aws::Utils::Xml::DecodeEscapedXmlText(userNameNode.GetText()); + m_userNameHasBeenSet = true; + } + + XmlNode groupNameNode = resultNode.FirstChild("GroupName"); + if(!groupNameNode.IsNull()) + { + m_groupName = Aws::Utils::Xml::DecodeEscapedXmlText(groupNameNode.GetText()); + m_groupNameHasBeenSet = true; + } + } + + return *this; +} + +void BatchHandlePolicy::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const +{ + if(m_policyNameHasBeenSet) + { + oStream << location << index << locationValue << ".PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; + } + + if(m_userNameHasBeenSet) + { + oStream << location << index << locationValue << ".UserName=" << StringUtils::URLEncode(m_userName.c_str()) << "&"; + } + + if(m_groupNameHasBeenSet) + { + oStream << location << index << locationValue << ".GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; + } + +} + +void BatchHandlePolicy::OutputToStream(Aws::OStream& oStream, const char* location) const +{ + if(m_policyNameHasBeenSet) + { + oStream << location << ".PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; + } + + if(m_userNameHasBeenSet) + { + oStream << location << ".UserName=" << StringUtils::URLEncode(m_userName.c_str()) << "&"; + } + + if(m_groupNameHasBeenSet) + { + oStream << location << ".GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; + } +} + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchHandlePolicyError.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchHandlePolicyError.cpp new file mode 100644 index 000000000..e87b89c0e --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchHandlePolicyError.cpp @@ -0,0 +1,148 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include + +#include + +using namespace Aws::Utils::Xml; +using namespace Aws::Utils; + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + +BatchHandlePolicyError::BatchHandlePolicyError() : + m_policyNameHasBeenSet(false), + m_userNameHasBeenSet(false), + m_groupNameHasBeenSet(false), + m_codeHasBeenSet(false), + m_messageHasBeenSet(false) +{ +} + +BatchHandlePolicyError::BatchHandlePolicyError(const XmlNode& xmlNode) : + m_policyNameHasBeenSet(false), + m_userNameHasBeenSet(false), + m_groupNameHasBeenSet(false), + m_codeHasBeenSet(false), + m_messageHasBeenSet(false) +{ + *this = xmlNode; +} + +BatchHandlePolicyError& BatchHandlePolicyError::operator =(const XmlNode& xmlNode) +{ + XmlNode resultNode = xmlNode; + + if(!resultNode.IsNull()) + { + XmlNode policyNameNode = resultNode.FirstChild("PolicyName"); + if(!policyNameNode.IsNull()) + { + m_policyName = Aws::Utils::Xml::DecodeEscapedXmlText(policyNameNode.GetText()); + m_policyNameHasBeenSet = true; + } + + XmlNode userNameNode = resultNode.FirstChild("UserName"); + if(!userNameNode.IsNull()) + { + m_userName = Aws::Utils::Xml::DecodeEscapedXmlText(userNameNode.GetText()); + m_userNameHasBeenSet = true; + } + + XmlNode groupNameNode = resultNode.FirstChild("GroupName"); + if(!groupNameNode.IsNull()) + { + m_groupName = Aws::Utils::Xml::DecodeEscapedXmlText(groupNameNode.GetText()); + m_groupNameHasBeenSet = true; + } + + XmlNode codeNode = resultNode.FirstChild("Code"); + if(!codeNode.IsNull()) + { + m_code = Aws::Utils::Xml::DecodeEscapedXmlText(codeNode.GetText()); + m_codeHasBeenSet = true; + } + + XmlNode messageNode = resultNode.FirstChild("Message"); + if(!messageNode.IsNull()) + { + m_message = Aws::Utils::Xml::DecodeEscapedXmlText(messageNode.GetText()); + m_messageHasBeenSet = true; + } + + } + + return *this; +} + +void BatchHandlePolicyError::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const +{ + if(m_policyNameHasBeenSet) + { + oStream << location << index << locationValue << ".PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; + } + + if(m_userNameHasBeenSet) + { + oStream << location << index << locationValue << ".UserName=" << StringUtils::URLEncode(m_userName.c_str()) << "&"; + } + + if(m_groupNameHasBeenSet) + { + oStream << location << index << locationValue << ".GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; + } + + if(m_codeHasBeenSet) + { + oStream << location << index << locationValue << ".Code=" << StringUtils::URLEncode(m_code.c_str()) << "&"; + } + + if(m_messageHasBeenSet) + { + oStream << location << index << locationValue << ".Message=" << StringUtils::URLEncode(m_message.c_str()) << "&"; + } + +} + +void BatchHandlePolicyError::OutputToStream(Aws::OStream& oStream, const char* location) const +{ + if(m_policyNameHasBeenSet) + { + oStream << location << ".PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; + } + + if(m_userNameHasBeenSet) + { + oStream << location << ".UserName=" << StringUtils::URLEncode(m_userName.c_str()) << "&"; + } + + if(m_groupNameHasBeenSet) + { + oStream << location << ".GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; + } + + if(m_codeHasBeenSet) + { + oStream << location << ".Code=" << StringUtils::URLEncode(m_code.c_str()) << "&"; + } + + if(m_messageHasBeenSet) + { + oStream << location << ".Message=" << StringUtils::URLEncode(m_message.c_str()) << "&"; + } + +} + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/batch_delete_policies.cpp b/batch_delete_policies.cpp new file mode 100644 index 000000000..bdf19ffe5 --- /dev/null +++ b/batch_delete_policies.cpp @@ -0,0 +1,64 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::BatchDeletePoliciesRequest request; + + request.SetPolicyDocument("{\"Name\":[\"policy1\",\"policy2\",\"policy3\"]}"); + + BatchDeletePoliciesOutcome outcome = iamClient.BatchDeletePolicies(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: BatchDeletePolicies: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::IAM::Model::Account account= outcome.GetResult().GetAccount(); + std::cout< PolicyDeleted= outcome.GetResult().GetPolicyDeleted(); + for (int i = 0; i < PolicyDeleted.size(); i++) { + std::cout< PolicyError= outcome.GetResult().GetPolicyError(); + for (int i = 0; i < PolicyError.size(); i++) { + std::cout< Date: Tue, 10 Oct 2023 14:48:40 +0800 Subject: [PATCH 04/10] [1] iam policy c++ sdk batch_handle_policy --- .../include/aws/iam/IAMClient.h | 89 +++++++ .../model/BatchAttachPoliciesToGroupRequest.h | 81 ++++++ .../model/BatchAttachPoliciesToGroupResult.h | 249 ++++++++++++++++++ .../model/BatchAttachPoliciesToUserRequest.h | 81 ++++++ .../model/BatchAttachPoliciesToUserResult.h | 249 ++++++++++++++++++ .../BatchAttachPolicyToMultiGroupsRequest.h | 81 ++++++ .../BatchAttachPolicyToMultiGroupsResult.h | 249 ++++++++++++++++++ .../BatchAttachPolicyToMultiUsersRequest.h | 81 ++++++ .../BatchAttachPolicyToMultiUsersResult.h | 249 ++++++++++++++++++ .../BatchDetachPoliciesFromGroupRequest.h | 81 ++++++ .../BatchDetachPoliciesFromGroupResult.h | 249 ++++++++++++++++++ .../BatchDetachPoliciesFromUserRequest.h | 81 ++++++ .../model/BatchDetachPoliciesFromUserResult.h | 249 ++++++++++++++++++ .../BatchDetachPolicyFromMultiGroupsRequest.h | 81 ++++++ .../BatchDetachPolicyFromMultiGroupsResult.h | 249 ++++++++++++++++++ .../BatchDetachPolicyFromMultiUsersRequest.h | 81 ++++++ .../BatchDetachPolicyFromMultiUsersResult.h | 249 ++++++++++++++++++ .../aws-cpp-sdk-iam/source/IAMClient.cpp | 229 ++++++++++++++++ .../BatchAttachPoliciesToGroupRequest.cpp | 41 +++ .../BatchAttachPoliciesToGroupResult.cpp | 82 ++++++ .../BatchAttachPoliciesToUserRequest.cpp | 41 +++ .../model/BatchAttachPoliciesToUserResult.cpp | 82 ++++++ .../BatchAttachPolicyToMultiGroupsRequest.cpp | 41 +++ .../BatchAttachPolicyToMultiGroupsResult.cpp | 82 ++++++ .../BatchAttachPolicyToMultiUsersRequest.cpp | 41 +++ .../BatchAttachPolicyToMultiUsersResult.cpp | 82 ++++++ .../BatchDetachPoliciesFromGroupRequest.cpp | 41 +++ .../BatchDetachPoliciesFromGroupResult.cpp | 82 ++++++ .../BatchDetachPoliciesFromUserRequest.cpp | 41 +++ .../BatchDetachPoliciesFromUserResult.cpp | 82 ++++++ ...atchDetachPolicyFromMultiGroupsRequest.cpp | 41 +++ ...BatchDetachPolicyFromMultiGroupsResult.cpp | 82 ++++++ ...BatchDetachPolicyFromMultiUsersRequest.cpp | 41 +++ .../BatchDetachPolicyFromMultiUsersResult.cpp | 82 ++++++ 34 files changed, 3942 insertions(+) create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToGroupRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToGroupResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToUserRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToUserResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiGroupsRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiGroupsResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiUsersRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiUsersResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromUserRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromUserResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiGroupsRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiGroupsResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiUsersRequest.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiUsersResult.h create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToGroupRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToGroupResult.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToUserRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToUserResult.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiGroupsRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiGroupsResult.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiUsersRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiUsersResult.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupResult.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromUserRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromUserResult.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiGroupsRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiGroupsResult.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiUsersRequest.cpp create mode 100644 aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiUsersResult.cpp diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h index 0969cd9d5..81a866e78 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/IAMClient.h @@ -109,6 +109,14 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include namespace Aws { @@ -186,6 +194,14 @@ namespace Model class DeletePolicyRequest; class UpdatePolicyDescriptionRequest; class BatchDeletePoliciesRequest; + class BatchAttachPoliciesToUserRequest; + class BatchAttachPoliciesToGroupRequest; + class BatchDetachPoliciesFromUserRequest; + class BatchDetachPoliciesFromGroupRequest; + class BatchAttachPolicyToMultiUsersRequest; + class BatchAttachPolicyToMultiGroupsRequest; + class BatchDetachPolicyFromMultiUsersRequest; + class BatchDetachPolicyFromMultiGroupsRequest; class DeletePolicyVersionRequest; class DeleteRoleRequest; class DeleteRolePermissionsBoundaryRequest; @@ -357,6 +373,14 @@ namespace Model typedef Aws::Utils::Outcome DeletePolicyOutcome; typedef Aws::Utils::Outcome UpdatePolicyDescriptionOutcome; typedef Aws::Utils::Outcome BatchDeletePoliciesOutcome; + typedef Aws::Utils::Outcome BatchAttachPoliciesToUserOutcome; + typedef Aws::Utils::Outcome BatchAttachPoliciesToGroupOutcome; + typedef Aws::Utils::Outcome BatchDetachPoliciesFromUserOutcome; + typedef Aws::Utils::Outcome BatchDetachPoliciesFromGroupOutcome; + typedef Aws::Utils::Outcome BatchAttachPolicyToMultiUsersOutcome; + typedef Aws::Utils::Outcome BatchAttachPolicyToMultiGroupsOutcome; + typedef Aws::Utils::Outcome BatchDetachPolicyFromMultiUsersOutcome; + typedef Aws::Utils::Outcome BatchDetachPolicyFromMultiGroupsOutcome; typedef Aws::Utils::Outcome DeletePolicyVersionOutcome; typedef Aws::Utils::Outcome DeleteRoleOutcome; typedef Aws::Utils::Outcome DeleteRolePermissionsBoundaryOutcome; @@ -528,6 +552,14 @@ namespace Model typedef std::future DeletePolicyOutcomeCallable; typedef std::future UpdatePolicyDescriptionOutcomeCallable; typedef std::future BatchDeletePoliciesOutcomeCallable; + typedef std::future BatchAttachPoliciesToUserOutcomeCallable; + typedef std::future BatchAttachPoliciesToGroupOutcomeCallable; + typedef std::future BatchDetachPoliciesFromUserOutcomeCallable; + typedef std::future BatchDetachPoliciesFromGroupOutcomeCallable; + typedef std::future BatchAttachPolicyToMultiUsersOutcomeCallable; + typedef std::future BatchAttachPolicyToMultiGroupsOutcomeCallable; + typedef std::future BatchDetachPolicyFromMultiUsersOutcomeCallable; + typedef std::future BatchDetachPolicyFromMultiGroupsOutcomeCallable; typedef std::future DeletePolicyVersionOutcomeCallable; typedef std::future DeleteRoleOutcomeCallable; typedef std::future DeleteRolePermissionsBoundaryOutcomeCallable; @@ -703,6 +735,19 @@ namespace Model typedef std::function&) > DeletePolicyResponseReceivedHandler; typedef std::function&) > UpdatePolicyDescriptionResponseReceivedHandler; typedef std::function&) > BatchDeletePoliciesResponseReceivedHandler; + + typedef std::function&) > BatchAttachPoliciesToUserResponseReceivedHandler; + typedef std::function&) > BatchAttachPoliciesToGroupResponseReceivedHandler; + + typedef std::function&) > BatchDetachPoliciesFromUserResponseReceivedHandler; + typedef std::function&) > BatchDetachPoliciesFromGroupResponseReceivedHandler; + + typedef std::function&) > BatchAttachPolicyToMultiUsersResponseReceivedHandler; + typedef std::function&) > BatchAttachPolicyToMultiGroupsResponseReceivedHandler; + + typedef std::function&) > BatchDetachPolicyFromMultiUsersResponseReceivedHandler; + typedef std::function&) > BatchDetachPolicyFromMultiGroupsResponseReceivedHandler; + typedef std::function&) > DeletePolicyVersionResponseReceivedHandler; typedef std::function&) > DeleteRoleResponseReceivedHandler; typedef std::function&) > DeleteRolePermissionsBoundaryResponseReceivedHandler; @@ -2440,6 +2485,39 @@ namespace Model virtual Model::BatchDeletePoliciesOutcomeCallable BatchDeletePoliciesCallable(const Model::BatchDeletePoliciesRequest& request) const; virtual void BatchDeletePoliciesAsync(const Model::BatchDeletePoliciesRequest& request, const BatchDeletePoliciesResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual Model::BatchAttachPoliciesToUserOutcome BatchAttachPoliciesToUser(const Model::BatchAttachPoliciesToUserRequest& request) const; + virtual Model::BatchAttachPoliciesToUserOutcomeCallable BatchAttachPoliciesToUserCallable(const Model::BatchAttachPoliciesToUserRequest& request) const; + virtual void BatchAttachPoliciesToUserAsync(const Model::BatchAttachPoliciesToUserRequest& request, const BatchAttachPoliciesToUserResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual Model::BatchAttachPoliciesToGroupOutcome BatchAttachPoliciesToGroup(const Model::BatchAttachPoliciesToGroupRequest& request) const; + virtual Model::BatchAttachPoliciesToGroupOutcomeCallable BatchAttachPoliciesToGroupCallable(const Model::BatchAttachPoliciesToGroupRequest& request) const; + virtual void BatchAttachPoliciesToGroupAsync(const Model::BatchAttachPoliciesToGroupRequest& request, const BatchAttachPoliciesToGroupResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual Model::BatchDetachPoliciesFromUserOutcome BatchDetachPoliciesFromUser(const Model::BatchDetachPoliciesFromUserRequest& request) const; + virtual Model::BatchDetachPoliciesFromUserOutcomeCallable BatchDetachPoliciesFromUserCallable(const Model::BatchDetachPoliciesFromUserRequest& request) const; + virtual void BatchDetachPoliciesFromUserAsync(const Model::BatchDetachPoliciesFromUserRequest& request, const BatchDetachPoliciesFromUserResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual Model::BatchDetachPoliciesFromGroupOutcome BatchDetachPoliciesFromGroup(const Model::BatchDetachPoliciesFromGroupRequest& request) const; + virtual Model::BatchDetachPoliciesFromGroupOutcomeCallable BatchDetachPoliciesFromGroupCallable(const Model::BatchDetachPoliciesFromGroupRequest& request) const; + virtual void BatchDetachPoliciesFromGroupAsync(const Model::BatchDetachPoliciesFromGroupRequest& request, const BatchDetachPoliciesFromGroupResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual Model::BatchAttachPolicyToMultiUsersOutcome BatchAttachPolicyToMultiUsers(const Model::BatchAttachPolicyToMultiUsersRequest& request) const; + virtual Model::BatchAttachPolicyToMultiUsersOutcomeCallable BatchAttachPolicyToMultiUsersCallable(const Model::BatchAttachPolicyToMultiUsersRequest& request) const; + virtual void BatchAttachPolicyToMultiUsersAsync(const Model::BatchAttachPolicyToMultiUsersRequest& request, const BatchAttachPolicyToMultiUsersResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual Model::BatchAttachPolicyToMultiGroupsOutcome BatchAttachPolicyToMultiGroups(const Model::BatchAttachPolicyToMultiGroupsRequest& request) const; + virtual Model::BatchAttachPolicyToMultiGroupsOutcomeCallable BatchAttachPolicyToMultiGroupsCallable(const Model::BatchAttachPolicyToMultiGroupsRequest& request) const; + virtual void BatchAttachPolicyToMultiGroupsAsync(const Model::BatchAttachPolicyToMultiGroupsRequest& request, const BatchAttachPolicyToMultiGroupsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual Model::BatchDetachPolicyFromMultiUsersOutcome BatchDetachPolicyFromMultiUsers(const Model::BatchDetachPolicyFromMultiUsersRequest& request) const; + virtual Model::BatchDetachPolicyFromMultiUsersOutcomeCallable BatchDetachPolicyFromMultiUsersCallable(const Model::BatchDetachPolicyFromMultiUsersRequest& request) const; + virtual void BatchDetachPolicyFromMultiUsersAsync(const Model::BatchDetachPolicyFromMultiUsersRequest& request, const BatchDetachPolicyFromMultiUsersResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + + virtual Model::BatchDetachPolicyFromMultiGroupsOutcome BatchDetachPolicyFromMultiGroups(const Model::BatchDetachPolicyFromMultiGroupsRequest& request) const; + virtual Model::BatchDetachPolicyFromMultiGroupsOutcomeCallable BatchDetachPolicyFromMultiGroupsCallable(const Model::BatchDetachPolicyFromMultiGroupsRequest& request) const; + virtual void BatchDetachPolicyFromMultiGroupsAsync(const Model::BatchDetachPolicyFromMultiGroupsRequest& request, const BatchDetachPolicyFromMultiGroupsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const; + /** *

Deletes the specified version from the specified managed policy.

You * cannot delete the default version from a policy using this operation. To delete @@ -9669,6 +9747,17 @@ namespace Model void DeletePolicyAsyncHelper(const Model::DeletePolicyRequest& request, const DeletePolicyResponseReceivedHandler& handler, const std::shared_ptr& context) const; void UpdatePolicyDescriptionAsyncHelper(const Model::UpdatePolicyDescriptionRequest& request, const UpdatePolicyDescriptionResponseReceivedHandler& handler, const std::shared_ptr& context) const; void BatchDeletePoliciesAsyncHelper(const Model::BatchDeletePoliciesRequest& request, const BatchDeletePoliciesResponseReceivedHandler& handler, const std::shared_ptr& context) const; + + void BatchAttachPoliciesToUserAsyncHelper(const Model::BatchAttachPoliciesToUserRequest& request, const BatchAttachPoliciesToUserResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void BatchAttachPoliciesToGroupAsyncHelper(const Model::BatchAttachPoliciesToGroupRequest& request, const BatchAttachPoliciesToGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void BatchDetachPoliciesFromUserAsyncHelper(const Model::BatchDetachPoliciesFromUserRequest& request, const BatchDetachPoliciesFromUserResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void BatchDetachPoliciesFromGroupAsyncHelper(const Model::BatchDetachPoliciesFromGroupRequest& request, const BatchDetachPoliciesFromGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const; + + void BatchAttachPolicyToMultiUsersAsyncHelper(const Model::BatchAttachPolicyToMultiUsersRequest& request, const BatchAttachPolicyToMultiUsersResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void BatchAttachPolicyToMultiGroupsAsyncHelper(const Model::BatchAttachPolicyToMultiGroupsRequest& request, const BatchAttachPolicyToMultiGroupsResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void BatchDetachPolicyFromMultiUsersAsyncHelper(const Model::BatchDetachPolicyFromMultiUsersRequest& request, const BatchDetachPolicyFromMultiUsersResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void BatchDetachPolicyFromMultiGroupsAsyncHelper(const Model::BatchDetachPolicyFromMultiGroupsRequest& request, const BatchDetachPolicyFromMultiGroupsResponseReceivedHandler& handler, const std::shared_ptr& context) const; + void DeletePolicyVersionAsyncHelper(const Model::DeletePolicyVersionRequest& request, const DeletePolicyVersionResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeleteRoleAsyncHelper(const Model::DeleteRoleRequest& request, const DeleteRoleResponseReceivedHandler& handler, const std::shared_ptr& context) const; void DeleteRolePermissionsBoundaryAsyncHelper(const Model::DeleteRolePermissionsBoundaryRequest& request, const DeleteRolePermissionsBoundaryResponseReceivedHandler& handler, const std::shared_ptr& context) const; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToGroupRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToGroupRequest.h new file mode 100644 index 000000000..79085dc07 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToGroupRequest.h @@ -0,0 +1,81 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API BatchAttachPoliciesToGroupRequest : public IAMRequest + { + public: + BatchAttachPoliciesToGroupRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "BatchAttachPoliciesToGroup"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; } + + inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; } + + inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; } + + inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); } + + inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); } + + inline BatchAttachPoliciesToGroupRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;} + + inline BatchAttachPoliciesToGroupRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;} + + inline BatchAttachPoliciesToGroupRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;} + + + inline const Aws::String& GetGroupName() const{ return m_groupName; } + + inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } + + inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } + + inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } + + inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } + + inline BatchAttachPoliciesToGroupRequest& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} + + inline BatchAttachPoliciesToGroupRequest& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} + + inline BatchAttachPoliciesToGroupRequest& WithGroupName(const char* value) { SetGroupName(value); return *this;} + + private: + Aws::String m_policyDocument; + bool m_policyDocumentHasBeenSet; + + Aws::String m_groupName; + bool m_groupNameHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToGroupResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToGroupResult.h new file mode 100644 index 000000000..4d4574c4b --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToGroupResult.h @@ -0,0 +1,249 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace Utils +{ +namespace Xml +{ + class XmlDocument; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + /** + *

Contains the response to a successful GetUser request.

See + * Also:

AWS + * API Reference

+ */ + class AWS_IAM_API BatchAttachPoliciesToGroupResult + { + public: + BatchAttachPoliciesToGroupResult(); + BatchAttachPoliciesToGroupResult(const Aws::AmazonWebServiceResult& result); + BatchAttachPoliciesToGroupResult& operator=(const Aws::AmazonWebServiceResult& result); + + + inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } + + + inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } + + + inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } + + + inline BatchAttachPoliciesToGroupResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} + + + inline BatchAttachPoliciesToGroupResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline const Account& GetAccount() const{ return m_account; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(const Account& value) { m_account = value; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchAttachPoliciesToGroupResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchAttachPoliciesToGroupResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyAttached() const{ return m_policyAttached; } + + /** + *

A list of users.

+ */ + inline void SetPolicyAttached(const Aws::Vector& value) { m_policyAttached = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyAttached(Aws::Vector&& value) { m_policyAttached = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToGroupResult& WithPolicyAttached(const Aws::Vector& value) { SetPolicyAttached(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToGroupResult& WithPolicyAttached(Aws::Vector&& value) { SetPolicyAttached(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToGroupResult& AddPolicyAttached(const BatchHandlePolicy& value) { m_policyAttached.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToGroupResult& AddPolicyAttached(BatchHandlePolicy&& value) { m_policyAttached.push_back(std::move(value)); return *this; } + + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyError() const{ return m_policyError; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(const Aws::Vector& value) { m_policyError = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(Aws::Vector&& value) { m_policyError = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToGroupResult& WithPolicyError(const Aws::Vector& value) { SetPolicyError(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToGroupResult& WithPolicyError(Aws::Vector&& value) { SetPolicyError(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToGroupResult& AddPolicyError(const BatchHandlePolicyError& value) { m_policyError.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToGroupResult& AddPolicyError(BatchHandlePolicyError&& value) { m_policyError.push_back(std::move(value)); return *this; } + + private: + + private: + + Aws::Vector m_policyAttached; + + Aws::Vector m_policyError; + + Account m_account; + + ResponseMetadata m_responseMetadata; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToUserRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToUserRequest.h new file mode 100644 index 000000000..3e0dfdcfa --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToUserRequest.h @@ -0,0 +1,81 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API BatchAttachPoliciesToUserRequest : public IAMRequest + { + public: + BatchAttachPoliciesToUserRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "BatchAttachPoliciesToUser"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; } + + inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; } + + inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; } + + inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); } + + inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); } + + inline BatchAttachPoliciesToUserRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;} + + inline BatchAttachPoliciesToUserRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;} + + inline BatchAttachPoliciesToUserRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;} + + + inline const Aws::String& GetUserName() const{ return m_userName; } + + inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; } + + inline void SetUserName(const Aws::String& value) { m_userNameHasBeenSet = true; m_userName = value; } + + inline void SetUserName(Aws::String&& value) { m_userNameHasBeenSet = true; m_userName = std::move(value); } + + inline void SetUserName(const char* value) { m_userNameHasBeenSet = true; m_userName.assign(value); } + + inline BatchAttachPoliciesToUserRequest& WithUserName(const Aws::String& value) { SetUserName(value); return *this;} + + inline BatchAttachPoliciesToUserRequest& WithUserName(Aws::String&& value) { SetUserName(std::move(value)); return *this;} + + inline BatchAttachPoliciesToUserRequest& WithUserName(const char* value) { SetUserName(value); return *this;} + + private: + Aws::String m_policyDocument; + bool m_policyDocumentHasBeenSet; + + Aws::String m_userName; + bool m_userNameHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToUserResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToUserResult.h new file mode 100644 index 000000000..6ae5ea533 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPoliciesToUserResult.h @@ -0,0 +1,249 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace Utils +{ +namespace Xml +{ + class XmlDocument; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + /** + *

Contains the response to a successful GetUser request.

See + * Also:

AWS + * API Reference

+ */ + class AWS_IAM_API BatchAttachPoliciesToUserResult + { + public: + BatchAttachPoliciesToUserResult(); + BatchAttachPoliciesToUserResult(const Aws::AmazonWebServiceResult& result); + BatchAttachPoliciesToUserResult& operator=(const Aws::AmazonWebServiceResult& result); + + + inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } + + + inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } + + + inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } + + + inline BatchAttachPoliciesToUserResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} + + + inline BatchAttachPoliciesToUserResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline const Account& GetAccount() const{ return m_account; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(const Account& value) { m_account = value; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchAttachPoliciesToUserResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchAttachPoliciesToUserResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyAttached() const{ return m_policyAttached; } + + /** + *

A list of users.

+ */ + inline void SetPolicyAttached(const Aws::Vector& value) { m_policyAttached = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyAttached(Aws::Vector&& value) { m_policyAttached = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToUserResult& WithPolicyAttached(const Aws::Vector& value) { SetPolicyAttached(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToUserResult& WithPolicyAttached(Aws::Vector&& value) { SetPolicyAttached(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToUserResult& AddPolicyAttached(const BatchHandlePolicy& value) { m_policyAttached.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToUserResult& AddPolicyAttached(BatchHandlePolicy&& value) { m_policyAttached.push_back(std::move(value)); return *this; } + + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyError() const{ return m_policyError; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(const Aws::Vector& value) { m_policyError = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(Aws::Vector&& value) { m_policyError = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToUserResult& WithPolicyError(const Aws::Vector& value) { SetPolicyError(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToUserResult& WithPolicyError(Aws::Vector&& value) { SetPolicyError(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToUserResult& AddPolicyError(const BatchHandlePolicyError& value) { m_policyError.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchAttachPoliciesToUserResult& AddPolicyError(BatchHandlePolicyError&& value) { m_policyError.push_back(std::move(value)); return *this; } + + private: + + private: + + Aws::Vector m_policyAttached; + + Aws::Vector m_policyError; + + Account m_account; + + ResponseMetadata m_responseMetadata; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiGroupsRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiGroupsRequest.h new file mode 100644 index 000000000..29efeb28d --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiGroupsRequest.h @@ -0,0 +1,81 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API BatchAttachPolicyToMultiGroupsRequest : public IAMRequest + { + public: + BatchAttachPolicyToMultiGroupsRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "BatchAttachPolicyToMultiUsers"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + inline const Aws::String& GetGroupDocument() const{ return m_groupDocument; } + + inline bool GroupDocumentHasBeenSet() const { return m_groupDocumentHasBeenSet; } + + inline void SetGroupDocument(const Aws::String& value) { m_groupDocumentHasBeenSet = true; m_groupDocument = value; } + + inline void SetGroupDocument(Aws::String&& value) { m_groupDocumentHasBeenSet = true; m_groupDocument = std::move(value); } + + inline void SetGroupDocument(const char* value) { m_groupDocumentHasBeenSet = true; m_groupDocument.assign(value); } + + inline BatchAttachPolicyToMultiGroupsRequest& WithGroupDocument(const Aws::String& value) { SetGroupDocument(value); return *this;} + + inline BatchAttachPolicyToMultiGroupsRequest& WithGroupDocument(Aws::String&& value) { SetGroupDocument(std::move(value)); return *this;} + + inline BatchAttachPolicyToMultiGroupsRequest& WithGroupDocument(const char* value) { SetGroupDocument(value); return *this;} + + + inline const Aws::String& GetPolicyName() const{ return m_policyName; } + + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } + + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } + + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } + + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } + + inline BatchAttachPolicyToMultiGroupsRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} + + inline BatchAttachPolicyToMultiGroupsRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} + + inline BatchAttachPolicyToMultiGroupsRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} + + private: + Aws::String m_groupDocument; + bool m_groupDocumentHasBeenSet; + + Aws::String m_policyName; + bool m_policyNameHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiGroupsResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiGroupsResult.h new file mode 100644 index 000000000..e1d34c06a --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiGroupsResult.h @@ -0,0 +1,249 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace Utils +{ +namespace Xml +{ + class XmlDocument; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + /** + *

Contains the response to a successful GetUser request.

See + * Also:

AWS + * API Reference

+ */ + class AWS_IAM_API BatchAttachPolicyToMultiGroupsResult + { + public: + BatchAttachPolicyToMultiGroupsResult(); + BatchAttachPolicyToMultiGroupsResult(const Aws::AmazonWebServiceResult& result); + BatchAttachPolicyToMultiGroupsResult& operator=(const Aws::AmazonWebServiceResult& result); + + + inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } + + + inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } + + + inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } + + + inline BatchAttachPolicyToMultiGroupsResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} + + + inline BatchAttachPolicyToMultiGroupsResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline const Account& GetAccount() const{ return m_account; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(const Account& value) { m_account = value; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyAttached() const{ return m_policyAttached; } + + /** + *

A list of users.

+ */ + inline void SetPolicyAttached(const Aws::Vector& value) { m_policyAttached = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyAttached(Aws::Vector&& value) { m_policyAttached = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& WithPolicyAttached(const Aws::Vector& value) { SetPolicyAttached(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& WithPolicyAttached(Aws::Vector&& value) { SetPolicyAttached(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& AddPolicyAttached(const BatchHandlePolicy& value) { m_policyAttached.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& AddPolicyAttached(BatchHandlePolicy&& value) { m_policyAttached.push_back(std::move(value)); return *this; } + + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyError() const{ return m_policyError; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(const Aws::Vector& value) { m_policyError = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(Aws::Vector&& value) { m_policyError = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& WithPolicyError(const Aws::Vector& value) { SetPolicyError(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& WithPolicyError(Aws::Vector&& value) { SetPolicyError(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& AddPolicyError(const BatchHandlePolicyError& value) { m_policyError.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiGroupsResult& AddPolicyError(BatchHandlePolicyError&& value) { m_policyError.push_back(std::move(value)); return *this; } + + private: + + private: + + Aws::Vector m_policyAttached; + + Aws::Vector m_policyError; + + Account m_account; + + ResponseMetadata m_responseMetadata; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiUsersRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiUsersRequest.h new file mode 100644 index 000000000..51a239f86 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiUsersRequest.h @@ -0,0 +1,81 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API BatchAttachPolicyToMultiUsersRequest : public IAMRequest + { + public: + BatchAttachPolicyToMultiUsersRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "BatchAttachPolicyToMultiUsers"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + inline const Aws::String& GetUserDocument() const{ return m_userDocument; } + + inline bool UserDocumentHasBeenSet() const { return m_userDocumentHasBeenSet; } + + inline void SetUserDocument(const Aws::String& value) { m_userDocumentHasBeenSet = true; m_userDocument = value; } + + inline void SetUserDocument(Aws::String&& value) { m_userDocumentHasBeenSet = true; m_userDocument = std::move(value); } + + inline void SetUserDocument(const char* value) { m_userDocumentHasBeenSet = true; m_userDocument.assign(value); } + + inline BatchAttachPolicyToMultiUsersRequest& WithUserDocument(const Aws::String& value) { SetUserDocument(value); return *this;} + + inline BatchAttachPolicyToMultiUsersRequest& WithUserDocument(Aws::String&& value) { SetUserDocument(std::move(value)); return *this;} + + inline BatchAttachPolicyToMultiUsersRequest& WithUserDocument(const char* value) { SetUserDocument(value); return *this;} + + + inline const Aws::String& GetPolicyName() const{ return m_policyName; } + + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } + + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } + + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } + + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } + + inline BatchAttachPolicyToMultiUsersRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} + + inline BatchAttachPolicyToMultiUsersRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} + + inline BatchAttachPolicyToMultiUsersRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} + + private: + Aws::String m_userDocument; + bool m_userDocumentHasBeenSet; + + Aws::String m_policyName; + bool m_policyNameHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiUsersResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiUsersResult.h new file mode 100644 index 000000000..e05dd002d --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchAttachPolicyToMultiUsersResult.h @@ -0,0 +1,249 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace Utils +{ +namespace Xml +{ + class XmlDocument; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + /** + *

Contains the response to a successful GetUser request.

See + * Also:

AWS + * API Reference

+ */ + class AWS_IAM_API BatchAttachPolicyToMultiUsersResult + { + public: + BatchAttachPolicyToMultiUsersResult(); + BatchAttachPolicyToMultiUsersResult(const Aws::AmazonWebServiceResult& result); + BatchAttachPolicyToMultiUsersResult& operator=(const Aws::AmazonWebServiceResult& result); + + + inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } + + + inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } + + + inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } + + + inline BatchAttachPolicyToMultiUsersResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} + + + inline BatchAttachPolicyToMultiUsersResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline const Account& GetAccount() const{ return m_account; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(const Account& value) { m_account = value; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchAttachPolicyToMultiUsersResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchAttachPolicyToMultiUsersResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyAttached() const{ return m_policyAttached; } + + /** + *

A list of users.

+ */ + inline void SetPolicyAttached(const Aws::Vector& value) { m_policyAttached = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyAttached(Aws::Vector&& value) { m_policyAttached = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiUsersResult& WithPolicyAttached(const Aws::Vector& value) { SetPolicyAttached(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiUsersResult& WithPolicyAttached(Aws::Vector&& value) { SetPolicyAttached(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiUsersResult& AddPolicyAttached(const BatchHandlePolicy& value) { m_policyAttached.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiUsersResult& AddPolicyAttached(BatchHandlePolicy&& value) { m_policyAttached.push_back(std::move(value)); return *this; } + + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyError() const{ return m_policyError; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(const Aws::Vector& value) { m_policyError = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(Aws::Vector&& value) { m_policyError = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiUsersResult& WithPolicyError(const Aws::Vector& value) { SetPolicyError(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiUsersResult& WithPolicyError(Aws::Vector&& value) { SetPolicyError(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiUsersResult& AddPolicyError(const BatchHandlePolicyError& value) { m_policyError.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchAttachPolicyToMultiUsersResult& AddPolicyError(BatchHandlePolicyError&& value) { m_policyError.push_back(std::move(value)); return *this; } + + private: + + private: + + Aws::Vector m_policyAttached; + + Aws::Vector m_policyError; + + Account m_account; + + ResponseMetadata m_responseMetadata; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupRequest.h new file mode 100644 index 000000000..d7fe60d8f --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupRequest.h @@ -0,0 +1,81 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API BatchDetachPoliciesFromGroupRequest : public IAMRequest + { + public: + BatchDetachPoliciesFromGroupRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "BatchDetachPoliciesFromGroup"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; } + + inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; } + + inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; } + + inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); } + + inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); } + + inline BatchDetachPoliciesFromGroupRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;} + + inline BatchDetachPoliciesFromGroupRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;} + + inline BatchDetachPoliciesFromGroupRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;} + + + inline const Aws::String& GetGroupName() const{ return m_groupName; } + + inline bool GroupNameHasBeenSet() const { return m_groupNameHasBeenSet; } + + inline void SetGroupName(const Aws::String& value) { m_groupNameHasBeenSet = true; m_groupName = value; } + + inline void SetGroupName(Aws::String&& value) { m_groupNameHasBeenSet = true; m_groupName = std::move(value); } + + inline void SetGroupName(const char* value) { m_groupNameHasBeenSet = true; m_groupName.assign(value); } + + inline BatchDetachPoliciesFromGroupRequest& WithGroupName(const Aws::String& value) { SetGroupName(value); return *this;} + + inline BatchDetachPoliciesFromGroupRequest& WithGroupName(Aws::String&& value) { SetGroupName(std::move(value)); return *this;} + + inline BatchDetachPoliciesFromGroupRequest& WithGroupName(const char* value) { SetGroupName(value); return *this;} + + private: + Aws::String m_policyDocument; + bool m_policyDocumentHasBeenSet; + + Aws::String m_groupName; + bool m_groupNameHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupResult.h new file mode 100644 index 000000000..e33be7caa --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupResult.h @@ -0,0 +1,249 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace Utils +{ +namespace Xml +{ + class XmlDocument; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + /** + *

Contains the response to a successful GetUser request.

See + * Also:

AWS + * API Reference

+ */ + class AWS_IAM_API BatchDetachPoliciesFromGroupResult + { + public: + BatchDetachPoliciesFromGroupResult(); + BatchDetachPoliciesFromGroupResult(const Aws::AmazonWebServiceResult& result); + BatchDetachPoliciesFromGroupResult& operator=(const Aws::AmazonWebServiceResult& result); + + + inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } + + + inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } + + + inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } + + + inline BatchDetachPoliciesFromGroupResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} + + + inline BatchDetachPoliciesFromGroupResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline const Account& GetAccount() const{ return m_account; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(const Account& value) { m_account = value; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDetachPoliciesFromGroupResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDetachPoliciesFromGroupResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyAttached() const{ return m_policyDetached; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDetached(const Aws::Vector& value) { m_policyDetached = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDetached(Aws::Vector&& value) { m_policyDetached = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromGroupResult& WithPolicyDetached(const Aws::Vector& value) { SetPolicyDetached(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromGroupResult& WithPolicyDetached(Aws::Vector&& value) { SetPolicyDetached(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromGroupResult& AddPolicyDetached(const BatchHandlePolicy& value) { m_policyDetached.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromGroupResult& AddPolicyDetached(BatchHandlePolicy&& value) { m_policyDetached.push_back(std::move(value)); return *this; } + + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyError() const{ return m_policyError; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(const Aws::Vector& value) { m_policyError = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(Aws::Vector&& value) { m_policyError = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromGroupResult& WithPolicyError(const Aws::Vector& value) { SetPolicyError(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromGroupResult& WithPolicyError(Aws::Vector&& value) { SetPolicyError(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromGroupResult& AddPolicyError(const BatchHandlePolicyError& value) { m_policyError.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromGroupResult& AddPolicyError(BatchHandlePolicyError&& value) { m_policyError.push_back(std::move(value)); return *this; } + + private: + + private: + + Aws::Vector m_policyDetached; + + Aws::Vector m_policyError; + + Account m_account; + + ResponseMetadata m_responseMetadata; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromUserRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromUserRequest.h new file mode 100644 index 000000000..588dba63e --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromUserRequest.h @@ -0,0 +1,81 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API BatchDetachPoliciesFromUserRequest : public IAMRequest + { + public: + BatchDetachPoliciesFromUserRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "BatchDetachPoliciesFromUser"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + inline const Aws::String& GetPolicyDocument() const{ return m_policyDocument; } + + inline bool PolicyDocumentHasBeenSet() const { return m_policyDocumentHasBeenSet; } + + inline void SetPolicyDocument(const Aws::String& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = value; } + + inline void SetPolicyDocument(Aws::String&& value) { m_policyDocumentHasBeenSet = true; m_policyDocument = std::move(value); } + + inline void SetPolicyDocument(const char* value) { m_policyDocumentHasBeenSet = true; m_policyDocument.assign(value); } + + inline BatchDetachPoliciesFromUserRequest& WithPolicyDocument(const Aws::String& value) { SetPolicyDocument(value); return *this;} + + inline BatchDetachPoliciesFromUserRequest& WithPolicyDocument(Aws::String&& value) { SetPolicyDocument(std::move(value)); return *this;} + + inline BatchDetachPoliciesFromUserRequest& WithPolicyDocument(const char* value) { SetPolicyDocument(value); return *this;} + + + inline const Aws::String& GetUserName() const{ return m_userName; } + + inline bool UserNameHasBeenSet() const { return m_userNameHasBeenSet; } + + inline void SetUserName(const Aws::String& value) { m_userNameHasBeenSet = true; m_userName = value; } + + inline void SetUserName(Aws::String&& value) { m_userNameHasBeenSet = true; m_userName = std::move(value); } + + inline void SetUserName(const char* value) { m_userNameHasBeenSet = true; m_userName.assign(value); } + + inline BatchDetachPoliciesFromUserRequest& WithUserName(const Aws::String& value) { SetUserName(value); return *this;} + + inline BatchDetachPoliciesFromUserRequest& WithUserName(Aws::String&& value) { SetUserName(std::move(value)); return *this;} + + inline BatchDetachPoliciesFromUserRequest& WithUserName(const char* value) { SetUserName(value); return *this;} + + private: + Aws::String m_policyDocument; + bool m_policyDocumentHasBeenSet; + + Aws::String m_userName; + bool m_userNameHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromUserResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromUserResult.h new file mode 100644 index 000000000..733d638f5 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromUserResult.h @@ -0,0 +1,249 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace Utils +{ +namespace Xml +{ + class XmlDocument; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + /** + *

Contains the response to a successful GetUser request.

See + * Also:

AWS + * API Reference

+ */ + class AWS_IAM_API BatchDetachPoliciesFromUserResult + { + public: + BatchDetachPoliciesFromUserResult(); + BatchDetachPoliciesFromUserResult(const Aws::AmazonWebServiceResult& result); + BatchDetachPoliciesFromUserResult& operator=(const Aws::AmazonWebServiceResult& result); + + + inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } + + + inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } + + + inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } + + + inline BatchDetachPoliciesFromUserResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} + + + inline BatchDetachPoliciesFromUserResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline const Account& GetAccount() const{ return m_account; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(const Account& value) { m_account = value; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDetachPoliciesFromUserResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDetachPoliciesFromUserResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyDetached() const{ return m_policyDetached; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDetached(const Aws::Vector& value) { m_policyDetached = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDetached(Aws::Vector&& value) { m_policyDetached = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromUserResult& WithPolicyDetached(const Aws::Vector& value) { SetPolicyDetached(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromUserResult& WithPolicyDetached(Aws::Vector&& value) { SetPolicyDetached(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromUserResult& AddPolicyDetached(const BatchHandlePolicy& value) { m_policyDetached.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromUserResult& AddPolicyDetached(BatchHandlePolicy&& value) { m_policyDetached.push_back(std::move(value)); return *this; } + + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyError() const{ return m_policyError; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(const Aws::Vector& value) { m_policyError = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(Aws::Vector&& value) { m_policyError = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromUserResult& WithPolicyError(const Aws::Vector& value) { SetPolicyError(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromUserResult& WithPolicyError(Aws::Vector&& value) { SetPolicyError(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromUserResult& AddPolicyError(const BatchHandlePolicyError& value) { m_policyError.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDetachPoliciesFromUserResult& AddPolicyError(BatchHandlePolicyError&& value) { m_policyError.push_back(std::move(value)); return *this; } + + private: + + private: + + Aws::Vector m_policyDetached; + + Aws::Vector m_policyError; + + Account m_account; + + ResponseMetadata m_responseMetadata; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiGroupsRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiGroupsRequest.h new file mode 100644 index 000000000..42ca808f3 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiGroupsRequest.h @@ -0,0 +1,81 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API BatchDetachPolicyFromMultiGroupsRequest : public IAMRequest + { + public: + BatchDetachPolicyFromMultiGroupsRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "BatchDetachPolicyFromMultiGroups"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + inline const Aws::String& GetGroupDocument() const{ return m_groupDocument; } + + inline bool GroupDocumentHasBeenSet() const { return m_groupDocumentHasBeenSet; } + + inline void SetGroupDocument(const Aws::String& value) { m_groupDocumentHasBeenSet = true; m_groupDocument = value; } + + inline void SetGroupDocument(Aws::String&& value) { m_groupDocumentHasBeenSet = true; m_groupDocument = std::move(value); } + + inline void SetGroupDocument(const char* value) { m_groupDocumentHasBeenSet = true; m_groupDocument.assign(value); } + + inline BatchDetachPolicyFromMultiGroupsRequest& WithGroupDocument(const Aws::String& value) { SetGroupDocument(value); return *this;} + + inline BatchDetachPolicyFromMultiGroupsRequest& WithGroupDocument(Aws::String&& value) { SetGroupDocument(std::move(value)); return *this;} + + inline BatchDetachPolicyFromMultiGroupsRequest& WithGroupDocument(const char* value) { SetGroupDocument(value); return *this;} + + + inline const Aws::String& GetPolicyName() const{ return m_policyName; } + + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } + + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } + + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } + + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } + + inline BatchDetachPolicyFromMultiGroupsRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} + + inline BatchDetachPolicyFromMultiGroupsRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} + + inline BatchDetachPolicyFromMultiGroupsRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} + + private: + Aws::String m_groupDocument; + bool m_groupDocumentHasBeenSet; + + Aws::String m_policyName; + bool m_policyNameHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiGroupsResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiGroupsResult.h new file mode 100644 index 000000000..960f3dba6 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiGroupsResult.h @@ -0,0 +1,249 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace Utils +{ +namespace Xml +{ + class XmlDocument; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + /** + *

Contains the response to a successful GetUser request.

See + * Also:

AWS + * API Reference

+ */ + class AWS_IAM_API BatchDetachPolicyFromMultiGroupsResult + { + public: + BatchDetachPolicyFromMultiGroupsResult(); + BatchDetachPolicyFromMultiGroupsResult(const Aws::AmazonWebServiceResult& result); + BatchDetachPolicyFromMultiGroupsResult& operator=(const Aws::AmazonWebServiceResult& result); + + + inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } + + + inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } + + + inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } + + + inline BatchDetachPolicyFromMultiGroupsResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} + + + inline BatchDetachPolicyFromMultiGroupsResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline const Account& GetAccount() const{ return m_account; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(const Account& value) { m_account = value; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyDetached() const{ return m_policyDetached; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDetached(const Aws::Vector& value) { m_policyDetached = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDetached(Aws::Vector&& value) { m_policyDetached = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& WithPolicyDetached(const Aws::Vector& value) { SetPolicyDetached(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& WithPolicyDetached(Aws::Vector&& value) { SetPolicyDetached(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& AddPolicyDetached(const BatchHandlePolicy& value) { m_policyDetached.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& AddPolicyDetached(BatchHandlePolicy&& value) { m_policyDetached.push_back(std::move(value)); return *this; } + + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyError() const{ return m_policyError; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(const Aws::Vector& value) { m_policyError = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(Aws::Vector&& value) { m_policyError = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& WithPolicyError(const Aws::Vector& value) { SetPolicyError(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& WithPolicyError(Aws::Vector&& value) { SetPolicyError(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& AddPolicyError(const BatchHandlePolicyError& value) { m_policyError.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiGroupsResult& AddPolicyError(BatchHandlePolicyError&& value) { m_policyError.push_back(std::move(value)); return *this; } + + private: + + private: + + Aws::Vector m_policyDetached; + + Aws::Vector m_policyError; + + Account m_account; + + ResponseMetadata m_responseMetadata; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiUsersRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiUsersRequest.h new file mode 100644 index 000000000..df2f19073 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiUsersRequest.h @@ -0,0 +1,81 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include + +namespace Aws +{ +namespace IAM +{ +namespace Model +{ + + /** + */ + class AWS_IAM_API BatchDetachPolicyFromMultiUsersRequest : public IAMRequest + { + public: + BatchDetachPolicyFromMultiUsersRequest(); + + // Service request name is the Operation name which will send this request out, + // each operation should has unique request name, so that we can get operation's name from this request. + // Note: this is not true for response, multiple operations may have the same response name, + // so we can not get operation's name from response. + inline virtual const char* GetServiceRequestName() const override { return "BatchDetachPolicyFromMultiUsers"; } + + Aws::String SerializePayload() const override; + + protected: + void DumpBodyToUrl(Aws::Http::URI& uri ) const override; + + public: + inline const Aws::String& GetUserDocument() const{ return m_userDocument; } + + inline bool UserDocumentHasBeenSet() const { return m_userDocumentHasBeenSet; } + + inline void SetUserDocument(const Aws::String& value) { m_userDocumentHasBeenSet = true; m_userDocument = value; } + + inline void SetUserDocument(Aws::String&& value) { m_userDocumentHasBeenSet = true; m_userDocument = std::move(value); } + + inline void SetUserDocument(const char* value) { m_userDocumentHasBeenSet = true; m_userDocument.assign(value); } + + inline BatchDetachPolicyFromMultiUsersRequest& WithUserDocument(const Aws::String& value) { SetUserDocument(value); return *this;} + + inline BatchDetachPolicyFromMultiUsersRequest& WithUserDocument(Aws::String&& value) { SetUserDocument(std::move(value)); return *this;} + + inline BatchDetachPolicyFromMultiUsersRequest& WithUserDocument(const char* value) { SetUserDocument(value); return *this;} + + + inline const Aws::String& GetPolicyName() const{ return m_policyName; } + + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } + + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } + + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } + + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } + + inline BatchDetachPolicyFromMultiUsersRequest& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;} + + inline BatchDetachPolicyFromMultiUsersRequest& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} + + inline BatchDetachPolicyFromMultiUsersRequest& WithPolicyName(const char* value) { SetPolicyName(value); return *this;} + + private: + Aws::String m_userDocument; + bool m_userDocumentHasBeenSet; + + Aws::String m_policyName; + bool m_policyNameHasBeenSet; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiUsersResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiUsersResult.h new file mode 100644 index 000000000..4f836499b --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPolicyFromMultiUsersResult.h @@ -0,0 +1,249 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#pragma once +#include +#include +#include +#include +#include +#include + +namespace Aws +{ +template +class AmazonWebServiceResult; + +namespace Utils +{ +namespace Xml +{ + class XmlDocument; +} // namespace Xml +} // namespace Utils +namespace IAM +{ +namespace Model +{ + /** + *

Contains the response to a successful GetUser request.

See + * Also:

AWS + * API Reference

+ */ + class AWS_IAM_API BatchDetachPolicyFromMultiUsersResult + { + public: + BatchDetachPolicyFromMultiUsersResult(); + BatchDetachPolicyFromMultiUsersResult(const Aws::AmazonWebServiceResult& result); + BatchDetachPolicyFromMultiUsersResult& operator=(const Aws::AmazonWebServiceResult& result); + + + inline const ResponseMetadata& GetResponseMetadata() const{ return m_responseMetadata; } + + + inline void SetResponseMetadata(const ResponseMetadata& value) { m_responseMetadata = value; } + + + inline void SetResponseMetadata(ResponseMetadata&& value) { m_responseMetadata = std::move(value); } + + + inline BatchDetachPolicyFromMultiUsersResult& WithResponseMetadata(const ResponseMetadata& value) { SetResponseMetadata(value); return *this;} + + + inline BatchDetachPolicyFromMultiUsersResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline const Account& GetAccount() const{ return m_account; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(const Account& value) { m_account = value; } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + /** + *

A structure containing details about the IAM user.

Due to + * a service issue, password last used data does not include password use from May + * 3, 2018 22:50 PDT to May 23, 2018 14:08 PDT. This affects last + * sign-in dates shown in the IAM console and password last used dates in the + * IAM + * credential report, and returned by this operation. If users signed in during + * the affected time, the password last used date that is returned is the date the + * user last signed in before May 3, 2018. For users that signed in after May 23, + * 2018 14:08 PDT, the returned password last used date is accurate.

You can + * use password last used information to identify unused credentials for deletion. + * For example, you might delete users who did not sign in to AWS in the last 90 + * days. In cases like this, we recommend that you adjust your evaluation window to + * include dates after May 23, 2018. Alternatively, if your users use access keys + * to access AWS programmatically you can refer to access key last used information + * because it is accurate for all dates.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyDetached() const{ return m_policyDetached; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDetached(const Aws::Vector& value) { m_policyDetached = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyDetached(Aws::Vector&& value) { m_policyDetached = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& WithPolicyDetached(const Aws::Vector& value) { SetPolicyDetached(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& WithPolicyDetached(Aws::Vector&& value) { SetPolicyDetached(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& AddPolicyDetached(const BatchHandlePolicy& value) { m_policyDetached.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& AddPolicyDetached(BatchHandlePolicy&& value) { m_policyDetached.push_back(std::move(value)); return *this; } + + + /** + *

A list of users.

+ */ + inline const Aws::Vector& GetPolicyError() const{ return m_policyError; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(const Aws::Vector& value) { m_policyError = value; } + + /** + *

A list of users.

+ */ + inline void SetPolicyError(Aws::Vector&& value) { m_policyError = std::move(value); } + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& WithPolicyError(const Aws::Vector& value) { SetPolicyError(value); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& WithPolicyError(Aws::Vector&& value) { SetPolicyError(std::move(value)); return *this;} + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& AddPolicyError(const BatchHandlePolicyError& value) { m_policyError.push_back(value); return *this; } + + /** + *

A list of users.

+ */ + inline BatchDetachPolicyFromMultiUsersResult& AddPolicyError(BatchHandlePolicyError&& value) { m_policyError.push_back(std::move(value)); return *this; } + + private: + + private: + + Aws::Vector m_policyDetached; + + Aws::Vector m_policyError; + + Account m_account; + + ResponseMetadata m_responseMetadata; + }; + +} // namespace Model +} // namespace IAM +} // namespace Aws diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp index 077abece6..652440a88 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/IAMClient.cpp @@ -193,6 +193,14 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include using namespace Aws; using namespace Aws::Auth; @@ -1263,6 +1271,227 @@ void IAMClient::BatchDeletePoliciesAsyncHelper(const BatchDeletePoliciesRequest& } +BatchAttachPoliciesToUserOutcome IAMClient::BatchAttachPoliciesToUser(const BatchAttachPoliciesToUserRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return BatchAttachPoliciesToUserOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +BatchAttachPoliciesToUserOutcomeCallable IAMClient::BatchAttachPoliciesToUserCallable(const BatchAttachPoliciesToUserRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< BatchAttachPoliciesToUserOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchAttachPoliciesToUser(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::BatchAttachPoliciesToUserAsync(const BatchAttachPoliciesToUserRequest& request, const BatchAttachPoliciesToUserResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->BatchAttachPoliciesToUserAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::BatchAttachPoliciesToUserAsyncHelper(const BatchAttachPoliciesToUserRequest& request, const BatchAttachPoliciesToUserResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, BatchAttachPoliciesToUser(request), context); +} + + +BatchAttachPoliciesToGroupOutcome IAMClient::BatchAttachPoliciesToGroup(const BatchAttachPoliciesToGroupRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return BatchAttachPoliciesToGroupOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +BatchAttachPoliciesToGroupOutcomeCallable IAMClient::BatchAttachPoliciesToGroupCallable(const BatchAttachPoliciesToGroupRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< BatchAttachPoliciesToGroupOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchAttachPoliciesToGroup(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::BatchAttachPoliciesToGroupAsync(const BatchAttachPoliciesToGroupRequest& request, const BatchAttachPoliciesToGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->BatchAttachPoliciesToGroupAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::BatchAttachPoliciesToGroupAsyncHelper(const BatchAttachPoliciesToGroupRequest& request, const BatchAttachPoliciesToGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, BatchAttachPoliciesToGroup(request), context); +} + + +BatchDetachPoliciesFromUserOutcome IAMClient::BatchDetachPoliciesFromUser(const BatchDetachPoliciesFromUserRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return BatchDetachPoliciesFromUserOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +BatchDetachPoliciesFromUserOutcomeCallable IAMClient::BatchDetachPoliciesFromUserCallable(const BatchDetachPoliciesFromUserRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< BatchDetachPoliciesFromUserOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchDetachPoliciesFromUser(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::BatchDetachPoliciesFromUserAsync(const BatchDetachPoliciesFromUserRequest& request, const BatchDetachPoliciesFromUserResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->BatchDetachPoliciesFromUserAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::BatchDetachPoliciesFromUserAsyncHelper(const BatchDetachPoliciesFromUserRequest& request, const BatchDetachPoliciesFromUserResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, BatchDetachPoliciesFromUser(request), context); +} + +BatchDetachPoliciesFromGroupOutcome IAMClient::BatchDetachPoliciesFromGroup(const BatchDetachPoliciesFromGroupRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return BatchDetachPoliciesFromGroupOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +BatchDetachPoliciesFromGroupOutcomeCallable IAMClient::BatchDetachPoliciesFromGroupCallable(const BatchDetachPoliciesFromGroupRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< BatchDetachPoliciesFromGroupOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchDetachPoliciesFromGroup(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::BatchDetachPoliciesFromGroupAsync(const BatchDetachPoliciesFromGroupRequest& request, const BatchDetachPoliciesFromGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->BatchDetachPoliciesFromGroupAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::BatchDetachPoliciesFromGroupAsyncHelper(const BatchDetachPoliciesFromGroupRequest& request, const BatchDetachPoliciesFromGroupResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, BatchDetachPoliciesFromGroup(request), context); +} + + +BatchAttachPolicyToMultiUsersOutcome IAMClient::BatchAttachPolicyToMultiUsers(const BatchAttachPolicyToMultiUsersRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return BatchAttachPolicyToMultiUsersOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +BatchAttachPolicyToMultiUsersOutcomeCallable IAMClient::BatchAttachPolicyToMultiUsersCallable(const BatchAttachPolicyToMultiUsersRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< BatchAttachPolicyToMultiUsersOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchAttachPolicyToMultiUsers(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::BatchAttachPolicyToMultiUsersAsync(const BatchAttachPolicyToMultiUsersRequest& request, const BatchAttachPolicyToMultiUsersResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->BatchAttachPolicyToMultiUsersAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::BatchAttachPolicyToMultiUsersAsyncHelper(const BatchAttachPolicyToMultiUsersRequest& request, const BatchAttachPolicyToMultiUsersResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, BatchAttachPolicyToMultiUsers(request), context); +} + + +BatchAttachPolicyToMultiGroupsOutcome IAMClient::BatchAttachPolicyToMultiGroups(const BatchAttachPolicyToMultiGroupsRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return BatchAttachPolicyToMultiGroupsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +BatchAttachPolicyToMultiGroupsOutcomeCallable IAMClient::BatchAttachPolicyToMultiGroupsCallable(const BatchAttachPolicyToMultiGroupsRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< BatchAttachPolicyToMultiGroupsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchAttachPolicyToMultiGroups(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::BatchAttachPolicyToMultiGroupsAsync(const BatchAttachPolicyToMultiGroupsRequest& request, const BatchAttachPolicyToMultiGroupsResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->BatchAttachPolicyToMultiGroupsAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::BatchAttachPolicyToMultiGroupsAsyncHelper(const BatchAttachPolicyToMultiGroupsRequest& request, const BatchAttachPolicyToMultiGroupsResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, BatchAttachPolicyToMultiGroups(request), context); +} + + +BatchDetachPolicyFromMultiUsersOutcome IAMClient::BatchDetachPolicyFromMultiUsers(const BatchDetachPolicyFromMultiUsersRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return BatchDetachPolicyFromMultiUsersOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +BatchDetachPolicyFromMultiUsersOutcomeCallable IAMClient::BatchDetachPolicyFromMultiUsersCallable(const BatchDetachPolicyFromMultiUsersRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< BatchDetachPolicyFromMultiUsersOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchDetachPolicyFromMultiUsers(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::BatchDetachPolicyFromMultiUsersAsync(const BatchDetachPolicyFromMultiUsersRequest& request, const BatchDetachPolicyFromMultiUsersResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->BatchDetachPolicyFromMultiUsersAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::BatchDetachPolicyFromMultiUsersAsyncHelper(const BatchDetachPolicyFromMultiUsersRequest& request, const BatchDetachPolicyFromMultiUsersResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, BatchDetachPolicyFromMultiUsers(request), context); +} + +BatchDetachPolicyFromMultiGroupsOutcome IAMClient::BatchDetachPolicyFromMultiGroups(const BatchDetachPolicyFromMultiGroupsRequest& request) const +{ + Aws::Http::URI uri = m_uri; + Aws::StringStream ss; + ss << "/"; + uri.SetPath(uri.GetPath() + ss.str()); + return BatchDetachPolicyFromMultiGroupsOutcome(MakeRequest(uri, request, Aws::Http::HttpMethod::HTTP_POST)); +} + +BatchDetachPolicyFromMultiGroupsOutcomeCallable IAMClient::BatchDetachPolicyFromMultiGroupsCallable(const BatchDetachPolicyFromMultiGroupsRequest& request) const +{ + auto task = Aws::MakeShared< std::packaged_task< BatchDetachPolicyFromMultiGroupsOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->BatchDetachPolicyFromMultiGroups(request); } ); + auto packagedFunction = [task]() { (*task)(); }; + m_executor->Submit(packagedFunction); + return task->get_future(); +} + +void IAMClient::BatchDetachPolicyFromMultiGroupsAsync(const BatchDetachPolicyFromMultiGroupsRequest& request, const BatchDetachPolicyFromMultiGroupsResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + m_executor->Submit( [this, request, handler, context](){ this->BatchDetachPolicyFromMultiGroupsAsyncHelper( request, handler, context ); } ); +} + +void IAMClient::BatchDetachPolicyFromMultiGroupsAsyncHelper(const BatchDetachPolicyFromMultiGroupsRequest& request, const BatchDetachPolicyFromMultiGroupsResponseReceivedHandler& handler, const std::shared_ptr& context) const +{ + handler(this, request, BatchDetachPolicyFromMultiGroups(request), context); +} + DeletePolicyVersionOutcome IAMClient::DeletePolicyVersion(const DeletePolicyVersionRequest& request) const { Aws::Http::URI uri = m_uri; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToGroupRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToGroupRequest.cpp new file mode 100644 index 000000000..3a5d3b893 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToGroupRequest.cpp @@ -0,0 +1,41 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +BatchAttachPoliciesToGroupRequest::BatchAttachPoliciesToGroupRequest() : + m_policyDocumentHasBeenSet(false), + m_groupNameHasBeenSet(false) +{ +} + +Aws::String BatchAttachPoliciesToGroupRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=BatchAttachPoliciesToGroup&"; + if(m_policyDocumentHasBeenSet) + { + ss << "PolicyDocument=" << StringUtils::URLEncode(m_policyDocument.c_str()) << "&"; + } + + if(m_groupNameHasBeenSet) + { + ss << "GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void BatchAttachPoliciesToGroupRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToGroupResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToGroupResult.cpp new file mode 100644 index 000000000..e44fdbd7b --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToGroupResult.cpp @@ -0,0 +1,82 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils::Logging; +using namespace Aws::Utils; +using namespace Aws; + +BatchAttachPoliciesToGroupResult::BatchAttachPoliciesToGroupResult() +{ +} + +BatchAttachPoliciesToGroupResult::BatchAttachPoliciesToGroupResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +BatchAttachPoliciesToGroupResult& BatchAttachPoliciesToGroupResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode rootNode = xmlDocument.GetRootElement(); + XmlNode resultNode = rootNode; + if (!rootNode.IsNull() && (rootNode.GetName() != "BatchAttachPoliciesToGroupResult")) + { + resultNode = rootNode.FirstChild("BatchAttachPoliciesToGroupResult"); + } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyAttachedNode = resultNode.FirstChild("Attached"); + if(!policyAttachedNode.IsNull()) + { + XmlNode policyAttachedMember = policyAttachedNode.FirstChild("member"); + while(!policyAttachedMember.IsNull()) + { + m_policyAttached.push_back(policyAttachedMember); + policyAttachedMember = policyAttachedMember.NextNode("member"); + } + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyErrorNode = resultNode.FirstChild("Error"); + if(!policyErrorNode.IsNull()) + { + XmlNode policyErrorMember = policyErrorNode.FirstChild("member"); + while(!policyErrorMember.IsNull()) + { + m_policyError.push_back(policyErrorMember); + policyErrorMember = policyErrorMember.NextNode("member"); + } + } + } + + if (!rootNode.IsNull()) { + XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata"); + m_responseMetadata = responseMetadataNode; + AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetUserResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() ); + } + return *this; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToUserRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToUserRequest.cpp new file mode 100644 index 000000000..7166db4c1 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToUserRequest.cpp @@ -0,0 +1,41 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +BatchAttachPoliciesToUserRequest::BatchAttachPoliciesToUserRequest() : + m_policyDocumentHasBeenSet(false), + m_userNameHasBeenSet(false) +{ +} + +Aws::String BatchAttachPoliciesToUserRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=BatchAttachPoliciesToUser&"; + if(m_policyDocumentHasBeenSet) + { + ss << "PolicyDocument=" << StringUtils::URLEncode(m_policyDocument.c_str()) << "&"; + } + + if(m_userNameHasBeenSet) + { + ss << "UserName=" << StringUtils::URLEncode(m_userName.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void BatchAttachPoliciesToUserRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToUserResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToUserResult.cpp new file mode 100644 index 000000000..ea2cd9cdd --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPoliciesToUserResult.cpp @@ -0,0 +1,82 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils::Logging; +using namespace Aws::Utils; +using namespace Aws; + +BatchAttachPoliciesToUserResult::BatchAttachPoliciesToUserResult() +{ +} + +BatchAttachPoliciesToUserResult::BatchAttachPoliciesToUserResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +BatchAttachPoliciesToUserResult& BatchAttachPoliciesToUserResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode rootNode = xmlDocument.GetRootElement(); + XmlNode resultNode = rootNode; + if (!rootNode.IsNull() && (rootNode.GetName() != "BatchAttachPoliciesToUserResult")) + { + resultNode = rootNode.FirstChild("BatchAttachPoliciesToUserResult"); + } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyAttachedNode = resultNode.FirstChild("Attached"); + if(!policyAttachedNode.IsNull()) + { + XmlNode policyAttachedMember = policyAttachedNode.FirstChild("member"); + while(!policyAttachedMember.IsNull()) + { + m_policyAttached.push_back(policyAttachedMember); + policyAttachedMember = policyAttachedMember.NextNode("member"); + } + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyErrorNode = resultNode.FirstChild("Error"); + if(!policyErrorNode.IsNull()) + { + XmlNode policyErrorMember = policyErrorNode.FirstChild("member"); + while(!policyErrorMember.IsNull()) + { + m_policyError.push_back(policyErrorMember); + policyErrorMember = policyErrorMember.NextNode("member"); + } + } + } + + if (!rootNode.IsNull()) { + XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata"); + m_responseMetadata = responseMetadataNode; + AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetUserResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() ); + } + return *this; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiGroupsRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiGroupsRequest.cpp new file mode 100644 index 000000000..8858d88be --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiGroupsRequest.cpp @@ -0,0 +1,41 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +BatchAttachPolicyToMultiGroupsRequest::BatchAttachPolicyToMultiGroupsRequest() : + m_groupDocumentHasBeenSet(false), + m_policyNameHasBeenSet(false) +{ +} + +Aws::String BatchAttachPolicyToMultiGroupsRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=BatchAttachPolicyToMultiGroups&"; + if(m_groupDocumentHasBeenSet) + { + ss << "GroupDocument=" << StringUtils::URLEncode(m_groupDocument.c_str()) << "&"; + } + + if(m_policyNameHasBeenSet) + { + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void BatchAttachPolicyToMultiGroupsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiGroupsResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiGroupsResult.cpp new file mode 100644 index 000000000..b5cf62d46 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiGroupsResult.cpp @@ -0,0 +1,82 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils::Logging; +using namespace Aws::Utils; +using namespace Aws; + +BatchAttachPolicyToMultiGroupsResult::BatchAttachPolicyToMultiGroupsResult() +{ +} + +BatchAttachPolicyToMultiGroupsResult::BatchAttachPolicyToMultiGroupsResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +BatchAttachPolicyToMultiGroupsResult& BatchAttachPolicyToMultiGroupsResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode rootNode = xmlDocument.GetRootElement(); + XmlNode resultNode = rootNode; + if (!rootNode.IsNull() && (rootNode.GetName() != "BatchAttachPolicyToMultiGroupsResult")) + { + resultNode = rootNode.FirstChild("BatchAttachPolicyToMultiGroupsResult"); + } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyAttachedNode = resultNode.FirstChild("Attached"); + if(!policyAttachedNode.IsNull()) + { + XmlNode policyAttachedMember = policyAttachedNode.FirstChild("member"); + while(!policyAttachedMember.IsNull()) + { + m_policyAttached.push_back(policyAttachedMember); + policyAttachedMember = policyAttachedMember.NextNode("member"); + } + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyErrorNode = resultNode.FirstChild("Error"); + if(!policyErrorNode.IsNull()) + { + XmlNode policyErrorMember = policyErrorNode.FirstChild("member"); + while(!policyErrorMember.IsNull()) + { + m_policyError.push_back(policyErrorMember); + policyErrorMember = policyErrorMember.NextNode("member"); + } + } + } + + if (!rootNode.IsNull()) { + XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata"); + m_responseMetadata = responseMetadataNode; + AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetUserResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() ); + } + return *this; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiUsersRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiUsersRequest.cpp new file mode 100644 index 000000000..7dd4bf38b --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiUsersRequest.cpp @@ -0,0 +1,41 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +BatchAttachPolicyToMultiUsersRequest::BatchAttachPolicyToMultiUsersRequest() : + m_userDocumentHasBeenSet(false), + m_policyNameHasBeenSet(false) +{ +} + +Aws::String BatchAttachPolicyToMultiUsersRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=BatchAttachPolicyToMultiUsers&"; + if(m_userDocumentHasBeenSet) + { + ss << "UserDocument=" << StringUtils::URLEncode(m_userDocument.c_str()) << "&"; + } + + if(m_policyNameHasBeenSet) + { + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void BatchAttachPolicyToMultiUsersRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiUsersResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiUsersResult.cpp new file mode 100644 index 000000000..04382513f --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchAttachPolicyToMultiUsersResult.cpp @@ -0,0 +1,82 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils::Logging; +using namespace Aws::Utils; +using namespace Aws; + +BatchAttachPolicyToMultiUsersResult::BatchAttachPolicyToMultiUsersResult() +{ +} + +BatchAttachPolicyToMultiUsersResult::BatchAttachPolicyToMultiUsersResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +BatchAttachPolicyToMultiUsersResult& BatchAttachPolicyToMultiUsersResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode rootNode = xmlDocument.GetRootElement(); + XmlNode resultNode = rootNode; + if (!rootNode.IsNull() && (rootNode.GetName() != "BatchAttachPolicyToMultiUsersResult")) + { + resultNode = rootNode.FirstChild("BatchAttachPolicyToMultiUsersResult"); + } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyAttachedNode = resultNode.FirstChild("Attached"); + if(!policyAttachedNode.IsNull()) + { + XmlNode policyAttachedMember = policyAttachedNode.FirstChild("member"); + while(!policyAttachedMember.IsNull()) + { + m_policyAttached.push_back(policyAttachedMember); + policyAttachedMember = policyAttachedMember.NextNode("member"); + } + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyErrorNode = resultNode.FirstChild("Error"); + if(!policyErrorNode.IsNull()) + { + XmlNode policyErrorMember = policyErrorNode.FirstChild("member"); + while(!policyErrorMember.IsNull()) + { + m_policyError.push_back(policyErrorMember); + policyErrorMember = policyErrorMember.NextNode("member"); + } + } + } + + if (!rootNode.IsNull()) { + XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata"); + m_responseMetadata = responseMetadataNode; + AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetUserResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() ); + } + return *this; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupRequest.cpp new file mode 100644 index 000000000..af36a5b75 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupRequest.cpp @@ -0,0 +1,41 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +BatchDetachPoliciesFromGroupRequest::BatchDetachPoliciesFromGroupRequest() : + m_policyDocumentHasBeenSet(false), + m_groupNameHasBeenSet(false) +{ +} + +Aws::String BatchDetachPoliciesFromGroupRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=BatchAttachPoliciesToGroup&"; + if(m_policyDocumentHasBeenSet) + { + ss << "PolicyDocument=" << StringUtils::URLEncode(m_policyDocument.c_str()) << "&"; + } + + if(m_groupNameHasBeenSet) + { + ss << "GroupName=" << StringUtils::URLEncode(m_groupName.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void BatchDetachPoliciesFromGroupRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupResult.cpp new file mode 100644 index 000000000..e5b7d1db4 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupResult.cpp @@ -0,0 +1,82 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils::Logging; +using namespace Aws::Utils; +using namespace Aws; + +BatchDetachPoliciesFromGroupResult::BatchDetachPoliciesFromGroupResult() +{ +} + +BatchDetachPoliciesFromGroupResult::BatchDetachPoliciesFromGroupResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +BatchDetachPoliciesFromGroupResult& BatchDetachPoliciesFromGroupResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode rootNode = xmlDocument.GetRootElement(); + XmlNode resultNode = rootNode; + if (!rootNode.IsNull() && (rootNode.GetName() != "BatchDetachPoliciesFromGroupResult")) + { + resultNode = rootNode.FirstChild("BatchDetachPoliciesFromGroupResult"); + } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyAttachedNode = resultNode.FirstChild("Detached"); + if(!policyAttachedNode.IsNull()) + { + XmlNode policyAttachedMember = policyAttachedNode.FirstChild("member"); + while(!policyAttachedMember.IsNull()) + { + m_policyDetached.push_back(policyAttachedMember); + policyAttachedMember = policyAttachedMember.NextNode("member"); + } + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyErrorNode = resultNode.FirstChild("Error"); + if(!policyErrorNode.IsNull()) + { + XmlNode policyErrorMember = policyErrorNode.FirstChild("member"); + while(!policyErrorMember.IsNull()) + { + m_policyError.push_back(policyErrorMember); + policyErrorMember = policyErrorMember.NextNode("member"); + } + } + } + + if (!rootNode.IsNull()) { + XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata"); + m_responseMetadata = responseMetadataNode; + AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetUserResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() ); + } + return *this; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromUserRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromUserRequest.cpp new file mode 100644 index 000000000..9a0cf7578 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromUserRequest.cpp @@ -0,0 +1,41 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +BatchDetachPoliciesFromUserRequest::BatchDetachPoliciesFromUserRequest() : + m_policyDocumentHasBeenSet(false), + m_userNameHasBeenSet(false) +{ +} + +Aws::String BatchDetachPoliciesFromUserRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=BatchDetachPoliciesFromUser&"; + if(m_policyDocumentHasBeenSet) + { + ss << "PolicyDocument=" << StringUtils::URLEncode(m_policyDocument.c_str()) << "&"; + } + + if(m_userNameHasBeenSet) + { + ss << "UserName=" << StringUtils::URLEncode(m_userName.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void BatchDetachPoliciesFromUserRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromUserResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromUserResult.cpp new file mode 100644 index 000000000..fc5885ba8 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromUserResult.cpp @@ -0,0 +1,82 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils::Logging; +using namespace Aws::Utils; +using namespace Aws; + +BatchDetachPoliciesFromUserResult::BatchDetachPoliciesFromUserResult() +{ +} + +BatchDetachPoliciesFromUserResult::BatchDetachPoliciesFromUserResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +BatchDetachPoliciesFromUserResult& BatchDetachPoliciesFromUserResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode rootNode = xmlDocument.GetRootElement(); + XmlNode resultNode = rootNode; + if (!rootNode.IsNull() && (rootNode.GetName() != "BatchDetachPoliciesFromUserResult")) + { + resultNode = rootNode.FirstChild("BatchDetachPoliciesFromUserResult"); + } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyDetachedNode = resultNode.FirstChild("Detached"); + if(!policyDetachedNode.IsNull()) + { + XmlNode policyDetachedMember = policyDetachedNode.FirstChild("member"); + while(!policyDetachedMember.IsNull()) + { + m_policyDetached.push_back(policyDetachedMember); + policyDetachedMember = policyDetachedMember.NextNode("member"); + } + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyErrorNode = resultNode.FirstChild("Error"); + if(!policyErrorNode.IsNull()) + { + XmlNode policyErrorMember = policyErrorNode.FirstChild("member"); + while(!policyErrorMember.IsNull()) + { + m_policyError.push_back(policyErrorMember); + policyErrorMember = policyErrorMember.NextNode("member"); + } + } + } + + if (!rootNode.IsNull()) { + XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata"); + m_responseMetadata = responseMetadataNode; + AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetUserResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() ); + } + return *this; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiGroupsRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiGroupsRequest.cpp new file mode 100644 index 000000000..30aeddee9 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiGroupsRequest.cpp @@ -0,0 +1,41 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +BatchDetachPolicyFromMultiGroupsRequest::BatchDetachPolicyFromMultiGroupsRequest() : + m_groupDocumentHasBeenSet(false), + m_policyNameHasBeenSet(false) +{ +} + +Aws::String BatchDetachPolicyFromMultiGroupsRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=BatchDetachPolicyFromMultiGroups&"; + if(m_groupDocumentHasBeenSet) + { + ss << "GroupDocument=" << StringUtils::URLEncode(m_groupDocument.c_str()) << "&"; + } + + if(m_policyNameHasBeenSet) + { + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void BatchDetachPolicyFromMultiGroupsRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiGroupsResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiGroupsResult.cpp new file mode 100644 index 000000000..57896963e --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiGroupsResult.cpp @@ -0,0 +1,82 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils::Logging; +using namespace Aws::Utils; +using namespace Aws; + +BatchDetachPolicyFromMultiGroupsResult::BatchDetachPolicyFromMultiGroupsResult() +{ +} + +BatchDetachPolicyFromMultiGroupsResult::BatchDetachPolicyFromMultiGroupsResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +BatchDetachPolicyFromMultiGroupsResult& BatchDetachPolicyFromMultiGroupsResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode rootNode = xmlDocument.GetRootElement(); + XmlNode resultNode = rootNode; + if (!rootNode.IsNull() && (rootNode.GetName() != "BatchDetachPolicyFromMultiGroupsResult")) + { + resultNode = rootNode.FirstChild("BatchDetachPolicyFromMultiGroupsResult"); + } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyAttachedNode = resultNode.FirstChild("Detached"); + if(!policyAttachedNode.IsNull()) + { + XmlNode policyAttachedMember = policyAttachedNode.FirstChild("member"); + while(!policyAttachedMember.IsNull()) + { + m_policyDetached.push_back(policyAttachedMember); + policyAttachedMember = policyAttachedMember.NextNode("member"); + } + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyErrorNode = resultNode.FirstChild("Error"); + if(!policyErrorNode.IsNull()) + { + XmlNode policyErrorMember = policyErrorNode.FirstChild("member"); + while(!policyErrorMember.IsNull()) + { + m_policyError.push_back(policyErrorMember); + policyErrorMember = policyErrorMember.NextNode("member"); + } + } + } + + if (!rootNode.IsNull()) { + XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata"); + m_responseMetadata = responseMetadataNode; + AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetUserResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() ); + } + return *this; +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiUsersRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiUsersRequest.cpp new file mode 100644 index 000000000..441976efa --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiUsersRequest.cpp @@ -0,0 +1,41 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + +BatchDetachPolicyFromMultiUsersRequest::BatchDetachPolicyFromMultiUsersRequest() : + m_userDocumentHasBeenSet(false), + m_policyNameHasBeenSet(false) +{ +} + +Aws::String BatchDetachPolicyFromMultiUsersRequest::SerializePayload() const +{ + Aws::StringStream ss; + ss << "Action=BatchDetachPolicyFromMultiUsers&"; + if(m_userDocumentHasBeenSet) + { + ss << "UserDocument=" << StringUtils::URLEncode(m_userDocument.c_str()) << "&"; + } + + if(m_policyNameHasBeenSet) + { + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; + } + + ss << "Version=2010-05-08"; + return ss.str(); +} + + +void BatchDetachPolicyFromMultiUsersRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const +{ + uri.SetQueryString(SerializePayload()); +} diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiUsersResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiUsersResult.cpp new file mode 100644 index 000000000..90c985037 --- /dev/null +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPolicyFromMultiUsersResult.cpp @@ -0,0 +1,82 @@ +/** + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0. + */ + +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM::Model; +using namespace Aws::Utils::Xml; +using namespace Aws::Utils::Logging; +using namespace Aws::Utils; +using namespace Aws; + +BatchDetachPolicyFromMultiUsersResult::BatchDetachPolicyFromMultiUsersResult() +{ +} + +BatchDetachPolicyFromMultiUsersResult::BatchDetachPolicyFromMultiUsersResult(const Aws::AmazonWebServiceResult& result) +{ + *this = result; +} + +BatchDetachPolicyFromMultiUsersResult& BatchDetachPolicyFromMultiUsersResult::operator =(const Aws::AmazonWebServiceResult& result) +{ + const XmlDocument& xmlDocument = result.GetPayload(); + XmlNode rootNode = xmlDocument.GetRootElement(); + XmlNode resultNode = rootNode; + if (!rootNode.IsNull() && (rootNode.GetName() != "BatchDetachPolicyFromMultiUsersResult")) + { + resultNode = rootNode.FirstChild("BatchDetachPolicyFromMultiUsersResult"); + } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyAttachedNode = resultNode.FirstChild("Detached"); + if(!policyAttachedNode.IsNull()) + { + XmlNode policyAttachedMember = policyAttachedNode.FirstChild("member"); + while(!policyAttachedMember.IsNull()) + { + m_policyDetached.push_back(policyAttachedMember); + policyAttachedMember = policyAttachedMember.NextNode("member"); + } + } + } + + if(!resultNode.IsNull()) + { + XmlNode policyErrorNode = resultNode.FirstChild("Error"); + if(!policyErrorNode.IsNull()) + { + XmlNode policyErrorMember = policyErrorNode.FirstChild("member"); + while(!policyErrorMember.IsNull()) + { + m_policyError.push_back(policyErrorMember); + policyErrorMember = policyErrorMember.NextNode("member"); + } + } + } + + if (!rootNode.IsNull()) { + XmlNode responseMetadataNode = rootNode.FirstChild("ResponseMetadata"); + m_responseMetadata = responseMetadataNode; + AWS_LOGSTREAM_DEBUG("Aws::IAM::Model::GetUserResult", "x-amzn-request-id: " << m_responseMetadata.GetRequestId() ); + } + return *this; +} -- Gitee From ecf4022d777ed2b32518d4581a792547d4bbd837 Mon Sep 17 00:00:00 2001 From: dinghh Date: Tue, 10 Oct 2023 16:35:33 +0800 Subject: [PATCH 05/10] [1] iam policy c++ sdk batch_handle_policy --- .../BatchDetachPoliciesFromGroupResult.h | 2 +- .../BatchDetachPoliciesFromGroupResult.cpp | 12 ++-- batch_attach_policies_to_group.cpp | 65 ++++++++++++++++++ batch_attach_policies_to_user.cpp | 65 ++++++++++++++++++ batch_attach_policy_to_multigroups.cpp | 65 ++++++++++++++++++ batch_attach_policy_to_multiusers.cpp | 65 ++++++++++++++++++ batch_detach_policies_from_group.cpp | 67 +++++++++++++++++++ batch_detach_policies_from_user.cpp | 65 ++++++++++++++++++ batch_detach_policy_from_multigroups.cpp | 65 ++++++++++++++++++ batch_detach_policy_from_multiusers.cpp | 65 ++++++++++++++++++ 10 files changed, 529 insertions(+), 7 deletions(-) create mode 100644 batch_attach_policies_to_group.cpp create mode 100644 batch_attach_policies_to_user.cpp create mode 100644 batch_attach_policy_to_multigroups.cpp create mode 100644 batch_attach_policy_to_multiusers.cpp create mode 100644 batch_detach_policies_from_group.cpp create mode 100644 batch_detach_policies_from_user.cpp create mode 100644 batch_detach_policy_from_multigroups.cpp create mode 100644 batch_detach_policy_from_multiusers.cpp diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupResult.h index e33be7caa..df3811cea 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupResult.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/BatchDetachPoliciesFromGroupResult.h @@ -163,7 +163,7 @@ namespace Model /** *

A list of users.

*/ - inline const Aws::Vector& GetPolicyAttached() const{ return m_policyDetached; } + inline const Aws::Vector& GetPolicyDetached() const{ return m_policyDetached; } /** *

A list of users.

diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupResult.cpp index e5b7d1db4..7d3f5e930 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupResult.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupResult.cpp @@ -47,14 +47,14 @@ BatchDetachPoliciesFromGroupResult& BatchDetachPoliciesFromGroupResult::operator if(!resultNode.IsNull()) { - XmlNode policyAttachedNode = resultNode.FirstChild("Detached"); - if(!policyAttachedNode.IsNull()) + XmlNode policyDetachedNode = resultNode.FirstChild("Detached"); + if(!policyDetachedNode.IsNull()) { - XmlNode policyAttachedMember = policyAttachedNode.FirstChild("member"); - while(!policyAttachedMember.IsNull()) + XmlNode policyDetachedMember = policyDetachedNode.FirstChild("member"); + while(!policyDetachedMember.IsNull()) { - m_policyDetached.push_back(policyAttachedMember); - policyAttachedMember = policyAttachedMember.NextNode("member"); + m_policyDetached.push_back(policyDetachedMember); + policyDetachedMember = policyDetachedMember.NextNode("member"); } } } diff --git a/batch_attach_policies_to_group.cpp b/batch_attach_policies_to_group.cpp new file mode 100644 index 000000000..296243599 --- /dev/null +++ b/batch_attach_policies_to_group.cpp @@ -0,0 +1,65 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::BatchAttachPoliciesToGroupRequest request; + + request.SetPolicyDocument("{\"Name\":[\"policy1\",\"policy2\",\"policy3\"]}"); + request.SetGroupName("group1"); + + BatchAttachPoliciesToGroupOutcome outcome = iamClient.BatchAttachPoliciesToGroup(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: BatchAttachPoliciesToGroup: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::IAM::Model::Account account= outcome.GetResult().GetAccount(); + std::cout< PolicyAttached= outcome.GetResult().GetPolicyAttached(); + for (int i = 0; i < PolicyAttached.size(); i++) { + std::cout< PolicyError= outcome.GetResult().GetPolicyError(); + for (int i = 0; i < PolicyError.size(); i++) { + std::cout< +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::BatchAttachPoliciesToUserRequest request; + + request.SetPolicyDocument("{\"Name\":[\"policy1\",\"policy2\",\"policy3\"]}"); + request.SetUserName("user1"); + + BatchAttachPoliciesToUserOutcome outcome = iamClient.BatchAttachPoliciesToUser(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: BatchAttachPoliciesToUser: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::IAM::Model::Account account= outcome.GetResult().GetAccount(); + std::cout< PolicyAttached= outcome.GetResult().GetPolicyAttached(); + for (int i = 0; i < PolicyAttached.size(); i++) { + std::cout< PolicyError= outcome.GetResult().GetPolicyError(); + for (int i = 0; i < PolicyError.size(); i++) { + std::cout< +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::BatchAttachPolicyToMultiGroupsRequest request; + + request.SetGroupDocument("{\"Name\":[\"group1\",\"group2\",\"group3\"]}"); + request.SetPolicyName("policy1"); + + BatchAttachPolicyToMultiGroupsOutcome outcome = iamClient.BatchAttachPolicyToMultiGroups(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: BatchAttachPolicyToMultiGroups: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::IAM::Model::Account account= outcome.GetResult().GetAccount(); + std::cout< PolicyAttached= outcome.GetResult().GetPolicyAttached(); + for (int i = 0; i < PolicyAttached.size(); i++) { + std::cout< PolicyError= outcome.GetResult().GetPolicyError(); + for (int i = 0; i < PolicyError.size(); i++) { + std::cout< +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::BatchAttachPolicyToMultiUsersRequest request; + + request.SetUserDocument("{\"Name\":[\"user1\",\"user2\",\"user3\"]}"); + request.SetPolicyName("policy1"); + + BatchAttachPolicyToMultiUsersOutcome outcome = iamClient.BatchAttachPolicyToMultiUsers(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: BatchAttachPoliciesToUser: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::IAM::Model::Account account= outcome.GetResult().GetAccount(); + std::cout< PolicyAttached= outcome.GetResult().GetPolicyAttached(); + for (int i = 0; i < PolicyAttached.size(); i++) { + std::cout< PolicyError= outcome.GetResult().GetPolicyError(); + for (int i = 0; i < PolicyError.size(); i++) { + std::cout< +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::BatchDetachPoliciesFromGroupRequest request; + + request.SetPolicyDocument("{\"Name\":[\"policy1\",\"policy2\",\"policy3\"]}"); + request.SetGroupName("group1"); + + BatchDetachPoliciesFromGroupOutcome outcome = iamClient.BatchDetachPoliciesFromGroup(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: BatchDetachPoliciesFromGroup: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + std::cout << "----success---" << std::endl; + Aws::IAM::Model::Account account= outcome.GetResult().GetAccount(); + std::cout< PolicyDetached= outcome.GetResult().GetPolicyDetached(); + for (int i = 0; i < PolicyDetached.size(); i++) { + std::cout< PolicyError= outcome.GetResult().GetPolicyError(); + for (int i = 0; i < PolicyError.size(); i++) { + std::cout< +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::BatchDetachPoliciesFromUserRequest request; + + request.SetPolicyDocument("{\"Name\":[\"policy1\",\"policy2\",\"policy3\"]}"); + request.SetUserName("user1"); + + BatchDetachPoliciesFromUserOutcome outcome = iamClient.BatchDetachPoliciesFromUser(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: BatchDetachPoliciesFromUser: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::IAM::Model::Account account= outcome.GetResult().GetAccount(); + std::cout< PolicyDetached= outcome.GetResult().GetPolicyDetached(); + for (int i = 0; i < PolicyDetached.size(); i++) { + std::cout< PolicyError= outcome.GetResult().GetPolicyError(); + for (int i = 0; i < PolicyError.size(); i++) { + std::cout< +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::BatchDetachPolicyFromMultiGroupsRequest request; + + request.SetGroupDocument("{\"Name\":[\"group1\",\"group2\",\"group3\"]}"); + request.SetPolicyName("policy1"); + + BatchDetachPolicyFromMultiGroupsOutcome outcome = iamClient.BatchDetachPolicyFromMultiGroups(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: BatchAttachPoliciesToUser: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::IAM::Model::Account account= outcome.GetResult().GetAccount(); + std::cout< PolicyAttached= outcome.GetResult().GetPolicyDetached(); + for (int i = 0; i < PolicyAttached.size(); i++) { + std::cout< PolicyError= outcome.GetResult().GetPolicyError(); + for (int i = 0; i < PolicyError.size(); i++) { + std::cout< +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::BatchDetachPolicyFromMultiUsersRequest request; + + request.SetUserDocument("{\"Name\":[\"user1\",\"user2\",\"user3\"]}"); + request.SetPolicyName("policy1"); + + BatchDetachPolicyFromMultiUsersOutcome outcome = iamClient.BatchDetachPolicyFromMultiUsers(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: BatchAttachPoliciesToUser: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::IAM::Model::Account account= outcome.GetResult().GetAccount(); + std::cout< PolicyAttached= outcome.GetResult().GetPolicyDetached(); + for (int i = 0; i < PolicyAttached.size(); i++) { + std::cout< PolicyError= outcome.GetResult().GetPolicyError(); + for (int i = 0; i < PolicyError.size(); i++) { + std::cout< Date: Tue, 10 Oct 2023 17:00:41 +0800 Subject: [PATCH 06/10] [1] iam policy c++ sdk batch_handle_policy --- .../source/model/BatchDetachPoliciesFromGroupRequest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupRequest.cpp index af36a5b75..983c20135 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/BatchDetachPoliciesFromGroupRequest.cpp @@ -19,7 +19,7 @@ BatchDetachPoliciesFromGroupRequest::BatchDetachPoliciesFromGroupRequest() : Aws::String BatchDetachPoliciesFromGroupRequest::SerializePayload() const { Aws::StringStream ss; - ss << "Action=BatchAttachPoliciesToGroup&"; + ss << "Action=BatchDetachPoliciesFromGroup&"; if(m_policyDocumentHasBeenSet) { ss << "PolicyDocument=" << StringUtils::URLEncode(m_policyDocument.c_str()) << "&"; @@ -39,3 +39,4 @@ void BatchDetachPoliciesFromGroupRequest::DumpBodyToUrl(Aws::Http::URI& uri ) c { uri.SetQueryString(SerializePayload()); } + -- Gitee From 0ce2995e94dc40c2beaebf7891a29740b6dc74e8 Mon Sep 17 00:00:00 2001 From: dinghh Date: Wed, 11 Oct 2023 10:08:12 +0800 Subject: [PATCH 07/10] [1] iam policy c++ sdk list_attached_user/group_policies --- .../include/aws/iam/model/AttachedPolicy.h | 126 +++++++++++++++ .../model/ListAttachedUserPoliciesRequest.h | 15 +- .../source/model/AttachedPolicy.cpp | 151 ++++++++++++++++-- .../model/ListAttachedUserPoliciesRequest.cpp | 9 +- list_attached_group_policies.cpp | 53 ++++++ list_attached_user_policies.cpp | 53 ++++++ 6 files changed, 391 insertions(+), 16 deletions(-) create mode 100644 list_attached_group_policies.cpp create mode 100644 list_attached_user_policies.cpp diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachedPolicy.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachedPolicy.h index 7f8a881bd..d0790f83c 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachedPolicy.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/AttachedPolicy.h @@ -112,6 +112,110 @@ namespace Model inline AttachedPolicy& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} + + inline bool GetIsDirectAttached() const{ return m_isDirectAttached; } + + inline bool IsDirectAttachedHasBeenSet() const { return m_isDirectAttachedHasBeenSet; } + + inline void SetIsDirectAttached(bool value) { m_isDirectAttachedHasBeenSet = true; m_isDirectAttached = value; } + + inline AttachedPolicy& WithIsDirectAttached(bool value) { SetIsDirectAttached(value); return *this;} + + + inline const Aws::String& GetPolicyId() const{ return m_policyId; } + + inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; } + + inline void SetPolicyId(const Aws::String& value) { m_policyIdHasBeenSet = true; m_policyId = value; } + + inline void SetPolicyId(Aws::String&& value) { m_policyIdHasBeenSet = true; m_policyId = std::move(value); } + + inline void SetPolicyId(const char* value) { m_policyIdHasBeenSet = true; m_policyId.assign(value); } + + inline AttachedPolicy& WithPolicyId(const Aws::String& value) { SetPolicyId(value); return *this;} + + inline AttachedPolicy& WithPolicyId(Aws::String&& value) { SetPolicyId(std::move(value)); return *this;} + + inline AttachedPolicy& WithPolicyId(const char* value) { SetPolicyId(value); return *this;} + + + inline const Aws::String& GetArn() const{ return m_arn; } + + inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } + + inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } + + inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } + + inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } + + inline AttachedPolicy& WithArn(const Aws::String& value) { SetArn(value); return *this;} + + inline AttachedPolicy& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} + + inline AttachedPolicy& WithArn(const char* value) { SetArn(value); return *this;} + + + inline const Aws::String& GetPath() const{ return m_path; } + + inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } + + inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; } + + inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } + + inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); } + + inline AttachedPolicy& WithPath(const Aws::String& value) { SetPath(value); return *this;} + + inline AttachedPolicy& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;} + + inline AttachedPolicy& WithPath(const char* value) { SetPath(value); return *this;} + + + inline const Aws::String& GetDescription() const{ return m_description; } + + inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } + + inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } + + inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } + + inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } + + inline AttachedPolicy& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} + + inline AttachedPolicy& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} + + inline AttachedPolicy& WithDescription(const char* value) { SetDescription(value); return *this;} + + + + inline const Aws::Utils::DateTime& GetCreateDate() const{ return m_createDate; } + + inline bool CreateDateHasBeenSet() const { return m_createDateHasBeenSet; } + + inline void SetCreateDate(const Aws::Utils::DateTime& value) { m_createDateHasBeenSet = true; m_createDate = value; } + + inline void SetCreateDate(Aws::Utils::DateTime&& value) { m_createDateHasBeenSet = true; m_createDate = std::move(value); } + + inline AttachedPolicy& WithCreateDate(const Aws::Utils::DateTime& value) { SetCreateDate(value); return *this;} + + inline AttachedPolicy& WithCreateDate(Aws::Utils::DateTime&& value) { SetCreateDate(std::move(value)); return *this;} + + + inline const Aws::Utils::DateTime& GetUpdateDate() const{ return m_updateDate; } + + inline bool UpdateDateHasBeenSet() const { return m_updateDateHasBeenSet; } + + inline void SetUpdateDate(const Aws::Utils::DateTime& value) { m_updateDateHasBeenSet = true; m_updateDate = value; } + + inline void SetUpdateDate(Aws::Utils::DateTime&& value) { m_updateDateHasBeenSet = true; m_updateDate = std::move(value); } + + inline AttachedPolicy& WithUpdateDate(const Aws::Utils::DateTime& value) { SetUpdateDate(value); return *this;} + + inline AttachedPolicy& WithUpdateDate(Aws::Utils::DateTime&& value) { SetUpdateDate(std::move(value)); return *this;} + private: Aws::String m_policyName; @@ -119,6 +223,28 @@ namespace Model Aws::String m_policyArn; bool m_policyArnHasBeenSet; + + bool m_isDirectAttached; + bool m_isDirectAttachedHasBeenSet; + + Aws::String m_policyId; + bool m_policyIdHasBeenSet; + + Aws::String m_arn; + bool m_arnHasBeenSet; + + Aws::String m_path; + bool m_pathHasBeenSet; + + Aws::String m_description; + bool m_descriptionHasBeenSet; + + Aws::Utils::DateTime m_createDate; + bool m_createDateHasBeenSet; + + Aws::Utils::DateTime m_updateDate; + bool m_updateDateHasBeenSet; + }; } // namespace Model diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedUserPoliciesRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedUserPoliciesRequest.h index 3d02e6c07..1ca1b0106 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedUserPoliciesRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedUserPoliciesRequest.h @@ -1,4 +1,4 @@ -/** +/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ @@ -319,6 +319,15 @@ namespace Model */ inline ListAttachedUserPoliciesRequest& WithMaxItems(int value) { SetMaxItems(value); return *this;} + + inline int GetNeedAllPolicies() const{ return m_needAllPolicies; } + + inline bool NeedAllPoliciesHasBeenSet() const { return m_needAllPoliciesHasBeenSet; } + + inline void SetNeedAllPolicies(int value) { m_maxItemsHasBeenSet = true; m_needAllPolicies = value; } + + inline ListAttachedUserPoliciesRequest& WithNeedAllPolicies(int value) { SetNeedAllPolicies(value); return *this;} + private: Aws::String m_userName; @@ -332,6 +341,10 @@ namespace Model int m_maxItems; bool m_maxItemsHasBeenSet; + + int m_needAllPolicies; + bool m_needAllPoliciesHasBeenSet; + }; } // namespace Model diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachedPolicy.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachedPolicy.cpp index 88ac7d0b0..ba38cc936 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachedPolicy.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/AttachedPolicy.cpp @@ -22,13 +22,29 @@ namespace Model AttachedPolicy::AttachedPolicy() : m_policyNameHasBeenSet(false), - m_policyArnHasBeenSet(false) + m_policyArnHasBeenSet(false), + m_isDirectAttachedHasBeenSet(false), + m_isDirectAttached(false), + m_policyIdHasBeenSet(false), + m_arnHasBeenSet(false), + m_pathHasBeenSet(false), + m_descriptionHasBeenSet(false), + m_createDateHasBeenSet(false), + m_updateDateHasBeenSet(false) { } AttachedPolicy::AttachedPolicy(const XmlNode& xmlNode) : m_policyNameHasBeenSet(false), - m_policyArnHasBeenSet(false) + m_policyArnHasBeenSet(false), + m_isDirectAttachedHasBeenSet(false), + m_isDirectAttached(false), + m_policyIdHasBeenSet(false), + m_arnHasBeenSet(false), + m_pathHasBeenSet(false), + m_descriptionHasBeenSet(false), + m_createDateHasBeenSet(false), + m_updateDateHasBeenSet(false) { *this = xmlNode; } @@ -51,6 +67,48 @@ AttachedPolicy& AttachedPolicy::operator =(const XmlNode& xmlNode) m_policyArn = Aws::Utils::Xml::DecodeEscapedXmlText(policyArnNode.GetText()); m_policyArnHasBeenSet = true; } + XmlNode isDirectAttachedNode = resultNode.FirstChild("IsDirectAttached"); + if(!isDirectAttachedNode.IsNull()) + { + m_isDirectAttached = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(isDirectAttachedNode.GetText()).c_str()).c_str()); + m_isDirectAttachedHasBeenSet = true; + } + XmlNode policyIdNode = resultNode.FirstChild("PolicyId"); + if(!policyIdNode.IsNull()) + { + m_policyId = Aws::Utils::Xml::DecodeEscapedXmlText(policyIdNode.GetText()); + m_policyIdHasBeenSet = true; + } + XmlNode arnNode = resultNode.FirstChild("Arn"); + if(!arnNode.IsNull()) + { + m_arn = Aws::Utils::Xml::DecodeEscapedXmlText(arnNode.GetText()); + m_arnHasBeenSet = true; + } + XmlNode pathNode = resultNode.FirstChild("Path"); + if(!pathNode.IsNull()) + { + m_path = Aws::Utils::Xml::DecodeEscapedXmlText(pathNode.GetText()); + m_pathHasBeenSet = true; + } + XmlNode descriptionNode = resultNode.FirstChild("Description"); + if(!descriptionNode.IsNull()) + { + m_description = Aws::Utils::Xml::DecodeEscapedXmlText(descriptionNode.GetText()); + m_descriptionHasBeenSet = true; + } + XmlNode createDateNode = resultNode.FirstChild("CreateDate"); + if(!createDateNode.IsNull()) + { + m_createDate = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(createDateNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601); + m_createDateHasBeenSet = true; + } + XmlNode updateDateNode = resultNode.FirstChild("UpdateDate"); + if(!updateDateNode.IsNull()) + { + m_updateDate = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(updateDateNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601); + m_updateDateHasBeenSet = true; + } } return *this; @@ -58,28 +116,93 @@ AttachedPolicy& AttachedPolicy::operator =(const XmlNode& xmlNode) void AttachedPolicy::OutputToStream(Aws::OStream& oStream, const char* location, unsigned index, const char* locationValue) const { - if(m_policyNameHasBeenSet) - { + if(m_policyNameHasBeenSet) + { oStream << location << index << locationValue << ".PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; - } + } - if(m_policyArnHasBeenSet) - { + if(m_policyArnHasBeenSet) + { oStream << location << index << locationValue << ".PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&"; - } + } + + if(m_isDirectAttachedHasBeenSet) + { + oStream << location << index << locationValue << ".IsDirectAttached=" << std::boolalpha << m_isDirectAttached << "&"; + } + + if(m_policyIdHasBeenSet) + { + oStream << location << index << locationValue << ".PolicyId=" << StringUtils::URLEncode(m_policyId.c_str()) << "&"; + } + + if(m_arnHasBeenSet) + { + oStream << location << index << locationValue << ".Arn=" << StringUtils::URLEncode(m_arn.c_str()) << "&"; + } + + if(m_pathHasBeenSet) + { + oStream << location << index << locationValue << ".Path=" << StringUtils::URLEncode(m_path.c_str()) << "&"; + } + if(m_descriptionHasBeenSet) + { + oStream << location << index << locationValue << ".Description=" << StringUtils::URLEncode(m_description.c_str()) << "&"; + } + + if(m_createDateHasBeenSet) + { + oStream << location << index << locationValue << ".CreateDate=" << StringUtils::URLEncode(m_createDate.ToGmtString(DateFormat::ISO_8601).c_str()) << "&"; + } + + if(m_updateDateHasBeenSet) + { + oStream << location << index << locationValue << ".UpdateDate=" << StringUtils::URLEncode(m_updateDate.ToGmtString(DateFormat::ISO_8601).c_str()) << "&"; + } } void AttachedPolicy::OutputToStream(Aws::OStream& oStream, const char* location) const { - if(m_policyNameHasBeenSet) - { + if(m_policyNameHasBeenSet) + { oStream << location << ".PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; - } - if(m_policyArnHasBeenSet) - { + } + if(m_policyArnHasBeenSet) + { oStream << location << ".PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&"; - } + } + + if(m_isDirectAttachedHasBeenSet) + { + oStream << location << ".IsAttachable=" << std::boolalpha << m_isDirectAttached << "&"; + } + + if(m_policyIdHasBeenSet) + { + oStream << location << ".PolicyId=" << StringUtils::URLEncode(m_policyId.c_str()) << "&"; + } + if(m_arnHasBeenSet) + { + oStream << location << ".Arn=" << StringUtils::URLEncode(m_arn.c_str()) << "&"; + } + if(m_pathHasBeenSet) + { + oStream << location << ".Path=" << StringUtils::URLEncode(m_path.c_str()) << "&"; + } + if(m_descriptionHasBeenSet) + { + oStream << location << ".Description=" << StringUtils::URLEncode(m_description.c_str()) << "&"; + } + if(m_createDateHasBeenSet) + { + oStream << location << ".CreateDate=" << StringUtils::URLEncode(m_createDate.ToGmtString(DateFormat::ISO_8601).c_str()) << "&"; + } + if(m_updateDateHasBeenSet) + { + oStream << location << ".UpdateDate=" << StringUtils::URLEncode(m_updateDate.ToGmtString(DateFormat::ISO_8601).c_str()) << "&"; + } + } } // namespace Model diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/ListAttachedUserPoliciesRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/ListAttachedUserPoliciesRequest.cpp index 9c8ba3ea6..4c8f65604 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/ListAttachedUserPoliciesRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/ListAttachedUserPoliciesRequest.cpp @@ -15,7 +15,9 @@ ListAttachedUserPoliciesRequest::ListAttachedUserPoliciesRequest() : m_pathPrefixHasBeenSet(false), m_markerHasBeenSet(false), m_maxItems(0), - m_maxItemsHasBeenSet(false) + m_maxItemsHasBeenSet(false), + m_needAllPolicies(0), + m_needAllPoliciesHasBeenSet(false) { } @@ -42,6 +44,11 @@ Aws::String ListAttachedUserPoliciesRequest::SerializePayload() const { ss << "MaxItems=" << m_maxItems << "&"; } + + if(m_needAllPoliciesHasBeenSet) + { + ss << "NeedAllPolicies=" << m_needAllPolicies << "&"; + } ss << "Version=2010-05-08"; return ss.str(); diff --git a/list_attached_group_policies.cpp b/list_attached_group_policies.cpp new file mode 100644 index 000000000..d50f723eb --- /dev/null +++ b/list_attached_group_policies.cpp @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::ListAttachedGroupPoliciesRequest request; + + request.SetMaxItems(100); + request.SetGroupName("group1"); + + ListAttachedGroupPoliciesOutcome outcome = iamClient.ListAttachedGroupPolicies(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: ListAttachedUserPolicies: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::Vector policies= outcome.GetResult().GetAttachedPolicies(); + for (int i = 0; i < policies.size(); i++) { + std::cout< +#include +#include +#include +#include +#include +#include +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::ListAttachedUserPoliciesRequest request; + + request.SetMaxItems(100); + request.SetUserName("user1"); + + ListAttachedUserPoliciesOutcome outcome = iamClient.ListAttachedUserPolicies(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: ListAttachedUserPolicies: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::Vector policies= outcome.GetResult().GetAttachedPolicies(); + for (int i = 0; i < policies.size(); i++) { + std::cout< Date: Wed, 11 Oct 2023 10:46:24 +0800 Subject: [PATCH 08/10] [1] iam policy c++ sdk list_entities_for_policy --- .../iam/model/ListEntitiesForPolicyRequest.h | 20 +++---- .../model/ListEntitiesForPolicyRequest.cpp | 6 +- list_entities_for_policy.cpp | 56 +++++++++++++++++++ 3 files changed, 69 insertions(+), 13 deletions(-) create mode 100644 list_entities_for_policy.cpp diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListEntitiesForPolicyRequest.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListEntitiesForPolicyRequest.h index 5476dffe0..d1dc49b12 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListEntitiesForPolicyRequest.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListEntitiesForPolicyRequest.h @@ -44,7 +44,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline const Aws::String& GetPolicyArn() const{ return m_policyArn; } + inline const Aws::String& GetPolicyName() const{ return m_policyName; } /** *

The Amazon Resource Name (ARN) of the IAM policy for which you want the @@ -52,7 +52,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; } + inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the IAM policy for which you want the @@ -60,7 +60,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const Aws::String& value) { m_policyArnHasBeenSet = true; m_policyArn = value; } + inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; } /** *

The Amazon Resource Name (ARN) of the IAM policy for which you want the @@ -68,7 +68,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(Aws::String&& value) { m_policyArnHasBeenSet = true; m_policyArn = std::move(value); } + inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy for which you want the @@ -76,7 +76,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline void SetPolicyArn(const char* value) { m_policyArnHasBeenSet = true; m_policyArn.assign(value); } + inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); } /** *

The Amazon Resource Name (ARN) of the IAM policy for which you want the @@ -84,7 +84,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline ListEntitiesForPolicyRequest& WithPolicyArn(const Aws::String& value) { SetPolicyArn(value); return *this;} + inline ListEntitiesForPolicyRequest& WithPolicyArn(const Aws::String& value) { SetPolicyName(value); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy for which you want the @@ -92,7 +92,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline ListEntitiesForPolicyRequest& WithPolicyArn(Aws::String&& value) { SetPolicyArn(std::move(value)); return *this;} + inline ListEntitiesForPolicyRequest& WithPolicyArn(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the IAM policy for which you want the @@ -100,7 +100,7 @@ namespace Model * href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon * Resource Names (ARNs) in the AWS General Reference.

*/ - inline ListEntitiesForPolicyRequest& WithPolicyArn(const char* value) { SetPolicyArn(value); return *this;} + inline ListEntitiesForPolicyRequest& WithPolicyArn(const char* value) { SetPolicyName(value); return *this;} /** @@ -431,8 +431,8 @@ namespace Model private: - Aws::String m_policyArn; - bool m_policyArnHasBeenSet; + Aws::String m_policyName; + bool m_policyNameHasBeenSet; EntityType m_entityFilter; bool m_entityFilterHasBeenSet; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/ListEntitiesForPolicyRequest.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/ListEntitiesForPolicyRequest.cpp index ef7409c3f..893464008 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/ListEntitiesForPolicyRequest.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/ListEntitiesForPolicyRequest.cpp @@ -11,7 +11,7 @@ using namespace Aws::IAM::Model; using namespace Aws::Utils; ListEntitiesForPolicyRequest::ListEntitiesForPolicyRequest() : - m_policyArnHasBeenSet(false), + m_policyNameHasBeenSet(false), m_entityFilter(EntityType::NOT_SET), m_entityFilterHasBeenSet(false), m_pathPrefixHasBeenSet(false), @@ -27,9 +27,9 @@ Aws::String ListEntitiesForPolicyRequest::SerializePayload() const { Aws::StringStream ss; ss << "Action=ListEntitiesForPolicy&"; - if(m_policyArnHasBeenSet) + if(m_policyNameHasBeenSet) { - ss << "PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&"; + ss << "PolicyName=" << StringUtils::URLEncode(m_policyName.c_str()) << "&"; } if(m_entityFilterHasBeenSet) diff --git a/list_entities_for_policy.cpp b/list_entities_for_policy.cpp new file mode 100644 index 000000000..c9567d62f --- /dev/null +++ b/list_entities_for_policy.cpp @@ -0,0 +1,56 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace Aws::IAM; +using namespace Aws::IAM::Model; +using namespace Aws::Utils; + + +int main(int argc, char** argv) +{ + Aws::SDKOptions options; + options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace; + InitAPI(options); + + Aws::IAM::IAMClient iamClient = sugonGetIAMClient("Zv33LRIEIjMOOBXX9JmwJlfc048sfUtY", "wikiydsg0u0vmsl0tvaplkkuhh0rhgnf", "http://10.20.0.81:20482"); + + Aws::IAM::Model::ListEntitiesForPolicyRequest request; + + request.SetMaxItems(100); + request.SetPolicyName("policy1"); + + ListEntitiesForPolicyOutcome outcome = iamClient.ListEntitiesForPolicy(request); + + if (!outcome.IsSuccess()) + { + const Aws::IAM::IAMError &err = outcome.GetError(); + std::cerr << "Error: ListEntitiesForPolicy: " << + err.GetExceptionName() << ": " << err.GetMessage() << std::endl; + } + else + { + Aws::Vector policyUser= outcome.GetResult().GetPolicyUsers(); + for (int i = 0; i < policyUser.size(); i++) + { + std::cout< policyGroup= outcome.GetResult().GetPolicyGroups(); + for (int i = 0; i < policyGroup.size(); i++) + { + std::cout< Date: Wed, 11 Oct 2023 11:36:16 +0800 Subject: [PATCH 09/10] =?UTF-8?q?[1]=20iam=20policy=20c++=20sdk=20account?= =?UTF-8?q?=20=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../include/aws/iam/model/CreatePolicyResult.h | 12 ++++++++++++ .../include/aws/iam/model/GetPolicyResult.h | 13 +++++++++++++ .../iam/model/ListAttachedGroupPoliciesResult.h | 13 +++++++++++++ .../aws/iam/model/ListAttachedUserPoliciesResult.h | 13 +++++++++++++ .../aws/iam/model/ListEntitiesForPolicyResult.h | 14 ++++++++++++++ .../include/aws/iam/model/ListPoliciesResult.h | 13 +++++++++++++ .../source/model/CreatePolicyResult.cpp | 9 +++++++++ .../source/model/GetPolicyResult.cpp | 9 +++++++++ .../model/ListAttachedGroupPoliciesResult.cpp | 9 +++++++++ .../model/ListAttachedUserPoliciesResult.cpp | 9 +++++++++ .../source/model/ListEntitiesForPolicyResult.cpp | 9 +++++++++ .../source/model/ListPoliciesResult.cpp | 9 +++++++++ create_policy.cpp | 4 ++++ get_policy.cpp | 4 ++++ list_attached_user_policies.cpp | 4 ++++ 15 files changed, 144 insertions(+) diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/CreatePolicyResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/CreatePolicyResult.h index 5b587e8d6..44db689f9 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/CreatePolicyResult.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/CreatePolicyResult.h @@ -7,6 +7,7 @@ #include #include #include +#include #include namespace Aws @@ -80,9 +81,20 @@ namespace Model inline CreatePolicyResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + inline const Account& GetAccount() const{ return m_account; } + + inline void SetAccount(const Account& value) { m_account = value; } + + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + inline CreatePolicyResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + inline CreatePolicyResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + private: Policy m_policy; + Account m_account; ResponseMetadata m_responseMetadata; }; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/GetPolicyResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/GetPolicyResult.h index 041ddf5b2..ed8fad8ce 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/GetPolicyResult.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/GetPolicyResult.h @@ -7,6 +7,7 @@ #include #include #include +#include #include namespace Aws @@ -80,9 +81,21 @@ namespace Model inline GetPolicyResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + inline const Account& GetAccount() const{ return m_account; } + + inline void SetAccount(const Account& value) { m_account = value; } + + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + inline GetPolicyResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + inline GetPolicyResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + private: Policy m_policy; + + Account m_account; ResponseMetadata m_responseMetadata; }; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedGroupPoliciesResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedGroupPoliciesResult.h index b236a248a..c025fb50d 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedGroupPoliciesResult.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedGroupPoliciesResult.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Aws @@ -176,6 +177,16 @@ namespace Model inline ListAttachedGroupPoliciesResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + inline const Account& GetAccount() const{ return m_account; } + + inline void SetAccount(const Account& value) { m_account = value; } + + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + inline ListAttachedGroupPoliciesResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + inline ListAttachedGroupPoliciesResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + private: Aws::Vector m_attachedPolicies; @@ -183,6 +194,8 @@ namespace Model bool m_isTruncated; Aws::String m_marker; + + Account m_account; ResponseMetadata m_responseMetadata; }; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedUserPoliciesResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedUserPoliciesResult.h index 933f37b4e..317888289 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedUserPoliciesResult.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListAttachedUserPoliciesResult.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Aws @@ -176,6 +177,16 @@ namespace Model inline ListAttachedUserPoliciesResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + inline const Account& GetAccount() const{ return m_account; } + + inline void SetAccount(const Account& value) { m_account = value; } + + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + inline ListAttachedUserPoliciesResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + inline ListAttachedUserPoliciesResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + private: Aws::Vector m_attachedPolicies; @@ -183,6 +194,8 @@ namespace Model bool m_isTruncated; Aws::String m_marker; + + Account m_account; ResponseMetadata m_responseMetadata; }; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListEntitiesForPolicyResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListEntitiesForPolicyResult.h index bb1bca302..d3e601cdc 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListEntitiesForPolicyResult.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListEntitiesForPolicyResult.h @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace Aws @@ -250,6 +251,17 @@ namespace Model inline ListEntitiesForPolicyResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + + inline const Account& GetAccount() const{ return m_account; } + + inline void SetAccount(const Account& value) { m_account = value; } + + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + inline ListEntitiesForPolicyResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + inline ListEntitiesForPolicyResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + private: Aws::Vector m_policyGroups; @@ -261,6 +273,8 @@ namespace Model bool m_isTruncated; Aws::String m_marker; + + Account m_account; ResponseMetadata m_responseMetadata; }; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListPoliciesResult.h b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListPoliciesResult.h index 476a5d959..db39dec8d 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListPoliciesResult.h +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/include/aws/iam/model/ListPoliciesResult.h @@ -9,6 +9,7 @@ #include #include #include +#include #include namespace Aws @@ -176,6 +177,16 @@ namespace Model inline ListPoliciesResult& WithResponseMetadata(ResponseMetadata&& value) { SetResponseMetadata(std::move(value)); return *this;} + inline const Account& GetAccount() const{ return m_account; } + + inline void SetAccount(const Account& value) { m_account = value; } + + inline void SetAccount(Account&& value) { m_account = std::move(value); } + + inline ListPoliciesResult& WithAccount(const Account& value) { SetAccount(value); return *this;} + + inline ListPoliciesResult& WithAccount(Account&& value) { SetAccount(std::move(value)); return *this;} + private: Aws::Vector m_policies; @@ -183,6 +194,8 @@ namespace Model bool m_isTruncated; Aws::String m_marker; + + Account m_account; ResponseMetadata m_responseMetadata; }; diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/CreatePolicyResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/CreatePolicyResult.cpp index ddb0b53c6..5a118b714 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/CreatePolicyResult.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/CreatePolicyResult.cpp @@ -35,6 +35,15 @@ CreatePolicyResult& CreatePolicyResult::operator =(const Aws::AmazonWebServiceRe { resultNode = rootNode.FirstChild("CreatePolicyResult"); } + + if(!resultNode.IsNull()) + { + XmlNode accountNode = resultNode.FirstChild("Account"); + if(!accountNode.IsNull()) + { + m_account = accountNode; + } + } if(!resultNode.IsNull()) { diff --git a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/GetPolicyResult.cpp b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/GetPolicyResult.cpp index d4e946721..1bfca319f 100644 --- a/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/GetPolicyResult.cpp +++ b/aws-sdk-cpp-1.8.183/aws-sdk-cpp-1.8.183/aws-cpp-sdk-iam/source/model/GetPolicyResult.cpp @@ -35,6 +35,15 @@ GetPolicyResult& GetPolicyResult::operator =(const Aws::AmazonWebServiceResult policies= outcome.GetResult().GetAttachedPolicies(); for (int i = 0; i < policies.size(); i++) { std::cout< Date: Fri, 13 Oct 2023 16:06:09 +0800 Subject: [PATCH 10/10] 1 --- .../attach_group_policy.cpp | 0 .../attach_user_policy.cpp | 0 .../batch_attach_policies_to_group.cpp | 0 .../batch_attach_policies_to_user.cpp | 0 .../batch_attach_policy_to_multigroups.cpp | 0 .../batch_attach_policy_to_multiusers.cpp | 0 .../batch_delete_policies.cpp | 0 .../batch_detach_policies_from_group.cpp | 0 .../batch_detach_policies_from_user.cpp | 0 .../batch_detach_policy_from_multigroups.cpp | 0 .../batch_detach_policy_from_multiusers.cpp | 0 create_policy.cpp => iampolicy-example/create_policy.cpp | 0 delete_policy.cpp => iampolicy-example/delete_policy.cpp | 0 .../detach_group_policy.cpp | 0 .../detach_user_policy.cpp | 0 get_policy.cpp => iampolicy-example/get_policy.cpp | 0 .../list_attached_group_policies.cpp | 0 .../list_attached_user_policies.cpp | 0 .../list_entities_for_policy.cpp | 0 list_policy.cpp => iampolicy-example/list_policy.cpp | 0 .../update_policy_description.cpp | 0 21 files changed, 0 insertions(+), 0 deletions(-) rename attach_group_policy.cpp => iampolicy-example/attach_group_policy.cpp (100%) rename attach_user_policy.cpp => iampolicy-example/attach_user_policy.cpp (100%) rename batch_attach_policies_to_group.cpp => iampolicy-example/batch_attach_policies_to_group.cpp (100%) rename batch_attach_policies_to_user.cpp => iampolicy-example/batch_attach_policies_to_user.cpp (100%) rename batch_attach_policy_to_multigroups.cpp => iampolicy-example/batch_attach_policy_to_multigroups.cpp (100%) rename batch_attach_policy_to_multiusers.cpp => iampolicy-example/batch_attach_policy_to_multiusers.cpp (100%) rename batch_delete_policies.cpp => iampolicy-example/batch_delete_policies.cpp (100%) rename batch_detach_policies_from_group.cpp => iampolicy-example/batch_detach_policies_from_group.cpp (100%) rename batch_detach_policies_from_user.cpp => iampolicy-example/batch_detach_policies_from_user.cpp (100%) rename batch_detach_policy_from_multigroups.cpp => iampolicy-example/batch_detach_policy_from_multigroups.cpp (100%) rename batch_detach_policy_from_multiusers.cpp => iampolicy-example/batch_detach_policy_from_multiusers.cpp (100%) rename create_policy.cpp => iampolicy-example/create_policy.cpp (100%) rename delete_policy.cpp => iampolicy-example/delete_policy.cpp (100%) rename detach_group_policy.cpp => iampolicy-example/detach_group_policy.cpp (100%) rename detach_user_policy.cpp => iampolicy-example/detach_user_policy.cpp (100%) rename get_policy.cpp => iampolicy-example/get_policy.cpp (100%) rename list_attached_group_policies.cpp => iampolicy-example/list_attached_group_policies.cpp (100%) rename list_attached_user_policies.cpp => iampolicy-example/list_attached_user_policies.cpp (100%) rename list_entities_for_policy.cpp => iampolicy-example/list_entities_for_policy.cpp (100%) rename list_policy.cpp => iampolicy-example/list_policy.cpp (100%) rename update_policy_description.cpp => iampolicy-example/update_policy_description.cpp (100%) diff --git a/attach_group_policy.cpp b/iampolicy-example/attach_group_policy.cpp similarity index 100% rename from attach_group_policy.cpp rename to iampolicy-example/attach_group_policy.cpp diff --git a/attach_user_policy.cpp b/iampolicy-example/attach_user_policy.cpp similarity index 100% rename from attach_user_policy.cpp rename to iampolicy-example/attach_user_policy.cpp diff --git a/batch_attach_policies_to_group.cpp b/iampolicy-example/batch_attach_policies_to_group.cpp similarity index 100% rename from batch_attach_policies_to_group.cpp rename to iampolicy-example/batch_attach_policies_to_group.cpp diff --git a/batch_attach_policies_to_user.cpp b/iampolicy-example/batch_attach_policies_to_user.cpp similarity index 100% rename from batch_attach_policies_to_user.cpp rename to iampolicy-example/batch_attach_policies_to_user.cpp diff --git a/batch_attach_policy_to_multigroups.cpp b/iampolicy-example/batch_attach_policy_to_multigroups.cpp similarity index 100% rename from batch_attach_policy_to_multigroups.cpp rename to iampolicy-example/batch_attach_policy_to_multigroups.cpp diff --git a/batch_attach_policy_to_multiusers.cpp b/iampolicy-example/batch_attach_policy_to_multiusers.cpp similarity index 100% rename from batch_attach_policy_to_multiusers.cpp rename to iampolicy-example/batch_attach_policy_to_multiusers.cpp diff --git a/batch_delete_policies.cpp b/iampolicy-example/batch_delete_policies.cpp similarity index 100% rename from batch_delete_policies.cpp rename to iampolicy-example/batch_delete_policies.cpp diff --git a/batch_detach_policies_from_group.cpp b/iampolicy-example/batch_detach_policies_from_group.cpp similarity index 100% rename from batch_detach_policies_from_group.cpp rename to iampolicy-example/batch_detach_policies_from_group.cpp diff --git a/batch_detach_policies_from_user.cpp b/iampolicy-example/batch_detach_policies_from_user.cpp similarity index 100% rename from batch_detach_policies_from_user.cpp rename to iampolicy-example/batch_detach_policies_from_user.cpp diff --git a/batch_detach_policy_from_multigroups.cpp b/iampolicy-example/batch_detach_policy_from_multigroups.cpp similarity index 100% rename from batch_detach_policy_from_multigroups.cpp rename to iampolicy-example/batch_detach_policy_from_multigroups.cpp diff --git a/batch_detach_policy_from_multiusers.cpp b/iampolicy-example/batch_detach_policy_from_multiusers.cpp similarity index 100% rename from batch_detach_policy_from_multiusers.cpp rename to iampolicy-example/batch_detach_policy_from_multiusers.cpp diff --git a/create_policy.cpp b/iampolicy-example/create_policy.cpp similarity index 100% rename from create_policy.cpp rename to iampolicy-example/create_policy.cpp diff --git a/delete_policy.cpp b/iampolicy-example/delete_policy.cpp similarity index 100% rename from delete_policy.cpp rename to iampolicy-example/delete_policy.cpp diff --git a/detach_group_policy.cpp b/iampolicy-example/detach_group_policy.cpp similarity index 100% rename from detach_group_policy.cpp rename to iampolicy-example/detach_group_policy.cpp diff --git a/detach_user_policy.cpp b/iampolicy-example/detach_user_policy.cpp similarity index 100% rename from detach_user_policy.cpp rename to iampolicy-example/detach_user_policy.cpp diff --git a/get_policy.cpp b/iampolicy-example/get_policy.cpp similarity index 100% rename from get_policy.cpp rename to iampolicy-example/get_policy.cpp diff --git a/list_attached_group_policies.cpp b/iampolicy-example/list_attached_group_policies.cpp similarity index 100% rename from list_attached_group_policies.cpp rename to iampolicy-example/list_attached_group_policies.cpp diff --git a/list_attached_user_policies.cpp b/iampolicy-example/list_attached_user_policies.cpp similarity index 100% rename from list_attached_user_policies.cpp rename to iampolicy-example/list_attached_user_policies.cpp diff --git a/list_entities_for_policy.cpp b/iampolicy-example/list_entities_for_policy.cpp similarity index 100% rename from list_entities_for_policy.cpp rename to iampolicy-example/list_entities_for_policy.cpp diff --git a/list_policy.cpp b/iampolicy-example/list_policy.cpp similarity index 100% rename from list_policy.cpp rename to iampolicy-example/list_policy.cpp diff --git a/update_policy_description.cpp b/iampolicy-example/update_policy_description.cpp similarity index 100% rename from update_policy_description.cpp rename to iampolicy-example/update_policy_description.cpp -- Gitee