« blib/lib/Paws/Organizations/CreateOrganizationalUnitResponse.pm
↑ Summary
blib/lib/Paws/Organizations/CreatePolicyResponse.pm »
| 1 | |||
| 2 | package Paws::Organizations::CreatePolicy; | ||
| 3 | use Moose; | ||
| 4 | has Content => (is => 'ro', isa => 'Str', required => 1); | ||
| 5 | has Description => (is => 'ro', isa => 'Str', required => 1); | ||
| 6 | has Name => (is => 'ro', isa => 'Str', required => 1); | ||
| 7 | has Tags => (is => 'ro', isa => 'ArrayRef[Paws::Organizations::Tag]'); | ||
| 8 | has Type => (is => 'ro', isa => 'Str', required => 1); | ||
| 9 | |||
| 10 | use MooseX::ClassAttribute; | ||
| 11 | |||
| 12 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreatePolicy'); | ||
| 13 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Organizations::CreatePolicyResponse'); | ||
| 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::CreatePolicy - Arguments for method CreatePolicy on L<Paws::Organizations> | ||
| 22 | |||
| 23 | =head1 DESCRIPTION | ||
| 24 | |||
| 25 | This class represents the parameters used for calling the method CreatePolicy on the | ||
| 26 | L<AWS Organizations|Paws::Organizations> service. Use the attributes of this class | ||
| 27 | as arguments to method CreatePolicy. | ||
| 28 | |||
| 29 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreatePolicy. | ||
| 30 | |||
| 31 | =head1 SYNOPSIS | ||
| 32 | |||
| 33 | my $organizations = Paws->service('Organizations'); | ||
| 34 | # To create a service control policy | ||
| 35 | # The following example shows how to create a service control policy (SCP) that | ||
| 36 | # is named AllowAllS3Actions. The JSON string in the content parameter specifies | ||
| 37 | # the content in the policy. The parameter string is escaped with backslashes to | ||
| 38 | # ensure that the embedded double quotes in the JSON policy are treated as | ||
| 39 | # literals in the parameter, which itself is surrounded by double quotes: | ||
| 40 | |||
| 41 | my $CreatePolicyResponse = $organizations->CreatePolicy( | ||
| 42 | 'Content' => | ||
| 43 | '{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\"}}', | ||
| 44 | 'Description' => | ||
| 45 | 'Enables admins of attached accounts to delegate all S3 permissions', | ||
| 46 | 'Name' => 'AllowAllS3Actions', | ||
| 47 | 'Type' => 'SERVICE_CONTROL_POLICY' | ||
| 48 | ); | ||
| 49 | |||
| 50 | # Results: | ||
| 51 | my $Policy = $CreatePolicyResponse->Policy; | ||
| 52 | |||
| 53 | # Returns a L<Paws::Organizations::CreatePolicyResponse> object. | ||
| 54 | |||
| 55 | 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. | ||
| 56 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/organizations/CreatePolicy> | ||
| 57 | |||
| 58 | =head1 ATTRIBUTES | ||
| 59 | |||
| 60 | |||
| 61 | =head2 B<REQUIRED> Content => Str | ||
| 62 | |||
| 63 | The policy text content to add to the new policy. The text that you | ||
| 64 | supply must adhere to the rules of the policy type you specify in the | ||
| 65 | C<Type> parameter. | ||
| 66 | |||
| 67 | |||
| 68 | |||
| 69 | =head2 B<REQUIRED> Description => Str | ||
| 70 | |||
| 71 | An optional description to assign to the policy. | ||
| 72 | |||
| 73 | |||
| 74 | |||
| 75 | =head2 B<REQUIRED> Name => Str | ||
| 76 | |||
| 77 | The friendly name to assign to the policy. | ||
| 78 | |||
| 79 | The regex pattern (http://wikipedia.org/wiki/regex) that is used to | ||
| 80 | validate this parameter is a string of any of the characters in the | ||
| 81 | ASCII character range. | ||
| 82 | |||
| 83 | |||
| 84 | |||
| 85 | =head2 Tags => ArrayRef[L<Paws::Organizations::Tag>] | ||
| 86 | |||
| 87 | A list of tags that you want to attach to the newly created policy. For | ||
| 88 | each tag in the list, you must specify both a tag key and a value. You | ||
| 89 | can set the value to an empty string, but you can't set it to C<null>. | ||
| 90 | For more information about tagging, see Tagging AWS Organizations | ||
| 91 | resources | ||
| 92 | (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html) | ||
| 93 | in the AWS Organizations User Guide. | ||
| 94 | |||
| 95 | If any one of the tags is invalid or if you exceed the allowed number | ||
| 96 | of tags for a policy, then the entire request fails and the policy is | ||
| 97 | not created. | ||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | =head2 B<REQUIRED> Type => Str | ||
| 102 | |||
| 103 | The type of policy to create. You can specify one of the following | ||
| 104 | values: | ||
| 105 | |||
| 106 | =over | ||
| 107 | |||
| 108 | =item * | ||
| 109 | |||
| 110 | AISERVICES_OPT_OUT_POLICY | ||
| 111 | (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html) | ||
| 112 | |||
| 113 | =item * | ||
| 114 | |||
| 115 | BACKUP_POLICY | ||
| 116 | (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html) | ||
| 117 | |||
| 118 | =item * | ||
| 119 | |||
| 120 | SERVICE_CONTROL_POLICY | ||
| 121 | (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html) | ||
| 122 | |||
| 123 | =item * | ||
| 124 | |||
| 125 | TAG_POLICY | ||
| 126 | (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) | ||
| 127 | |||
| 128 | =back | ||
| 129 | |||
| 130 | |||
| 131 | Valid values are: C<"SERVICE_CONTROL_POLICY">, C<"TAG_POLICY">, C<"BACKUP_POLICY">, C<"AISERVICES_OPT_OUT_POLICY"> | ||
| 132 | |||
| 133 | |||
| 134 | =head1 SEE ALSO | ||
| 135 | |||
| 136 | This class forms part of L<Paws>, documenting arguments for method CreatePolicy in L<Paws::Organizations> | ||
| 137 | |||
| 138 | =head1 BUGS and CONTRIBUTIONS | ||
| 139 | |||
| 140 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 141 | |||
| 142 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 143 | |||
| 144 | =cut | ||
| 145 |