AWS SDK for C++

AWS SDK for C++ Version 1.11.870

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/VectorIndex.h>
24#include <aws/dynamodb/model/WarmThroughput.h>
25
26#include <utility>
27
28namespace Aws {
29namespace DynamoDB {
30namespace Model {
31
39 public:
40 AWS_DYNAMODB_API CreateTableRequest() = default;
41
42 // Service request name is the Operation name which will send this request out,
43 // each operation should has unique request name, so that we can get operation's name from this request.
44 // Note: this is not true for response, multiple operations may have the same response name,
45 // so we can not get operation's name from response.
46 inline virtual const char* GetServiceRequestName() const override { return "CreateTable"; }
47
48 AWS_DYNAMODB_API Aws::String SerializePayload() const override;
49
51
55 AWS_DYNAMODB_API EndpointParameters GetEndpointContextParams() const override;
56
58
62 inline const Aws::Vector<AttributeDefinition>& GetAttributeDefinitions() const { return m_attributeDefinitions; }
63 inline bool AttributeDefinitionsHasBeenSet() const { return m_attributeDefinitionsHasBeenSet; }
64 template <typename AttributeDefinitionsT = Aws::Vector<AttributeDefinition>>
65 void SetAttributeDefinitions(AttributeDefinitionsT&& value) {
66 m_attributeDefinitionsHasBeenSet = true;
67 m_attributeDefinitions = std::forward<AttributeDefinitionsT>(value);
68 }
69 template <typename AttributeDefinitionsT = Aws::Vector<AttributeDefinition>>
70 CreateTableRequest& WithAttributeDefinitions(AttributeDefinitionsT&& value) {
71 SetAttributeDefinitions(std::forward<AttributeDefinitionsT>(value));
72 return *this;
73 }
74 template <typename AttributeDefinitionsT = AttributeDefinition>
75 CreateTableRequest& AddAttributeDefinitions(AttributeDefinitionsT&& value) {
76 m_attributeDefinitionsHasBeenSet = true;
77 m_attributeDefinitions.emplace_back(std::forward<AttributeDefinitionsT>(value));
78 return *this;
79 }
81
83
87 inline const Aws::String& GetTableName() const { return m_tableName; }
88 inline bool TableNameHasBeenSet() const { return m_tableNameHasBeenSet; }
89 template <typename TableNameT = Aws::String>
90 void SetTableName(TableNameT&& value) {
91 m_tableNameHasBeenSet = true;
92 m_tableName = std::forward<TableNameT>(value);
93 }
94 template <typename TableNameT = Aws::String>
95 CreateTableRequest& WithTableName(TableNameT&& value) {
96 SetTableName(std::forward<TableNameT>(value));
97 return *this;
98 }
100
102
128 inline const Aws::Vector<KeySchemaElement>& GetKeySchema() const { return m_keySchema; }
129 inline bool KeySchemaHasBeenSet() const { return m_keySchemaHasBeenSet; }
130 template <typename KeySchemaT = Aws::Vector<KeySchemaElement>>
131 void SetKeySchema(KeySchemaT&& value) {
132 m_keySchemaHasBeenSet = true;
133 m_keySchema = std::forward<KeySchemaT>(value);
134 }
135 template <typename KeySchemaT = Aws::Vector<KeySchemaElement>>
136 CreateTableRequest& WithKeySchema(KeySchemaT&& value) {
137 SetKeySchema(std::forward<KeySchemaT>(value));
138 return *this;
139 }
140 template <typename KeySchemaT = KeySchemaElement>
141 CreateTableRequest& AddKeySchema(KeySchemaT&& value) {
142 m_keySchemaHasBeenSet = true;
143 m_keySchema.emplace_back(std::forward<KeySchemaT>(value));
144 return *this;
145 }
147
149
178 inline const Aws::Vector<LocalSecondaryIndex>& GetLocalSecondaryIndexes() const { return m_localSecondaryIndexes; }
179 inline bool LocalSecondaryIndexesHasBeenSet() const { return m_localSecondaryIndexesHasBeenSet; }
180 template <typename LocalSecondaryIndexesT = Aws::Vector<LocalSecondaryIndex>>
181 void SetLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
182 m_localSecondaryIndexesHasBeenSet = true;
183 m_localSecondaryIndexes = std::forward<LocalSecondaryIndexesT>(value);
184 }
185 template <typename LocalSecondaryIndexesT = Aws::Vector<LocalSecondaryIndex>>
186 CreateTableRequest& WithLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
187 SetLocalSecondaryIndexes(std::forward<LocalSecondaryIndexesT>(value));
188 return *this;
189 }
190 template <typename LocalSecondaryIndexesT = LocalSecondaryIndex>
191 CreateTableRequest& AddLocalSecondaryIndexes(LocalSecondaryIndexesT&& value) {
192 m_localSecondaryIndexesHasBeenSet = true;
193 m_localSecondaryIndexes.emplace_back(std::forward<LocalSecondaryIndexesT>(value));
194 return *this;
195 }
197
199
229 inline const Aws::Vector<GlobalSecondaryIndex>& GetGlobalSecondaryIndexes() const { return m_globalSecondaryIndexes; }
230 inline bool GlobalSecondaryIndexesHasBeenSet() const { return m_globalSecondaryIndexesHasBeenSet; }
231 template <typename GlobalSecondaryIndexesT = Aws::Vector<GlobalSecondaryIndex>>
232 void SetGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
233 m_globalSecondaryIndexesHasBeenSet = true;
234 m_globalSecondaryIndexes = std::forward<GlobalSecondaryIndexesT>(value);
235 }
236 template <typename GlobalSecondaryIndexesT = Aws::Vector<GlobalSecondaryIndex>>
237 CreateTableRequest& WithGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
238 SetGlobalSecondaryIndexes(std::forward<GlobalSecondaryIndexesT>(value));
239 return *this;
240 }
241 template <typename GlobalSecondaryIndexesT = GlobalSecondaryIndex>
242 CreateTableRequest& AddGlobalSecondaryIndexes(GlobalSecondaryIndexesT&& value) {
243 m_globalSecondaryIndexesHasBeenSet = true;
244 m_globalSecondaryIndexes.emplace_back(std::forward<GlobalSecondaryIndexesT>(value));
245 return *this;
246 }
248
250
264 inline BillingMode GetBillingMode() const { return m_billingMode; }
265 inline bool BillingModeHasBeenSet() const { return m_billingModeHasBeenSet; }
266 inline void SetBillingMode(BillingMode value) {
267 m_billingModeHasBeenSet = true;
268 m_billingMode = value;
269 }
271 SetBillingMode(value);
272 return *this;
273 }
275
277
287 inline const ProvisionedThroughput& GetProvisionedThroughput() const { return m_provisionedThroughput; }
288 inline bool ProvisionedThroughputHasBeenSet() const { return m_provisionedThroughputHasBeenSet; }
289 template <typename ProvisionedThroughputT = ProvisionedThroughput>
290 void SetProvisionedThroughput(ProvisionedThroughputT&& value) {
291 m_provisionedThroughputHasBeenSet = true;
292 m_provisionedThroughput = std::forward<ProvisionedThroughputT>(value);
293 }
294 template <typename ProvisionedThroughputT = ProvisionedThroughput>
295 CreateTableRequest& WithProvisionedThroughput(ProvisionedThroughputT&& value) {
296 SetProvisionedThroughput(std::forward<ProvisionedThroughputT>(value));
297 return *this;
298 }
300
302
317 inline const StreamSpecification& GetStreamSpecification() const { return m_streamSpecification; }
318 inline bool StreamSpecificationHasBeenSet() const { return m_streamSpecificationHasBeenSet; }
319 template <typename StreamSpecificationT = StreamSpecification>
320 void SetStreamSpecification(StreamSpecificationT&& value) {
321 m_streamSpecificationHasBeenSet = true;
322 m_streamSpecification = std::forward<StreamSpecificationT>(value);
323 }
324 template <typename StreamSpecificationT = StreamSpecification>
325 CreateTableRequest& WithStreamSpecification(StreamSpecificationT&& value) {
326 SetStreamSpecification(std::forward<StreamSpecificationT>(value));
327 return *this;
328 }
330
332
335 inline const SSESpecification& GetSSESpecification() const { return m_sSESpecification; }
336 inline bool SSESpecificationHasBeenSet() const { return m_sSESpecificationHasBeenSet; }
337 template <typename SSESpecificationT = SSESpecification>
338 void SetSSESpecification(SSESpecificationT&& value) {
339 m_sSESpecificationHasBeenSet = true;
340 m_sSESpecification = std::forward<SSESpecificationT>(value);
341 }
342 template <typename SSESpecificationT = SSESpecification>
343 CreateTableRequest& WithSSESpecification(SSESpecificationT&& value) {
344 SetSSESpecification(std::forward<SSESpecificationT>(value));
345 return *this;
346 }
348
350
355 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
356 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
357 template <typename TagsT = Aws::Vector<Tag>>
358 void SetTags(TagsT&& value) {
359 m_tagsHasBeenSet = true;
360 m_tags = std::forward<TagsT>(value);
361 }
362 template <typename TagsT = Aws::Vector<Tag>>
363 CreateTableRequest& WithTags(TagsT&& value) {
364 SetTags(std::forward<TagsT>(value));
365 return *this;
366 }
367 template <typename TagsT = Tag>
368 CreateTableRequest& AddTags(TagsT&& value) {
369 m_tagsHasBeenSet = true;
370 m_tags.emplace_back(std::forward<TagsT>(value));
371 return *this;
372 }
374
376
380 inline TableClass GetTableClass() const { return m_tableClass; }
381 inline bool TableClassHasBeenSet() const { return m_tableClassHasBeenSet; }
382 inline void SetTableClass(TableClass value) {
383 m_tableClassHasBeenSet = true;
384 m_tableClass = value;
385 }
387 SetTableClass(value);
388 return *this;
389 }
391
393
397 inline bool GetDeletionProtectionEnabled() const { return m_deletionProtectionEnabled; }
398 inline bool DeletionProtectionEnabledHasBeenSet() const { return m_deletionProtectionEnabledHasBeenSet; }
399 inline void SetDeletionProtectionEnabled(bool value) {
400 m_deletionProtectionEnabledHasBeenSet = true;
401 m_deletionProtectionEnabled = value;
402 }
405 return *this;
406 }
408
410
414 inline const WarmThroughput& GetWarmThroughput() const { return m_warmThroughput; }
415 inline bool WarmThroughputHasBeenSet() const { return m_warmThroughputHasBeenSet; }
416 template <typename WarmThroughputT = WarmThroughput>
417 void SetWarmThroughput(WarmThroughputT&& value) {
418 m_warmThroughputHasBeenSet = true;
419 m_warmThroughput = std::forward<WarmThroughputT>(value);
420 }
421 template <typename WarmThroughputT = WarmThroughput>
422 CreateTableRequest& WithWarmThroughput(WarmThroughputT&& value) {
423 SetWarmThroughput(std::forward<WarmThroughputT>(value));
424 return *this;
425 }
427
429
442 inline const Aws::String& GetResourcePolicy() const { return m_resourcePolicy; }
443 inline bool ResourcePolicyHasBeenSet() const { return m_resourcePolicyHasBeenSet; }
444 template <typename ResourcePolicyT = Aws::String>
445 void SetResourcePolicy(ResourcePolicyT&& value) {
446 m_resourcePolicyHasBeenSet = true;
447 m_resourcePolicy = std::forward<ResourcePolicyT>(value);
448 }
449 template <typename ResourcePolicyT = Aws::String>
450 CreateTableRequest& WithResourcePolicy(ResourcePolicyT&& value) {
451 SetResourcePolicy(std::forward<ResourcePolicyT>(value));
452 return *this;
453 }
455
457
463 inline const OnDemandThroughput& GetOnDemandThroughput() const { return m_onDemandThroughput; }
464 inline bool OnDemandThroughputHasBeenSet() const { return m_onDemandThroughputHasBeenSet; }
465 template <typename OnDemandThroughputT = OnDemandThroughput>
466 void SetOnDemandThroughput(OnDemandThroughputT&& value) {
467 m_onDemandThroughputHasBeenSet = true;
468 m_onDemandThroughput = std::forward<OnDemandThroughputT>(value);
469 }
470 template <typename OnDemandThroughputT = OnDemandThroughput>
471 CreateTableRequest& WithOnDemandThroughput(OnDemandThroughputT&& value) {
472 SetOnDemandThroughput(std::forward<OnDemandThroughputT>(value));
473 return *this;
474 }
476
478
482 inline const Aws::String& GetGlobalTableSourceArn() const { return m_globalTableSourceArn; }
483 inline bool GlobalTableSourceArnHasBeenSet() const { return m_globalTableSourceArnHasBeenSet; }
484 template <typename GlobalTableSourceArnT = Aws::String>
485 void SetGlobalTableSourceArn(GlobalTableSourceArnT&& value) {
486 m_globalTableSourceArnHasBeenSet = true;
487 m_globalTableSourceArn = std::forward<GlobalTableSourceArnT>(value);
488 }
489 template <typename GlobalTableSourceArnT = Aws::String>
490 CreateTableRequest& WithGlobalTableSourceArn(GlobalTableSourceArnT&& value) {
491 SetGlobalTableSourceArn(std::forward<GlobalTableSourceArnT>(value));
492 return *this;
493 }
495
497
503 inline GlobalTableSettingsReplicationMode GetGlobalTableSettingsReplicationMode() const { return m_globalTableSettingsReplicationMode; }
504 inline bool GlobalTableSettingsReplicationModeHasBeenSet() const { return m_globalTableSettingsReplicationModeHasBeenSet; }
506 m_globalTableSettingsReplicationModeHasBeenSet = true;
507 m_globalTableSettingsReplicationMode = value;
508 }
511 return *this;
512 }
514
516
536 inline const Aws::Vector<VectorIndex>& GetVectorIndexes() const { return m_vectorIndexes; }
537 inline bool VectorIndexesHasBeenSet() const { return m_vectorIndexesHasBeenSet; }
538 template <typename VectorIndexesT = Aws::Vector<VectorIndex>>
539 void SetVectorIndexes(VectorIndexesT&& value) {
540 m_vectorIndexesHasBeenSet = true;
541 m_vectorIndexes = std::forward<VectorIndexesT>(value);
542 }
543 template <typename VectorIndexesT = Aws::Vector<VectorIndex>>
544 CreateTableRequest& WithVectorIndexes(VectorIndexesT&& value) {
545 SetVectorIndexes(std::forward<VectorIndexesT>(value));
546 return *this;
547 }
548 template <typename VectorIndexesT = VectorIndex>
549 CreateTableRequest& AddVectorIndexes(VectorIndexesT&& value) {
550 m_vectorIndexesHasBeenSet = true;
551 m_vectorIndexes.emplace_back(std::forward<VectorIndexesT>(value));
552 return *this;
553 }
555 private:
556 Aws::Vector<AttributeDefinition> m_attributeDefinitions;
557
558 Aws::String m_tableName;
559
561
562 Aws::Vector<LocalSecondaryIndex> m_localSecondaryIndexes;
563
564 Aws::Vector<GlobalSecondaryIndex> m_globalSecondaryIndexes;
565
566 BillingMode m_billingMode{BillingMode::NOT_SET};
567
568 ProvisionedThroughput m_provisionedThroughput;
569
570 StreamSpecification m_streamSpecification;
571
572 SSESpecification m_sSESpecification;
573
574 Aws::Vector<Tag> m_tags;
575
576 TableClass m_tableClass{TableClass::NOT_SET};
577
578 bool m_deletionProtectionEnabled{false};
579
580 WarmThroughput m_warmThroughput;
581
582 Aws::String m_resourcePolicy;
583
584 OnDemandThroughput m_onDemandThroughput;
585
586 Aws::String m_globalTableSourceArn;
587
589
590 Aws::Vector<VectorIndex> m_vectorIndexes;
591 bool m_attributeDefinitionsHasBeenSet = false;
592 bool m_tableNameHasBeenSet = false;
593 bool m_keySchemaHasBeenSet = false;
594 bool m_localSecondaryIndexesHasBeenSet = false;
595 bool m_globalSecondaryIndexesHasBeenSet = false;
596 bool m_billingModeHasBeenSet = false;
597 bool m_provisionedThroughputHasBeenSet = false;
598 bool m_streamSpecificationHasBeenSet = false;
599 bool m_sSESpecificationHasBeenSet = false;
600 bool m_tagsHasBeenSet = false;
601 bool m_tableClassHasBeenSet = false;
602 bool m_deletionProtectionEnabledHasBeenSet = false;
603 bool m_warmThroughputHasBeenSet = false;
604 bool m_resourcePolicyHasBeenSet = false;
605 bool m_onDemandThroughputHasBeenSet = false;
606 bool m_globalTableSourceArnHasBeenSet = false;
607 bool m_globalTableSettingsReplicationModeHasBeenSet = false;
608 bool m_vectorIndexesHasBeenSet = false;
609};
610
611} // namespace Model
612} // namespace DynamoDB
613} // 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 & WithVectorIndexes(VectorIndexesT &&value)
CreateTableRequest & WithBillingMode(BillingMode value)
CreateTableRequest & AddVectorIndexes(VectorIndexesT &&value)
void SetProvisionedThroughput(ProvisionedThroughputT &&value)
void SetWarmThroughput(WarmThroughputT &&value)
void SetResourcePolicy(ResourcePolicyT &&value)
void SetAttributeDefinitions(AttributeDefinitionsT &&value)
void SetGlobalTableSourceArn(GlobalTableSourceArnT &&value)
const Aws::Vector< VectorIndex > & GetVectorIndexes() const
CreateTableRequest & WithTags(TagsT &&value)
const WarmThroughput & GetWarmThroughput() const
CreateTableRequest & WithDeletionProtectionEnabled(bool value)
CreateTableRequest & AddLocalSecondaryIndexes(LocalSecondaryIndexesT &&value)
void SetVectorIndexes(VectorIndexesT &&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