blib/lib/Paws/AppMesh/CreateRoute.pm untested

filter: Statementstmt 0.0% 0 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::AppMesh::CreateRoute;
3 use Moose;
4 has ClientToken => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'clientToken');
5 has MeshName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'meshName', required => 1);
6 has MeshOwner => (is => 'ro', isa => 'Str', traits => ['ParamInQuery'], query_name => 'meshOwner');
7 has RouteName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'routeName', required => 1);
8 has Spec => (is => 'ro', isa => 'Paws::AppMesh::RouteSpec', traits => ['NameInRequest'], request_name => 'spec', required => 1);
9 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::AppMesh::TagRef]', traits => ['NameInRequest'], request_name => 'tags');
10 has VirtualRouterName => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'virtualRouterName', required => 1);
11  
12 use MooseX::ClassAttribute;
13  
14 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateRoute');
15 class_has _api_uri => (isa => 'Str', is => 'ro', default => '/v20190125/meshes/{meshName}/virtualRouter/{virtualRouterName}/routes');
16 class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT');
17 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::AppMesh::CreateRouteOutput');
18 1;
19  
20 ### main pod documentation begin ###
21  
22 =head1 NAME
23  
24 Paws::AppMesh::CreateRoute - Arguments for method CreateRoute on L<Paws::AppMesh>
25  
26 =head1 DESCRIPTION
27  
28 This class represents the parameters used for calling the method CreateRoute on the
29 L<AWS App Mesh|Paws::AppMesh> service. Use the attributes of this class
30 as arguments to method CreateRoute.
31  
32 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateRoute.
33  
34 =head1 SYNOPSIS
35  
36 my $appmesh = Paws->service('AppMesh');
37 my $CreateRouteOutput = $appmesh->CreateRoute(
38 MeshName => 'MyResourceName',
39 RouteName => 'MyResourceName',
40 Spec => {
41 GrpcRoute => {
42 Action => {
43 WeightedTargets => [
44 {
45 VirtualNode => 'MyResourceName', # min: 1, max: 255
46 Weight => 1, # max: 100
47  
48 },
49 ...
50 ], # min: 1, max: 10
51  
52 },
53 Match => {
54 Metadata => [
55 {
56 Name => 'MyHeaderName', # min: 1, max: 50
57 Invert => 1, # OPTIONAL
58 Match => {
59 Exact => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
60 Prefix => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
61 Range => {
62 End => 1,
63 Start => 1,
64  
65 }, # OPTIONAL
66 Regex => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
67 Suffix => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
68 }, # OPTIONAL
69 },
70 ...
71 ], # min: 1, max: 10; OPTIONAL
72 MethodName => 'MyMethodName', # min: 1, max: 50; OPTIONAL
73 ServiceName => 'MyServiceName', # OPTIONAL
74 },
75 RetryPolicy => {
76 MaxRetries => 1,
77 PerRetryTimeout => {
78 Unit => 's', # values: s, ms; OPTIONAL
79 Value => 1, # OPTIONAL
80 },
81 GrpcRetryEvents => [
82 'cancelled',
83 ... # values: cancelled, deadline-exceeded, internal, resource-exhausted, unavailable
84 ], # min: 1, max: 5; OPTIONAL
85 HttpRetryEvents => [
86 'MyHttpRetryPolicyEvent', ... # min: 1, max: 25
87 ], # min: 1, max: 25; OPTIONAL
88 TcpRetryEvents => [
89 'connection-error', ... # values: connection-error
90 ], # min: 1, max: 1; OPTIONAL
91 }, # OPTIONAL
92 Timeout => {
93 Idle => {
94 Unit => 's', # values: s, ms; OPTIONAL
95 Value => 1, # OPTIONAL
96 },
97 PerRequest => {
98 Unit => 's', # values: s, ms; OPTIONAL
99 Value => 1, # OPTIONAL
100 },
101 }, # OPTIONAL
102 }, # OPTIONAL
103 Http2Route => {
104 Action => {
105 WeightedTargets => [
106 {
107 VirtualNode => 'MyResourceName', # min: 1, max: 255
108 Weight => 1, # max: 100
109  
110 },
111 ...
112 ], # min: 1, max: 10
113  
114 },
115 Match => {
116 Headers => [
117 {
118 Name => 'MyHeaderName', # min: 1, max: 50
119 Invert => 1, # OPTIONAL
120 Match => {
121 Exact => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
122 Prefix => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
123 Range => {
124 End => 1,
125 Start => 1,
126  
127 }, # OPTIONAL
128 Regex => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
129 Suffix => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
130 }, # OPTIONAL
131 },
132 ...
133 ], # min: 1, max: 10; OPTIONAL
134 Method => 'GET'
135 , # values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH; OPTIONAL
136 Path => {
137 Exact => 'MyHttpPathExact', # min: 1, max: 255; OPTIONAL
138 Regex => 'MyHttpPathRegex', # min: 1, max: 255; OPTIONAL
139 }, # OPTIONAL
140 Prefix => 'MyString', # OPTIONAL
141 QueryParameters => [
142 {
143 Name => 'MyQueryParameterName',
144 Match => {
145 Exact => 'MyString', # OPTIONAL
146 }, # OPTIONAL
147 },
148 ...
149 ], # min: 1, max: 10; OPTIONAL
150 Scheme => 'http', # values: http, https; OPTIONAL
151 },
152 RetryPolicy => {
153 MaxRetries => 1,
154 PerRetryTimeout => {
155 Unit => 's', # values: s, ms; OPTIONAL
156 Value => 1, # OPTIONAL
157 },
158 HttpRetryEvents => [
159 'MyHttpRetryPolicyEvent', ... # min: 1, max: 25
160 ], # min: 1, max: 25; OPTIONAL
161 TcpRetryEvents => [
162 'connection-error', ... # values: connection-error
163 ], # min: 1, max: 1; OPTIONAL
164 }, # OPTIONAL
165 Timeout => {
166 Idle => {
167 Unit => 's', # values: s, ms; OPTIONAL
168 Value => 1, # OPTIONAL
169 },
170 PerRequest => {
171 Unit => 's', # values: s, ms; OPTIONAL
172 Value => 1, # OPTIONAL
173 },
174 }, # OPTIONAL
175 }, # OPTIONAL
176 HttpRoute => {
177 Action => {
178 WeightedTargets => [
179 {
180 VirtualNode => 'MyResourceName', # min: 1, max: 255
181 Weight => 1, # max: 100
182  
183 },
184 ...
185 ], # min: 1, max: 10
186  
187 },
188 Match => {
189 Headers => [
190 {
191 Name => 'MyHeaderName', # min: 1, max: 50
192 Invert => 1, # OPTIONAL
193 Match => {
194 Exact => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
195 Prefix => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
196 Range => {
197 End => 1,
198 Start => 1,
199  
200 }, # OPTIONAL
201 Regex => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
202 Suffix => 'MyHeaderMatch', # min: 1, max: 255; OPTIONAL
203 }, # OPTIONAL
204 },
205 ...
206 ], # min: 1, max: 10; OPTIONAL
207 Method => 'GET'
208 , # values: GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, PATCH; OPTIONAL
209 Path => {
210 Exact => 'MyHttpPathExact', # min: 1, max: 255; OPTIONAL
211 Regex => 'MyHttpPathRegex', # min: 1, max: 255; OPTIONAL
212 }, # OPTIONAL
213 Prefix => 'MyString', # OPTIONAL
214 QueryParameters => [
215 {
216 Name => 'MyQueryParameterName',
217 Match => {
218 Exact => 'MyString', # OPTIONAL
219 }, # OPTIONAL
220 },
221 ...
222 ], # min: 1, max: 10; OPTIONAL
223 Scheme => 'http', # values: http, https; OPTIONAL
224 },
225 RetryPolicy => {
226 MaxRetries => 1,
227 PerRetryTimeout => {
228 Unit => 's', # values: s, ms; OPTIONAL
229 Value => 1, # OPTIONAL
230 },
231 HttpRetryEvents => [
232 'MyHttpRetryPolicyEvent', ... # min: 1, max: 25
233 ], # min: 1, max: 25; OPTIONAL
234 TcpRetryEvents => [
235 'connection-error', ... # values: connection-error
236 ], # min: 1, max: 1; OPTIONAL
237 }, # OPTIONAL
238 Timeout => {
239 Idle => {
240 Unit => 's', # values: s, ms; OPTIONAL
241 Value => 1, # OPTIONAL
242 },
243 PerRequest => {
244 Unit => 's', # values: s, ms; OPTIONAL
245 Value => 1, # OPTIONAL
246 },
247 }, # OPTIONAL
248 }, # OPTIONAL
249 Priority => 1, # max: 1000; OPTIONAL
250 TcpRoute => {
251 Action => {
252 WeightedTargets => [
253 {
254 VirtualNode => 'MyResourceName', # min: 1, max: 255
255 Weight => 1, # max: 100
256  
257 },
258 ...
259 ], # min: 1, max: 10
260  
261 },
262 Timeout => {
263 Idle => {
264 Unit => 's', # values: s, ms; OPTIONAL
265 Value => 1, # OPTIONAL
266 },
267 }, # OPTIONAL
268 }, # OPTIONAL
269 },
270 VirtualRouterName => 'MyResourceName',
271 ClientToken => 'MyString', # OPTIONAL
272 MeshOwner => 'MyAccountId', # OPTIONAL
273 Tags => [
274 {
275 Key => 'MyTagKey', # min: 1, max: 128
276 Value => 'MyTagValue', # max: 256
277  
278 },
279 ...
280 ], # OPTIONAL
281 );
282  
283 # Results:
284 my $Route = $CreateRouteOutput->Route;
285  
286 # Returns a L<Paws::AppMesh::CreateRouteOutput> object.
287  
288 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.
289 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/appmesh/CreateRoute>
290  
291 =head1 ATTRIBUTES
292  
293  
294 =head2 ClientToken => Str
295  
296 Unique, case-sensitive identifier that you provide to ensure the
297 idempotency of the request. Up to 36 letters, numbers, hyphens, and
298 underscores are allowed.
299  
300  
301  
302 =head2 B<REQUIRED> MeshName => Str
303  
304 The name of the service mesh to create the route in.
305  
306  
307  
308 =head2 MeshOwner => Str
309  
310 The AWS IAM account ID of the service mesh owner. If the account ID is
311 not your own, then the account that you specify must share the mesh
312 with your account before you can create the resource in the service
313 mesh. For more information about mesh sharing, see Working with shared
314 meshes
315 (https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html).
316  
317  
318  
319 =head2 B<REQUIRED> RouteName => Str
320  
321 The name to use for the route.
322  
323  
324  
325 =head2 B<REQUIRED> Spec => L<Paws::AppMesh::RouteSpec>
326  
327 The route specification to apply.
328  
329  
330  
331 =head2 Tags => ArrayRef[L<Paws::AppMesh::TagRef>]
332  
333 Optional metadata that you can apply to the route to assist with
334 categorization and organization. Each tag consists of a key and an
335 optional value, both of which you define. Tag keys can have a maximum
336 character length of 128 characters, and tag values can have a maximum
337 length of 256 characters.
338  
339  
340  
341 =head2 B<REQUIRED> VirtualRouterName => Str
342  
343 The name of the virtual router in which to create the route. If the
344 virtual router is in a shared mesh, then you must be the owner of the
345 virtual router resource.
346  
347  
348  
349  
350 =head1 SEE ALSO
351  
352 This class forms part of L<Paws>, documenting arguments for method CreateRoute in L<Paws::AppMesh>
353  
354 =head1 BUGS and CONTRIBUTIONS
355  
356 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
357  
358 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
359  
360 =cut
361