/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Organizations { namespace Model { /** */ class CreatePolicyRequest : public OrganizationsRequest { public: AWS_ORGANIZATIONS_API CreatePolicyRequest(); // 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 "CreatePolicy"; } AWS_ORGANIZATIONS_API Aws::String SerializePayload() const override; AWS_ORGANIZATIONS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The policy text content to add to the new policy. The text that you supply * must adhere to the rules of the policy type you specify in the Type * parameter.

*/ inline const Aws::String& GetContent() const{ return m_content; } /** *

The policy text content to add to the new policy. The text that you supply * must adhere to the rules of the policy type you specify in the Type * parameter.

*/ inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; } /** *

The policy text content to add to the new policy. The text that you supply * must adhere to the rules of the policy type you specify in the Type * parameter.

*/ inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; } /** *

The policy text content to add to the new policy. The text that you supply * must adhere to the rules of the policy type you specify in the Type * parameter.

*/ inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); } /** *

The policy text content to add to the new policy. The text that you supply * must adhere to the rules of the policy type you specify in the Type * parameter.

*/ inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); } /** *

The policy text content to add to the new policy. The text that you supply * must adhere to the rules of the policy type you specify in the Type * parameter.

*/ inline CreatePolicyRequest& WithContent(const Aws::String& value) { SetContent(value); return *this;} /** *

The policy text content to add to the new policy. The text that you supply * must adhere to the rules of the policy type you specify in the Type * parameter.

*/ inline CreatePolicyRequest& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;} /** *

The policy text content to add to the new policy. The text that you supply * must adhere to the rules of the policy type you specify in the Type * parameter.

*/ inline CreatePolicyRequest& WithContent(const char* value) { SetContent(value); return *this;} /** *

An optional description to assign to the policy.

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

An optional description to assign to the policy.

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

An optional description to assign to the policy.

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

An optional description to assign to the policy.

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

An optional description to assign to the policy.

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

An optional description to assign to the policy.

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

An optional description to assign to the policy.

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

An optional description to assign to the policy.

*/ inline CreatePolicyRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

The friendly name to assign to the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The friendly name to assign to the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The friendly name to assign to the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The friendly name to assign to the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The friendly name to assign to the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The friendly name to assign to the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

*/ inline CreatePolicyRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The friendly name to assign to the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

*/ inline CreatePolicyRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The friendly name to assign to the policy.

The regex pattern that is used to * validate this parameter is a string of any of the characters in the ASCII * character range.

*/ inline CreatePolicyRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The type of policy to create. You can specify one of the following * values:

*/ inline const PolicyType& GetType() const{ return m_type; } /** *

The type of policy to create. You can specify one of the following * values:

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of policy to create. You can specify one of the following * values:

*/ inline void SetType(const PolicyType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of policy to create. You can specify one of the following * values:

*/ inline void SetType(PolicyType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of policy to create. You can specify one of the following * values:

*/ inline CreatePolicyRequest& WithType(const PolicyType& value) { SetType(value); return *this;} /** *

The type of policy to create. You can specify one of the following * values:

*/ inline CreatePolicyRequest& WithType(PolicyType&& value) { SetType(std::move(value)); return *this;} /** *

A list of tags that you want to attach to the newly created policy. For each * tag in the list, you must specify both a tag key and a value. You can set the * value to an empty string, but you can't set it to null. For more * information about tagging, see Tagging * Organizations resources in the Organizations User Guide.

If * any one of the tags is not valid or if you exceed the allowed number of tags for * a policy, then the entire request fails and the policy is not created.

* */ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

A list of tags that you want to attach to the newly created policy. For each * tag in the list, you must specify both a tag key and a value. You can set the * value to an empty string, but you can't set it to null. For more * information about tagging, see Tagging * Organizations resources in the Organizations User Guide.

If * any one of the tags is not valid or if you exceed the allowed number of tags for * a policy, then the entire request fails and the policy is not created.

* */ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

A list of tags that you want to attach to the newly created policy. For each * tag in the list, you must specify both a tag key and a value. You can set the * value to an empty string, but you can't set it to null. For more * information about tagging, see Tagging * Organizations resources in the Organizations User Guide.

If * any one of the tags is not valid or if you exceed the allowed number of tags for * a policy, then the entire request fails and the policy is not created.

* */ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

A list of tags that you want to attach to the newly created policy. For each * tag in the list, you must specify both a tag key and a value. You can set the * value to an empty string, but you can't set it to null. For more * information about tagging, see Tagging * Organizations resources in the Organizations User Guide.

If * any one of the tags is not valid or if you exceed the allowed number of tags for * a policy, then the entire request fails and the policy is not created.

* */ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

A list of tags that you want to attach to the newly created policy. For each * tag in the list, you must specify both a tag key and a value. You can set the * value to an empty string, but you can't set it to null. For more * information about tagging, see Tagging * Organizations resources in the Organizations User Guide.

If * any one of the tags is not valid or if you exceed the allowed number of tags for * a policy, then the entire request fails and the policy is not created.

* */ inline CreatePolicyRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

A list of tags that you want to attach to the newly created policy. For each * tag in the list, you must specify both a tag key and a value. You can set the * value to an empty string, but you can't set it to null. For more * information about tagging, see Tagging * Organizations resources in the Organizations User Guide.

If * any one of the tags is not valid or if you exceed the allowed number of tags for * a policy, then the entire request fails and the policy is not created.

* */ inline CreatePolicyRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

A list of tags that you want to attach to the newly created policy. For each * tag in the list, you must specify both a tag key and a value. You can set the * value to an empty string, but you can't set it to null. For more * information about tagging, see Tagging * Organizations resources in the Organizations User Guide.

If * any one of the tags is not valid or if you exceed the allowed number of tags for * a policy, then the entire request fails and the policy is not created.

* */ inline CreatePolicyRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

A list of tags that you want to attach to the newly created policy. For each * tag in the list, you must specify both a tag key and a value. You can set the * value to an empty string, but you can't set it to null. For more * information about tagging, see Tagging * Organizations resources in the Organizations User Guide.

If * any one of the tags is not valid or if you exceed the allowed number of tags for * a policy, then the entire request fails and the policy is not created.

* */ inline CreatePolicyRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_content; bool m_contentHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; PolicyType m_type; bool m_typeHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace Organizations } // namespace Aws