« blib/lib/Paws/DynamoDB/TransactWriteItem.pm
↑ Summary
blib/lib/Paws/DynamoDB/TransactWriteItemsOutput.pm »
| 1 | |||
| 2 | package Paws::DynamoDB::TransactWriteItems; | ||
| 3 | use Moose; | ||
| 4 | has ClientRequestToken => (is => 'ro', isa => 'Str'); | ||
| 5 | has ReturnConsumedCapacity => (is => 'ro', isa => 'Str'); | ||
| 6 | has ReturnItemCollectionMetrics => (is => 'ro', isa => 'Str'); | ||
| 7 | has TransactItems => (is => 'ro', isa => 'ArrayRef[Paws::DynamoDB::TransactWriteItem]', required => 1); | ||
| 8 | |||
| 9 | use MooseX::ClassAttribute; | ||
| 10 | |||
| 11 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'TransactWriteItems'); | ||
| 12 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::DynamoDB::TransactWriteItemsOutput'); | ||
| 13 | class_has _result_key => (isa => 'Str', is => 'ro'); | ||
| 14 | 1; | ||
| 15 | |||
| 16 | ### main pod documentation begin ### | ||
| 17 | |||
| 18 | =head1 NAME | ||
| 19 | |||
| 20 | Paws::DynamoDB::TransactWriteItems - Arguments for method TransactWriteItems on L<Paws::DynamoDB> | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | This class represents the parameters used for calling the method TransactWriteItems on the | ||
| 25 | L<Amazon DynamoDB|Paws::DynamoDB> service. Use the attributes of this class | ||
| 26 | as arguments to method TransactWriteItems. | ||
| 27 | |||
| 28 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to TransactWriteItems. | ||
| 29 | |||
| 30 | =head1 SYNOPSIS | ||
| 31 | |||
| 32 | my $dynamodb = Paws->service('DynamoDB'); | ||
| 33 | my $TransactWriteItemsOutput = $dynamodb->TransactWriteItems( | ||
| 34 | TransactItems => [ | ||
| 35 | { | ||
| 36 | ConditionCheck => { | ||
| 37 | ConditionExpression => 'MyConditionExpression', | ||
| 38 | Key => { | ||
| 39 | 'MyAttributeName' => { | ||
| 40 | B => 'BlobBinaryAttributeValue', # OPTIONAL | ||
| 41 | BOOL => 1, # OPTIONAL | ||
| 42 | BS => [ | ||
| 43 | 'BlobBinaryAttributeValue', ... # OPTIONAL | ||
| 44 | ], # OPTIONAL | ||
| 45 | L => [ <AttributeValue>, ... ], # OPTIONAL | ||
| 46 | M => { | ||
| 47 | 'MyAttributeName' => <AttributeValue>, # key: max: 65535 | ||
| 48 | }, # OPTIONAL | ||
| 49 | N => 'MyNumberAttributeValue', # OPTIONAL | ||
| 50 | NS => [ | ||
| 51 | 'MyNumberAttributeValue', ... # OPTIONAL | ||
| 52 | ], # OPTIONAL | ||
| 53 | NULL => 1, # OPTIONAL | ||
| 54 | S => 'MyStringAttributeValue', # OPTIONAL | ||
| 55 | SS => [ | ||
| 56 | 'MyStringAttributeValue', ... # OPTIONAL | ||
| 57 | ], # OPTIONAL | ||
| 58 | }, # key: max: 65535 | ||
| 59 | }, | ||
| 60 | TableName => 'MyTableName', # min: 3, max: 255 | ||
| 61 | ExpressionAttributeNames => { | ||
| 62 | 'MyExpressionAttributeNameVariable' => | ||
| 63 | 'MyAttributeName', # , value: max: 65535 | ||
| 64 | }, # OPTIONAL | ||
| 65 | ExpressionAttributeValues => { | ||
| 66 | 'MyExpressionAttributeValueVariable' => { | ||
| 67 | B => 'BlobBinaryAttributeValue', # OPTIONAL | ||
| 68 | BOOL => 1, # OPTIONAL | ||
| 69 | BS => [ | ||
| 70 | 'BlobBinaryAttributeValue', ... # OPTIONAL | ||
| 71 | ], # OPTIONAL | ||
| 72 | L => [ <AttributeValue>, ... ], # OPTIONAL | ||
| 73 | M => { | ||
| 74 | 'MyAttributeName' => <AttributeValue>, # key: max: 65535 | ||
| 75 | }, # OPTIONAL | ||
| 76 | N => 'MyNumberAttributeValue', # OPTIONAL | ||
| 77 | NS => [ | ||
| 78 | 'MyNumberAttributeValue', ... # OPTIONAL | ||
| 79 | ], # OPTIONAL | ||
| 80 | NULL => 1, # OPTIONAL | ||
| 81 | S => 'MyStringAttributeValue', # OPTIONAL | ||
| 82 | SS => [ | ||
| 83 | 'MyStringAttributeValue', ... # OPTIONAL | ||
| 84 | ], # OPTIONAL | ||
| 85 | }, | ||
| 86 | }, # OPTIONAL | ||
| 87 | ReturnValuesOnConditionCheckFailure => | ||
| 88 | 'ALL_OLD', # values: ALL_OLD, NONE; OPTIONAL | ||
| 89 | }, # OPTIONAL | ||
| 90 | Delete => { | ||
| 91 | Key => { | ||
| 92 | 'MyAttributeName' => { | ||
| 93 | B => 'BlobBinaryAttributeValue', # OPTIONAL | ||
| 94 | BOOL => 1, # OPTIONAL | ||
| 95 | BS => [ | ||
| 96 | 'BlobBinaryAttributeValue', ... # OPTIONAL | ||
| 97 | ], # OPTIONAL | ||
| 98 | L => [ <AttributeValue>, ... ], # OPTIONAL | ||
| 99 | M => { | ||
| 100 | 'MyAttributeName' => <AttributeValue>, # key: max: 65535 | ||
| 101 | }, # OPTIONAL | ||
| 102 | N => 'MyNumberAttributeValue', # OPTIONAL | ||
| 103 | NS => [ | ||
| 104 | 'MyNumberAttributeValue', ... # OPTIONAL | ||
| 105 | ], # OPTIONAL | ||
| 106 | NULL => 1, # OPTIONAL | ||
| 107 | S => 'MyStringAttributeValue', # OPTIONAL | ||
| 108 | SS => [ | ||
| 109 | 'MyStringAttributeValue', ... # OPTIONAL | ||
| 110 | ], # OPTIONAL | ||
| 111 | }, # key: max: 65535 | ||
| 112 | }, | ||
| 113 | TableName => 'MyTableName', # min: 3, max: 255 | ||
| 114 | ConditionExpression => 'MyConditionExpression', | ||
| 115 | ExpressionAttributeNames => { | ||
| 116 | 'MyExpressionAttributeNameVariable' => | ||
| 117 | 'MyAttributeName', # , value: max: 65535 | ||
| 118 | }, # OPTIONAL | ||
| 119 | ExpressionAttributeValues => { | ||
| 120 | 'MyExpressionAttributeValueVariable' => { | ||
| 121 | B => 'BlobBinaryAttributeValue', # OPTIONAL | ||
| 122 | BOOL => 1, # OPTIONAL | ||
| 123 | BS => [ | ||
| 124 | 'BlobBinaryAttributeValue', ... # OPTIONAL | ||
| 125 | ], # OPTIONAL | ||
| 126 | L => [ <AttributeValue>, ... ], # OPTIONAL | ||
| 127 | M => { | ||
| 128 | 'MyAttributeName' => <AttributeValue>, # key: max: 65535 | ||
| 129 | }, # OPTIONAL | ||
| 130 | N => 'MyNumberAttributeValue', # OPTIONAL | ||
| 131 | NS => [ | ||
| 132 | 'MyNumberAttributeValue', ... # OPTIONAL | ||
| 133 | ], # OPTIONAL | ||
| 134 | NULL => 1, # OPTIONAL | ||
| 135 | S => 'MyStringAttributeValue', # OPTIONAL | ||
| 136 | SS => [ | ||
| 137 | 'MyStringAttributeValue', ... # OPTIONAL | ||
| 138 | ], # OPTIONAL | ||
| 139 | }, | ||
| 140 | }, # OPTIONAL | ||
| 141 | ReturnValuesOnConditionCheckFailure => | ||
| 142 | 'ALL_OLD', # values: ALL_OLD, NONE; OPTIONAL | ||
| 143 | }, # OPTIONAL | ||
| 144 | Put => { | ||
| 145 | Item => { | ||
| 146 | 'MyAttributeName' => { | ||
| 147 | B => 'BlobBinaryAttributeValue', # OPTIONAL | ||
| 148 | BOOL => 1, # OPTIONAL | ||
| 149 | BS => [ | ||
| 150 | 'BlobBinaryAttributeValue', ... # OPTIONAL | ||
| 151 | ], # OPTIONAL | ||
| 152 | L => [ <AttributeValue>, ... ], # OPTIONAL | ||
| 153 | M => { | ||
| 154 | 'MyAttributeName' => <AttributeValue>, # key: max: 65535 | ||
| 155 | }, # OPTIONAL | ||
| 156 | N => 'MyNumberAttributeValue', # OPTIONAL | ||
| 157 | NS => [ | ||
| 158 | 'MyNumberAttributeValue', ... # OPTIONAL | ||
| 159 | ], # OPTIONAL | ||
| 160 | NULL => 1, # OPTIONAL | ||
| 161 | S => 'MyStringAttributeValue', # OPTIONAL | ||
| 162 | SS => [ | ||
| 163 | 'MyStringAttributeValue', ... # OPTIONAL | ||
| 164 | ], # OPTIONAL | ||
| 165 | }, # key: max: 65535 | ||
| 166 | }, | ||
| 167 | TableName => 'MyTableName', # min: 3, max: 255 | ||
| 168 | ConditionExpression => 'MyConditionExpression', | ||
| 169 | ExpressionAttributeNames => { | ||
| 170 | 'MyExpressionAttributeNameVariable' => | ||
| 171 | 'MyAttributeName', # , value: max: 65535 | ||
| 172 | }, # OPTIONAL | ||
| 173 | ExpressionAttributeValues => { | ||
| 174 | 'MyExpressionAttributeValueVariable' => { | ||
| 175 | B => 'BlobBinaryAttributeValue', # OPTIONAL | ||
| 176 | BOOL => 1, # OPTIONAL | ||
| 177 | BS => [ | ||
| 178 | 'BlobBinaryAttributeValue', ... # OPTIONAL | ||
| 179 | ], # OPTIONAL | ||
| 180 | L => [ <AttributeValue>, ... ], # OPTIONAL | ||
| 181 | M => { | ||
| 182 | 'MyAttributeName' => <AttributeValue>, # key: max: 65535 | ||
| 183 | }, # OPTIONAL | ||
| 184 | N => 'MyNumberAttributeValue', # OPTIONAL | ||
| 185 | NS => [ | ||
| 186 | 'MyNumberAttributeValue', ... # OPTIONAL | ||
| 187 | ], # OPTIONAL | ||
| 188 | NULL => 1, # OPTIONAL | ||
| 189 | S => 'MyStringAttributeValue', # OPTIONAL | ||
| 190 | SS => [ | ||
| 191 | 'MyStringAttributeValue', ... # OPTIONAL | ||
| 192 | ], # OPTIONAL | ||
| 193 | }, | ||
| 194 | }, # OPTIONAL | ||
| 195 | ReturnValuesOnConditionCheckFailure => | ||
| 196 | 'ALL_OLD', # values: ALL_OLD, NONE; OPTIONAL | ||
| 197 | }, # OPTIONAL | ||
| 198 | Update => { | ||
| 199 | Key => { | ||
| 200 | 'MyAttributeName' => { | ||
| 201 | B => 'BlobBinaryAttributeValue', # OPTIONAL | ||
| 202 | BOOL => 1, # OPTIONAL | ||
| 203 | BS => [ | ||
| 204 | 'BlobBinaryAttributeValue', ... # OPTIONAL | ||
| 205 | ], # OPTIONAL | ||
| 206 | L => [ <AttributeValue>, ... ], # OPTIONAL | ||
| 207 | M => { | ||
| 208 | 'MyAttributeName' => <AttributeValue>, # key: max: 65535 | ||
| 209 | }, # OPTIONAL | ||
| 210 | N => 'MyNumberAttributeValue', # OPTIONAL | ||
| 211 | NS => [ | ||
| 212 | 'MyNumberAttributeValue', ... # OPTIONAL | ||
| 213 | ], # OPTIONAL | ||
| 214 | NULL => 1, # OPTIONAL | ||
| 215 | S => 'MyStringAttributeValue', # OPTIONAL | ||
| 216 | SS => [ | ||
| 217 | 'MyStringAttributeValue', ... # OPTIONAL | ||
| 218 | ], # OPTIONAL | ||
| 219 | }, # key: max: 65535 | ||
| 220 | }, | ||
| 221 | TableName => 'MyTableName', # min: 3, max: 255 | ||
| 222 | UpdateExpression => 'MyUpdateExpression', | ||
| 223 | ConditionExpression => 'MyConditionExpression', | ||
| 224 | ExpressionAttributeNames => { | ||
| 225 | 'MyExpressionAttributeNameVariable' => | ||
| 226 | 'MyAttributeName', # , value: max: 65535 | ||
| 227 | }, # OPTIONAL | ||
| 228 | ExpressionAttributeValues => { | ||
| 229 | 'MyExpressionAttributeValueVariable' => { | ||
| 230 | B => 'BlobBinaryAttributeValue', # OPTIONAL | ||
| 231 | BOOL => 1, # OPTIONAL | ||
| 232 | BS => [ | ||
| 233 | 'BlobBinaryAttributeValue', ... # OPTIONAL | ||
| 234 | ], # OPTIONAL | ||
| 235 | L => [ <AttributeValue>, ... ], # OPTIONAL | ||
| 236 | M => { | ||
| 237 | 'MyAttributeName' => <AttributeValue>, # key: max: 65535 | ||
| 238 | }, # OPTIONAL | ||
| 239 | N => 'MyNumberAttributeValue', # OPTIONAL | ||
| 240 | NS => [ | ||
| 241 | 'MyNumberAttributeValue', ... # OPTIONAL | ||
| 242 | ], # OPTIONAL | ||
| 243 | NULL => 1, # OPTIONAL | ||
| 244 | S => 'MyStringAttributeValue', # OPTIONAL | ||
| 245 | SS => [ | ||
| 246 | 'MyStringAttributeValue', ... # OPTIONAL | ||
| 247 | ], # OPTIONAL | ||
| 248 | }, | ||
| 249 | }, # OPTIONAL | ||
| 250 | ReturnValuesOnConditionCheckFailure => | ||
| 251 | 'ALL_OLD', # values: ALL_OLD, NONE; OPTIONAL | ||
| 252 | }, # OPTIONAL | ||
| 253 | }, | ||
| 254 | ... | ||
| 255 | ], | ||
| 256 | ClientRequestToken => 'MyClientRequestToken', # OPTIONAL | ||
| 257 | ReturnConsumedCapacity => 'INDEXES', # OPTIONAL | ||
| 258 | ReturnItemCollectionMetrics => 'SIZE', # OPTIONAL | ||
| 259 | ); | ||
| 260 | |||
| 261 | # Results: | ||
| 262 | my $ConsumedCapacity = $TransactWriteItemsOutput->ConsumedCapacity; | ||
| 263 | my $ItemCollectionMetrics = | ||
| 264 | $TransactWriteItemsOutput->ItemCollectionMetrics; | ||
| 265 | |||
| 266 | # Returns a L<Paws::DynamoDB::TransactWriteItemsOutput> object. | ||
| 267 | |||
| 268 | 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. | ||
| 269 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/dynamodb/TransactWriteItems> | ||
| 270 | |||
| 271 | =head1 ATTRIBUTES | ||
| 272 | |||
| 273 | |||
| 274 | =head2 ClientRequestToken => Str | ||
| 275 | |||
| 276 | Providing a C<ClientRequestToken> makes the call to | ||
| 277 | C<TransactWriteItems> idempotent, meaning that multiple identical calls | ||
| 278 | have the same effect as one single call. | ||
| 279 | |||
| 280 | Although multiple identical calls using the same client request token | ||
| 281 | produce the same result on the server (no side effects), the responses | ||
| 282 | to the calls might not be the same. If the | ||
| 283 | C<ReturnConsumedCapacityE<gt>> parameter is set, then the initial | ||
| 284 | C<TransactWriteItems> call returns the amount of write capacity units | ||
| 285 | consumed in making the changes. Subsequent C<TransactWriteItems> calls | ||
| 286 | with the same client token return the number of read capacity units | ||
| 287 | consumed in reading the item. | ||
| 288 | |||
| 289 | A client request token is valid for 10 minutes after the first request | ||
| 290 | that uses it is completed. After 10 minutes, any request with the same | ||
| 291 | client token is treated as a new request. Do not resubmit the same | ||
| 292 | request with the same client token for more than 10 minutes, or the | ||
| 293 | result might not be idempotent. | ||
| 294 | |||
| 295 | If you submit a request with the same client token but a change in | ||
| 296 | other parameters within the 10-minute idempotency window, DynamoDB | ||
| 297 | returns an C<IdempotentParameterMismatch> exception. | ||
| 298 | |||
| 299 | |||
| 300 | |||
| 301 | =head2 ReturnConsumedCapacity => Str | ||
| 302 | |||
| 303 | |||
| 304 | |||
| 305 | Valid values are: C<"INDEXES">, C<"TOTAL">, C<"NONE"> | ||
| 306 | |||
| 307 | =head2 ReturnItemCollectionMetrics => Str | ||
| 308 | |||
| 309 | Determines whether item collection metrics are returned. If set to | ||
| 310 | C<SIZE>, the response includes statistics about item collections (if | ||
| 311 | any), that were modified during the operation and are returned in the | ||
| 312 | response. If set to C<NONE> (the default), no statistics are returned. | ||
| 313 | |||
| 314 | Valid values are: C<"SIZE">, C<"NONE"> | ||
| 315 | |||
| 316 | =head2 B<REQUIRED> TransactItems => ArrayRef[L<Paws::DynamoDB::TransactWriteItem>] | ||
| 317 | |||
| 318 | An ordered array of up to 25 C<TransactWriteItem> objects, each of | ||
| 319 | which contains a C<ConditionCheck>, C<Put>, C<Update>, or C<Delete> | ||
| 320 | object. These can operate on items in different tables, but the tables | ||
| 321 | must reside in the same AWS account and Region, and no two of them can | ||
| 322 | operate on the same item. | ||
| 323 | |||
| 324 | |||
| 325 | |||
| 326 | |||
| 327 | =head1 SEE ALSO | ||
| 328 | |||
| 329 | This class forms part of L<Paws>, documenting arguments for method TransactWriteItems in L<Paws::DynamoDB> | ||
| 330 | |||
| 331 | =head1 BUGS and CONTRIBUTIONS | ||
| 332 | |||
| 333 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 334 | |||
| 335 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 336 | |||
| 337 | =cut | ||
| 338 |