blib/lib/Paws/Organizations/CreateAccount.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 16 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::Organizations::CreateAccount;
3 use Moose;
4 has AccountName => (is => 'ro', isa => 'Str', required => 1);
5 has Email => (is => 'ro', isa => 'Str', required => 1);
6 has IamUserAccessToBilling => (is => 'ro', isa => 'Str');
7 has RoleName => (is => 'ro', isa => 'Str');
8 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::Organizations::Tag]');
9  
10 use MooseX::ClassAttribute;
11  
12 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateAccount');
13 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Organizations::CreateAccountResponse');
14 class_has _result_key => (isa => 'Str', is => 'ro');
15 1;
16  
17 ### main pod documentation begin ###
18  
19 =head1 NAME
20  
21 Paws::Organizations::CreateAccount - Arguments for method CreateAccount on L<Paws::Organizations>
22  
23 =head1 DESCRIPTION
24  
25 This class represents the parameters used for calling the method CreateAccount on the
26 L<AWS Organizations|Paws::Organizations> service. Use the attributes of this class
27 as arguments to method CreateAccount.
28  
29 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateAccount.
30  
31 =head1 SYNOPSIS
32  
33 my $organizations = Paws->service('Organizations');
34 # To create a new account that is automatically part of the organization
35 # The owner of an organization creates a member account in the organization. The
36 # following example shows that when the organization owner creates the member
37 # account, the account is preconfigured with the name "Production Account" and
38 # an owner email address of susan@example.com. An IAM role is automatically
39 # created using the default name because the roleName parameter is not used. AWS
40 # Organizations sends Susan a "Welcome to AWS" email:
41  
42 my $CreateAccountResponse = $organizations->CreateAccount(
43 'AccountName' => 'Production Account',
44 'Email' => 'susan@example.com'
45 );
46  
47 # Results:
48 my $CreateAccountStatus = $CreateAccountResponse->CreateAccountStatus;
49  
50 # Returns a L<Paws::Organizations::CreateAccountResponse> object.
51  
52 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
53 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/organizations/CreateAccount>
54  
55 =head1 ATTRIBUTES
56  
57  
58 =head2 B<REQUIRED> AccountName => Str
59  
60 The friendly name of the member account.
61  
62  
63  
64 =head2 B<REQUIRED> Email => Str
65  
66 The email address of the owner to assign to the new member account.
67 This email address must not already be associated with another AWS
68 account. You must use a valid email address to complete account
69 creation. You can't access the root user of the account or remove an
70 account that was created with an invalid email address.
71  
72  
73  
74 =head2 IamUserAccessToBilling => Str
75  
76 If set to C<ALLOW>, the new account enables IAM users to access account
77 billing information I<if> they have the required permissions. If set to
78 C<DENY>, only the root user of the new account can access account
79 billing information. For more information, see Activating Access to the
80 Billing and Cost Management Console
81 (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate)
82 in the I<AWS Billing and Cost Management User Guide>.
83  
84 If you don't specify this parameter, the value defaults to C<ALLOW>,
85 and IAM users and roles with the required permissions can access
86 billing information for the new account.
87  
88 Valid values are: C<"ALLOW">, C<"DENY">
89  
90 =head2 RoleName => Str
91  
92 (Optional)
93  
94 The name of an IAM role that AWS Organizations automatically
95 preconfigures in the new member account. This role trusts the
96 management account, allowing users in the management account to assume
97 the role, as permitted by the management account administrator. The
98 role has administrator permissions in the new member account.
99  
100 If you don't specify this parameter, the role name defaults to
101 C<OrganizationAccountAccessRole>.
102  
103 For more information about how to use this role to access the member
104 account, see the following links:
105  
106 =over
107  
108 =item *
109  
110 Accessing and Administering the Member Accounts in Your Organization
111 (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role)
112 in the I<AWS Organizations User Guide>
113  
114 =item *
115  
116 Steps 2 and 3 in Tutorial: Delegate Access Across AWS Accounts Using
117 IAM Roles
118 (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html)
119 in the I<IAM User Guide>
120  
121 =back
122  
123 The regex pattern (http://wikipedia.org/wiki/regex) that is used to
124 validate this parameter. The pattern can include uppercase letters,
125 lowercase letters, digits with no spaces, and any of the following
126 characters: =,.@-
127  
128  
129  
130 =head2 Tags => ArrayRef[L<Paws::Organizations::Tag>]
131  
132 A list of tags that you want to attach to the newly created account.
133 For each tag in the list, you must specify both a tag key and a value.
134 You can set the value to an empty string, but you can't set it to
135 C<null>. For more information about tagging, see Tagging AWS
136 Organizations resources
137 (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
138 in the AWS Organizations User Guide.
139  
140 If any one of the tags is invalid or if you exceed the allowed number
141 of tags for an account, then the entire request fails and the account
142 is not created.
143  
144  
145  
146  
147 =head1 SEE ALSO
148  
149 This class forms part of L<Paws>, documenting arguments for method CreateAccount in L<Paws::Organizations>
150  
151 =head1 BUGS and CONTRIBUTIONS
152  
153 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
154  
155 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
156  
157 =cut
158