| 1 | |||
| 2 | package Paws::Organizations::AttachPolicy; | ||
| 3 | use Moose; | ||
| 4 | has PolicyId => (is => 'ro', isa => 'Str', required => 1); | ||
| 5 | has TargetId => (is => 'ro', isa => 'Str', required => 1); | ||
| 6 | |||
| 7 | use MooseX::ClassAttribute; | ||
| 8 | |||
| 9 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'AttachPolicy'); | ||
| 10 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response'); | ||
| 11 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 12 | 1; | ||
| 13 | |||
| 14 | ### main pod documentation begin ### | ||
| 15 | |||
| 16 | =head1 NAME | ||
| 17 | |||
| 18 | Paws::Organizations::AttachPolicy - Arguments for method AttachPolicy on L<Paws::Organizations> | ||
| 19 | |||
| 20 | =head1 DESCRIPTION | ||
| 21 | |||
| 22 | This class represents the parameters used for calling the method AttachPolicy on the | ||
| 23 | L<AWS Organizations|Paws::Organizations> service. Use the attributes of this class | ||
| 24 | as arguments to method AttachPolicy. | ||
| 25 | |||
| 26 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to AttachPolicy. | ||
| 27 | |||
| 28 | =head1 SYNOPSIS | ||
| 29 | |||
| 30 | my $organizations = Paws->service('Organizations'); | ||
| 31 | # To attach a policy to an OU | ||
| 32 | # The following example shows how to attach a service control policy (SCP) to an | ||
| 33 | # OU: | ||
| 34 | |||
| 35 | $organizations->AttachPolicy( | ||
| 36 | 'PolicyId' => 'p-examplepolicyid111', | ||
| 37 | 'TargetId' => 'ou-examplerootid111-exampleouid111' | ||
| 38 | ); | ||
| 39 | |||
| 40 | # To attach a policy to an account | ||
| 41 | # The following example shows how to attach a service control policy (SCP) to an | ||
| 42 | # account: | ||
| 43 | |||
| 44 | $organizations->AttachPolicy( | ||
| 45 | 'PolicyId' => 'p-examplepolicyid111', | ||
| 46 | 'TargetId' => 333333333333 | ||
| 47 | ); | ||
| 48 | |||
| 49 | |||
| 50 | 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. | ||
| 51 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/organizations/AttachPolicy> | ||
| 52 | |||
| 53 | =head1 ATTRIBUTES | ||
| 54 | |||
| 55 | |||
| 56 | =head2 B<REQUIRED> PolicyId => Str | ||
| 57 | |||
| 58 | The unique identifier (ID) of the policy that you want to attach to the | ||
| 59 | target. You can get the ID for the policy by calling the ListPolicies | ||
| 60 | operation. | ||
| 61 | |||
| 62 | The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID | ||
| 63 | string requires "p-" followed by from 8 to 128 lowercase or uppercase | ||
| 64 | letters, digits, or the underscore character (_). | ||
| 65 | |||
| 66 | |||
| 67 | |||
| 68 | =head2 B<REQUIRED> TargetId => Str | ||
| 69 | |||
| 70 | The unique identifier (ID) of the root, OU, or account that you want to | ||
| 71 | attach the policy to. You can get the ID by calling the ListRoots, | ||
| 72 | ListOrganizationalUnitsForParent, or ListAccounts operations. | ||
| 73 | |||
| 74 | The regex pattern (http://wikipedia.org/wiki/regex) for a target ID | ||
| 75 | string requires one of the following: | ||
| 76 | |||
| 77 | =over | ||
| 78 | |||
| 79 | =item * | ||
| 80 | |||
| 81 | B<Root> - A string that begins with "r-" followed by from 4 to 32 | ||
| 82 | lowercase letters or digits. | ||
| 83 | |||
| 84 | =item * | ||
| 85 | |||
| 86 | B<Account> - A string that consists of exactly 12 digits. | ||
| 87 | |||
| 88 | =item * | ||
| 89 | |||
| 90 | B<Organizational unit (OU)> - A string that begins with "ou-" followed | ||
| 91 | by from 4 to 32 lowercase letters or digits (the ID of the root that | ||
| 92 | the OU is in). This string is followed by a second "-" dash and from 8 | ||
| 93 | to 32 additional lowercase letters or digits. | ||
| 94 | |||
| 95 | =back | ||
| 96 | |||
| 97 | |||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | =head1 SEE ALSO | ||
| 102 | |||
| 103 | This class forms part of L<Paws>, documenting arguments for method AttachPolicy in L<Paws::Organizations> | ||
| 104 | |||
| 105 | =head1 BUGS and CONTRIBUTIONS | ||
| 106 | |||
| 107 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 108 | |||
| 109 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 110 | |||
| 111 | =cut | ||
| 112 |