blib/lib/Paws/ApiGateway/CreateRestApi.pm untested

filter: Statementstmt 0.0% 0 / 32 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 34 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::ApiGateway::CreateRestApi;
3 use Moose;
4 has ApiKeySource => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'apiKeySource');
5 has BinaryMediaTypes => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'binaryMediaTypes');
6 has CloneFrom => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'cloneFrom');
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 EndpointConfiguration => (is => 'ro', isa => 'Paws::ApiGateway::EndpointConfiguration', traits => ['NameInRequest'], request_name => 'endpointConfiguration');
10 has MinimumCompressionSize => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'minimumCompressionSize');
11 has Name => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'name', required => 1);
12 has Policy => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'policy');
13 has Tags => (is => 'ro', isa => 'Paws::ApiGateway::MapOfStringToString', traits => ['NameInRequest'], request_name => 'tags');
14 has Version => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'version');
15  
16 use MooseX::ClassAttribute;
17  
18 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateRestApi');
19 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/restapis');
20 class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST');
21 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ApiGateway::RestApi');
22 1;
23  
24 ### main pod documentation begin ###
25  
26 =head1 NAME
27  
28 Paws::ApiGateway::CreateRestApi - Arguments for method CreateRestApi on L<Paws::ApiGateway>
29  
30 =head1 DESCRIPTION
31  
32 This class represents the parameters used for calling the method CreateRestApi on the
33 L<Amazon API Gateway|Paws::ApiGateway> service. Use the attributes of this class
34 as arguments to method CreateRestApi.
35  
36 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateRestApi.
37  
38 =head1 SYNOPSIS
39  
40 my $apigateway = Paws->service('ApiGateway');
41 my $RestApi = $apigateway->CreateRestApi(
42 Name => 'MyString',
43 ApiKeySource => 'HEADER', # OPTIONAL
44 BinaryMediaTypes => [ 'MyString', ... ], # OPTIONAL
45 CloneFrom => 'MyString', # OPTIONAL
46 Description => 'MyString', # OPTIONAL
47 DisableExecuteApiEndpoint => 1, # OPTIONAL
48 EndpointConfiguration => {
49 Types => [
50 'REGIONAL', ... # values: REGIONAL, EDGE, PRIVATE
51 ], # OPTIONAL
52 VpcEndpointIds => [ 'MyString', ... ],
53 }, # OPTIONAL
54 MinimumCompressionSize => 1, # OPTIONAL
55 Policy => 'MyString', # OPTIONAL
56 Tags => { 'MyString' => 'MyString', }, # OPTIONAL
57 Version => 'MyString', # OPTIONAL
58 );
59  
60 # Results:
61 my $ApiKeySource = $RestApi->ApiKeySource;
62 my $BinaryMediaTypes = $RestApi->BinaryMediaTypes;
63 my $CreatedDate = $RestApi->CreatedDate;
64 my $Description = $RestApi->Description;
65 my $DisableExecuteApiEndpoint = $RestApi->DisableExecuteApiEndpoint;
66 my $EndpointConfiguration = $RestApi->EndpointConfiguration;
67 my $Id = $RestApi->Id;
68 my $MinimumCompressionSize = $RestApi->MinimumCompressionSize;
69 my $Name = $RestApi->Name;
70 my $Policy = $RestApi->Policy;
71 my $Tags = $RestApi->Tags;
72 my $Version = $RestApi->Version;
73 my $Warnings = $RestApi->Warnings;
74  
75 # Returns a L<Paws::ApiGateway::RestApi> object.
76  
77 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.
78 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/apigateway/CreateRestApi>
79  
80 =head1 ATTRIBUTES
81  
82  
83 =head2 ApiKeySource => Str
84  
85 The source of the API key for metering requests according to a usage
86 plan. Valid values are:
87  
88 =over
89  
90 =item * C<HEADER> to read the API key from the C<X-API-Key> header of a
91 request.
92  
93 =item * C<AUTHORIZER> to read the API key from the
94 C<UsageIdentifierKey> from a custom authorizer.
95  
96 =back
97  
98  
99 Valid values are: C<"HEADER">, C<"AUTHORIZER">
100  
101 =head2 BinaryMediaTypes => ArrayRef[Str|Undef]
102  
103 The list of binary media types supported by the RestApi. By default,
104 the RestApi supports only UTF-8-encoded text payloads.
105  
106  
107  
108 =head2 CloneFrom => Str
109  
110 The ID of the RestApi that you want to clone from.
111  
112  
113  
114 =head2 Description => Str
115  
116 The description of the RestApi.
117  
118  
119  
120 =head2 DisableExecuteApiEndpoint => Bool
121  
122 Specifies whether clients can invoke your API by using the default
123 C<execute-api> endpoint. By default, clients can invoke your API with
124 the default https://{api_id}.execute-api.{region}.amazonaws.com
125 endpoint. To require that clients use a custom domain name to invoke
126 your API, disable the default endpoint.
127  
128  
129  
130 =head2 EndpointConfiguration => L<Paws::ApiGateway::EndpointConfiguration>
131  
132 The endpoint configuration of this RestApi showing the endpoint types
133 of the API.
134  
135  
136  
137 =head2 MinimumCompressionSize => Int
138  
139 A nullable integer that is used to enable compression (with
140 non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable
141 compression (with a null value) on an API. When compression is enabled,
142 compression or decompression is not applied on the payload if the
143 payload size is smaller than this value. Setting it to zero allows
144 compression for any payload size.
145  
146  
147  
148 =head2 B<REQUIRED> Name => Str
149  
150 [Required] The name of the RestApi.
151  
152  
153  
154 =head2 Policy => Str
155  
156 A stringified JSON policy document that applies to this RestApi
157 regardless of the caller and Method configuration.
158  
159  
160  
161 =head2 Tags => L<Paws::ApiGateway::MapOfStringToString>
162  
163 The key-value map of strings. The valid character set is
164 [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not
165 start with C<aws:>. The tag value can be up to 256 characters.
166  
167  
168  
169 =head2 Version => Str
170  
171 A version identifier for the API.
172  
173  
174  
175  
176 =head1 SEE ALSO
177  
178 This class forms part of L<Paws>, documenting arguments for method CreateRestApi in L<Paws::ApiGateway>
179  
180 =head1 BUGS and CONTRIBUTIONS
181  
182 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
183  
184 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
185  
186 =cut
187