« blib/lib/Paws/LexModelsV2/CreateResourcePolicyResponse.pm
↑ Summary
blib/lib/Paws/LexModelsV2/CreateResourcePolicyStatementResponse.pm »
| 1 | |||
| 2 | package Paws::LexModelsV2::CreateResourcePolicyStatement; | ||
| 3 | use Moose; | ||
| 4 | has Action => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'action', required => 1); | ||
| 5 | has Condition => (is => 'ro', isa => 'Paws::LexModelsV2::ConditionMap', traits => ['NameInRequest'], request_name => 'condition'); | ||
| 6 | has Effect => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'effect', required => 1); | ||
| 7 | has ExpectedRevisionId => (is => 'ro', isa => 'Str', traits => ['ParamInQuery'], query_name => 'expectedRevisionId'); | ||
| 8 | has Principal => (is => 'ro', isa => 'ArrayRef[Paws::LexModelsV2::Principal]', traits => ['NameInRequest'], request_name => 'principal', required => 1); | ||
| 9 | has ResourceArn => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'resourceArn', required => 1); | ||
| 10 | has StatementId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'statementId', required => 1); | ||
| 11 | |||
| 12 | use MooseX::ClassAttribute; | ||
| 13 | |||
| 14 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateResourcePolicyStatement'); | ||
| 15 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/policy/{resourceArn}/statements/'); | ||
| 16 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 17 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::LexModelsV2::CreateResourcePolicyStatementResponse'); | ||
| 18 | 1; | ||
| 19 | |||
| 20 | ### main pod documentation begin ### | ||
| 21 | |||
| 22 | =head1 NAME | ||
| 23 | |||
| 24 | Paws::LexModelsV2::CreateResourcePolicyStatement - Arguments for method CreateResourcePolicyStatement on L<Paws::LexModelsV2> | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | This class represents the parameters used for calling the method CreateResourcePolicyStatement on the | ||
| 29 | L<Amazon Lex Model Building V2|Paws::LexModelsV2> service. Use the attributes of this class | ||
| 30 | as arguments to method CreateResourcePolicyStatement. | ||
| 31 | |||
| 32 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateResourcePolicyStatement. | ||
| 33 | |||
| 34 | =head1 SYNOPSIS | ||
| 35 | |||
| 36 | my $models-v2-lex = Paws->service('LexModelsV2'); | ||
| 37 | my $CreateResourcePolicyStatementResponse = | ||
| 38 | $models - v2 -lex->CreateResourcePolicyStatement( | ||
| 39 | Action => [ | ||
| 40 | 'MyOperation', ... # min: 5, max: 50 | ||
| 41 | ], | ||
| 42 | Effect => 'Allow', | ||
| 43 | Principal => [ | ||
| 44 | { | ||
| 45 | Arn => 'MyPrincipalArn', # min: 30, max: 1024; OPTIONAL | ||
| 46 | Service => 'MyServicePrincipal', # min: 15, max: 1024; OPTIONAL | ||
| 47 | }, | ||
| 48 | ... | ||
| 49 | ], | ||
| 50 | ResourceArn => 'MyAmazonResourceName', | ||
| 51 | StatementId => 'MyName', | ||
| 52 | Condition => { | ||
| 53 | 'MyConditionOperator' => { | ||
| 54 | 'MyConditionKey' => 'MyConditionValue' | ||
| 55 | , # key: min: 1, max: 1024, value: min: 1, max: 1024 | ||
| 56 | }, # key: min: 1, value: max: 10 | ||
| 57 | }, # OPTIONAL | ||
| 58 | ExpectedRevisionId => 'MyRevisionId', # OPTIONAL | ||
| 59 | ); | ||
| 60 | |||
| 61 | # Results: | ||
| 62 | my $ResourceArn = $CreateResourcePolicyStatementResponse->ResourceArn; | ||
| 63 | my $RevisionId = $CreateResourcePolicyStatementResponse->RevisionId; | ||
| 64 | |||
| 65 | # Returns a L<Paws::LexModelsV2::CreateResourcePolicyStatementResponse> object. | ||
| 66 | |||
| 67 | 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. | ||
| 68 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/models-v2-lex/CreateResourcePolicyStatement> | ||
| 69 | |||
| 70 | =head1 ATTRIBUTES | ||
| 71 | |||
| 72 | |||
| 73 | =head2 B<REQUIRED> Action => ArrayRef[Str|Undef] | ||
| 74 | |||
| 75 | The Amazon Lex action that this policy either allows or denies. The | ||
| 76 | action must apply to the resource type of the specified ARN. For more | ||
| 77 | information, see Actions, resources, and condition keys for Amazon Lex | ||
| 78 | V2 | ||
| 79 | (https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonlexv2.html). | ||
| 80 | |||
| 81 | |||
| 82 | |||
| 83 | =head2 Condition => L<Paws::LexModelsV2::ConditionMap> | ||
| 84 | |||
| 85 | Specifies a condition when the policy is in effect. If the principal of | ||
| 86 | the policy is a service principal, you must provide two condition | ||
| 87 | blocks, one with a SourceAccount global condition key and one with a | ||
| 88 | SourceArn global condition key. | ||
| 89 | |||
| 90 | For more information, see IAM JSON policy elements: Condition | ||
| 91 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html). | ||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | =head2 B<REQUIRED> Effect => Str | ||
| 96 | |||
| 97 | Determines whether the statement allows or denies access to the | ||
| 98 | resource. | ||
| 99 | |||
| 100 | Valid values are: C<"Allow">, C<"Deny"> | ||
| 101 | |||
| 102 | =head2 ExpectedRevisionId => Str | ||
| 103 | |||
| 104 | The identifier of the revision of the policy to edit. If this revision | ||
| 105 | ID doesn't match the current revision ID, Amazon Lex throws an | ||
| 106 | exception. | ||
| 107 | |||
| 108 | If you don't specify a revision, Amazon Lex overwrites the contents of | ||
| 109 | the policy with the new values. | ||
| 110 | |||
| 111 | |||
| 112 | |||
| 113 | =head2 B<REQUIRED> Principal => ArrayRef[L<Paws::LexModelsV2::Principal>] | ||
| 114 | |||
| 115 | An IAM principal, such as an IAM users, IAM roles, or AWS services that | ||
| 116 | is allowed or denied access to a resource. For more information, see | ||
| 117 | AWS JSON policy elements: Principal | ||
| 118 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html). | ||
| 119 | |||
| 120 | |||
| 121 | |||
| 122 | =head2 B<REQUIRED> ResourceArn => Str | ||
| 123 | |||
| 124 | The Amazon Resource Name (ARN) of the bot or bot alias that the | ||
| 125 | resource policy is attached to. | ||
| 126 | |||
| 127 | |||
| 128 | |||
| 129 | =head2 B<REQUIRED> StatementId => Str | ||
| 130 | |||
| 131 | The name of the statement. The ID is the same as the C<Sid> IAM | ||
| 132 | property. The statement name must be unique within the policy. For more | ||
| 133 | information, see IAM JSON policy elements: Sid | ||
| 134 | (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_sid.html). | ||
| 135 | |||
| 136 | |||
| 137 | |||
| 138 | |||
| 139 | =head1 SEE ALSO | ||
| 140 | |||
| 141 | This class forms part of L<Paws>, documenting arguments for method CreateResourcePolicyStatement in L<Paws::LexModelsV2> | ||
| 142 | |||
| 143 | =head1 BUGS and CONTRIBUTIONS | ||
| 144 | |||
| 145 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 146 | |||
| 147 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 148 | |||
| 149 | =cut | ||
| 150 |