aws-sdk-organizations 1.119.1

AWS SDK for AWS Organizations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`AttachPolicy`](crate::operation::attach_policy::builders::AttachPolicyFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`policy_id(impl Into<String>)`](crate::operation::attach_policy::builders::AttachPolicyFluentBuilder::policy_id) / [`set_policy_id(Option<String>)`](crate::operation::attach_policy::builders::AttachPolicyFluentBuilder::set_policy_id):<br>required: **true**<br><p>ID for the policy that you want to attach to the target. You can get the ID for the policy by calling the <code>ListPolicies</code> operation.</p> <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a policy ID string requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits, or the underscore character (_).</p><br>
    ///   - [`target_id(impl Into<String>)`](crate::operation::attach_policy::builders::AttachPolicyFluentBuilder::target_id) / [`set_target_id(Option<String>)`](crate::operation::attach_policy::builders::AttachPolicyFluentBuilder::set_target_id):<br>required: **true**<br><p>ID for the root, OU, or account that you want to attach the policy to. You can get the ID by calling the <code>ListRoots</code>, <code>ListOrganizationalUnitsForParent</code>, or <code>ListAccounts</code> operations.</p> <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> for a target ID string requires one of the following:</p> <ul>  <li>   <p><b>Root</b> - A string that begins with "r-" followed by from 4 to 32 lowercase letters or digits.</p></li>  <li>   <p><b>Account</b> - A string that consists of exactly 12 digits.</p></li>  <li>   <p><b>Organizational unit (OU)</b> - A string that begins with "ou-" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second "-" dash and from 8 to 32 additional lowercase letters or digits.</p></li> </ul><br>
    /// - On success, responds with [`AttachPolicyOutput`](crate::operation::attach_policy::AttachPolicyOutput)
    /// - On failure, responds with [`SdkError<AttachPolicyError>`](crate::operation::attach_policy::AttachPolicyError)
    pub fn attach_policy(&self) -> crate::operation::attach_policy::builders::AttachPolicyFluentBuilder {
        crate::operation::attach_policy::builders::AttachPolicyFluentBuilder::new(self.handle.clone())
    }
}