aws-sdk-organizations 1.120.0

AWS SDK for AWS Organizations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateAccount`](crate::operation::create_account::builders::CreateAccountFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`email(impl Into<String>)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::email) / [`set_email(Option<String>)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::set_email):<br>required: **true**<br><p>The email address of the owner to assign to the new member account. This email address must not already be associated with another Amazon Web Services account. You must use a valid email address to complete account creation.</p> <p>The rules for a valid email address:</p> <ul>  <li>   <p>The address must be a minimum of 6 and a maximum of 64 characters long.</p></li>  <li>   <p>All characters must be 7-bit ASCII characters.</p></li>  <li>   <p>There must be one and only one @ symbol, which separates the local name from the domain name.</p></li>  <li>   <p>The local name can't contain any of the following characters:</p>   <p>whitespace, " ' ( ) &lt; &gt; \[ \] : ; , \ | % &amp;</p></li>  <li>   <p>The local name can't begin with a dot (.)</p></li>  <li>   <p>The domain name can consist of only the characters \[a-z\],\[A-Z\],\[0-9\], hyphen (-), or dot (.)</p></li>  <li>   <p>The domain name can't begin or end with a hyphen (-) or dot (.)</p></li>  <li>   <p>The domain name must contain at least one dot</p></li> </ul> <p>You can't access the root user of the account or remove an account that was created with an invalid email address.</p><br>
    ///   - [`account_name(impl Into<String>)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::account_name) / [`set_account_name(Option<String>)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::set_account_name):<br>required: **true**<br><p>The friendly name of the member account.</p><br>
    ///   - [`role_name(impl Into<String>)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::role_name) / [`set_role_name(Option<String>)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::set_role_name):<br>required: **false**<br><p>The name of an IAM role that Organizations automatically preconfigures in the new member account. This role trusts the management account, allowing users in the management account to assume the role, as permitted by the management account administrator. The role has administrator permissions in the new member account.</p> <p>If you don't specify this parameter, the role name defaults to <code>OrganizationAccountAccessRole</code>.</p> <p>For more information about how to use this role to access the member account, see the following links:</p> <ul>  <li>   <p><a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role">Creating the OrganizationAccountAccessRole in an invited member account</a> in the <i>Organizations User Guide</i></p></li>  <li>   <p>Steps 2 and 3 in <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html">IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles</a> in the <i>IAM User Guide</i></p></li> </ul> <p>The <a href="http://wikipedia.org/wiki/regex">regex pattern</a> that is used to validate this parameter. The pattern can include uppercase letters, lowercase letters, digits with no spaces, and any of the following characters: =,.@-</p><br>
    ///   - [`iam_user_access_to_billing(IamUserAccessToBilling)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::iam_user_access_to_billing) / [`set_iam_user_access_to_billing(Option<IamUserAccessToBilling>)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::set_iam_user_access_to_billing):<br>required: **false**<br><p>If set to <code>ALLOW</code>, the new account enables IAM users to access account billing information <i>if</i> they have the required permissions. If set to <code>DENY</code>, only the root user of the new account can access account billing information. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate">About IAM access to the Billing and Cost Management console</a> in the <i>Amazon Web Services Billing and Cost Management User Guide</i>.</p> <p>If you don't specify this parameter, the value defaults to <code>ALLOW</code>, and IAM users and roles with the required permissions can access billing information for the new account.</p><br>
    ///   - [`tags(Tag)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::tags) / [`set_tags(Option<Vec::<Tag>>)`](crate::operation::create_account::builders::CreateAccountFluentBuilder::set_tags):<br>required: **false**<br><p>A list of tags that you want to attach to the newly created account. 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 maximum allowed number of tags for an account, then the entire request fails and the account is not created.</p> </note><br>
    /// - On success, responds with [`CreateAccountOutput`](crate::operation::create_account::CreateAccountOutput) with field(s):
    ///   - [`create_account_status(Option<CreateAccountStatus>)`](crate::operation::create_account::CreateAccountOutput::create_account_status): <p>A structure that contains details about the request to create an account. This response structure might not be fully populated when you first receive it because account creation is an asynchronous process. You can pass the returned <code>CreateAccountStatus</code> ID as a parameter to <code>DescribeCreateAccountStatus</code> to get status about the progress of the request at later times. You can also check the CloudTrail log for the <code>CreateAccountResult</code> event. For more information, see <a href="https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html">Logging and monitoring in Organizations</a> in the <i>Organizations User Guide</i>.</p>
    /// - On failure, responds with [`SdkError<CreateAccountError>`](crate::operation::create_account::CreateAccountError)
    pub fn create_account(&self) -> crate::operation::create_account::builders::CreateAccountFluentBuilder {
        crate::operation::create_account::builders::CreateAccountFluentBuilder::new(self.handle.clone())
    }
}