capo-keyspaces 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. capo_keyspaces/__init__.py +70 -0
  2. capo_keyspaces/_async.py +25 -0
  3. capo_keyspaces/_auth/_identity.py +16 -0
  4. capo_keyspaces/_auth/_providers.py +886 -0
  5. capo_keyspaces/_auth/_signers.py +88 -0
  6. capo_keyspaces/_auth/_sigv4.py +434 -0
  7. capo_keyspaces/_auth/_zapros_handler.py +80 -0
  8. capo_keyspaces/_iter.py +113 -0
  9. capo_keyspaces/_operations/keyspaces_service/create_keyspace.py +170 -0
  10. capo_keyspaces/_operations/keyspaces_service/create_table.py +183 -0
  11. capo_keyspaces/_operations/keyspaces_service/create_type.py +172 -0
  12. capo_keyspaces/_operations/keyspaces_service/delete_keyspace.py +165 -0
  13. capo_keyspaces/_operations/keyspaces_service/delete_table.py +163 -0
  14. capo_keyspaces/_operations/keyspaces_service/delete_type.py +171 -0
  15. capo_keyspaces/_operations/keyspaces_service/get_keyspace.py +168 -0
  16. capo_keyspaces/_operations/keyspaces_service/get_table.py +173 -0
  17. capo_keyspaces/_operations/keyspaces_service/get_table_auto_scaling_settings.py +168 -0
  18. capo_keyspaces/_operations/keyspaces_service/get_type.py +166 -0
  19. capo_keyspaces/_operations/keyspaces_service/list_keyspaces.py +167 -0
  20. capo_keyspaces/_operations/keyspaces_service/list_tables.py +167 -0
  21. capo_keyspaces/_operations/keyspaces_service/list_tags_for_resource.py +167 -0
  22. capo_keyspaces/_operations/keyspaces_service/list_types.py +163 -0
  23. capo_keyspaces/_operations/keyspaces_service/restore_table.py +178 -0
  24. capo_keyspaces/_operations/keyspaces_service/tag_resource.py +164 -0
  25. capo_keyspaces/_operations/keyspaces_service/untag_resource.py +164 -0
  26. capo_keyspaces/_operations/keyspaces_service/update_keyspace.py +175 -0
  27. capo_keyspaces/_operations/keyspaces_service/update_table.py +181 -0
  28. capo_keyspaces/_pagination.py +21 -0
  29. capo_keyspaces/_protocol/__init__.py +1 -0
  30. capo_keyspaces/_protocol/errors.py +93 -0
  31. capo_keyspaces/_protocol/eventstream.py +238 -0
  32. capo_keyspaces/_protocol/serialize.py +47 -0
  33. capo_keyspaces/_protocol/xml.py +33 -0
  34. capo_keyspaces/_rule_engine/__init__.py +0 -0
  35. capo_keyspaces/_rule_engine/_aws_partition.py +160 -0
  36. capo_keyspaces/_rule_engine/_endpoint_rule_set.py +150 -0
  37. capo_keyspaces/_rule_engine/_endpoint_runtime.py +389 -0
  38. capo_keyspaces/_services/_aws_config.py +160 -0
  39. capo_keyspaces/_services/_pipeline.py +198 -0
  40. capo_keyspaces/_services/async_keyspaces.py +1467 -0
  41. capo_keyspaces/_services/keyspaces.py +1448 -0
  42. capo_keyspaces/errors/__init__.py +35 -0
  43. capo_keyspaces/errors/_base.py +94 -0
  44. capo_keyspaces/errors/access_denied_exception.py +47 -0
  45. capo_keyspaces/errors/conflict_exception.py +47 -0
  46. capo_keyspaces/errors/internal_server_exception.py +47 -0
  47. capo_keyspaces/errors/resource_not_found_exception.py +58 -0
  48. capo_keyspaces/errors/service_quota_exceeded_exception.py +49 -0
  49. capo_keyspaces/errors/validation_exception.py +47 -0
  50. capo_keyspaces/py.typed +0 -0
  51. capo_keyspaces/types/_prelude/blob.py +12 -0
  52. capo_keyspaces/types/_prelude/timestamp.py +17 -0
  53. capo_keyspaces/types/arn.py +5 -0
  54. capo_keyspaces/types/auto_scaling_policy.py +42 -0
  55. capo_keyspaces/types/auto_scaling_settings.py +63 -0
  56. capo_keyspaces/types/auto_scaling_specification.py +62 -0
  57. capo_keyspaces/types/boolean_object.py +5 -0
  58. capo_keyspaces/types/capacity_specification.py +48 -0
  59. capo_keyspaces/types/capacity_specification_summary.py +71 -0
  60. capo_keyspaces/types/capacity_units.py +5 -0
  61. capo_keyspaces/types/cdc_propagate_tags.py +5 -0
  62. capo_keyspaces/types/cdc_specification.py +62 -0
  63. capo_keyspaces/types/cdc_specification_summary.py +38 -0
  64. capo_keyspaces/types/cdc_status.py +5 -0
  65. capo_keyspaces/types/client_side_timestamps.py +33 -0
  66. capo_keyspaces/types/client_side_timestamps_status.py +5 -0
  67. capo_keyspaces/types/clustering_key.py +39 -0
  68. capo_keyspaces/types/clustering_key_list.py +29 -0
  69. capo_keyspaces/types/column_definition.py +38 -0
  70. capo_keyspaces/types/column_definition_list.py +33 -0
  71. capo_keyspaces/types/comment.py +26 -0
  72. capo_keyspaces/types/create_keyspace_request.py +67 -0
  73. capo_keyspaces/types/create_keyspace_response.py +31 -0
  74. capo_keyspaces/types/create_table_request.py +281 -0
  75. capo_keyspaces/types/create_table_response.py +31 -0
  76. capo_keyspaces/types/create_type_request.py +57 -0
  77. capo_keyspaces/types/create_type_response.py +39 -0
  78. capo_keyspaces/types/default_time_to_live.py +5 -0
  79. capo_keyspaces/types/delete_keyspace_request.py +31 -0
  80. capo_keyspaces/types/delete_keyspace_response.py +18 -0
  81. capo_keyspaces/types/delete_table_request.py +39 -0
  82. capo_keyspaces/types/delete_table_response.py +18 -0
  83. capo_keyspaces/types/delete_type_request.py +39 -0
  84. capo_keyspaces/types/delete_type_response.py +39 -0
  85. capo_keyspaces/types/depth.py +5 -0
  86. capo_keyspaces/types/double_object.py +5 -0
  87. capo_keyspaces/types/encryption_specification.py +38 -0
  88. capo_keyspaces/types/encryption_type.py +5 -0
  89. capo_keyspaces/types/field_definition.py +38 -0
  90. capo_keyspaces/types/field_list.py +29 -0
  91. capo_keyspaces/types/generic_string.py +5 -0
  92. capo_keyspaces/types/get_keyspace_request.py +31 -0
  93. capo_keyspaces/types/get_keyspace_response.py +87 -0
  94. capo_keyspaces/types/get_table_auto_scaling_settings_request.py +43 -0
  95. capo_keyspaces/types/get_table_auto_scaling_settings_response.py +95 -0
  96. capo_keyspaces/types/get_table_request.py +39 -0
  97. capo_keyspaces/types/get_table_response.py +287 -0
  98. capo_keyspaces/types/get_type_request.py +39 -0
  99. capo_keyspaces/types/get_type_response.py +140 -0
  100. capo_keyspaces/types/integer_object.py +5 -0
  101. capo_keyspaces/types/keyspace_name.py +5 -0
  102. capo_keyspaces/types/keyspace_status.py +5 -0
  103. capo_keyspaces/types/keyspace_summary.py +66 -0
  104. capo_keyspaces/types/keyspace_summary_list.py +31 -0
  105. capo_keyspaces/types/kms_key_arn.py +5 -0
  106. capo_keyspaces/types/list_keyspaces_request.py +35 -0
  107. capo_keyspaces/types/list_keyspaces_response.py +50 -0
  108. capo_keyspaces/types/list_tables_request.py +45 -0
  109. capo_keyspaces/types/list_tables_response.py +45 -0
  110. capo_keyspaces/types/list_tags_for_resource_request.py +45 -0
  111. capo_keyspaces/types/list_tags_for_resource_response.py +43 -0
  112. capo_keyspaces/types/list_types_request.py +45 -0
  113. capo_keyspaces/types/list_types_response.py +46 -0
  114. capo_keyspaces/types/max_results.py +5 -0
  115. capo_keyspaces/types/next_token.py +5 -0
  116. capo_keyspaces/types/partition_key.py +31 -0
  117. capo_keyspaces/types/partition_key_list.py +29 -0
  118. capo_keyspaces/types/point_in_time_recovery.py +33 -0
  119. capo_keyspaces/types/point_in_time_recovery_status.py +5 -0
  120. capo_keyspaces/types/point_in_time_recovery_summary.py +54 -0
  121. capo_keyspaces/types/region.py +5 -0
  122. capo_keyspaces/types/region_list.py +17 -0
  123. capo_keyspaces/types/replica_auto_scaling_specification.py +49 -0
  124. capo_keyspaces/types/replica_auto_scaling_specification_list.py +39 -0
  125. capo_keyspaces/types/replica_specification.py +61 -0
  126. capo_keyspaces/types/replica_specification_list.py +35 -0
  127. capo_keyspaces/types/replica_specification_summary.py +76 -0
  128. capo_keyspaces/types/replica_specification_summary_list.py +39 -0
  129. capo_keyspaces/types/replication_group_status.py +48 -0
  130. capo_keyspaces/types/replication_group_status_list.py +35 -0
  131. capo_keyspaces/types/replication_specification.py +48 -0
  132. capo_keyspaces/types/restore_table_request.py +190 -0
  133. capo_keyspaces/types/restore_table_response.py +31 -0
  134. capo_keyspaces/types/rs.py +5 -0
  135. capo_keyspaces/types/schema_definition.py +105 -0
  136. capo_keyspaces/types/sort_order.py +5 -0
  137. capo_keyspaces/types/static_column.py +31 -0
  138. capo_keyspaces/types/static_column_list.py +29 -0
  139. capo_keyspaces/types/stream_arn.py +5 -0
  140. capo_keyspaces/types/table_name.py +5 -0
  141. capo_keyspaces/types/table_name_list.py +17 -0
  142. capo_keyspaces/types/table_status.py +5 -0
  143. capo_keyspaces/types/table_summary.py +47 -0
  144. capo_keyspaces/types/table_summary_list.py +29 -0
  145. capo_keyspaces/types/tables_replication_progress.py +5 -0
  146. capo_keyspaces/types/tag.py +39 -0
  147. capo_keyspaces/types/tag_key.py +5 -0
  148. capo_keyspaces/types/tag_list.py +29 -0
  149. capo_keyspaces/types/tag_resource_request.py +45 -0
  150. capo_keyspaces/types/tag_resource_response.py +18 -0
  151. capo_keyspaces/types/tag_value.py +5 -0
  152. capo_keyspaces/types/target_tracking_scaling_policy_configuration.py +60 -0
  153. capo_keyspaces/types/throughput_mode.py +5 -0
  154. capo_keyspaces/types/time_to_live.py +31 -0
  155. capo_keyspaces/types/time_to_live_status.py +5 -0
  156. capo_keyspaces/types/timestamp.py +20 -0
  157. capo_keyspaces/types/type_name.py +5 -0
  158. capo_keyspaces/types/type_name_list.py +17 -0
  159. capo_keyspaces/types/type_status.py +5 -0
  160. capo_keyspaces/types/untag_resource_request.py +45 -0
  161. capo_keyspaces/types/untag_resource_response.py +18 -0
  162. capo_keyspaces/types/update_keyspace_request.py +74 -0
  163. capo_keyspaces/types/update_keyspace_response.py +31 -0
  164. capo_keyspaces/types/update_table_request.py +252 -0
  165. capo_keyspaces/types/update_table_response.py +31 -0
  166. capo_keyspaces/types/view_type.py +5 -0
  167. capo_keyspaces/types/warm_throughput_specification.py +29 -0
  168. capo_keyspaces/types/warm_throughput_specification_summary.py +49 -0
  169. capo_keyspaces/types/warm_throughput_status.py +5 -0
  170. capo_keyspaces-0.1.0.dist-info/METADATA +101 -0
  171. capo_keyspaces-0.1.0.dist-info/RECORD +174 -0
  172. capo_keyspaces-0.1.0.dist-info/WHEEL +5 -0
  173. capo_keyspaces-0.1.0.dist-info/licenses/LICENSE +21 -0
  174. capo_keyspaces-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,281 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#CreateTableRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import NotRequired, TypedDict
6
+
7
+ from capo_keyspaces.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_keyspaces.types.auto_scaling_specification
11
+ import capo_keyspaces.types.capacity_specification
12
+ import capo_keyspaces.types.cdc_specification
13
+ import capo_keyspaces.types.client_side_timestamps
14
+ import capo_keyspaces.types.comment
15
+ import capo_keyspaces.types.default_time_to_live
16
+ import capo_keyspaces.types.encryption_specification
17
+ import capo_keyspaces.types.keyspace_name
18
+ import capo_keyspaces.types.point_in_time_recovery
19
+ import capo_keyspaces.types.replica_specification_list
20
+ import capo_keyspaces.types.schema_definition
21
+ import capo_keyspaces.types.table_name
22
+ import capo_keyspaces.types.tag_list
23
+ import capo_keyspaces.types.time_to_live
24
+ import capo_keyspaces.types.warm_throughput_specification
25
+
26
+
27
+ class CreateTableRequest(TypedDict, closed=True):
28
+ keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName"
29
+ """<p>The name of the keyspace that the table is going to be created in.</p>"""
30
+ table_name: "capo_keyspaces.types.table_name.TableName"
31
+ """<p>The name of the table.</p>"""
32
+ schema_definition: "capo_keyspaces.types.schema_definition.SchemaDefinition"
33
+ r"""<p>The <code>schemaDefinition</code> consists of the following parameters.</p> <p>For each column to be created:</p> <ul> <li> <p> <code>name</code> - The name of the column.</p> </li> <li> <p> <code>type</code> - An Amazon Keyspaces data type. For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/cql.elements.html#cql.data-types\">Data types</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p> </li> </ul> <p>The primary key of the table consists of the following columns:</p> <ul> <li> <p> <code>partitionKeys</code> - The partition key can be a single column, or it can be a compound value composed of two or more columns. The partition key portion of the primary key is required and determines how Amazon Keyspaces stores your data.</p> </li> <li> <p> <code>name</code> - The name of each partition key column.</p> </li> <li> <p> <code>clusteringKeys</code> - The optional clustering column portion of your primary key determines how the data is clustered and sorted within each partition.</p> </li> <li> <p> <code>name</code> - The name of the clustering column. </p> </li> <li> <p> <code>orderBy</code> - Sets the ascendant (<code>ASC</code>) or descendant (<code>DESC</code>) order modifier.</p> <p>To define a column as static use <code>staticColumns</code> - Static columns store values that are shared by all rows in the same partition:</p> </li> <li> <p> <code>name</code> - The name of the column.</p> </li> <li> <p> <code>type</code> - An Amazon Keyspaces data type.</p> </li> </ul>"""
34
+ comment: NotRequired["capo_keyspaces.types.comment.Comment"]
35
+ """<p>This parameter allows to enter a description of the table.</p>"""
36
+ capacity_specification: NotRequired[
37
+ "capo_keyspaces.types.capacity_specification.CapacitySpecification"
38
+ ]
39
+ r"""<p>Specifies the read/write throughput capacity mode for the table. The options are:</p> <ul> <li> <p> <code>throughputMode:PAY_PER_REQUEST</code> and </p> </li> <li> <p> <code>throughputMode:PROVISIONED</code> - Provisioned capacity mode requires <code>readCapacityUnits</code> and <code>writeCapacityUnits</code> as input.</p> </li> </ul> <p>The default is <code>throughput_mode:PAY_PER_REQUEST</code>.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/ReadWriteCapacityMode.html\">Read/write capacity modes</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>"""
40
+ encryption_specification: NotRequired[
41
+ "capo_keyspaces.types.encryption_specification.EncryptionSpecification"
42
+ ]
43
+ r"""<p>Specifies how the encryption key for encryption at rest is managed for the table. You can choose one of the following KMS key (KMS key):</p> <ul> <li> <p> <code>type:AWS_OWNED_KMS_KEY</code> - This key is owned by Amazon Keyspaces. </p> </li> <li> <p> <code>type:CUSTOMER_MANAGED_KMS_KEY</code> - This key is stored in your account and is created, owned, and managed by you. This option requires the <code>kms_key_identifier</code> of the KMS key in Amazon Resource Name (ARN) format as input.</p> </li> </ul> <p>The default is <code>type:AWS_OWNED_KMS_KEY</code>.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/EncryptionAtRest.html\">Encryption at rest</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>"""
44
+ point_in_time_recovery: NotRequired[
45
+ "capo_keyspaces.types.point_in_time_recovery.PointInTimeRecovery"
46
+ ]
47
+ r"""<p>Specifies if <code>pointInTimeRecovery</code> is enabled or disabled for the table. The options are:</p> <ul> <li> <p> <code>status=ENABLED</code> </p> </li> <li> <p> <code>status=DISABLED</code> </p> </li> </ul> <p>If it's not specified, the default is <code>status=DISABLED</code>.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery.html\">Point-in-time recovery</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>"""
48
+ ttl: NotRequired["capo_keyspaces.types.time_to_live.TimeToLive"]
49
+ r"""<p>Enables Time to Live custom settings for the table. The options are:</p> <ul> <li> <p> <code>status:enabled</code> </p> </li> <li> <p> <code>status:disabled</code> </p> </li> </ul> <p>The default is <code>status:disabled</code>. After <code>ttl</code> is enabled, you can't disable it for the table.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL.html\">Expiring data by using Amazon Keyspaces Time to Live (TTL)</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>"""
50
+ default_time_to_live: NotRequired[
51
+ "capo_keyspaces.types.default_time_to_live.DefaultTimeToLive"
52
+ ]
53
+ r"""<p>The default Time to Live setting in seconds for the table.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/TTL-how-it-works.html#ttl-howitworks_default_ttl\">Setting the default TTL value for a table</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>"""
54
+ tags: NotRequired["capo_keyspaces.types.tag_list.TagList"]
55
+ r"""<p>A list of key-value pair tags to be attached to the resource. </p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/tagging-keyspaces.html\">Adding tags and labels to Amazon Keyspaces resources</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>"""
56
+ client_side_timestamps: NotRequired[
57
+ "capo_keyspaces.types.client_side_timestamps.ClientSideTimestamps"
58
+ ]
59
+ r"""<p> Enables client-side timestamps for the table. By default, the setting is disabled. You can enable client-side timestamps with the following option:</p> <ul> <li> <p> <code>status: \"enabled\"</code> </p> </li> </ul> <p>Once client-side timestamps are enabled for a table, this setting cannot be disabled.</p>"""
60
+ auto_scaling_specification: NotRequired[
61
+ "capo_keyspaces.types.auto_scaling_specification.AutoScalingSpecification"
62
+ ]
63
+ r"""<p>The optional auto scaling settings for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity automatically on your behalf.</p> <p>Auto scaling helps you provision throughput capacity for variable workloads efficiently by increasing and decreasing your table's read and write capacity automatically in response to application traffic. For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/autoscaling.html\">Managing throughput capacity automatically with Amazon Keyspaces auto scaling</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p> <p>By default, auto scaling is disabled for a table. </p>"""
64
+ replica_specifications: NotRequired[
65
+ "capo_keyspaces.types.replica_specification_list.ReplicaSpecificationList"
66
+ ]
67
+ """<p>The optional Amazon Web Services Region specific settings of a multi-Region table. These settings overwrite the general settings of the table for the specified Region. </p> <p>For a multi-Region table in provisioned capacity mode, you can configure the table's read capacity differently for each Region's replica. The write capacity, however, remains synchronized between all replicas to ensure that there's enough capacity to replicate writes across all Regions. To define the read capacity for a table replica in a specific Region, you can do so by configuring the following parameters.</p> <ul> <li> <p> <code>region</code>: The Region where these settings are applied. (Required)</p> </li> <li> <p> <code>readCapacityUnits</code>: The provisioned read capacity units. (Optional)</p> </li> <li> <p> <code>readCapacityAutoScaling</code>: The read capacity auto scaling settings for the table. (Optional) </p> </li> </ul>"""
68
+ cdc_specification: NotRequired[
69
+ "capo_keyspaces.types.cdc_specification.CdcSpecification"
70
+ ]
71
+ """<p>The CDC stream settings of the table.</p>"""
72
+ warm_throughput_specification: NotRequired[
73
+ "capo_keyspaces.types.warm_throughput_specification.WarmThroughputSpecification"
74
+ ]
75
+ r"""<p>Specifies the warm throughput settings for the table. Pre-warming a table helps you avoid capacity exceeded exceptions by pre-provisioning read and write capacity units to reduce cold start latency when your table receives traffic.</p> <p>For more information about pre-warming in Amazon Keyspaces, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/warm-throughput.html\">Pre-warm a table in Amazon Keyspaces</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>"""
76
+
77
+
78
+ # --- awsJson1_0 ser/de ---
79
+ def serialize_aws_json_1_0(value: CreateTableRequest) -> dict:
80
+ out: dict = {}
81
+ out["keyspaceName"] = value["keyspace_name"]
82
+ out["tableName"] = value["table_name"]
83
+ import capo_keyspaces.types.schema_definition
84
+
85
+ out["schemaDefinition"] = (
86
+ capo_keyspaces.types.schema_definition.serialize_aws_json_1_0(
87
+ value["schema_definition"]
88
+ )
89
+ )
90
+ if "comment" in value:
91
+ import capo_keyspaces.types.comment
92
+
93
+ out["comment"] = capo_keyspaces.types.comment.serialize_aws_json_1_0(
94
+ value["comment"]
95
+ )
96
+ if "capacity_specification" in value:
97
+ import capo_keyspaces.types.capacity_specification
98
+
99
+ out["capacitySpecification"] = (
100
+ capo_keyspaces.types.capacity_specification.serialize_aws_json_1_0(
101
+ value["capacity_specification"]
102
+ )
103
+ )
104
+ if "encryption_specification" in value:
105
+ import capo_keyspaces.types.encryption_specification
106
+
107
+ out["encryptionSpecification"] = (
108
+ capo_keyspaces.types.encryption_specification.serialize_aws_json_1_0(
109
+ value["encryption_specification"]
110
+ )
111
+ )
112
+ if "point_in_time_recovery" in value:
113
+ import capo_keyspaces.types.point_in_time_recovery
114
+
115
+ out["pointInTimeRecovery"] = (
116
+ capo_keyspaces.types.point_in_time_recovery.serialize_aws_json_1_0(
117
+ value["point_in_time_recovery"]
118
+ )
119
+ )
120
+ if "ttl" in value:
121
+ import capo_keyspaces.types.time_to_live
122
+
123
+ out["ttl"] = capo_keyspaces.types.time_to_live.serialize_aws_json_1_0(
124
+ value["ttl"]
125
+ )
126
+ if "default_time_to_live" in value:
127
+ out["defaultTimeToLive"] = value["default_time_to_live"]
128
+ if "tags" in value:
129
+ import capo_keyspaces.types.tag_list
130
+
131
+ out["tags"] = capo_keyspaces.types.tag_list.serialize_aws_json_1_0(
132
+ value["tags"]
133
+ )
134
+ if "client_side_timestamps" in value:
135
+ import capo_keyspaces.types.client_side_timestamps
136
+
137
+ out["clientSideTimestamps"] = (
138
+ capo_keyspaces.types.client_side_timestamps.serialize_aws_json_1_0(
139
+ value["client_side_timestamps"]
140
+ )
141
+ )
142
+ if "auto_scaling_specification" in value:
143
+ import capo_keyspaces.types.auto_scaling_specification
144
+
145
+ out["autoScalingSpecification"] = (
146
+ capo_keyspaces.types.auto_scaling_specification.serialize_aws_json_1_0(
147
+ value["auto_scaling_specification"]
148
+ )
149
+ )
150
+ if "replica_specifications" in value:
151
+ import capo_keyspaces.types.replica_specification_list
152
+
153
+ out["replicaSpecifications"] = (
154
+ capo_keyspaces.types.replica_specification_list.serialize_aws_json_1_0(
155
+ value["replica_specifications"]
156
+ )
157
+ )
158
+ if "cdc_specification" in value:
159
+ import capo_keyspaces.types.cdc_specification
160
+
161
+ out["cdcSpecification"] = (
162
+ capo_keyspaces.types.cdc_specification.serialize_aws_json_1_0(
163
+ value["cdc_specification"]
164
+ )
165
+ )
166
+ if "warm_throughput_specification" in value:
167
+ import capo_keyspaces.types.warm_throughput_specification
168
+
169
+ out["warmThroughputSpecification"] = (
170
+ capo_keyspaces.types.warm_throughput_specification.serialize_aws_json_1_0(
171
+ value["warm_throughput_specification"]
172
+ )
173
+ )
174
+ return out
175
+
176
+
177
+ def deserialize_aws_json_1_0(data: dict) -> CreateTableRequest:
178
+ out: CreateTableRequest = {} # type: ignore[typeddict-item]
179
+ if data.get("keyspaceName") is not None:
180
+ out["keyspace_name"] = data["keyspaceName"]
181
+ else:
182
+ raise DeserializationError("CreateTableRequest.keyspace_name required")
183
+ if data.get("tableName") is not None:
184
+ out["table_name"] = data["tableName"]
185
+ else:
186
+ raise DeserializationError("CreateTableRequest.table_name required")
187
+ if data.get("schemaDefinition") is not None:
188
+ import capo_keyspaces.types.schema_definition
189
+
190
+ out["schema_definition"] = (
191
+ capo_keyspaces.types.schema_definition.deserialize_aws_json_1_0(
192
+ data["schemaDefinition"]
193
+ )
194
+ )
195
+ else:
196
+ raise DeserializationError("CreateTableRequest.schema_definition required")
197
+ if data.get("comment") is not None:
198
+ import capo_keyspaces.types.comment
199
+
200
+ out["comment"] = capo_keyspaces.types.comment.deserialize_aws_json_1_0(
201
+ data["comment"]
202
+ )
203
+ if data.get("capacitySpecification") is not None:
204
+ import capo_keyspaces.types.capacity_specification
205
+
206
+ out["capacity_specification"] = (
207
+ capo_keyspaces.types.capacity_specification.deserialize_aws_json_1_0(
208
+ data["capacitySpecification"]
209
+ )
210
+ )
211
+ if data.get("encryptionSpecification") is not None:
212
+ import capo_keyspaces.types.encryption_specification
213
+
214
+ out["encryption_specification"] = (
215
+ capo_keyspaces.types.encryption_specification.deserialize_aws_json_1_0(
216
+ data["encryptionSpecification"]
217
+ )
218
+ )
219
+ if data.get("pointInTimeRecovery") is not None:
220
+ import capo_keyspaces.types.point_in_time_recovery
221
+
222
+ out["point_in_time_recovery"] = (
223
+ capo_keyspaces.types.point_in_time_recovery.deserialize_aws_json_1_0(
224
+ data["pointInTimeRecovery"]
225
+ )
226
+ )
227
+ if data.get("ttl") is not None:
228
+ import capo_keyspaces.types.time_to_live
229
+
230
+ out["ttl"] = capo_keyspaces.types.time_to_live.deserialize_aws_json_1_0(
231
+ data["ttl"]
232
+ )
233
+ if data.get("defaultTimeToLive") is not None:
234
+ out["default_time_to_live"] = data["defaultTimeToLive"]
235
+ if data.get("tags") is not None:
236
+ import capo_keyspaces.types.tag_list
237
+
238
+ out["tags"] = capo_keyspaces.types.tag_list.deserialize_aws_json_1_0(
239
+ data["tags"]
240
+ )
241
+ if data.get("clientSideTimestamps") is not None:
242
+ import capo_keyspaces.types.client_side_timestamps
243
+
244
+ out["client_side_timestamps"] = (
245
+ capo_keyspaces.types.client_side_timestamps.deserialize_aws_json_1_0(
246
+ data["clientSideTimestamps"]
247
+ )
248
+ )
249
+ if data.get("autoScalingSpecification") is not None:
250
+ import capo_keyspaces.types.auto_scaling_specification
251
+
252
+ out["auto_scaling_specification"] = (
253
+ capo_keyspaces.types.auto_scaling_specification.deserialize_aws_json_1_0(
254
+ data["autoScalingSpecification"]
255
+ )
256
+ )
257
+ if data.get("replicaSpecifications") is not None:
258
+ import capo_keyspaces.types.replica_specification_list
259
+
260
+ out["replica_specifications"] = (
261
+ capo_keyspaces.types.replica_specification_list.deserialize_aws_json_1_0(
262
+ data["replicaSpecifications"]
263
+ )
264
+ )
265
+ if data.get("cdcSpecification") is not None:
266
+ import capo_keyspaces.types.cdc_specification
267
+
268
+ out["cdc_specification"] = (
269
+ capo_keyspaces.types.cdc_specification.deserialize_aws_json_1_0(
270
+ data["cdcSpecification"]
271
+ )
272
+ )
273
+ if data.get("warmThroughputSpecification") is not None:
274
+ import capo_keyspaces.types.warm_throughput_specification
275
+
276
+ out["warm_throughput_specification"] = (
277
+ capo_keyspaces.types.warm_throughput_specification.deserialize_aws_json_1_0(
278
+ data["warmThroughputSpecification"]
279
+ )
280
+ )
281
+ return out
@@ -0,0 +1,31 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#CreateTableResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_keyspaces.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_keyspaces.types.arn
11
+
12
+
13
+ class CreateTableResponse(TypedDict, closed=True):
14
+ resource_arn: "capo_keyspaces.types.arn.ARN"
15
+ """<p>The unique identifier of the table in the format of an Amazon Resource Name (ARN).</p>"""
16
+
17
+
18
+ # --- awsJson1_0 ser/de ---
19
+ def serialize_aws_json_1_0(value: CreateTableResponse) -> dict:
20
+ out: dict = {}
21
+ out["resourceArn"] = value["resource_arn"]
22
+ return out
23
+
24
+
25
+ def deserialize_aws_json_1_0(data: dict) -> CreateTableResponse:
26
+ out: CreateTableResponse = {} # type: ignore[typeddict-item]
27
+ if data.get("resourceArn") is not None:
28
+ out["resource_arn"] = data["resourceArn"]
29
+ else:
30
+ raise DeserializationError("CreateTableResponse.resource_arn required")
31
+ return out
@@ -0,0 +1,57 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#CreateTypeRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_keyspaces.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_keyspaces.types.field_list
11
+ import capo_keyspaces.types.keyspace_name
12
+ import capo_keyspaces.types.type_name
13
+
14
+
15
+ class CreateTypeRequest(TypedDict, closed=True):
16
+ keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName"
17
+ """<p> The name of the keyspace. </p>"""
18
+ type_name: "capo_keyspaces.types.type_name.TypeName"
19
+ """<p> The name of the user-defined type. </p> <p>UDT names must contain 48 characters or less, must begin with an alphabetic character, and can only contain alpha-numeric characters and underscores. Amazon Keyspaces converts upper case characters automatically into lower case characters. </p> <p>Alternatively, you can declare a UDT name in double quotes. When declaring a UDT name inside double quotes, Amazon Keyspaces preserves upper casing and allows special characters.</p> <p>You can also use double quotes as part of the name when you create the UDT, but you must escape each double quote character with an additional double quote character.</p>"""
20
+ field_definitions: "capo_keyspaces.types.field_list.FieldList"
21
+ """<p> The field definitions, consisting of names and types, that define this type. </p>"""
22
+
23
+
24
+ # --- awsJson1_0 ser/de ---
25
+ def serialize_aws_json_1_0(value: CreateTypeRequest) -> dict:
26
+ out: dict = {}
27
+ out["keyspaceName"] = value["keyspace_name"]
28
+ out["typeName"] = value["type_name"]
29
+ import capo_keyspaces.types.field_list
30
+
31
+ out["fieldDefinitions"] = capo_keyspaces.types.field_list.serialize_aws_json_1_0(
32
+ value["field_definitions"]
33
+ )
34
+ return out
35
+
36
+
37
+ def deserialize_aws_json_1_0(data: dict) -> CreateTypeRequest:
38
+ out: CreateTypeRequest = {} # type: ignore[typeddict-item]
39
+ if data.get("keyspaceName") is not None:
40
+ out["keyspace_name"] = data["keyspaceName"]
41
+ else:
42
+ raise DeserializationError("CreateTypeRequest.keyspace_name required")
43
+ if data.get("typeName") is not None:
44
+ out["type_name"] = data["typeName"]
45
+ else:
46
+ raise DeserializationError("CreateTypeRequest.type_name required")
47
+ if data.get("fieldDefinitions") is not None:
48
+ import capo_keyspaces.types.field_list
49
+
50
+ out["field_definitions"] = (
51
+ capo_keyspaces.types.field_list.deserialize_aws_json_1_0(
52
+ data["fieldDefinitions"]
53
+ )
54
+ )
55
+ else:
56
+ raise DeserializationError("CreateTypeRequest.field_definitions required")
57
+ return out
@@ -0,0 +1,39 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#CreateTypeResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_keyspaces.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_keyspaces.types.arn
11
+ import capo_keyspaces.types.type_name
12
+
13
+
14
+ class CreateTypeResponse(TypedDict, closed=True):
15
+ keyspace_arn: "capo_keyspaces.types.arn.ARN"
16
+ """<p> The unique identifier of the keyspace that contains the new type in the format of an Amazon Resource Name (ARN). </p>"""
17
+ type_name: "capo_keyspaces.types.type_name.TypeName"
18
+ """<p> The formatted name of the user-defined type that was created. Note that Amazon Keyspaces requires the formatted name of the type for other operations, for example <code>GetType</code>. </p>"""
19
+
20
+
21
+ # --- awsJson1_0 ser/de ---
22
+ def serialize_aws_json_1_0(value: CreateTypeResponse) -> dict:
23
+ out: dict = {}
24
+ out["keyspaceArn"] = value["keyspace_arn"]
25
+ out["typeName"] = value["type_name"]
26
+ return out
27
+
28
+
29
+ def deserialize_aws_json_1_0(data: dict) -> CreateTypeResponse:
30
+ out: CreateTypeResponse = {} # type: ignore[typeddict-item]
31
+ if data.get("keyspaceArn") is not None:
32
+ out["keyspace_arn"] = data["keyspaceArn"]
33
+ else:
34
+ raise DeserializationError("CreateTypeResponse.keyspace_arn required")
35
+ if data.get("typeName") is not None:
36
+ out["type_name"] = data["typeName"]
37
+ else:
38
+ raise DeserializationError("CreateTypeResponse.type_name required")
39
+ return out
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#DefaultTimeToLive``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ DefaultTimeToLive: TypeAlias = int
@@ -0,0 +1,31 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#DeleteKeyspaceRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_keyspaces.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_keyspaces.types.keyspace_name
11
+
12
+
13
+ class DeleteKeyspaceRequest(TypedDict, closed=True):
14
+ keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName"
15
+ """<p>The name of the keyspace to be deleted.</p>"""
16
+
17
+
18
+ # --- awsJson1_0 ser/de ---
19
+ def serialize_aws_json_1_0(value: DeleteKeyspaceRequest) -> dict:
20
+ out: dict = {}
21
+ out["keyspaceName"] = value["keyspace_name"]
22
+ return out
23
+
24
+
25
+ def deserialize_aws_json_1_0(data: dict) -> DeleteKeyspaceRequest:
26
+ out: DeleteKeyspaceRequest = {} # type: ignore[typeddict-item]
27
+ if data.get("keyspaceName") is not None:
28
+ out["keyspace_name"] = data["keyspaceName"]
29
+ else:
30
+ raise DeserializationError("DeleteKeyspaceRequest.keyspace_name required")
31
+ return out
@@ -0,0 +1,18 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#DeleteKeyspaceResponse``."""
2
+
3
+ from typing_extensions import TypedDict
4
+
5
+
6
+ class DeleteKeyspaceResponse(TypedDict, closed=True):
7
+ pass
8
+
9
+
10
+ # --- awsJson1_0 ser/de ---
11
+ def serialize_aws_json_1_0(value: DeleteKeyspaceResponse) -> dict:
12
+ out: dict = {}
13
+ return out
14
+
15
+
16
+ def deserialize_aws_json_1_0(data: dict) -> DeleteKeyspaceResponse:
17
+ out: DeleteKeyspaceResponse = {} # type: ignore[typeddict-item]
18
+ return out
@@ -0,0 +1,39 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#DeleteTableRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_keyspaces.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_keyspaces.types.keyspace_name
11
+ import capo_keyspaces.types.table_name
12
+
13
+
14
+ class DeleteTableRequest(TypedDict, closed=True):
15
+ keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName"
16
+ """<p>The name of the keyspace of the to be deleted table.</p>"""
17
+ table_name: "capo_keyspaces.types.table_name.TableName"
18
+ """<p>The name of the table to be deleted.</p>"""
19
+
20
+
21
+ # --- awsJson1_0 ser/de ---
22
+ def serialize_aws_json_1_0(value: DeleteTableRequest) -> dict:
23
+ out: dict = {}
24
+ out["keyspaceName"] = value["keyspace_name"]
25
+ out["tableName"] = value["table_name"]
26
+ return out
27
+
28
+
29
+ def deserialize_aws_json_1_0(data: dict) -> DeleteTableRequest:
30
+ out: DeleteTableRequest = {} # type: ignore[typeddict-item]
31
+ if data.get("keyspaceName") is not None:
32
+ out["keyspace_name"] = data["keyspaceName"]
33
+ else:
34
+ raise DeserializationError("DeleteTableRequest.keyspace_name required")
35
+ if data.get("tableName") is not None:
36
+ out["table_name"] = data["tableName"]
37
+ else:
38
+ raise DeserializationError("DeleteTableRequest.table_name required")
39
+ return out
@@ -0,0 +1,18 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#DeleteTableResponse``."""
2
+
3
+ from typing_extensions import TypedDict
4
+
5
+
6
+ class DeleteTableResponse(TypedDict, closed=True):
7
+ pass
8
+
9
+
10
+ # --- awsJson1_0 ser/de ---
11
+ def serialize_aws_json_1_0(value: DeleteTableResponse) -> dict:
12
+ out: dict = {}
13
+ return out
14
+
15
+
16
+ def deserialize_aws_json_1_0(data: dict) -> DeleteTableResponse:
17
+ out: DeleteTableResponse = {} # type: ignore[typeddict-item]
18
+ return out
@@ -0,0 +1,39 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#DeleteTypeRequest``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_keyspaces.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_keyspaces.types.keyspace_name
11
+ import capo_keyspaces.types.type_name
12
+
13
+
14
+ class DeleteTypeRequest(TypedDict, closed=True):
15
+ keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName"
16
+ """<p> The name of the keyspace of the to be deleted type. </p>"""
17
+ type_name: "capo_keyspaces.types.type_name.TypeName"
18
+ """<p> The name of the type to be deleted. </p>"""
19
+
20
+
21
+ # --- awsJson1_0 ser/de ---
22
+ def serialize_aws_json_1_0(value: DeleteTypeRequest) -> dict:
23
+ out: dict = {}
24
+ out["keyspaceName"] = value["keyspace_name"]
25
+ out["typeName"] = value["type_name"]
26
+ return out
27
+
28
+
29
+ def deserialize_aws_json_1_0(data: dict) -> DeleteTypeRequest:
30
+ out: DeleteTypeRequest = {} # type: ignore[typeddict-item]
31
+ if data.get("keyspaceName") is not None:
32
+ out["keyspace_name"] = data["keyspaceName"]
33
+ else:
34
+ raise DeserializationError("DeleteTypeRequest.keyspace_name required")
35
+ if data.get("typeName") is not None:
36
+ out["type_name"] = data["typeName"]
37
+ else:
38
+ raise DeserializationError("DeleteTypeRequest.type_name required")
39
+ return out
@@ -0,0 +1,39 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#DeleteTypeResponse``."""
2
+
3
+ from typing import TYPE_CHECKING
4
+
5
+ from typing_extensions import TypedDict
6
+
7
+ from capo_keyspaces.errors import DeserializationError
8
+
9
+ if TYPE_CHECKING:
10
+ import capo_keyspaces.types.arn
11
+ import capo_keyspaces.types.type_name
12
+
13
+
14
+ class DeleteTypeResponse(TypedDict, closed=True):
15
+ keyspace_arn: "capo_keyspaces.types.arn.ARN"
16
+ """<p> The unique identifier of the keyspace from which the type was deleted in the format of an Amazon Resource Name (ARN). </p>"""
17
+ type_name: "capo_keyspaces.types.type_name.TypeName"
18
+ """<p> The name of the type that was deleted. </p>"""
19
+
20
+
21
+ # --- awsJson1_0 ser/de ---
22
+ def serialize_aws_json_1_0(value: DeleteTypeResponse) -> dict:
23
+ out: dict = {}
24
+ out["keyspaceArn"] = value["keyspace_arn"]
25
+ out["typeName"] = value["type_name"]
26
+ return out
27
+
28
+
29
+ def deserialize_aws_json_1_0(data: dict) -> DeleteTypeResponse:
30
+ out: DeleteTypeResponse = {} # type: ignore[typeddict-item]
31
+ if data.get("keyspaceArn") is not None:
32
+ out["keyspace_arn"] = data["keyspaceArn"]
33
+ else:
34
+ raise DeserializationError("DeleteTypeResponse.keyspace_arn required")
35
+ if data.get("typeName") is not None:
36
+ out["type_name"] = data["typeName"]
37
+ else:
38
+ raise DeserializationError("DeleteTypeResponse.type_name required")
39
+ return out
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#Depth``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ Depth: TypeAlias = int
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#DoubleObject``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ DoubleObject: TypeAlias = float