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,18 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#UntagResourceResponse``."""
2
+
3
+ from typing_extensions import TypedDict
4
+
5
+
6
+ class UntagResourceResponse(TypedDict, closed=True):
7
+ pass
8
+
9
+
10
+ # --- awsJson1_0 ser/de ---
11
+ def serialize_aws_json_1_0(value: UntagResourceResponse) -> dict:
12
+ out: dict = {}
13
+ return out
14
+
15
+
16
+ def deserialize_aws_json_1_0(data: dict) -> UntagResourceResponse:
17
+ out: UntagResourceResponse = {} # type: ignore[typeddict-item]
18
+ return out
@@ -0,0 +1,74 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#UpdateKeyspaceRequest``."""
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.client_side_timestamps
11
+ import capo_keyspaces.types.keyspace_name
12
+ import capo_keyspaces.types.replication_specification
13
+
14
+
15
+ class UpdateKeyspaceRequest(TypedDict, closed=True):
16
+ keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName"
17
+ """<p> The name of the keyspace. </p>"""
18
+ replication_specification: (
19
+ "capo_keyspaces.types.replication_specification.ReplicationSpecification"
20
+ )
21
+ client_side_timestamps: NotRequired[
22
+ "capo_keyspaces.types.client_side_timestamps.ClientSideTimestamps"
23
+ ]
24
+
25
+
26
+ # --- awsJson1_0 ser/de ---
27
+ def serialize_aws_json_1_0(value: UpdateKeyspaceRequest) -> dict:
28
+ out: dict = {}
29
+ out["keyspaceName"] = value["keyspace_name"]
30
+ import capo_keyspaces.types.replication_specification
31
+
32
+ out["replicationSpecification"] = (
33
+ capo_keyspaces.types.replication_specification.serialize_aws_json_1_0(
34
+ value["replication_specification"]
35
+ )
36
+ )
37
+ if "client_side_timestamps" in value:
38
+ import capo_keyspaces.types.client_side_timestamps
39
+
40
+ out["clientSideTimestamps"] = (
41
+ capo_keyspaces.types.client_side_timestamps.serialize_aws_json_1_0(
42
+ value["client_side_timestamps"]
43
+ )
44
+ )
45
+ return out
46
+
47
+
48
+ def deserialize_aws_json_1_0(data: dict) -> UpdateKeyspaceRequest:
49
+ out: UpdateKeyspaceRequest = {} # type: ignore[typeddict-item]
50
+ if data.get("keyspaceName") is not None:
51
+ out["keyspace_name"] = data["keyspaceName"]
52
+ else:
53
+ raise DeserializationError("UpdateKeyspaceRequest.keyspace_name required")
54
+ if data.get("replicationSpecification") is not None:
55
+ import capo_keyspaces.types.replication_specification
56
+
57
+ out["replication_specification"] = (
58
+ capo_keyspaces.types.replication_specification.deserialize_aws_json_1_0(
59
+ data["replicationSpecification"]
60
+ )
61
+ )
62
+ else:
63
+ raise DeserializationError(
64
+ "UpdateKeyspaceRequest.replication_specification required"
65
+ )
66
+ if data.get("clientSideTimestamps") is not None:
67
+ import capo_keyspaces.types.client_side_timestamps
68
+
69
+ out["client_side_timestamps"] = (
70
+ capo_keyspaces.types.client_side_timestamps.deserialize_aws_json_1_0(
71
+ data["clientSideTimestamps"]
72
+ )
73
+ )
74
+ return out
@@ -0,0 +1,31 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#UpdateKeyspaceResponse``."""
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 UpdateKeyspaceResponse(TypedDict, closed=True):
14
+ resource_arn: "capo_keyspaces.types.arn.ARN"
15
+ """<p> The unique identifier of the keyspace 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: UpdateKeyspaceResponse) -> dict:
20
+ out: dict = {}
21
+ out["resourceArn"] = value["resource_arn"]
22
+ return out
23
+
24
+
25
+ def deserialize_aws_json_1_0(data: dict) -> UpdateKeyspaceResponse:
26
+ out: UpdateKeyspaceResponse = {} # type: ignore[typeddict-item]
27
+ if data.get("resourceArn") is not None:
28
+ out["resource_arn"] = data["resourceArn"]
29
+ else:
30
+ raise DeserializationError("UpdateKeyspaceResponse.resource_arn required")
31
+ return out
@@ -0,0 +1,252 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#UpdateTableRequest``."""
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.column_definition_list
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.table_name
21
+ import capo_keyspaces.types.time_to_live
22
+ import capo_keyspaces.types.warm_throughput_specification
23
+
24
+
25
+ class UpdateTableRequest(TypedDict, closed=True):
26
+ keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName"
27
+ """<p>The name of the keyspace the specified table is stored in.</p>"""
28
+ table_name: "capo_keyspaces.types.table_name.TableName"
29
+ """<p>The name of the table.</p>"""
30
+ add_columns: NotRequired[
31
+ "capo_keyspaces.types.column_definition_list.ColumnDefinitionList"
32
+ ]
33
+ r"""<p>For each column to be added to the specified table:</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>"""
34
+ capacity_specification: NotRequired[
35
+ "capo_keyspaces.types.capacity_specification.CapacitySpecification"
36
+ ]
37
+ r"""<p>Modifies 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>"""
38
+ encryption_specification: NotRequired[
39
+ "capo_keyspaces.types.encryption_specification.EncryptionSpecification"
40
+ ]
41
+ r"""<p>Modifies the encryption settings of 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>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>"""
42
+ point_in_time_recovery: NotRequired[
43
+ "capo_keyspaces.types.point_in_time_recovery.PointInTimeRecovery"
44
+ ]
45
+ r"""<p>Modifies the <code>pointInTimeRecovery</code> settings of 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>"""
46
+ ttl: NotRequired["capo_keyspaces.types.time_to_live.TimeToLive"]
47
+ r"""<p>Modifies 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>"""
48
+ default_time_to_live: NotRequired[
49
+ "capo_keyspaces.types.default_time_to_live.DefaultTimeToLive"
50
+ ]
51
+ 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>"""
52
+ client_side_timestamps: NotRequired[
53
+ "capo_keyspaces.types.client_side_timestamps.ClientSideTimestamps"
54
+ ]
55
+ 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>"""
56
+ auto_scaling_specification: NotRequired[
57
+ "capo_keyspaces.types.auto_scaling_specification.AutoScalingSpecification"
58
+ ]
59
+ r"""<p>The optional auto scaling settings to update for a table in provisioned capacity mode. Specifies if the service can manage throughput capacity of a provisioned table automatically on your behalf. Amazon Keyspaces 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.</p> <p>If auto scaling is already enabled for the table, you can use <code>UpdateTable</code> to update the minimum and maximum values or the auto scaling policy settings independently.</p> <p>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>"""
60
+ replica_specifications: NotRequired[
61
+ "capo_keyspaces.types.replica_specification_list.ReplicaSpecificationList"
62
+ ]
63
+ """<p>The Region specific settings of a multi-Regional table.</p>"""
64
+ cdc_specification: NotRequired[
65
+ "capo_keyspaces.types.cdc_specification.CdcSpecification"
66
+ ]
67
+ """<p>The CDC stream settings of the table.</p>"""
68
+ warm_throughput_specification: NotRequired[
69
+ "capo_keyspaces.types.warm_throughput_specification.WarmThroughputSpecification"
70
+ ]
71
+ """<p>Modifies the warm throughput settings for the table. You can update the read and write capacity units to adjust the pre-provisioned throughput.</p>"""
72
+
73
+
74
+ # --- awsJson1_0 ser/de ---
75
+ def serialize_aws_json_1_0(value: UpdateTableRequest) -> dict:
76
+ out: dict = {}
77
+ out["keyspaceName"] = value["keyspace_name"]
78
+ out["tableName"] = value["table_name"]
79
+ if "add_columns" in value:
80
+ import capo_keyspaces.types.column_definition_list
81
+
82
+ out["addColumns"] = (
83
+ capo_keyspaces.types.column_definition_list.serialize_aws_json_1_0(
84
+ value["add_columns"]
85
+ )
86
+ )
87
+ if "capacity_specification" in value:
88
+ import capo_keyspaces.types.capacity_specification
89
+
90
+ out["capacitySpecification"] = (
91
+ capo_keyspaces.types.capacity_specification.serialize_aws_json_1_0(
92
+ value["capacity_specification"]
93
+ )
94
+ )
95
+ if "encryption_specification" in value:
96
+ import capo_keyspaces.types.encryption_specification
97
+
98
+ out["encryptionSpecification"] = (
99
+ capo_keyspaces.types.encryption_specification.serialize_aws_json_1_0(
100
+ value["encryption_specification"]
101
+ )
102
+ )
103
+ if "point_in_time_recovery" in value:
104
+ import capo_keyspaces.types.point_in_time_recovery
105
+
106
+ out["pointInTimeRecovery"] = (
107
+ capo_keyspaces.types.point_in_time_recovery.serialize_aws_json_1_0(
108
+ value["point_in_time_recovery"]
109
+ )
110
+ )
111
+ if "ttl" in value:
112
+ import capo_keyspaces.types.time_to_live
113
+
114
+ out["ttl"] = capo_keyspaces.types.time_to_live.serialize_aws_json_1_0(
115
+ value["ttl"]
116
+ )
117
+ if "default_time_to_live" in value:
118
+ out["defaultTimeToLive"] = value["default_time_to_live"]
119
+ if "client_side_timestamps" in value:
120
+ import capo_keyspaces.types.client_side_timestamps
121
+
122
+ out["clientSideTimestamps"] = (
123
+ capo_keyspaces.types.client_side_timestamps.serialize_aws_json_1_0(
124
+ value["client_side_timestamps"]
125
+ )
126
+ )
127
+ if "auto_scaling_specification" in value:
128
+ import capo_keyspaces.types.auto_scaling_specification
129
+
130
+ out["autoScalingSpecification"] = (
131
+ capo_keyspaces.types.auto_scaling_specification.serialize_aws_json_1_0(
132
+ value["auto_scaling_specification"]
133
+ )
134
+ )
135
+ if "replica_specifications" in value:
136
+ import capo_keyspaces.types.replica_specification_list
137
+
138
+ out["replicaSpecifications"] = (
139
+ capo_keyspaces.types.replica_specification_list.serialize_aws_json_1_0(
140
+ value["replica_specifications"]
141
+ )
142
+ )
143
+ if "cdc_specification" in value:
144
+ import capo_keyspaces.types.cdc_specification
145
+
146
+ out["cdcSpecification"] = (
147
+ capo_keyspaces.types.cdc_specification.serialize_aws_json_1_0(
148
+ value["cdc_specification"]
149
+ )
150
+ )
151
+ if "warm_throughput_specification" in value:
152
+ import capo_keyspaces.types.warm_throughput_specification
153
+
154
+ out["warmThroughputSpecification"] = (
155
+ capo_keyspaces.types.warm_throughput_specification.serialize_aws_json_1_0(
156
+ value["warm_throughput_specification"]
157
+ )
158
+ )
159
+ return out
160
+
161
+
162
+ def deserialize_aws_json_1_0(data: dict) -> UpdateTableRequest:
163
+ out: UpdateTableRequest = {} # type: ignore[typeddict-item]
164
+ if data.get("keyspaceName") is not None:
165
+ out["keyspace_name"] = data["keyspaceName"]
166
+ else:
167
+ raise DeserializationError("UpdateTableRequest.keyspace_name required")
168
+ if data.get("tableName") is not None:
169
+ out["table_name"] = data["tableName"]
170
+ else:
171
+ raise DeserializationError("UpdateTableRequest.table_name required")
172
+ if data.get("addColumns") is not None:
173
+ import capo_keyspaces.types.column_definition_list
174
+
175
+ out["add_columns"] = (
176
+ capo_keyspaces.types.column_definition_list.deserialize_aws_json_1_0(
177
+ data["addColumns"]
178
+ )
179
+ )
180
+ if data.get("capacitySpecification") is not None:
181
+ import capo_keyspaces.types.capacity_specification
182
+
183
+ out["capacity_specification"] = (
184
+ capo_keyspaces.types.capacity_specification.deserialize_aws_json_1_0(
185
+ data["capacitySpecification"]
186
+ )
187
+ )
188
+ if data.get("encryptionSpecification") is not None:
189
+ import capo_keyspaces.types.encryption_specification
190
+
191
+ out["encryption_specification"] = (
192
+ capo_keyspaces.types.encryption_specification.deserialize_aws_json_1_0(
193
+ data["encryptionSpecification"]
194
+ )
195
+ )
196
+ if data.get("pointInTimeRecovery") is not None:
197
+ import capo_keyspaces.types.point_in_time_recovery
198
+
199
+ out["point_in_time_recovery"] = (
200
+ capo_keyspaces.types.point_in_time_recovery.deserialize_aws_json_1_0(
201
+ data["pointInTimeRecovery"]
202
+ )
203
+ )
204
+ if data.get("ttl") is not None:
205
+ import capo_keyspaces.types.time_to_live
206
+
207
+ out["ttl"] = capo_keyspaces.types.time_to_live.deserialize_aws_json_1_0(
208
+ data["ttl"]
209
+ )
210
+ if data.get("defaultTimeToLive") is not None:
211
+ out["default_time_to_live"] = data["defaultTimeToLive"]
212
+ if data.get("clientSideTimestamps") is not None:
213
+ import capo_keyspaces.types.client_side_timestamps
214
+
215
+ out["client_side_timestamps"] = (
216
+ capo_keyspaces.types.client_side_timestamps.deserialize_aws_json_1_0(
217
+ data["clientSideTimestamps"]
218
+ )
219
+ )
220
+ if data.get("autoScalingSpecification") is not None:
221
+ import capo_keyspaces.types.auto_scaling_specification
222
+
223
+ out["auto_scaling_specification"] = (
224
+ capo_keyspaces.types.auto_scaling_specification.deserialize_aws_json_1_0(
225
+ data["autoScalingSpecification"]
226
+ )
227
+ )
228
+ if data.get("replicaSpecifications") is not None:
229
+ import capo_keyspaces.types.replica_specification_list
230
+
231
+ out["replica_specifications"] = (
232
+ capo_keyspaces.types.replica_specification_list.deserialize_aws_json_1_0(
233
+ data["replicaSpecifications"]
234
+ )
235
+ )
236
+ if data.get("cdcSpecification") is not None:
237
+ import capo_keyspaces.types.cdc_specification
238
+
239
+ out["cdc_specification"] = (
240
+ capo_keyspaces.types.cdc_specification.deserialize_aws_json_1_0(
241
+ data["cdcSpecification"]
242
+ )
243
+ )
244
+ if data.get("warmThroughputSpecification") is not None:
245
+ import capo_keyspaces.types.warm_throughput_specification
246
+
247
+ out["warm_throughput_specification"] = (
248
+ capo_keyspaces.types.warm_throughput_specification.deserialize_aws_json_1_0(
249
+ data["warmThroughputSpecification"]
250
+ )
251
+ )
252
+ return out
@@ -0,0 +1,31 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#UpdateTableResponse``."""
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 UpdateTableResponse(TypedDict, closed=True):
14
+ resource_arn: "capo_keyspaces.types.arn.ARN"
15
+ """<p>The Amazon Resource Name (ARN) of the modified table.</p>"""
16
+
17
+
18
+ # --- awsJson1_0 ser/de ---
19
+ def serialize_aws_json_1_0(value: UpdateTableResponse) -> dict:
20
+ out: dict = {}
21
+ out["resourceArn"] = value["resource_arn"]
22
+ return out
23
+
24
+
25
+ def deserialize_aws_json_1_0(data: dict) -> UpdateTableResponse:
26
+ out: UpdateTableResponse = {} # type: ignore[typeddict-item]
27
+ if data.get("resourceArn") is not None:
28
+ out["resource_arn"] = data["resourceArn"]
29
+ else:
30
+ raise DeserializationError("UpdateTableResponse.resource_arn required")
31
+ return out
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#ViewType``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ ViewType: TypeAlias = str
@@ -0,0 +1,29 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#WarmThroughputSpecification``."""
2
+
3
+ from typing_extensions import NotRequired, TypedDict
4
+
5
+
6
+ class WarmThroughputSpecification(TypedDict, closed=True):
7
+ read_units_per_second: NotRequired["int"]
8
+ """<p>The number of read capacity units per second to pre-warm the table for read capacity throughput. The minimum value is 1.</p>"""
9
+ write_units_per_second: NotRequired["int"]
10
+ """<p>The number of write capacity units per second to pre-warm the table for write capacity throughput. The minimum value is 1.</p>"""
11
+
12
+
13
+ # --- awsJson1_0 ser/de ---
14
+ def serialize_aws_json_1_0(value: WarmThroughputSpecification) -> dict:
15
+ out: dict = {}
16
+ if "read_units_per_second" in value:
17
+ out["readUnitsPerSecond"] = value["read_units_per_second"]
18
+ if "write_units_per_second" in value:
19
+ out["writeUnitsPerSecond"] = value["write_units_per_second"]
20
+ return out
21
+
22
+
23
+ def deserialize_aws_json_1_0(data: dict) -> WarmThroughputSpecification:
24
+ out: WarmThroughputSpecification = {} # type: ignore[typeddict-item]
25
+ if data.get("readUnitsPerSecond") is not None:
26
+ out["read_units_per_second"] = data["readUnitsPerSecond"]
27
+ if data.get("writeUnitsPerSecond") is not None:
28
+ out["write_units_per_second"] = data["writeUnitsPerSecond"]
29
+ return out
@@ -0,0 +1,49 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#WarmThroughputSpecificationSummary``."""
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.warm_throughput_status
11
+
12
+
13
+ class WarmThroughputSpecificationSummary(TypedDict, closed=True):
14
+ read_units_per_second: "int"
15
+ """<p>The number of read capacity units per second currently configured for warm throughput.</p>"""
16
+ write_units_per_second: "int"
17
+ """<p>The number of write capacity units per second currently configured for warm throughput.</p>"""
18
+ status: "capo_keyspaces.types.warm_throughput_status.WarmThroughputStatus"
19
+ """<p>The current status of the warm throughput configuration. Valid values are <code>AVAILABLE</code> when the configuration is active, and <code>UPDATING</code> when changes are being applied.</p>"""
20
+
21
+
22
+ # --- awsJson1_0 ser/de ---
23
+ def serialize_aws_json_1_0(value: WarmThroughputSpecificationSummary) -> dict:
24
+ out: dict = {}
25
+ out["readUnitsPerSecond"] = value["read_units_per_second"]
26
+ out["writeUnitsPerSecond"] = value["write_units_per_second"]
27
+ out["status"] = value["status"]
28
+ return out
29
+
30
+
31
+ def deserialize_aws_json_1_0(data: dict) -> WarmThroughputSpecificationSummary:
32
+ out: WarmThroughputSpecificationSummary = {} # type: ignore[typeddict-item]
33
+ if data.get("readUnitsPerSecond") is not None:
34
+ out["read_units_per_second"] = data["readUnitsPerSecond"]
35
+ else:
36
+ raise DeserializationError(
37
+ "WarmThroughputSpecificationSummary.read_units_per_second required"
38
+ )
39
+ if data.get("writeUnitsPerSecond") is not None:
40
+ out["write_units_per_second"] = data["writeUnitsPerSecond"]
41
+ else:
42
+ raise DeserializationError(
43
+ "WarmThroughputSpecificationSummary.write_units_per_second required"
44
+ )
45
+ if data.get("status") is not None:
46
+ out["status"] = data["status"]
47
+ else:
48
+ raise DeserializationError("WarmThroughputSpecificationSummary.status required")
49
+ return out
@@ -0,0 +1,5 @@
1
+ """Generated from Smithy shape ``com.amazonaws.keyspaces#WarmThroughputStatus``."""
2
+
3
+ from typing import TypeAlias
4
+
5
+ WarmThroughputStatus: TypeAlias = str
@@ -0,0 +1,101 @@
1
+ Metadata-Version: 2.4
2
+ Name: capo-keyspaces
3
+ Version: 0.1.0
4
+ Summary: Python SDK for Keyspaces.
5
+ Classifier: Development Status :: 4 - Beta
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: License :: OSI Approved :: MIT License
8
+ Classifier: Operating System :: OS Independent
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Topic :: Software Development :: Code Generators
16
+ Classifier: Typing :: Typed
17
+ Requires-Python: >=3.10
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: zapros>=0.13.0
21
+ Provides-Extra: sso
22
+ Requires-Dist: capo-sso>=0.2.0; extra == "sso"
23
+ Requires-Dist: capo-sso-oidc>=0.2.0; extra == "sso"
24
+ Requires-Dist: capo-sts>=0.3.0; extra == "sso"
25
+ Dynamic: license-file
26
+
27
+ # Getting Started
28
+
29
+ ## Installation
30
+
31
+ ```
32
+ pip install capo-keyspaces
33
+ ```
34
+
35
+ ## Usage
36
+
37
+ ```python
38
+ from capo_keyspaces import AsyncKeyspacesClient
39
+
40
+
41
+ async def main():
42
+ async with AsyncKeyspacesClient() as keyspaces:
43
+ # Example: call the create_keyspace operation
44
+ response = await keyspaces.create_keyspace()
45
+ print(response["resource_arn"])
46
+ ```
47
+
48
+ ## Pagination
49
+
50
+ Some operations in this SDK support pagination. If the operation supports pagination it will have an `iter_` prefixed method that returns an async iterator.
51
+
52
+ ```python
53
+ from capo_keyspaces import AsyncKeyspacesClient
54
+
55
+
56
+ async def main():
57
+ async with AsyncKeyspacesClient() as keyspaces:
58
+ # Example: paginate over list_keyspaces
59
+ async for item in keyspaces.iter_list_keyspaces():
60
+ print(item)
61
+ ```
62
+
63
+ ## Error Handling
64
+
65
+ The SDK raises exceptions for errors returned by the API. Catch them to handle failures gracefully.
66
+
67
+ ```python
68
+ from capo_keyspaces import AsyncKeyspacesClient
69
+ from capo_keyspaces.error import AccessDeniedException
70
+
71
+
72
+ async def main():
73
+ async with AsyncKeyspacesClient() as keyspaces:
74
+ try:
75
+ await keyspaces.create_keyspace()
76
+ except AccessDeniedException as e:
77
+ print(f"Error: {e}")
78
+ print(e.data) # additional error data
79
+ ```
80
+
81
+ ## Retrying
82
+
83
+ The SDK retries failed operations automatically. Retry behaviour follows the Smithy specification: errors are retried based on their `is_retryable` and `is_throttling_error` attributes. Throttling errors use a longer base delay. Network-level failures (connection errors and timeouts) are also retried. Non-retryable errors, such as client errors without the `@retryable` trait, are raised immediately without further attempts.
84
+
85
+ The number of attempts defaults to 3 and can be changed at the client level via `retry_max_attempts`, or per call via `config_overrides`.
86
+
87
+ ```python
88
+ from capo_keyspaces import AsyncKeyspacesClient
89
+
90
+
91
+ async def main():
92
+ async with AsyncKeyspacesClient() as keyspaces:
93
+ # Default: 3 attempts for every operation
94
+ response = await keyspaces.create_keyspace()
95
+
96
+ # Override per operation
97
+ response = await keyspaces.create_keyspace(config_overrides={"retry_max_attempts": 5})
98
+
99
+ # Disable retries for this call
100
+ response = await keyspaces.create_keyspace(config_overrides={"retry_max_attempts": 1})
101
+ ```