| 1 | |||
| 2 | package Paws::DynamoDB::BatchGetItem; | ||
| 3 | 2 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 2 | has RequestItems => (is => 'ro', isa => 'Paws::DynamoDB::BatchGetRequestMap', required => 1); | |
| 5 | 2 | has ReturnConsumedCapacity => (is => 'ro', isa => 'Str'); | |
| 6 | |||
| 7 | 2 | ▶ | use MooseX::ClassAttribute; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 2 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'BatchGetItem'); | |
| 10 | 2 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::DynamoDB::BatchGetItemOutput'); | |
| 11 | 2 | class_has _result_key => (isa => 'Str', is => 'ro'); | |
| 12 | 2 | 1; | |
| 13 | |||
| 14 | ### main pod documentation begin ### | ||
| 15 | |||
| 16 | =head1 NAME | ||
| 17 | |||
| 18 | Paws::DynamoDB::BatchGetItem - Arguments for method BatchGetItem on L<Paws::DynamoDB> | ||
| 19 | |||
| 20 | =head1 DESCRIPTION | ||
| 21 | |||
| 22 | This class represents the parameters used for calling the method BatchGetItem on the | ||
| 23 | L<Amazon DynamoDB|Paws::DynamoDB> service. Use the attributes of this class | ||
| 24 | as arguments to method BatchGetItem. | ||
| 25 | |||
| 26 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to BatchGetItem. | ||
| 27 | |||
| 28 | =head1 SYNOPSIS | ||
| 29 | |||
| 30 | my $dynamodb = Paws->service('DynamoDB'); | ||
| 31 | # To retrieve multiple items from a table | ||
| 32 | # This example reads multiple items from the Music table using a batch of three | ||
| 33 | # GetItem requests. Only the AlbumTitle attribute is returned. | ||
| 34 | my $BatchGetItemOutput = $dynamodb->BatchGetItem( | ||
| 35 | 'RequestItems' => { | ||
| 36 | 'Music' => { | ||
| 37 | 'Keys' => [ | ||
| 38 | |||
| 39 | { | ||
| 40 | 'Artist' => { | ||
| 41 | 'S' => 'No One You Know' | ||
| 42 | }, | ||
| 43 | 'SongTitle' => { | ||
| 44 | 'S' => 'Call Me Today' | ||
| 45 | } | ||
| 46 | }, | ||
| 47 | |||
| 48 | { | ||
| 49 | 'Artist' => { | ||
| 50 | 'S' => 'Acme Band' | ||
| 51 | }, | ||
| 52 | 'SongTitle' => { | ||
| 53 | 'S' => 'Happy Day' | ||
| 54 | } | ||
| 55 | }, | ||
| 56 | |||
| 57 | { | ||
| 58 | 'Artist' => { | ||
| 59 | 'S' => 'No One You Know' | ||
| 60 | }, | ||
| 61 | 'SongTitle' => { | ||
| 62 | 'S' => 'Scared of My Shadow' | ||
| 63 | } | ||
| 64 | } | ||
| 65 | ], | ||
| 66 | 'ProjectionExpression' => 'AlbumTitle' | ||
| 67 | } | ||
| 68 | } | ||
| 69 | ); | ||
| 70 | |||
| 71 | # Results: | ||
| 72 | my $Responses = $BatchGetItemOutput->Responses; | ||
| 73 | |||
| 74 | # Returns a L<Paws::DynamoDB::BatchGetItemOutput> object. | ||
| 75 | |||
| 76 | 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. | ||
| 77 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/dynamodb/BatchGetItem> | ||
| 78 | |||
| 79 | =head1 ATTRIBUTES | ||
| 80 | |||
| 81 | |||
| 82 | =head2 B<REQUIRED> RequestItems => L<Paws::DynamoDB::BatchGetRequestMap> | ||
| 83 | |||
| 84 | A map of one or more table names and, for each table, a map that | ||
| 85 | describes one or more items to retrieve from that table. Each table | ||
| 86 | name can be used only once per C<BatchGetItem> request. | ||
| 87 | |||
| 88 | Each element in the map of items to retrieve consists of the following: | ||
| 89 | |||
| 90 | =over | ||
| 91 | |||
| 92 | =item * | ||
| 93 | |||
| 94 | C<ConsistentRead> - If C<true>, a strongly consistent read is used; if | ||
| 95 | C<false> (the default), an eventually consistent read is used. | ||
| 96 | |||
| 97 | =item * | ||
| 98 | |||
| 99 | C<ExpressionAttributeNames> - One or more substitution tokens for | ||
| 100 | attribute names in the C<ProjectionExpression> parameter. The following | ||
| 101 | are some use cases for using C<ExpressionAttributeNames>: | ||
| 102 | |||
| 103 | =over | ||
| 104 | |||
| 105 | =item * | ||
| 106 | |||
| 107 | To access an attribute whose name conflicts with a DynamoDB reserved | ||
| 108 | word. | ||
| 109 | |||
| 110 | =item * | ||
| 111 | |||
| 112 | To create a placeholder for repeating occurrences of an attribute name | ||
| 113 | in an expression. | ||
| 114 | |||
| 115 | =item * | ||
| 116 | |||
| 117 | To prevent special characters in an attribute name from being | ||
| 118 | misinterpreted in an expression. | ||
| 119 | |||
| 120 | =back | ||
| 121 | |||
| 122 | Use the B<#> character in an expression to dereference an attribute | ||
| 123 | name. For example, consider the following attribute name: | ||
| 124 | |||
| 125 | =over | ||
| 126 | |||
| 127 | =item * | ||
| 128 | |||
| 129 | C<Percentile> | ||
| 130 | |||
| 131 | =back | ||
| 132 | |||
| 133 | The name of this attribute conflicts with a reserved word, so it cannot | ||
| 134 | be used directly in an expression. (For the complete list of reserved | ||
| 135 | words, see Reserved Words | ||
| 136 | (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ReservedWords.html) | ||
| 137 | in the I<Amazon DynamoDB Developer Guide>). To work around this, you | ||
| 138 | could specify the following for C<ExpressionAttributeNames>: | ||
| 139 | |||
| 140 | =over | ||
| 141 | |||
| 142 | =item * | ||
| 143 | |||
| 144 | C<{"#P":"Percentile"}> | ||
| 145 | |||
| 146 | =back | ||
| 147 | |||
| 148 | You could then use this substitution in an expression, as in this | ||
| 149 | example: | ||
| 150 | |||
| 151 | =over | ||
| 152 | |||
| 153 | =item * | ||
| 154 | |||
| 155 | C<#P = :val> | ||
| 156 | |||
| 157 | =back | ||
| 158 | |||
| 159 | Tokens that begin with the B<:> character are I<expression attribute | ||
| 160 | values>, which are placeholders for the actual value at runtime. | ||
| 161 | |||
| 162 | For more information about expression attribute names, see Accessing | ||
| 163 | Item Attributes | ||
| 164 | (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) | ||
| 165 | in the I<Amazon DynamoDB Developer Guide>. | ||
| 166 | |||
| 167 | =item * | ||
| 168 | |||
| 169 | C<Keys> - An array of primary key attribute values that define specific | ||
| 170 | items in the table. For each primary key, you must provide I<all> of | ||
| 171 | the key attributes. For example, with a simple primary key, you only | ||
| 172 | need to provide the partition key value. For a composite key, you must | ||
| 173 | provide I<both> the partition key value and the sort key value. | ||
| 174 | |||
| 175 | =item * | ||
| 176 | |||
| 177 | C<ProjectionExpression> - A string that identifies one or more | ||
| 178 | attributes to retrieve from the table. These attributes can include | ||
| 179 | scalars, sets, or elements of a JSON document. The attributes in the | ||
| 180 | expression must be separated by commas. | ||
| 181 | |||
| 182 | If no attribute names are specified, then all attributes are returned. | ||
| 183 | If any of the requested attributes are not found, they do not appear in | ||
| 184 | the result. | ||
| 185 | |||
| 186 | For more information, see Accessing Item Attributes | ||
| 187 | (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.AccessingItemAttributes.html) | ||
| 188 | in the I<Amazon DynamoDB Developer Guide>. | ||
| 189 | |||
| 190 | =item * | ||
| 191 | |||
| 192 | C<AttributesToGet> - This is a legacy parameter. Use | ||
| 193 | C<ProjectionExpression> instead. For more information, see | ||
| 194 | AttributesToGet | ||
| 195 | (https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.AttributesToGet.html) | ||
| 196 | in the I<Amazon DynamoDB Developer Guide>. | ||
| 197 | |||
| 198 | =back | ||
| 199 | |||
| 200 | |||
| 201 | |||
| 202 | |||
| 203 | =head2 ReturnConsumedCapacity => Str | ||
| 204 | |||
| 205 | |||
| 206 | |||
| 207 | Valid values are: C<"INDEXES">, C<"TOTAL">, C<"NONE"> | ||
| 208 | |||
| 209 | |||
| 210 | =head1 SEE ALSO | ||
| 211 | |||
| 212 | This class forms part of L<Paws>, documenting arguments for method BatchGetItem in L<Paws::DynamoDB> | ||
| 213 | |||
| 214 | =head1 BUGS and CONTRIBUTIONS | ||
| 215 | |||
| 216 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 217 | |||
| 218 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 219 | |||
| 220 | =cut | ||
| 221 | |||