File Coverage

blib/lib/Cfn/Resource/AWS/DynamoDB/Table.pm
Criterion Covered Total %
statement 74 74 100.0
branch n/a
condition n/a
subroutine 26 26 100.0
pod 0 2 0.0
total 100 102 98.0


line stmt bran cond sub pod time code
1             # AWS::DynamoDB::Table generated from spec 6.0.0
2 4     4   3061 use Moose::Util::TypeConstraints;
  4         11  
  4         49  
3              
4             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::DynamoDB::Table->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::DynamoDB::Table {
9 4     4   9678 use Moose;
  4         9  
  4         34  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::DynamoDB::Table', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 5 [ 'Arn','StreamArn' ]
15             }
16             sub supported_regions {
17 1     1 0 1515 [ 'ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-southeast-1','ap-southeast-2','ca-central-1','cn-north-1','cn-northwest-1','eu-central-1','eu-north-1','eu-west-1','eu-west-2','eu-west-3','me-south-1','sa-east-1','us-east-1','us-east-2','us-gov-east-1','us-gov-west-1','us-west-1','us-west-2' ]
18             }
19             }
20              
21              
22              
23             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::ProvisionedThroughput',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::ProvisionedThroughput',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::AWS::DynamoDB::Table::ProvisionedThroughputValue->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::AWS::DynamoDB::Table::ProvisionedThroughputValue {
37 4     4   30900 use Moose;
  4         13  
  4         26  
38 4     4   28118 use MooseX::StrictConstructor;
  4         12  
  4         43  
39             extends 'Cfn::Value::TypedValue';
40            
41             has ReadCapacityUnits => (isa => 'Cfn::Value::Long', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             has WriteCapacityUnits => (isa => 'Cfn::Value::Long', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
43             }
44              
45             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::Projection',
46             as 'Cfn::Value';
47              
48             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::Projection',
49             from 'HashRef',
50             via {
51             if (my $f = Cfn::TypeLibrary::try_function($_)) {
52             return $f
53             } else {
54             return Cfn::Resource::Properties::AWS::DynamoDB::Table::ProjectionValue->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::AWS::DynamoDB::Table::ProjectionValue {
59 4     4   14710 use Moose;
  4         12  
  4         21  
60 4     4   26895 use MooseX::StrictConstructor;
  4         11  
  4         21  
61             extends 'Cfn::Value::TypedValue';
62            
63             has NonKeyAttributes => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64             has ProjectionType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
65             }
66             subtype 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::KeySchema',
67             as 'Cfn::Value',
68             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
69             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
70              
71             coerce 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::KeySchema',
72             from 'HashRef',
73             via {
74             if (my $f = Cfn::TypeLibrary::try_function($_)) {
75             return $f
76             } else {
77             die 'Only accepts functions';
78             }
79             },
80             from 'ArrayRef',
81             via {
82             Cfn::Value::Array->new(Value => [
83             map {
84             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::DynamoDB::Table::KeySchema')->coerce($_)
85             } @$_
86             ]);
87             };
88              
89             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::KeySchema',
90             as 'Cfn::Value';
91              
92             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::KeySchema',
93             from 'HashRef',
94             via {
95             if (my $f = Cfn::TypeLibrary::try_function($_)) {
96             return $f
97             } else {
98             return Cfn::Resource::Properties::AWS::DynamoDB::Table::KeySchemaValue->new( %$_ );
99             }
100             };
101              
102             package Cfn::Resource::Properties::AWS::DynamoDB::Table::KeySchemaValue {
103 4     4   14540 use Moose;
  4         16  
  4         19  
104 4     4   26642 use MooseX::StrictConstructor;
  4         11  
  4         26  
105             extends 'Cfn::Value::TypedValue';
106            
107             has AttributeName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
108             has KeyType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109             }
110              
111             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::TimeToLiveSpecification',
112             as 'Cfn::Value';
113              
114             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::TimeToLiveSpecification',
115             from 'HashRef',
116             via {
117             if (my $f = Cfn::TypeLibrary::try_function($_)) {
118             return $f
119             } else {
120             return Cfn::Resource::Properties::AWS::DynamoDB::Table::TimeToLiveSpecificationValue->new( %$_ );
121             }
122             };
123              
124             package Cfn::Resource::Properties::AWS::DynamoDB::Table::TimeToLiveSpecificationValue {
125 4     4   13553 use Moose;
  4         11  
  4         23  
126 4     4   26528 use MooseX::StrictConstructor;
  4         11  
  4         28  
127             extends 'Cfn::Value::TypedValue';
128            
129             has AttributeName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
130             has Enabled => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
131             }
132              
133             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::StreamSpecification',
134             as 'Cfn::Value';
135              
136             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::StreamSpecification',
137             from 'HashRef',
138             via {
139             if (my $f = Cfn::TypeLibrary::try_function($_)) {
140             return $f
141             } else {
142             return Cfn::Resource::Properties::AWS::DynamoDB::Table::StreamSpecificationValue->new( %$_ );
143             }
144             };
145              
146             package Cfn::Resource::Properties::AWS::DynamoDB::Table::StreamSpecificationValue {
147 4     4   13613 use Moose;
  4         11  
  4         23  
148 4     4   26766 use MooseX::StrictConstructor;
  4         15  
  4         24  
149             extends 'Cfn::Value::TypedValue';
150            
151             has StreamViewType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
152             }
153              
154             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::SSESpecification',
155             as 'Cfn::Value';
156              
157             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::SSESpecification',
158             from 'HashRef',
159             via {
160             if (my $f = Cfn::TypeLibrary::try_function($_)) {
161             return $f
162             } else {
163             return Cfn::Resource::Properties::AWS::DynamoDB::Table::SSESpecificationValue->new( %$_ );
164             }
165             };
166              
167             package Cfn::Resource::Properties::AWS::DynamoDB::Table::SSESpecificationValue {
168 4     4   13431 use Moose;
  4         11  
  4         23  
169 4     4   26719 use MooseX::StrictConstructor;
  4         14  
  4         21  
170             extends 'Cfn::Value::TypedValue';
171            
172             has KMSMasterKeyId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
173             has SSEEnabled => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
174             has SSEType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
175             }
176              
177             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::PointInTimeRecoverySpecification',
178             as 'Cfn::Value';
179              
180             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::PointInTimeRecoverySpecification',
181             from 'HashRef',
182             via {
183             if (my $f = Cfn::TypeLibrary::try_function($_)) {
184             return $f
185             } else {
186             return Cfn::Resource::Properties::AWS::DynamoDB::Table::PointInTimeRecoverySpecificationValue->new( %$_ );
187             }
188             };
189              
190             package Cfn::Resource::Properties::AWS::DynamoDB::Table::PointInTimeRecoverySpecificationValue {
191 4     4   13714 use Moose;
  4         16  
  4         21  
192 4     4   26965 use MooseX::StrictConstructor;
  4         12  
  4         22  
193             extends 'Cfn::Value::TypedValue';
194            
195             has PointInTimeRecoveryEnabled => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
196             }
197             subtype 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::LocalSecondaryIndex',
198             as 'Cfn::Value',
199             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
200             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
201              
202             coerce 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::LocalSecondaryIndex',
203             from 'HashRef',
204             via {
205             if (my $f = Cfn::TypeLibrary::try_function($_)) {
206             return $f
207             } else {
208             die 'Only accepts functions';
209             }
210             },
211             from 'ArrayRef',
212             via {
213             Cfn::Value::Array->new(Value => [
214             map {
215             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::DynamoDB::Table::LocalSecondaryIndex')->coerce($_)
216             } @$_
217             ]);
218             };
219              
220             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::LocalSecondaryIndex',
221             as 'Cfn::Value';
222              
223             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::LocalSecondaryIndex',
224             from 'HashRef',
225             via {
226             if (my $f = Cfn::TypeLibrary::try_function($_)) {
227             return $f
228             } else {
229             return Cfn::Resource::Properties::AWS::DynamoDB::Table::LocalSecondaryIndexValue->new( %$_ );
230             }
231             };
232              
233             package Cfn::Resource::Properties::AWS::DynamoDB::Table::LocalSecondaryIndexValue {
234 4     4   14616 use Moose;
  4         11  
  4         30  
235 4     4   27008 use MooseX::StrictConstructor;
  4         13  
  4         22  
236             extends 'Cfn::Value::TypedValue';
237            
238             has IndexName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
239             has KeySchema => (isa => 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::KeySchema', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
240             has Projection => (isa => 'Cfn::Resource::Properties::AWS::DynamoDB::Table::Projection', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
241             }
242             subtype 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::GlobalSecondaryIndex',
243             as 'Cfn::Value',
244             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
245             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
246              
247             coerce 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::GlobalSecondaryIndex',
248             from 'HashRef',
249             via {
250             if (my $f = Cfn::TypeLibrary::try_function($_)) {
251             return $f
252             } else {
253             die 'Only accepts functions';
254             }
255             },
256             from 'ArrayRef',
257             via {
258             Cfn::Value::Array->new(Value => [
259             map {
260             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::DynamoDB::Table::GlobalSecondaryIndex')->coerce($_)
261             } @$_
262             ]);
263             };
264              
265             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::GlobalSecondaryIndex',
266             as 'Cfn::Value';
267              
268             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::GlobalSecondaryIndex',
269             from 'HashRef',
270             via {
271             if (my $f = Cfn::TypeLibrary::try_function($_)) {
272             return $f
273             } else {
274             return Cfn::Resource::Properties::AWS::DynamoDB::Table::GlobalSecondaryIndexValue->new( %$_ );
275             }
276             };
277              
278             package Cfn::Resource::Properties::AWS::DynamoDB::Table::GlobalSecondaryIndexValue {
279 4     4   14568 use Moose;
  4         21  
  4         24  
280 4     4   27150 use MooseX::StrictConstructor;
  4         8  
  4         40  
281             extends 'Cfn::Value::TypedValue';
282            
283             has IndexName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
284             has KeySchema => (isa => 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::KeySchema', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
285             has Projection => (isa => 'Cfn::Resource::Properties::AWS::DynamoDB::Table::Projection', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
286             has ProvisionedThroughput => (isa => 'Cfn::Resource::Properties::AWS::DynamoDB::Table::ProvisionedThroughput', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
287             }
288             subtype 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::AttributeDefinition',
289             as 'Cfn::Value',
290             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
291             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
292              
293             coerce 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::AttributeDefinition',
294             from 'HashRef',
295             via {
296             if (my $f = Cfn::TypeLibrary::try_function($_)) {
297             return $f
298             } else {
299             die 'Only accepts functions';
300             }
301             },
302             from 'ArrayRef',
303             via {
304             Cfn::Value::Array->new(Value => [
305             map {
306             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::DynamoDB::Table::AttributeDefinition')->coerce($_)
307             } @$_
308             ]);
309             };
310              
311             subtype 'Cfn::Resource::Properties::AWS::DynamoDB::Table::AttributeDefinition',
312             as 'Cfn::Value';
313              
314             coerce 'Cfn::Resource::Properties::AWS::DynamoDB::Table::AttributeDefinition',
315             from 'HashRef',
316             via {
317             if (my $f = Cfn::TypeLibrary::try_function($_)) {
318             return $f
319             } else {
320             return Cfn::Resource::Properties::AWS::DynamoDB::Table::AttributeDefinitionValue->new( %$_ );
321             }
322             };
323              
324             package Cfn::Resource::Properties::AWS::DynamoDB::Table::AttributeDefinitionValue {
325 4     4   14426 use Moose;
  4         14  
  4         25  
326 4     4   26429 use MooseX::StrictConstructor;
  4         14  
  4         24  
327             extends 'Cfn::Value::TypedValue';
328            
329             has AttributeName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
330             has AttributeType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
331             }
332              
333             package Cfn::Resource::Properties::AWS::DynamoDB::Table {
334 4     4   13308 use Moose;
  4         16  
  4         21  
335 4     4   26847 use MooseX::StrictConstructor;
  4         13  
  4         24  
336             extends 'Cfn::Resource::Properties';
337            
338             has AttributeDefinitions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::AttributeDefinition', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Conditional');
339             has BillingMode => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
340             has GlobalSecondaryIndexes => (isa => 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::GlobalSecondaryIndex', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
341             has KeySchema => (isa => 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::KeySchema', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
342             has LocalSecondaryIndexes => (isa => 'ArrayOfCfn::Resource::Properties::AWS::DynamoDB::Table::LocalSecondaryIndex', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
343             has PointInTimeRecoverySpecification => (isa => 'Cfn::Resource::Properties::AWS::DynamoDB::Table::PointInTimeRecoverySpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
344             has ProvisionedThroughput => (isa => 'Cfn::Resource::Properties::AWS::DynamoDB::Table::ProvisionedThroughput', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
345             has SSESpecification => (isa => 'Cfn::Resource::Properties::AWS::DynamoDB::Table::SSESpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Conditional');
346             has StreamSpecification => (isa => 'Cfn::Resource::Properties::AWS::DynamoDB::Table::StreamSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
347             has TableName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
348             has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
349             has TimeToLiveSpecification => (isa => 'Cfn::Resource::Properties::AWS::DynamoDB::Table::TimeToLiveSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
350             }
351              
352             1;