blib/lib/Paws/DynamoDB/CreateTable.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 22 / 22 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Paws/DynamoDB/ConsumedCapacity.pm ↑ Summary blib/lib/Paws/DynamoDB/CreateTableOutput.pm »
1  
2 package Paws::DynamoDB::CreateTable;
3 1 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 has AttributeDefinitions => (is => 'ro', isa => 'ArrayRef[Paws::DynamoDB::AttributeDefinition]', required => 1);
5 1 has BillingMode => (is => 'ro', isa => 'Str');
6 1 has GlobalSecondaryIndexes => (is => 'ro', isa => 'ArrayRef[Paws::DynamoDB::GlobalSecondaryIndex]');
7 1 has KeySchema => (is => 'ro', isa => 'ArrayRef[Paws::DynamoDB::KeySchemaElement]', required => 1);
8 1 has LocalSecondaryIndexes => (is => 'ro', isa => 'ArrayRef[Paws::DynamoDB::LocalSecondaryIndex]');
9 1 has ProvisionedThroughput => (is => 'ro', isa => 'Paws::DynamoDB::ProvisionedThroughput');
10 1 has SSESpecification => (is => 'ro', isa => 'Paws::DynamoDB::SSESpecification');
11 1 has StreamSpecification => (is => 'ro', isa => 'Paws::DynamoDB::StreamSpecification');
12 1 has TableName => (is => 'ro', isa => 'Str', required => 1);
13 1 has Tags => (is => 'ro', isa => 'ArrayRef[Paws::DynamoDB::Tag]');
14  
15 1 ▶ use MooseX::ClassAttribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 1 class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateTable');
18 1 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::DynamoDB::CreateTableOutput');
19 1 class_has _result_key => (isa => 'Str', is => 'ro');
20 1 1;
21  
22 ### main pod documentation begin ###
23  
24 =head1 NAME
25  
26 Paws::DynamoDB::CreateTable - Arguments for method CreateTable on L<Paws::DynamoDB>
27  
28 =head1 DESCRIPTION
29  
30 This class represents the parameters used for calling the method CreateTable on the
31 L<Amazon DynamoDB|Paws::DynamoDB> service. Use the attributes of this class
32 as arguments to method CreateTable.
33  
34 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateTable.
35  
36 =head1 SYNOPSIS
37  
38 my $dynamodb = Paws->service('DynamoDB');
39 # To create a table
40 # This example creates a table named Music.
41 my $CreateTableOutput = $dynamodb->CreateTable(
42 'AttributeDefinitions' => [
43  
44 {
45 'AttributeName' => 'Artist',
46 'AttributeType' => 'S'
47 },
48  
49 {
50 'AttributeName' => 'SongTitle',
51 'AttributeType' => 'S'
52 }
53 ],
54 'KeySchema' => [
55  
56 {
57 'AttributeName' => 'Artist',
58 'KeyType' => 'HASH'
59 },
60  
61 {
62 'AttributeName' => 'SongTitle',
63 'KeyType' => 'RANGE'
64 }
65 ],
66 'ProvisionedThroughput' => {
67 'ReadCapacityUnits' => 5,
68 'WriteCapacityUnits' => 5
69 },
70 'TableName' => 'Music'
71 );
72  
73 # Results:
74 my $TableDescription = $CreateTableOutput->TableDescription;
75  
76 # Returns a L<Paws::DynamoDB::CreateTableOutput> object.
77  
78 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.
79 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/dynamodb/CreateTable>
80  
81 =head1 ATTRIBUTES
82  
83  
84 =head2 B<REQUIRED> AttributeDefinitions => ArrayRef[L<Paws::DynamoDB::AttributeDefinition>]
85  
86 An array of attributes that describe the key schema for the table and
87 indexes.
88  
89  
90  
91 =head2 BillingMode => Str
92  
93 Controls how you are charged for read and write throughput and how you
94 manage capacity. This setting can be changed later.
95  
96 =over
97  
98 =item *
99  
100 C<PROVISIONED> - We recommend using C<PROVISIONED> for predictable
101 workloads. C<PROVISIONED> sets the billing mode to Provisioned Mode
102 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.ProvisionedThroughput.Manual).
103  
104 =item *
105  
106 C<PAY_PER_REQUEST> - We recommend using C<PAY_PER_REQUEST> for
107 unpredictable workloads. C<PAY_PER_REQUEST> sets the billing mode to
108 On-Demand Mode
109 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.ReadWriteCapacityMode.html#HowItWorks.OnDemand).
110  
111 =back
112  
113  
114 Valid values are: C<"PROVISIONED">, C<"PAY_PER_REQUEST">
115  
116 =head2 GlobalSecondaryIndexes => ArrayRef[L<Paws::DynamoDB::GlobalSecondaryIndex>]
117  
118 One or more global secondary indexes (the maximum is 20) to be created
119 on the table. Each global secondary index in the array includes the
120 following:
121  
122 =over
123  
124 =item *
125  
126 C<IndexName> - The name of the global secondary index. Must be unique
127 only for this table.
128  
129 =item *
130  
131 C<KeySchema> - Specifies the key schema for the global secondary index.
132  
133 =item *
134  
135 C<Projection> - Specifies attributes that are copied (projected) from
136 the table into the index. These are in addition to the primary key
137 attributes and index key attributes, which are automatically projected.
138 Each attribute specification is composed of:
139  
140 =over
141  
142 =item *
143  
144 C<ProjectionType> - One of the following:
145  
146 =over
147  
148 =item *
149  
150 C<KEYS_ONLY> - Only the index and primary keys are projected into the
151 index.
152  
153 =item *
154  
155 C<INCLUDE> - Only the specified table attributes are projected into the
156 index. The list of projected attributes is in C<NonKeyAttributes>.
157  
158 =item *
159  
160 C<ALL> - All of the table attributes are projected into the index.
161  
162 =back
163  
164 =item *
165  
166 C<NonKeyAttributes> - A list of one or more non-key attribute names
167 that are projected into the secondary index. The total count of
168 attributes provided in C<NonKeyAttributes>, summed across all of the
169 secondary indexes, must not exceed 100. If you project the same
170 attribute into two different indexes, this counts as two distinct
171 attributes when determining the total.
172  
173 =back
174  
175 =item *
176  
177 C<ProvisionedThroughput> - The provisioned throughput settings for the
178 global secondary index, consisting of read and write capacity units.
179  
180 =back
181  
182  
183  
184  
185 =head2 B<REQUIRED> KeySchema => ArrayRef[L<Paws::DynamoDB::KeySchemaElement>]
186  
187 Specifies the attributes that make up the primary key for a table or an
188 index. The attributes in C<KeySchema> must also be defined in the
189 C<AttributeDefinitions> array. For more information, see Data Model
190 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DataModel.html)
191 in the I<Amazon DynamoDB Developer Guide>.
192  
193 Each C<KeySchemaElement> in the array is composed of:
194  
195 =over
196  
197 =item *
198  
199 C<AttributeName> - The name of this key attribute.
200  
201 =item *
202  
203 C<KeyType> - The role that the key attribute will assume:
204  
205 =over
206  
207 =item *
208  
209 C<HASH> - partition key
210  
211 =item *
212  
213 C<RANGE> - sort key
214  
215 =back
216  
217 =back
218  
219 The partition key of an item is also known as its I<hash attribute>.
220 The term "hash attribute" derives from the DynamoDB usage of an
221 internal hash function to evenly distribute data items across
222 partitions, based on their partition key values.
223  
224 The sort key of an item is also known as its I<range attribute>. The
225 term "range attribute" derives from the way DynamoDB stores items with
226 the same partition key physically close together, in sorted order by
227 the sort key value.
228  
229 For a simple primary key (partition key), you must provide exactly one
230 element with a C<KeyType> of C<HASH>.
231  
232 For a composite primary key (partition key and sort key), you must
233 provide exactly two elements, in this order: The first element must
234 have a C<KeyType> of C<HASH>, and the second element must have a
235 C<KeyType> of C<RANGE>.
236  
237 For more information, see Working with Tables
238 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.html#WorkingWithTables.primary.key)
239 in the I<Amazon DynamoDB Developer Guide>.
240  
241  
242  
243 =head2 LocalSecondaryIndexes => ArrayRef[L<Paws::DynamoDB::LocalSecondaryIndex>]
244  
245 One or more local secondary indexes (the maximum is 5) to be created on
246 the table. Each index is scoped to a given partition key value. There
247 is a 10 GB size limit per partition key value; otherwise, the size of a
248 local secondary index is unconstrained.
249  
250 Each local secondary index in the array includes the following:
251  
252 =over
253  
254 =item *
255  
256 C<IndexName> - The name of the local secondary index. Must be unique
257 only for this table.
258  
259 =item *
260  
261 C<KeySchema> - Specifies the key schema for the local secondary index.
262 The key schema must begin with the same partition key as the table.
263  
264 =item *
265  
266 C<Projection> - Specifies attributes that are copied (projected) from
267 the table into the index. These are in addition to the primary key
268 attributes and index key attributes, which are automatically projected.
269 Each attribute specification is composed of:
270  
271 =over
272  
273 =item *
274  
275 C<ProjectionType> - One of the following:
276  
277 =over
278  
279 =item *
280  
281 C<KEYS_ONLY> - Only the index and primary keys are projected into the
282 index.
283  
284 =item *
285  
286 C<INCLUDE> - Only the specified table attributes are projected into the
287 index. The list of projected attributes is in C<NonKeyAttributes>.
288  
289 =item *
290  
291 C<ALL> - All of the table attributes are projected into the index.
292  
293 =back
294  
295 =item *
296  
297 C<NonKeyAttributes> - A list of one or more non-key attribute names
298 that are projected into the secondary index. The total count of
299 attributes provided in C<NonKeyAttributes>, summed across all of the
300 secondary indexes, must not exceed 100. If you project the same
301 attribute into two different indexes, this counts as two distinct
302 attributes when determining the total.
303  
304 =back
305  
306 =back
307  
308  
309  
310  
311 =head2 ProvisionedThroughput => L<Paws::DynamoDB::ProvisionedThroughput>
312  
313 Represents the provisioned throughput settings for a specified table or
314 index. The settings can be modified using the C<UpdateTable> operation.
315  
316 If you set BillingMode as C<PROVISIONED>, you must specify this
317 property. If you set BillingMode as C<PAY_PER_REQUEST>, you cannot
318 specify this property.
319  
320 For current minimum and maximum provisioned throughput values, see
321 Service, Account, and Table Quotas
322 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html)
323 in the I<Amazon DynamoDB Developer Guide>.
324  
325  
326  
327 =head2 SSESpecification => L<Paws::DynamoDB::SSESpecification>
328  
329 Represents the settings used to enable server-side encryption.
330  
331  
332  
333 =head2 StreamSpecification => L<Paws::DynamoDB::StreamSpecification>
334  
335 The settings for DynamoDB Streams on the table. These settings consist
336 of:
337  
338 =over
339  
340 =item *
341  
342 C<StreamEnabled> - Indicates whether DynamoDB Streams is to be enabled
343 (true) or disabled (false).
344  
345 =item *
346  
347 C<StreamViewType> - When an item in the table is modified,
348 C<StreamViewType> determines what information is written to the table's
349 stream. Valid values for C<StreamViewType> are:
350  
351 =over
352  
353 =item *
354  
355 C<KEYS_ONLY> - Only the key attributes of the modified item are written
356 to the stream.
357  
358 =item *
359  
360 C<NEW_IMAGE> - The entire item, as it appears after it was modified, is
361 written to the stream.
362  
363 =item *
364  
365 C<OLD_IMAGE> - The entire item, as it appeared before it was modified,
366 is written to the stream.
367  
368 =item *
369  
370 C<NEW_AND_OLD_IMAGES> - Both the new and the old item images of the
371 item are written to the stream.
372  
373 =back
374  
375 =back
376  
377  
378  
379  
380 =head2 B<REQUIRED> TableName => Str
381  
382 The name of the table to create.
383  
384  
385  
386 =head2 Tags => ArrayRef[L<Paws::DynamoDB::Tag>]
387  
388 A list of key-value pairs to label the table. For more information, see
389 Tagging for DynamoDB
390 (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tagging.html).
391  
392  
393  
394  
395 =head1 SEE ALSO
396  
397 This class forms part of L<Paws>, documenting arguments for method CreateTable in L<Paws::DynamoDB>
398  
399 =head1 BUGS and CONTRIBUTIONS
400  
401 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
402  
403 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
404  
405 =cut
406  
« blib/lib/Paws/DynamoDB/ConsumedCapacity.pm ↑ Summary blib/lib/Paws/DynamoDB/CreateTableOutput.pm »