// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
/// Constructs a fluent builder for the [`CreatePolicy`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder) operation.
///
/// - The fluent builder is configurable:
/// - [`content(impl Into<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::content) / [`set_content(Option<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::set_content):<br>required: **true**<br><p>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 <code>Type</code> parameter.</p> <p>The maximum size of a policy document depends on the policy's type. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html#min-max-values">Maximum and minimum values</a> in the <i>Organizations User Guide</i>.</p><br>
/// - [`description(impl Into<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::description) / [`set_description(Option<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::set_description):<br>required: **true**<br><p>An optional description to assign to the policy.</p><br>
/// - [`name(impl Into<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::set_name):<br>required: **true**<br><p>The friendly name to assign to the policy.</p> <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> that is used to validate this parameter is a string of any of the characters in the ASCII character range.</p><br>
/// - [`r#type(PolicyType)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::type) / [`set_type(Option<PolicyType>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::set_type):<br>required: **true**<br><p>The type of policy to create. You can specify one of the following values:</p> <ul> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html">SERVICE_CONTROL_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html">RESOURCE_CONTROL_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html">DECLARATIVE_POLICY_EC2</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html">BACKUP_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html">TAG_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html">CHATBOT_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html">AISERVICES_OPT_OUT_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html">SECURITYHUB_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html">UPGRADE_ROLLOUT_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html">INSPECTOR_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html">BEDROCK_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html">S3_POLICY</a></p></li> <li> <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html">NETWORK_SECURITY_DIRECTOR_POLICY</a></p></li> </ul><br>
/// - [`tags(Tag)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_policy::builders::CreatePolicyFluentBuilder::set_tags):<br>required: **false**<br><p>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 <code>null</code>. For more information about tagging, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html">Tagging Organizations resources</a> in the Organizations User Guide.</p><note> <p>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.</p> </note><br>
/// - On success, responds with [`CreatePolicyOutput`](crate::operation::create_policy::CreatePolicyOutput) with field(s):
/// - [`policy(Option<Policy>)`](crate::operation::create_policy::CreatePolicyOutput::policy): <p>A structure that contains details about the newly created policy.</p>
/// - On failure, responds with [`SdkError<CreatePolicyError>`](crate::operation::create_policy::CreatePolicyError)
pub fn create_policy(&self) -> crate::operation::create_policy::builders::CreatePolicyFluentBuilder {
crate::operation::create_policy::builders::CreatePolicyFluentBuilder::new(self.handle.clone())
}
}