AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
CreateTableRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/dynamodb/DynamoDBRequest.h>
10#include <aws/dynamodb/DynamoDB_EXPORTS.h>
11#include <aws/dynamodb/model/AttributeDefinition.h>
12#include <aws/dynamodb/model/BillingMode.h>
13#include <aws/dynamodb/model/GlobalSecondaryIndex.h>
14#include <aws/dynamodb/model/GlobalTableSettingsReplicationMode.h>
15#include <aws/dynamodb/model/KeySchemaElement.h>
16#include <aws/dynamodb/model/LocalSecondaryIndex.h>
17#include <aws/dynamodb/model/OnDemandThroughput.h>
18#include <aws/dynamodb/model/ProvisionedThroughput.h>
19#include <aws/dynamodb/model/SSESpecification.h>
20#include <aws/dynamodb/model/StreamSpecification.h>
21#include <aws/dynamodb/model/TableClass.h>
22#include <aws/dynamodb/model/Tag.h>
23#include <aws/dynamodb/model/WarmThroughput.h>
24
25#include <utility>
26
27namespace Aws {
28namespace DynamoDB {
29namespace Model {
30
38 public:
39 AWS_DYNAMODB_API CreateTableRequest() = default;
40
41 // Service request name is the Operation name which will send this request out,
42 // each operation should has unique request name, so that we can get operation's name from this request.
43 // Note: this is not true for response, multiple operations may have the same response name,
44 // so we can not get operation's name from response.
45 inline virtual const char* GetServiceRequestName() const override { return "CreateTable"; }
46
47 AWS_DYNAMODB_API Aws::String SerializePayload() const override;
48
50
54 AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override;
55
57
61 inline const Aws::Vector<AttributeDefinition>& GetAttributeDefinitions() const { return m_attributeDefinitions; }
62 inline bool AttributeDefinitionsHasBeenSet() const { return m_attributeDefinitionsHasBeenSet; }
63 template <typename AttributeDefinitionsT = Aws::Vector<AttributeDefinition>>
64 void SetAttributeDefinitions(AttributeDefinitionsT&& value) {
65 m_attributeDefinitionsHasBeenSet = true;
66 m_attributeDefinitions = std::forward<AttributeDefinitionsT>(value);
67 }
68 template <typename AttributeDefinitionsT = Aws::Vector<AttributeDefinition>>
69 CreateTableRequest& WithAttributeDefinitions(AttributeDefinitionsT&& value) {
70 SetAttributeDefinitions(std::forward<AttributeDefinitionsT>(value));
71 return *this;
72 }
73 template <typename AttributeDefinitionsT = AttributeDefinition>
74 CreateTableRequest& AddAttributeDefinitions(AttributeDefinitionsT&& value) {
75 m_attributeDefinitionsHasBeenSet = true;
76 m_attributeDefinitions.emplace_back(std::forward<AttributeDefinitionsT>(value));
77 return *this;
78 }
80
82
86 inline const Aws::String& GetTableName() const { return m_tableName; }
87 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
88 template <typename TableNameT = Aws::String>
89 void SetTableName(TableNameT&& value) {
90 m_tableNameHasBeenSet = true;
91 m_tableName = std::forward<TableNameT>(value);
92 }
93 template <typename TableNameT = Aws::String>
94 CreateTableRequest& WithTableName(TableNameT&& value) {
95 SetTableName(std::forward<TableNameT>(value));
96 return *this;
97 }
99
101
127 inline const Aws::Vector<KeySchemaElement>& GetKeySchema() const { return m_keySchema; }
128 inline bool KeySchemaHasBeenSet() const { return m_keySchemaHasBeenSet; }
129 template <typename KeySchemaT = Aws::Vector<KeySchemaElement>>
130 void SetKeySchema(KeySchemaT&& value) {
131 m_keySchemaHasBeenSet = true;
132 m_keySchema = std::forward<KeySchemaT>(value);
133 }
134 template <typename KeySchemaT = Aws::Vector<KeySchemaElement>>
135 CreateTableRequest& WithKeySchema(KeySchemaT&& value) {
136 SetKeySchema(std::forward<KeySchemaT>(value));
137 return *this;
138 }
139 template <typename KeySchemaT = KeySchemaElement>
140 CreateTableRequest& AddKeySchema(KeySchemaT&& value) {
141 m_keySchemaHasBeenSet = true;
142 m_keySchema.emplace_back(std::forward<KeySchemaT>(value));
143 return *this;
144 }
146
148
177 inline const Aws::Vector<LocalSecondaryIndex>& GetLocalSecondaryIndexes() const { return m_localSecondaryIndexes; }
178 inline bool LocalSecondaryIndexesHasBeenSet() const { return m_localSecondaryIndexesHasBeenSet; }
179 template <typename LocalSecondaryIndexesT = Aws::Vector<LocalSecondaryIndex>>
180 void SetLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
181 m_localSecondaryIndexesHasBeenSet = true;
182 m_localSecondaryIndexes = std::forward<LocalSecondaryIndexesT>(value);
183 }
184 template <typename LocalSecondaryIndexesT = Aws::Vector<LocalSecondaryIndex>>
185 CreateTableRequest& WithLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
186 SetLocalSecondaryIndexes(std::forward<LocalSecondaryIndexesT>(value));
187 return *this;
188 }
189 template <typename LocalSecondaryIndexesT = LocalSecondaryIndex>
190 CreateTableRequest& AddLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
191 m_localSecondaryIndexesHasBeenSet = true;
192 m_localSecondaryIndexes.emplace_back(std::forward<LocalSecondaryIndexesT>(value));
193 return *this;
194 }
196
198
228 inline const Aws::Vector<GlobalSecondaryIndex>& GetGlobalSecondaryIndexes() const { return m_globalSecondaryIndexes; }
229 inline bool GlobalSecondaryIndexesHasBeenSet() const { return m_globalSecondaryIndexesHasBeenSet; }
230 template <typename GlobalSecondaryIndexesT = Aws::Vector<GlobalSecondaryIndex>>
231 void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
232 m_globalSecondaryIndexesHasBeenSet = true;
233 m_globalSecondaryIndexes = std::forward<GlobalSecondaryIndexesT>(value);
234 }
235 template <typename GlobalSecondaryIndexesT = Aws::Vector<GlobalSecondaryIndex>>
236 CreateTableRequest& WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
237 SetGlobalSecondaryIndexes(std::forward<GlobalSecondaryIndexesT>(value));
238 return *this;
239 }
240 template <typename GlobalSecondaryIndexesT = GlobalSecondaryIndex>
241 CreateTableRequest& AddGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
242 m_globalSecondaryIndexesHasBeenSet = true;
243 m_globalSecondaryIndexes.emplace_back(std::forward<GlobalSecondaryIndexesT>(value));
244 return *this;
245 }
247
249
263 inline BillingMode GetBillingMode() const { return m_billingMode; }
264 inline bool BillingModeHasBeenSet() const { return m_billingModeHasBeenSet; }
265 inline void SetBillingMode(BillingMode value) {
266 m_billingModeHasBeenSet = true;
267 m_billingMode = value;
268 }
270 SetBillingMode(value);
271 return *this;
272 }
274
276
286 inline const ProvisionedThroughput& GetProvisionedThroughput() const { return m_provisionedThroughput; }
287 inline bool ProvisionedThroughputHasBeenSet() const { return m_provisionedThroughputHasBeenSet; }
288 template <typename ProvisionedThroughputT = ProvisionedThroughput>
289 void SetProvisionedThroughput(ProvisionedThroughputT&& value) {
290 m_provisionedThroughputHasBeenSet = true;
291 m_provisionedThroughput = std::forward<ProvisionedThroughputT>(value);
292 }
293 template <typename ProvisionedThroughputT = ProvisionedThroughput>
294 CreateTableRequest& WithProvisionedThroughput(ProvisionedThroughputT&& value) {
295 SetProvisionedThroughput(std::forward<ProvisionedThroughputT>(value));
296 return *this;
297 }
299
301
316 inline const StreamSpecification& GetStreamSpecification() const { return m_streamSpecification; }
317 inline bool StreamSpecificationHasBeenSet() const { return m_streamSpecificationHasBeenSet; }
318 template <typename StreamSpecificationT = StreamSpecification>
319 void SetStreamSpecification(StreamSpecificationT&& value) {
320 m_streamSpecificationHasBeenSet = true;
321 m_streamSpecification = std::forward<StreamSpecificationT>(value);
322 }
323 template <typename StreamSpecificationT = StreamSpecification>
324 CreateTableRequest& WithStreamSpecification(StreamSpecificationT&& value) {
325 SetStreamSpecification(std::forward<StreamSpecificationT>(value));
326 return *this;
327 }
329
331
334 inline const SSESpecification& GetSSESpecification() const { return m_sSESpecification; }
335 inline bool SSESpecificationHasBeenSet() const { return m_sSESpecificationHasBeenSet; }
336 template <typename SSESpecificationT = SSESpecification>
337 void SetSSESpecification(SSESpecificationT&& value) {
338 m_sSESpecificationHasBeenSet = true;
339 m_sSESpecification = std::forward<SSESpecificationT>(value);
340 }
341 template <typename SSESpecificationT = SSESpecification>
342 CreateTableRequest& WithSSESpecification(SSESpecificationT&& value) {
343 SetSSESpecification(std::forward<SSESpecificationT>(value));
344 return *this;
345 }
347
349
354 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
355 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
356 template <typename TagsT = Aws::Vector<Tag>>
357 void SetTags(TagsT&& value) {
358 m_tagsHasBeenSet = true;
359 m_tags = std::forward<TagsT>(value);
360 }
361 template <typename TagsT = Aws::Vector<Tag>>
362 CreateTableRequest& WithTags(TagsT&& value) {
363 SetTags(std::forward<TagsT>(value));
364 return *this;
365 }
366 template <typename TagsT = Tag>
367 CreateTableRequest& AddTags(TagsT&& value) {
368 m_tagsHasBeenSet = true;
369 m_tags.emplace_back(std::forward<TagsT>(value));
370 return *this;
371 }
373
375
379 inline TableClass GetTableClass() const { return m_tableClass; }
380 inline bool TableClassHasBeenSet() const { return m_tableClassHasBeenSet; }
381 inline void SetTableClass(TableClass value) {
382 m_tableClassHasBeenSet = true;
383 m_tableClass = value;
384 }
386 SetTableClass(value);
387 return *this;
388 }
390
392
396 inline bool GetDeletionProtectionEnabled() const { return m_deletionProtectionEnabled; }
397 inline bool DeletionProtectionEnabledHasBeenSet() const { return m_deletionProtectionEnabledHasBeenSet; }
398 inline void SetDeletionProtectionEnabled(bool value) {
399 m_deletionProtectionEnabledHasBeenSet = true;
400 m_deletionProtectionEnabled = value;
401 }
404 return *this;
405 }
407
409
413 inline const WarmThroughput& GetWarmThroughput() const { return m_warmThroughput; }
414 inline bool WarmThroughputHasBeenSet() const { return m_warmThroughputHasBeenSet; }
415 template <typename WarmThroughputT = WarmThroughput>
416 void SetWarmThroughput(WarmThroughputT&& value) {
417 m_warmThroughputHasBeenSet = true;
418 m_warmThroughput = std::forward<WarmThroughputT>(value);
419 }
420 template <typename WarmThroughputT = WarmThroughput>
421 CreateTableRequest& WithWarmThroughput(WarmThroughputT&& value) {
422 SetWarmThroughput(std::forward<WarmThroughputT>(value));
423 return *this;
424 }
426
428
441 inline const Aws::String& GetResourcePolicy() const { return m_resourcePolicy; }
442 inline bool ResourcePolicyHasBeenSet() const { return m_resourcePolicyHasBeenSet; }
443 template <typename ResourcePolicyT = Aws::String>
444 void SetResourcePolicy(ResourcePolicyT&& value) {
445 m_resourcePolicyHasBeenSet = true;
446 m_resourcePolicy = std::forward<ResourcePolicyT>(value);
447 }
448 template <typename ResourcePolicyT = Aws::String>
449 CreateTableRequest& WithResourcePolicy(ResourcePolicyT&& value) {
450 SetResourcePolicy(std::forward<ResourcePolicyT>(value));
451 return *this;
452 }
454
456
462 inline const OnDemandThroughput& GetOnDemandThroughput() const { return m_onDemandThroughput; }
463 inline bool OnDemandThroughputHasBeenSet() const { return m_onDemandThroughputHasBeenSet; }
464 template <typename OnDemandThroughputT = OnDemandThroughput>
465 void SetOnDemandThroughput(OnDemandThroughputT&& value) {
466 m_onDemandThroughputHasBeenSet = true;
467 m_onDemandThroughput = std::forward<OnDemandThroughputT>(value);
468 }
469 template <typename OnDemandThroughputT = OnDemandThroughput>
470 CreateTableRequest& WithOnDemandThroughput(OnDemandThroughputT&& value) {
471 SetOnDemandThroughput(std::forward<OnDemandThroughputT>(value));
472 return *this;
473 }
475
477
481 inline const Aws::String& GetGlobalTableSourceArn() const { return m_globalTableSourceArn; }
482 inline bool GlobalTableSourceArnHasBeenSet() const { return m_globalTableSourceArnHasBeenSet; }
483 template <typename GlobalTableSourceArnT = Aws::String>
484 void SetGlobalTableSourceArn(GlobalTableSourceArnT&& value) {
485 m_globalTableSourceArnHasBeenSet = true;
486 m_globalTableSourceArn = std::forward<GlobalTableSourceArnT>(value);
487 }
488 template <typename GlobalTableSourceArnT = Aws::String>
489 CreateTableRequest& WithGlobalTableSourceArn(GlobalTableSourceArnT&& value) {
490 SetGlobalTableSourceArn(std::forward<GlobalTableSourceArnT>(value));
491 return *this;
492 }
494
496
502 inline GlobalTableSettingsReplicationMode GetGlobalTableSettingsReplicationMode() const { return m_globalTableSettingsReplicationMode; }
503 inline bool GlobalTableSettingsReplicationModeHasBeenSet() const { return m_globalTableSettingsReplicationModeHasBeenSet; }
505 m_globalTableSettingsReplicationModeHasBeenSet = true;
506 m_globalTableSettingsReplicationMode = value;
507 }
510 return *this;
511 }
513 private:
514 Aws::Vector<AttributeDefinition> m_attributeDefinitions;
515
516 Aws::String m_tableName;
517
519
520 Aws::Vector<LocalSecondaryIndex> m_localSecondaryIndexes;
521
522 Aws::Vector<GlobalSecondaryIndex> m_globalSecondaryIndexes;
523
524 BillingMode m_billingMode{BillingMode::NOT_SET};
525
526 ProvisionedThroughput m_provisionedThroughput;
527
528 StreamSpecification m_streamSpecification;
529
530 SSESpecification m_sSESpecification;
531
532 Aws::Vector<Tag> m_tags;
533
534 TableClass m_tableClass{TableClass::NOT_SET};
535
536 bool m_deletionProtectionEnabled{false};
537
538 WarmThroughput m_warmThroughput;
539
540 Aws::String m_resourcePolicy;
541
542 OnDemandThroughput m_onDemandThroughput;
543
544 Aws::String m_globalTableSourceArn;
545
547 bool m_attributeDefinitionsHasBeenSet = false;
548 bool m_tableNameHasBeenSet = false;
549 bool m_keySchemaHasBeenSet = false;
550 bool m_localSecondaryIndexesHasBeenSet = false;
551 bool m_globalSecondaryIndexesHasBeenSet = false;
552 bool m_billingModeHasBeenSet = false;
553 bool m_provisionedThroughputHasBeenSet = false;
554 bool m_streamSpecificationHasBeenSet = false;
555 bool m_sSESpecificationHasBeenSet = false;
556 bool m_tagsHasBeenSet = false;
557 bool m_tableClassHasBeenSet = false;
558 bool m_deletionProtectionEnabledHasBeenSet = false;
559 bool m_warmThroughputHasBeenSet = false;
560 bool m_resourcePolicyHasBeenSet = false;
561 bool m_onDemandThroughputHasBeenSet = false;
562 bool m_globalTableSourceArnHasBeenSet = false;
563 bool m_globalTableSettingsReplicationModeHasBeenSet = false;
564};
565
566} // namespace Model
567} // namespace DynamoDB
568} // namespace Aws
Aws::Endpoint::EndpointParameters EndpointParameters
const Aws::Vector< GlobalSecondaryIndex > & GetGlobalSecondaryIndexes() const
CreateTableRequest & WithProvisionedThroughput(ProvisionedThroughputT &&value)
void SetOnDemandThroughput(OnDemandThroughputT &&value)
CreateTableRequest & WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
CreateTableRequest & WithBillingMode(BillingMode value)
void SetProvisionedThroughput(ProvisionedThroughputT &&value)
void SetWarmThroughput(WarmThroughputT &&value)
void SetResourcePolicy(ResourcePolicyT &&value)
void SetAttributeDefinitions(AttributeDefinitionsT &&value)
void SetGlobalTableSourceArn(GlobalTableSourceArnT &&value)
CreateTableRequest & WithTags(TagsT &&value)
const WarmThroughput & GetWarmThroughput() const
CreateTableRequest & WithDeletionProtectionEnabled(bool value)
CreateTableRequest & AddLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
void SetSSESpecification(SSESpecificationT &&value)
GlobalTableSettingsReplicationMode GetGlobalTableSettingsReplicationMode() const
AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override
CreateTableRequest & WithGlobalTableSourceArn(GlobalTableSourceArnT &&value)
const Aws::String & GetGlobalTableSourceArn() const
const Aws::Vector< AttributeDefinition > & GetAttributeDefinitions() const
const Aws::Vector< Tag > & GetTags() const
virtual const char * GetServiceRequestName() const override
void SetGlobalTableSettingsReplicationMode(GlobalTableSettingsReplicationMode value)
CreateTableRequest & AddGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
CreateTableRequest & WithLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
const SSESpecification & GetSSESpecification() const
CreateTableRequest & WithSSESpecification(SSESpecificationT &&value)
CreateTableRequest & WithGlobalTableSettingsReplicationMode(GlobalTableSettingsReplicationMode value)
const Aws::String & GetResourcePolicy() const
CreateTableRequest & WithResourcePolicy(ResourcePolicyT &&value)
void SetLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
CreateTableRequest & AddKeySchema(KeySchemaT &&value)
CreateTableRequest & WithTableName(TableNameT &&value)
CreateTableRequest & AddTags(TagsT &&value)
CreateTableRequest & WithOnDemandThroughput(OnDemandThroughputT &&value)
CreateTableRequest & WithAttributeDefinitions(AttributeDefinitionsT &&value)
CreateTableRequest & WithStreamSpecification(StreamSpecificationT &&value)
AWS_DYNAMODB_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateTableRequest & WithTableClass(TableClass value)
const Aws::Vector< KeySchemaElement > & GetKeySchema() const
const OnDemandThroughput & GetOnDemandThroughput() const
const StreamSpecification & GetStreamSpecification() const
AWS_DYNAMODB_API Aws::String SerializePayload() const override
CreateTableRequest & AddAttributeDefinitions(AttributeDefinitionsT &&value)
AWS_DYNAMODB_API CreateTableRequest()=default
CreateTableRequest & WithWarmThroughput(WarmThroughputT &&value)
const Aws::Vector< LocalSecondaryIndex > & GetLocalSecondaryIndexes() const
void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT &&value)
CreateTableRequest & WithKeySchema(KeySchemaT &&value)
void SetStreamSpecification(StreamSpecificationT &&value)
const ProvisionedThroughput & GetProvisionedThroughput() const
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector