| 1 | |||
| 2 | package Paws::ApiGatewayV2::CreateApi; | ||
| 3 | use Moose; | ||
| 4 | has ApiKeySelectionExpression => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'apiKeySelectionExpression'); | ||
| 5 | has CorsConfiguration => (is => 'ro', isa => 'Paws::ApiGatewayV2::Cors', traits => ['NameInRequest'], request_name => 'corsConfiguration'); | ||
| 6 | has CredentialsArn => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'credentialsArn'); | ||
| 7 | has Description => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'description'); | ||
| 8 | has DisableExecuteApiEndpoint => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'disableExecuteApiEndpoint'); | ||
| 9 | has DisableSchemaValidation => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'disableSchemaValidation'); | ||
| 10 | has Name => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'name', required => 1); | ||
| 11 | has ProtocolType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'protocolType', required => 1); | ||
| 12 | has RouteKey => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'routeKey'); | ||
| 13 | has RouteSelectionExpression => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'routeSelectionExpression'); | ||
| 14 | has Tags => (is => 'ro', isa => 'Paws::ApiGatewayV2::Tags', traits => ['NameInRequest'], request_name => 'tags'); | ||
| 15 | has Target => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'target'); | ||
| 16 | has Version => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'version'); | ||
| 17 | |||
| 18 | use MooseX::ClassAttribute; | ||
| 19 | |||
| 20 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateApi'); | ||
| 21 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/v2/apis'); | ||
| 22 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 23 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ApiGatewayV2::CreateApiResponse'); | ||
| 24 | 1; | ||
| 25 | |||
| 26 | ### main pod documentation begin ### | ||
| 27 | |||
| 28 | =head1 NAME | ||
| 29 | |||
| 30 | Paws::ApiGatewayV2::CreateApi - Arguments for method CreateApi on L<Paws::ApiGatewayV2> | ||
| 31 | |||
| 32 | =head1 DESCRIPTION | ||
| 33 | |||
| 34 | This class represents the parameters used for calling the method CreateApi on the | ||
| 35 | L<AmazonApiGatewayV2|Paws::ApiGatewayV2> service. Use the attributes of this class | ||
| 36 | as arguments to method CreateApi. | ||
| 37 | |||
| 38 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateApi. | ||
| 39 | |||
| 40 | =head1 SYNOPSIS | ||
| 41 | |||
| 42 | my $apigateway = Paws->service('ApiGatewayV2'); | ||
| 43 | my $CreateApiResponse = $apigateway->CreateApi( | ||
| 44 | Name => 'MyStringWithLengthBetween1And128', | ||
| 45 | ProtocolType => 'WEBSOCKET', | ||
| 46 | ApiKeySelectionExpression => 'MySelectionExpression', # OPTIONAL | ||
| 47 | CorsConfiguration => { | ||
| 48 | AllowCredentials => 1, # OPTIONAL | ||
| 49 | AllowHeaders => [ 'My__string', ... ], # OPTIONAL | ||
| 50 | AllowMethods => [ 'MyStringWithLengthBetween1And64', ... ], # OPTIONAL | ||
| 51 | AllowOrigins => [ 'My__string', ... ], # OPTIONAL | ||
| 52 | ExposeHeaders => [ 'My__string', ... ], # OPTIONAL | ||
| 53 | MaxAge => 1, # min: -1, max: 86400; OPTIONAL | ||
| 54 | }, # OPTIONAL | ||
| 55 | CredentialsArn => 'MyArn', # OPTIONAL | ||
| 56 | Description => 'MyStringWithLengthBetween0And1024', # OPTIONAL | ||
| 57 | DisableExecuteApiEndpoint => 1, # OPTIONAL | ||
| 58 | DisableSchemaValidation => 1, # OPTIONAL | ||
| 59 | RouteKey => 'MySelectionKey', # OPTIONAL | ||
| 60 | RouteSelectionExpression => 'MySelectionExpression', # OPTIONAL | ||
| 61 | Tags => { 'My__string' => 'MyStringWithLengthBetween1And1600', } | ||
| 62 | , # OPTIONAL | ||
| 63 | Target => 'MyUriWithLengthBetween1And2048', # OPTIONAL | ||
| 64 | Version => 'MyStringWithLengthBetween1And64', # OPTIONAL | ||
| 65 | ); | ||
| 66 | |||
| 67 | # Results: | ||
| 68 | my $ApiEndpoint = $CreateApiResponse->ApiEndpoint; | ||
| 69 | my $ApiGatewayManaged = $CreateApiResponse->ApiGatewayManaged; | ||
| 70 | my $ApiId = $CreateApiResponse->ApiId; | ||
| 71 | my $ApiKeySelectionExpression = | ||
| 72 | $CreateApiResponse->ApiKeySelectionExpression; | ||
| 73 | my $CorsConfiguration = $CreateApiResponse->CorsConfiguration; | ||
| 74 | my $CreatedDate = $CreateApiResponse->CreatedDate; | ||
| 75 | my $Description = $CreateApiResponse->Description; | ||
| 76 | my $DisableExecuteApiEndpoint = | ||
| 77 | $CreateApiResponse->DisableExecuteApiEndpoint; | ||
| 78 | my $DisableSchemaValidation = $CreateApiResponse->DisableSchemaValidation; | ||
| 79 | my $ImportInfo = $CreateApiResponse->ImportInfo; | ||
| 80 | my $Name = $CreateApiResponse->Name; | ||
| 81 | my $ProtocolType = $CreateApiResponse->ProtocolType; | ||
| 82 | my $RouteSelectionExpression = $CreateApiResponse->RouteSelectionExpression; | ||
| 83 | my $Tags = $CreateApiResponse->Tags; | ||
| 84 | my $Version = $CreateApiResponse->Version; | ||
| 85 | my $Warnings = $CreateApiResponse->Warnings; | ||
| 86 | |||
| 87 | # Returns a L<Paws::ApiGatewayV2::CreateApiResponse> object. | ||
| 88 | |||
| 89 | 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. | ||
| 90 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/apigateway/CreateApi> | ||
| 91 | |||
| 92 | =head1 ATTRIBUTES | ||
| 93 | |||
| 94 | |||
| 95 | =head2 ApiKeySelectionExpression => Str | ||
| 96 | |||
| 97 | An API key selection expression. Supported only for WebSocket APIs. See | ||
| 98 | API Key Selection Expressions | ||
| 99 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-apikey-selection-expressions). | ||
| 100 | |||
| 101 | |||
| 102 | |||
| 103 | =head2 CorsConfiguration => L<Paws::ApiGatewayV2::Cors> | ||
| 104 | |||
| 105 | A CORS configuration. Supported only for HTTP APIs. See Configuring | ||
| 106 | CORS | ||
| 107 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-cors.html) | ||
| 108 | for more information. | ||
| 109 | |||
| 110 | |||
| 111 | |||
| 112 | =head2 CredentialsArn => Str | ||
| 113 | |||
| 114 | This property is part of quick create. It specifies the credentials | ||
| 115 | required for the integration, if any. For a Lambda integration, three | ||
| 116 | options are available. To specify an IAM Role for API Gateway to | ||
| 117 | assume, use the role's Amazon Resource Name (ARN). To require that the | ||
| 118 | caller's identity be passed through from the request, specify | ||
| 119 | arn:aws:iam::*:user/*. To use resource-based permissions on supported | ||
| 120 | AWS services, specify null. Currently, this property is not used for | ||
| 121 | HTTP integrations. Supported only for HTTP APIs. | ||
| 122 | |||
| 123 | |||
| 124 | |||
| 125 | =head2 Description => Str | ||
| 126 | |||
| 127 | The description of the API. | ||
| 128 | |||
| 129 | |||
| 130 | |||
| 131 | =head2 DisableExecuteApiEndpoint => Bool | ||
| 132 | |||
| 133 | Specifies whether clients can invoke your API by using the default | ||
| 134 | execute-api endpoint. By default, clients can invoke your API with the | ||
| 135 | default https://{api_id}.execute-api.{region}.amazonaws.com endpoint. | ||
| 136 | To require that clients use a custom domain name to invoke your API, | ||
| 137 | disable the default endpoint. | ||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | =head2 DisableSchemaValidation => Bool | ||
| 142 | |||
| 143 | Avoid validating models when creating a deployment. Supported only for | ||
| 144 | WebSocket APIs. | ||
| 145 | |||
| 146 | |||
| 147 | |||
| 148 | =head2 B<REQUIRED> Name => Str | ||
| 149 | |||
| 150 | The name of the API. | ||
| 151 | |||
| 152 | |||
| 153 | |||
| 154 | =head2 B<REQUIRED> ProtocolType => Str | ||
| 155 | |||
| 156 | The API protocol. | ||
| 157 | |||
| 158 | Valid values are: C<"WEBSOCKET">, C<"HTTP"> | ||
| 159 | |||
| 160 | =head2 RouteKey => Str | ||
| 161 | |||
| 162 | This property is part of quick create. If you don't specify a routeKey, | ||
| 163 | a default route of $default is created. The $default route acts as a | ||
| 164 | catch-all for any request made to your API, for a particular stage. The | ||
| 165 | $default route key can't be modified. You can add routes after creating | ||
| 166 | the API, and you can update the route keys of additional routes. | ||
| 167 | Supported only for HTTP APIs. | ||
| 168 | |||
| 169 | |||
| 170 | |||
| 171 | =head2 RouteSelectionExpression => Str | ||
| 172 | |||
| 173 | The route selection expression for the API. For HTTP APIs, the | ||
| 174 | routeSelectionExpression must be ${request.method} ${request.path}. If | ||
| 175 | not provided, this will be the default for HTTP APIs. This property is | ||
| 176 | required for WebSocket APIs. | ||
| 177 | |||
| 178 | |||
| 179 | |||
| 180 | =head2 Tags => L<Paws::ApiGatewayV2::Tags> | ||
| 181 | |||
| 182 | The collection of tags. Each tag element is associated with a given | ||
| 183 | resource. | ||
| 184 | |||
| 185 | |||
| 186 | |||
| 187 | =head2 Target => Str | ||
| 188 | |||
| 189 | This property is part of quick create. Quick create produces an API | ||
| 190 | with an integration, a default catch-all route, and a default stage | ||
| 191 | which is configured to automatically deploy changes. For HTTP | ||
| 192 | integrations, specify a fully qualified URL. For Lambda integrations, | ||
| 193 | specify a function ARN. The type of the integration will be HTTP_PROXY | ||
| 194 | or AWS_PROXY, respectively. Supported only for HTTP APIs. | ||
| 195 | |||
| 196 | |||
| 197 | |||
| 198 | =head2 Version => Str | ||
| 199 | |||
| 200 | A version identifier for the API. | ||
| 201 | |||
| 202 | |||
| 203 | |||
| 204 | |||
| 205 | =head1 SEE ALSO | ||
| 206 | |||
| 207 | This class forms part of L<Paws>, documenting arguments for method CreateApi in L<Paws::ApiGatewayV2> | ||
| 208 | |||
| 209 | =head1 BUGS and CONTRIBUTIONS | ||
| 210 | |||
| 211 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 212 | |||
| 213 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 214 | |||
| 215 | =cut | ||
| 216 |