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.
- capo_keyspaces/__init__.py +70 -0
- capo_keyspaces/_async.py +25 -0
- capo_keyspaces/_auth/_identity.py +16 -0
- capo_keyspaces/_auth/_providers.py +886 -0
- capo_keyspaces/_auth/_signers.py +88 -0
- capo_keyspaces/_auth/_sigv4.py +434 -0
- capo_keyspaces/_auth/_zapros_handler.py +80 -0
- capo_keyspaces/_iter.py +113 -0
- capo_keyspaces/_operations/keyspaces_service/create_keyspace.py +170 -0
- capo_keyspaces/_operations/keyspaces_service/create_table.py +183 -0
- capo_keyspaces/_operations/keyspaces_service/create_type.py +172 -0
- capo_keyspaces/_operations/keyspaces_service/delete_keyspace.py +165 -0
- capo_keyspaces/_operations/keyspaces_service/delete_table.py +163 -0
- capo_keyspaces/_operations/keyspaces_service/delete_type.py +171 -0
- capo_keyspaces/_operations/keyspaces_service/get_keyspace.py +168 -0
- capo_keyspaces/_operations/keyspaces_service/get_table.py +173 -0
- capo_keyspaces/_operations/keyspaces_service/get_table_auto_scaling_settings.py +168 -0
- capo_keyspaces/_operations/keyspaces_service/get_type.py +166 -0
- capo_keyspaces/_operations/keyspaces_service/list_keyspaces.py +167 -0
- capo_keyspaces/_operations/keyspaces_service/list_tables.py +167 -0
- capo_keyspaces/_operations/keyspaces_service/list_tags_for_resource.py +167 -0
- capo_keyspaces/_operations/keyspaces_service/list_types.py +163 -0
- capo_keyspaces/_operations/keyspaces_service/restore_table.py +178 -0
- capo_keyspaces/_operations/keyspaces_service/tag_resource.py +164 -0
- capo_keyspaces/_operations/keyspaces_service/untag_resource.py +164 -0
- capo_keyspaces/_operations/keyspaces_service/update_keyspace.py +175 -0
- capo_keyspaces/_operations/keyspaces_service/update_table.py +181 -0
- capo_keyspaces/_pagination.py +21 -0
- capo_keyspaces/_protocol/__init__.py +1 -0
- capo_keyspaces/_protocol/errors.py +93 -0
- capo_keyspaces/_protocol/eventstream.py +238 -0
- capo_keyspaces/_protocol/serialize.py +47 -0
- capo_keyspaces/_protocol/xml.py +33 -0
- capo_keyspaces/_rule_engine/__init__.py +0 -0
- capo_keyspaces/_rule_engine/_aws_partition.py +160 -0
- capo_keyspaces/_rule_engine/_endpoint_rule_set.py +150 -0
- capo_keyspaces/_rule_engine/_endpoint_runtime.py +389 -0
- capo_keyspaces/_services/_aws_config.py +160 -0
- capo_keyspaces/_services/_pipeline.py +198 -0
- capo_keyspaces/_services/async_keyspaces.py +1467 -0
- capo_keyspaces/_services/keyspaces.py +1448 -0
- capo_keyspaces/errors/__init__.py +35 -0
- capo_keyspaces/errors/_base.py +94 -0
- capo_keyspaces/errors/access_denied_exception.py +47 -0
- capo_keyspaces/errors/conflict_exception.py +47 -0
- capo_keyspaces/errors/internal_server_exception.py +47 -0
- capo_keyspaces/errors/resource_not_found_exception.py +58 -0
- capo_keyspaces/errors/service_quota_exceeded_exception.py +49 -0
- capo_keyspaces/errors/validation_exception.py +47 -0
- capo_keyspaces/py.typed +0 -0
- capo_keyspaces/types/_prelude/blob.py +12 -0
- capo_keyspaces/types/_prelude/timestamp.py +17 -0
- capo_keyspaces/types/arn.py +5 -0
- capo_keyspaces/types/auto_scaling_policy.py +42 -0
- capo_keyspaces/types/auto_scaling_settings.py +63 -0
- capo_keyspaces/types/auto_scaling_specification.py +62 -0
- capo_keyspaces/types/boolean_object.py +5 -0
- capo_keyspaces/types/capacity_specification.py +48 -0
- capo_keyspaces/types/capacity_specification_summary.py +71 -0
- capo_keyspaces/types/capacity_units.py +5 -0
- capo_keyspaces/types/cdc_propagate_tags.py +5 -0
- capo_keyspaces/types/cdc_specification.py +62 -0
- capo_keyspaces/types/cdc_specification_summary.py +38 -0
- capo_keyspaces/types/cdc_status.py +5 -0
- capo_keyspaces/types/client_side_timestamps.py +33 -0
- capo_keyspaces/types/client_side_timestamps_status.py +5 -0
- capo_keyspaces/types/clustering_key.py +39 -0
- capo_keyspaces/types/clustering_key_list.py +29 -0
- capo_keyspaces/types/column_definition.py +38 -0
- capo_keyspaces/types/column_definition_list.py +33 -0
- capo_keyspaces/types/comment.py +26 -0
- capo_keyspaces/types/create_keyspace_request.py +67 -0
- capo_keyspaces/types/create_keyspace_response.py +31 -0
- capo_keyspaces/types/create_table_request.py +281 -0
- capo_keyspaces/types/create_table_response.py +31 -0
- capo_keyspaces/types/create_type_request.py +57 -0
- capo_keyspaces/types/create_type_response.py +39 -0
- capo_keyspaces/types/default_time_to_live.py +5 -0
- capo_keyspaces/types/delete_keyspace_request.py +31 -0
- capo_keyspaces/types/delete_keyspace_response.py +18 -0
- capo_keyspaces/types/delete_table_request.py +39 -0
- capo_keyspaces/types/delete_table_response.py +18 -0
- capo_keyspaces/types/delete_type_request.py +39 -0
- capo_keyspaces/types/delete_type_response.py +39 -0
- capo_keyspaces/types/depth.py +5 -0
- capo_keyspaces/types/double_object.py +5 -0
- capo_keyspaces/types/encryption_specification.py +38 -0
- capo_keyspaces/types/encryption_type.py +5 -0
- capo_keyspaces/types/field_definition.py +38 -0
- capo_keyspaces/types/field_list.py +29 -0
- capo_keyspaces/types/generic_string.py +5 -0
- capo_keyspaces/types/get_keyspace_request.py +31 -0
- capo_keyspaces/types/get_keyspace_response.py +87 -0
- capo_keyspaces/types/get_table_auto_scaling_settings_request.py +43 -0
- capo_keyspaces/types/get_table_auto_scaling_settings_response.py +95 -0
- capo_keyspaces/types/get_table_request.py +39 -0
- capo_keyspaces/types/get_table_response.py +287 -0
- capo_keyspaces/types/get_type_request.py +39 -0
- capo_keyspaces/types/get_type_response.py +140 -0
- capo_keyspaces/types/integer_object.py +5 -0
- capo_keyspaces/types/keyspace_name.py +5 -0
- capo_keyspaces/types/keyspace_status.py +5 -0
- capo_keyspaces/types/keyspace_summary.py +66 -0
- capo_keyspaces/types/keyspace_summary_list.py +31 -0
- capo_keyspaces/types/kms_key_arn.py +5 -0
- capo_keyspaces/types/list_keyspaces_request.py +35 -0
- capo_keyspaces/types/list_keyspaces_response.py +50 -0
- capo_keyspaces/types/list_tables_request.py +45 -0
- capo_keyspaces/types/list_tables_response.py +45 -0
- capo_keyspaces/types/list_tags_for_resource_request.py +45 -0
- capo_keyspaces/types/list_tags_for_resource_response.py +43 -0
- capo_keyspaces/types/list_types_request.py +45 -0
- capo_keyspaces/types/list_types_response.py +46 -0
- capo_keyspaces/types/max_results.py +5 -0
- capo_keyspaces/types/next_token.py +5 -0
- capo_keyspaces/types/partition_key.py +31 -0
- capo_keyspaces/types/partition_key_list.py +29 -0
- capo_keyspaces/types/point_in_time_recovery.py +33 -0
- capo_keyspaces/types/point_in_time_recovery_status.py +5 -0
- capo_keyspaces/types/point_in_time_recovery_summary.py +54 -0
- capo_keyspaces/types/region.py +5 -0
- capo_keyspaces/types/region_list.py +17 -0
- capo_keyspaces/types/replica_auto_scaling_specification.py +49 -0
- capo_keyspaces/types/replica_auto_scaling_specification_list.py +39 -0
- capo_keyspaces/types/replica_specification.py +61 -0
- capo_keyspaces/types/replica_specification_list.py +35 -0
- capo_keyspaces/types/replica_specification_summary.py +76 -0
- capo_keyspaces/types/replica_specification_summary_list.py +39 -0
- capo_keyspaces/types/replication_group_status.py +48 -0
- capo_keyspaces/types/replication_group_status_list.py +35 -0
- capo_keyspaces/types/replication_specification.py +48 -0
- capo_keyspaces/types/restore_table_request.py +190 -0
- capo_keyspaces/types/restore_table_response.py +31 -0
- capo_keyspaces/types/rs.py +5 -0
- capo_keyspaces/types/schema_definition.py +105 -0
- capo_keyspaces/types/sort_order.py +5 -0
- capo_keyspaces/types/static_column.py +31 -0
- capo_keyspaces/types/static_column_list.py +29 -0
- capo_keyspaces/types/stream_arn.py +5 -0
- capo_keyspaces/types/table_name.py +5 -0
- capo_keyspaces/types/table_name_list.py +17 -0
- capo_keyspaces/types/table_status.py +5 -0
- capo_keyspaces/types/table_summary.py +47 -0
- capo_keyspaces/types/table_summary_list.py +29 -0
- capo_keyspaces/types/tables_replication_progress.py +5 -0
- capo_keyspaces/types/tag.py +39 -0
- capo_keyspaces/types/tag_key.py +5 -0
- capo_keyspaces/types/tag_list.py +29 -0
- capo_keyspaces/types/tag_resource_request.py +45 -0
- capo_keyspaces/types/tag_resource_response.py +18 -0
- capo_keyspaces/types/tag_value.py +5 -0
- capo_keyspaces/types/target_tracking_scaling_policy_configuration.py +60 -0
- capo_keyspaces/types/throughput_mode.py +5 -0
- capo_keyspaces/types/time_to_live.py +31 -0
- capo_keyspaces/types/time_to_live_status.py +5 -0
- capo_keyspaces/types/timestamp.py +20 -0
- capo_keyspaces/types/type_name.py +5 -0
- capo_keyspaces/types/type_name_list.py +17 -0
- capo_keyspaces/types/type_status.py +5 -0
- capo_keyspaces/types/untag_resource_request.py +45 -0
- capo_keyspaces/types/untag_resource_response.py +18 -0
- capo_keyspaces/types/update_keyspace_request.py +74 -0
- capo_keyspaces/types/update_keyspace_response.py +31 -0
- capo_keyspaces/types/update_table_request.py +252 -0
- capo_keyspaces/types/update_table_response.py +31 -0
- capo_keyspaces/types/view_type.py +5 -0
- capo_keyspaces/types/warm_throughput_specification.py +29 -0
- capo_keyspaces/types/warm_throughput_specification_summary.py +49 -0
- capo_keyspaces/types/warm_throughput_status.py +5 -0
- capo_keyspaces-0.1.0.dist-info/METADATA +101 -0
- capo_keyspaces-0.1.0.dist-info/RECORD +174 -0
- capo_keyspaces-0.1.0.dist-info/WHEEL +5 -0
- capo_keyspaces-0.1.0.dist-info/licenses/LICENSE +21 -0
- capo_keyspaces-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#SchemaDefinition``."""
|
|
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.clustering_key_list
|
|
11
|
+
import capo_keyspaces.types.column_definition_list
|
|
12
|
+
import capo_keyspaces.types.partition_key_list
|
|
13
|
+
import capo_keyspaces.types.static_column_list
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class SchemaDefinition(TypedDict, closed=True):
|
|
17
|
+
all_columns: "capo_keyspaces.types.column_definition_list.ColumnDefinitionList"
|
|
18
|
+
"""<p>The regular columns of the table.</p>"""
|
|
19
|
+
partition_keys: "capo_keyspaces.types.partition_key_list.PartitionKeyList"
|
|
20
|
+
"""<p>The columns that are part of the partition key of the table .</p>"""
|
|
21
|
+
clustering_keys: NotRequired[
|
|
22
|
+
"capo_keyspaces.types.clustering_key_list.ClusteringKeyList"
|
|
23
|
+
]
|
|
24
|
+
"""<p>The columns that are part of the clustering key of the table.</p>"""
|
|
25
|
+
static_columns: NotRequired[
|
|
26
|
+
"capo_keyspaces.types.static_column_list.StaticColumnList"
|
|
27
|
+
]
|
|
28
|
+
"""<p>The columns that have been defined as <code>STATIC</code>. Static columns store values that are shared by all rows in the same partition.</p>"""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# --- awsJson1_0 ser/de ---
|
|
32
|
+
def serialize_aws_json_1_0(value: SchemaDefinition) -> dict:
|
|
33
|
+
out: dict = {}
|
|
34
|
+
import capo_keyspaces.types.column_definition_list
|
|
35
|
+
|
|
36
|
+
out["allColumns"] = (
|
|
37
|
+
capo_keyspaces.types.column_definition_list.serialize_aws_json_1_0(
|
|
38
|
+
value["all_columns"]
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
import capo_keyspaces.types.partition_key_list
|
|
42
|
+
|
|
43
|
+
out["partitionKeys"] = (
|
|
44
|
+
capo_keyspaces.types.partition_key_list.serialize_aws_json_1_0(
|
|
45
|
+
value["partition_keys"]
|
|
46
|
+
)
|
|
47
|
+
)
|
|
48
|
+
if "clustering_keys" in value:
|
|
49
|
+
import capo_keyspaces.types.clustering_key_list
|
|
50
|
+
|
|
51
|
+
out["clusteringKeys"] = (
|
|
52
|
+
capo_keyspaces.types.clustering_key_list.serialize_aws_json_1_0(
|
|
53
|
+
value["clustering_keys"]
|
|
54
|
+
)
|
|
55
|
+
)
|
|
56
|
+
if "static_columns" in value:
|
|
57
|
+
import capo_keyspaces.types.static_column_list
|
|
58
|
+
|
|
59
|
+
out["staticColumns"] = (
|
|
60
|
+
capo_keyspaces.types.static_column_list.serialize_aws_json_1_0(
|
|
61
|
+
value["static_columns"]
|
|
62
|
+
)
|
|
63
|
+
)
|
|
64
|
+
return out
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def deserialize_aws_json_1_0(data: dict) -> SchemaDefinition:
|
|
68
|
+
out: SchemaDefinition = {} # type: ignore[typeddict-item]
|
|
69
|
+
if data.get("allColumns") is not None:
|
|
70
|
+
import capo_keyspaces.types.column_definition_list
|
|
71
|
+
|
|
72
|
+
out["all_columns"] = (
|
|
73
|
+
capo_keyspaces.types.column_definition_list.deserialize_aws_json_1_0(
|
|
74
|
+
data["allColumns"]
|
|
75
|
+
)
|
|
76
|
+
)
|
|
77
|
+
else:
|
|
78
|
+
raise DeserializationError("SchemaDefinition.all_columns required")
|
|
79
|
+
if data.get("partitionKeys") is not None:
|
|
80
|
+
import capo_keyspaces.types.partition_key_list
|
|
81
|
+
|
|
82
|
+
out["partition_keys"] = (
|
|
83
|
+
capo_keyspaces.types.partition_key_list.deserialize_aws_json_1_0(
|
|
84
|
+
data["partitionKeys"]
|
|
85
|
+
)
|
|
86
|
+
)
|
|
87
|
+
else:
|
|
88
|
+
raise DeserializationError("SchemaDefinition.partition_keys required")
|
|
89
|
+
if data.get("clusteringKeys") is not None:
|
|
90
|
+
import capo_keyspaces.types.clustering_key_list
|
|
91
|
+
|
|
92
|
+
out["clustering_keys"] = (
|
|
93
|
+
capo_keyspaces.types.clustering_key_list.deserialize_aws_json_1_0(
|
|
94
|
+
data["clusteringKeys"]
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
if data.get("staticColumns") is not None:
|
|
98
|
+
import capo_keyspaces.types.static_column_list
|
|
99
|
+
|
|
100
|
+
out["static_columns"] = (
|
|
101
|
+
capo_keyspaces.types.static_column_list.deserialize_aws_json_1_0(
|
|
102
|
+
data["staticColumns"]
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
return out
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#StaticColumn``."""
|
|
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.generic_string
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class StaticColumn(TypedDict, closed=True):
|
|
14
|
+
name: "capo_keyspaces.types.generic_string.GenericString"
|
|
15
|
+
"""<p>The name of the static column.</p>"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# --- awsJson1_0 ser/de ---
|
|
19
|
+
def serialize_aws_json_1_0(value: StaticColumn) -> dict:
|
|
20
|
+
out: dict = {}
|
|
21
|
+
out["name"] = value["name"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> StaticColumn:
|
|
26
|
+
out: StaticColumn = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("name") is not None:
|
|
28
|
+
out["name"] = data["name"]
|
|
29
|
+
else:
|
|
30
|
+
raise DeserializationError("StaticColumn.name required")
|
|
31
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#StaticColumnList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspaces.types.static_column
|
|
7
|
+
|
|
8
|
+
StaticColumnList: TypeAlias = list["capo_keyspaces.types.static_column.StaticColumn"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- awsJson1_0 ser/de ---
|
|
12
|
+
def serialize_aws_json_1_0(value: StaticColumnList) -> list:
|
|
13
|
+
import capo_keyspaces.types.static_column
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_keyspaces.types.static_column.serialize_aws_json_1_0(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_aws_json_1_0(data: list) -> StaticColumnList:
|
|
22
|
+
import capo_keyspaces.types.static_column
|
|
23
|
+
|
|
24
|
+
out: StaticColumnList = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_keyspaces.types.static_column.deserialize_aws_json_1_0(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#TableNameList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspaces.types.table_name
|
|
7
|
+
|
|
8
|
+
TableNameList: TypeAlias = list["capo_keyspaces.types.table_name.TableName"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- awsJson1_0 ser/de ---
|
|
12
|
+
def serialize_aws_json_1_0(value: TableNameList) -> list:
|
|
13
|
+
return list(value)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_aws_json_1_0(data: list) -> TableNameList:
|
|
17
|
+
return [item for item in data if item is not None]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#TableSummary``."""
|
|
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.keyspace_name
|
|
12
|
+
import capo_keyspaces.types.table_name
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class TableSummary(TypedDict, closed=True):
|
|
16
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName"
|
|
17
|
+
"""<p>The name of the keyspace that the table is stored in.</p>"""
|
|
18
|
+
table_name: "capo_keyspaces.types.table_name.TableName"
|
|
19
|
+
"""<p>The name of the table.</p>"""
|
|
20
|
+
resource_arn: "capo_keyspaces.types.arn.ARN"
|
|
21
|
+
"""<p>The unique identifier of the table in the format of an Amazon Resource Name (ARN).</p>"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# --- awsJson1_0 ser/de ---
|
|
25
|
+
def serialize_aws_json_1_0(value: TableSummary) -> dict:
|
|
26
|
+
out: dict = {}
|
|
27
|
+
out["keyspaceName"] = value["keyspace_name"]
|
|
28
|
+
out["tableName"] = value["table_name"]
|
|
29
|
+
out["resourceArn"] = value["resource_arn"]
|
|
30
|
+
return out
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def deserialize_aws_json_1_0(data: dict) -> TableSummary:
|
|
34
|
+
out: TableSummary = {} # type: ignore[typeddict-item]
|
|
35
|
+
if data.get("keyspaceName") is not None:
|
|
36
|
+
out["keyspace_name"] = data["keyspaceName"]
|
|
37
|
+
else:
|
|
38
|
+
raise DeserializationError("TableSummary.keyspace_name required")
|
|
39
|
+
if data.get("tableName") is not None:
|
|
40
|
+
out["table_name"] = data["tableName"]
|
|
41
|
+
else:
|
|
42
|
+
raise DeserializationError("TableSummary.table_name required")
|
|
43
|
+
if data.get("resourceArn") is not None:
|
|
44
|
+
out["resource_arn"] = data["resourceArn"]
|
|
45
|
+
else:
|
|
46
|
+
raise DeserializationError("TableSummary.resource_arn required")
|
|
47
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#TableSummaryList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspaces.types.table_summary
|
|
7
|
+
|
|
8
|
+
TableSummaryList: TypeAlias = list["capo_keyspaces.types.table_summary.TableSummary"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- awsJson1_0 ser/de ---
|
|
12
|
+
def serialize_aws_json_1_0(value: TableSummaryList) -> list:
|
|
13
|
+
import capo_keyspaces.types.table_summary
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_keyspaces.types.table_summary.serialize_aws_json_1_0(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_aws_json_1_0(data: list) -> TableSummaryList:
|
|
22
|
+
import capo_keyspaces.types.table_summary
|
|
23
|
+
|
|
24
|
+
out: TableSummaryList = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_keyspaces.types.table_summary.deserialize_aws_json_1_0(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#Tag``."""
|
|
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.tag_key
|
|
11
|
+
import capo_keyspaces.types.tag_value
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Tag(TypedDict, closed=True):
|
|
15
|
+
key: "capo_keyspaces.types.tag_key.TagKey"
|
|
16
|
+
"""<p>The key of the tag. Tag keys are case sensitive. Each Amazon Keyspaces resource can only have up to one tag with the same key. If you try to add an existing tag (same key), the existing tag value will be updated to the new value.</p>"""
|
|
17
|
+
value: "capo_keyspaces.types.tag_value.TagValue"
|
|
18
|
+
"""<p>The value of the tag. Tag values are case-sensitive and can be null.</p>"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# --- awsJson1_0 ser/de ---
|
|
22
|
+
def serialize_aws_json_1_0(value: Tag) -> dict:
|
|
23
|
+
out: dict = {}
|
|
24
|
+
out["key"] = value["key"]
|
|
25
|
+
out["value"] = value["value"]
|
|
26
|
+
return out
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def deserialize_aws_json_1_0(data: dict) -> Tag:
|
|
30
|
+
out: Tag = {} # type: ignore[typeddict-item]
|
|
31
|
+
if data.get("key") is not None:
|
|
32
|
+
out["key"] = data["key"]
|
|
33
|
+
else:
|
|
34
|
+
raise DeserializationError("Tag.key required")
|
|
35
|
+
if data.get("value") is not None:
|
|
36
|
+
out["value"] = data["value"]
|
|
37
|
+
else:
|
|
38
|
+
raise DeserializationError("Tag.value required")
|
|
39
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#TagList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspaces.types.tag
|
|
7
|
+
|
|
8
|
+
TagList: TypeAlias = list["capo_keyspaces.types.tag.Tag"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- awsJson1_0 ser/de ---
|
|
12
|
+
def serialize_aws_json_1_0(value: TagList) -> list:
|
|
13
|
+
import capo_keyspaces.types.tag
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_keyspaces.types.tag.serialize_aws_json_1_0(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_aws_json_1_0(data: list) -> TagList:
|
|
22
|
+
import capo_keyspaces.types.tag
|
|
23
|
+
|
|
24
|
+
out: TagList = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_keyspaces.types.tag.deserialize_aws_json_1_0(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#TagResourceRequest``."""
|
|
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.tag_list
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class TagResourceRequest(TypedDict, closed=True):
|
|
15
|
+
resource_arn: "capo_keyspaces.types.arn.ARN"
|
|
16
|
+
"""<p>The Amazon Resource Name (ARN) of the Amazon Keyspaces resource to which to add tags.</p>"""
|
|
17
|
+
tags: "capo_keyspaces.types.tag_list.TagList"
|
|
18
|
+
"""<p>The tags to be assigned to the Amazon Keyspaces resource.</p>"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# --- awsJson1_0 ser/de ---
|
|
22
|
+
def serialize_aws_json_1_0(value: TagResourceRequest) -> dict:
|
|
23
|
+
out: dict = {}
|
|
24
|
+
out["resourceArn"] = value["resource_arn"]
|
|
25
|
+
import capo_keyspaces.types.tag_list
|
|
26
|
+
|
|
27
|
+
out["tags"] = capo_keyspaces.types.tag_list.serialize_aws_json_1_0(value["tags"])
|
|
28
|
+
return out
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def deserialize_aws_json_1_0(data: dict) -> TagResourceRequest:
|
|
32
|
+
out: TagResourceRequest = {} # type: ignore[typeddict-item]
|
|
33
|
+
if data.get("resourceArn") is not None:
|
|
34
|
+
out["resource_arn"] = data["resourceArn"]
|
|
35
|
+
else:
|
|
36
|
+
raise DeserializationError("TagResourceRequest.resource_arn required")
|
|
37
|
+
if data.get("tags") is not None:
|
|
38
|
+
import capo_keyspaces.types.tag_list
|
|
39
|
+
|
|
40
|
+
out["tags"] = capo_keyspaces.types.tag_list.deserialize_aws_json_1_0(
|
|
41
|
+
data["tags"]
|
|
42
|
+
)
|
|
43
|
+
else:
|
|
44
|
+
raise DeserializationError("TagResourceRequest.tags required")
|
|
45
|
+
return out
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#TagResourceResponse``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class TagResourceResponse(TypedDict, closed=True):
|
|
7
|
+
pass
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# --- awsJson1_0 ser/de ---
|
|
11
|
+
def serialize_aws_json_1_0(value: TagResourceResponse) -> dict:
|
|
12
|
+
out: dict = {}
|
|
13
|
+
return out
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_aws_json_1_0(data: dict) -> TagResourceResponse:
|
|
17
|
+
out: TagResourceResponse = {} # type: ignore[typeddict-item]
|
|
18
|
+
return out
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#TargetTrackingScalingPolicyConfiguration``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_keyspaces.types.boolean_object
|
|
9
|
+
import capo_keyspaces.types.double_object
|
|
10
|
+
import capo_keyspaces.types.integer_object
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TargetTrackingScalingPolicyConfiguration(TypedDict, closed=True):
|
|
14
|
+
disable_scale_in: "capo_keyspaces.types.boolean_object.BooleanObject"
|
|
15
|
+
"""<p>Specifies if <code>scale-in</code> is enabled.</p> <p>When auto scaling automatically decreases capacity for a table, the table <i>scales in</i>. When scaling policies are set, they can't scale in the table lower than its minimum capacity.</p>"""
|
|
16
|
+
scale_in_cooldown: "capo_keyspaces.types.integer_object.IntegerObject"
|
|
17
|
+
"""<p>Specifies a <code>scale-in</code> cool down period.</p> <p>A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts. </p>"""
|
|
18
|
+
scale_out_cooldown: "capo_keyspaces.types.integer_object.IntegerObject"
|
|
19
|
+
"""<p>Specifies a scale out cool down period.</p> <p>A cooldown period in seconds between scaling activities that lets the table stabilize before another scaling activity starts. </p>"""
|
|
20
|
+
target_value: "capo_keyspaces.types.double_object.DoubleObject"
|
|
21
|
+
"""<p>Specifies the target value for the target tracking auto scaling policy.</p> <p>Amazon Keyspaces auto scaling scales up capacity automatically when traffic exceeds this target utilization rate, and then back down when it falls below the target. This ensures that the ratio of consumed capacity to provisioned capacity stays at or near this value. You define <code>targetValue</code> as a percentage. A <code>double</code> between 20 and 90.</p>"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# --- awsJson1_0 ser/de ---
|
|
25
|
+
def serialize_aws_json_1_0(value: TargetTrackingScalingPolicyConfiguration) -> dict:
|
|
26
|
+
out: dict = {}
|
|
27
|
+
out["disableScaleIn"] = value.get("disable_scale_in", False)
|
|
28
|
+
out["scaleInCooldown"] = value.get("scale_in_cooldown", 0)
|
|
29
|
+
out["scaleOutCooldown"] = value.get("scale_out_cooldown", 0)
|
|
30
|
+
out["targetValue"] = (
|
|
31
|
+
"NaN"
|
|
32
|
+
if value.get("target_value", 0) != value.get("target_value", 0)
|
|
33
|
+
else "Infinity"
|
|
34
|
+
if value.get("target_value", 0) == float("inf")
|
|
35
|
+
else "-Infinity"
|
|
36
|
+
if value.get("target_value", 0) == float("-inf")
|
|
37
|
+
else value.get("target_value", 0)
|
|
38
|
+
)
|
|
39
|
+
return out
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def deserialize_aws_json_1_0(data: dict) -> TargetTrackingScalingPolicyConfiguration:
|
|
43
|
+
out: TargetTrackingScalingPolicyConfiguration = {} # type: ignore[typeddict-item]
|
|
44
|
+
if data.get("disableScaleIn") is not None:
|
|
45
|
+
out["disable_scale_in"] = data["disableScaleIn"]
|
|
46
|
+
else:
|
|
47
|
+
out["disable_scale_in"] = False
|
|
48
|
+
if data.get("scaleInCooldown") is not None:
|
|
49
|
+
out["scale_in_cooldown"] = data["scaleInCooldown"]
|
|
50
|
+
else:
|
|
51
|
+
out["scale_in_cooldown"] = 0
|
|
52
|
+
if data.get("scaleOutCooldown") is not None:
|
|
53
|
+
out["scale_out_cooldown"] = data["scaleOutCooldown"]
|
|
54
|
+
else:
|
|
55
|
+
out["scale_out_cooldown"] = 0
|
|
56
|
+
if data.get("targetValue") is not None:
|
|
57
|
+
out["target_value"] = float(data["targetValue"])
|
|
58
|
+
else:
|
|
59
|
+
out["target_value"] = 0
|
|
60
|
+
return out
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#TimeToLive``."""
|
|
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.time_to_live_status
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TimeToLive(TypedDict, closed=True):
|
|
14
|
+
status: "capo_keyspaces.types.time_to_live_status.TimeToLiveStatus"
|
|
15
|
+
"""<p>Shows how to enable custom Time to Live (TTL) settings for the specified table.</p>"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# --- awsJson1_0 ser/de ---
|
|
19
|
+
def serialize_aws_json_1_0(value: TimeToLive) -> dict:
|
|
20
|
+
out: dict = {}
|
|
21
|
+
out["status"] = value["status"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> TimeToLive:
|
|
26
|
+
out: TimeToLive = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("status") is not None:
|
|
28
|
+
out["status"] = data["status"]
|
|
29
|
+
else:
|
|
30
|
+
raise DeserializationError("TimeToLive.status required")
|
|
31
|
+
return out
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#Timestamp``."""
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
from typing import TypeAlias
|
|
5
|
+
|
|
6
|
+
Timestamp: TypeAlias = datetime.datetime
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# --- awsJson1_0 ser/de ---
|
|
10
|
+
def serialize_aws_json_1_0(value: Timestamp) -> float:
|
|
11
|
+
value = (
|
|
12
|
+
value.astimezone(datetime.timezone.utc)
|
|
13
|
+
if value.tzinfo
|
|
14
|
+
else value.replace(tzinfo=datetime.timezone.utc)
|
|
15
|
+
)
|
|
16
|
+
return value.timestamp()
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def deserialize_aws_json_1_0(data: float) -> Timestamp:
|
|
20
|
+
return datetime.datetime.fromtimestamp(float(data), tz=datetime.timezone.utc)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#TypeNameList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_keyspaces.types.type_name
|
|
7
|
+
|
|
8
|
+
TypeNameList: TypeAlias = list["capo_keyspaces.types.type_name.TypeName"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- awsJson1_0 ser/de ---
|
|
12
|
+
def serialize_aws_json_1_0(value: TypeNameList) -> list:
|
|
13
|
+
return list(value)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_aws_json_1_0(data: list) -> TypeNameList:
|
|
17
|
+
return [item for item in data if item is not None]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#UntagResourceRequest``."""
|
|
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.tag_list
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class UntagResourceRequest(TypedDict, closed=True):
|
|
15
|
+
resource_arn: "capo_keyspaces.types.arn.ARN"
|
|
16
|
+
"""<p>The Amazon Keyspaces resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).</p>"""
|
|
17
|
+
tags: "capo_keyspaces.types.tag_list.TagList"
|
|
18
|
+
"""<p>A list of existing tags to be removed from the Amazon Keyspaces resource.</p>"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# --- awsJson1_0 ser/de ---
|
|
22
|
+
def serialize_aws_json_1_0(value: UntagResourceRequest) -> dict:
|
|
23
|
+
out: dict = {}
|
|
24
|
+
out["resourceArn"] = value["resource_arn"]
|
|
25
|
+
import capo_keyspaces.types.tag_list
|
|
26
|
+
|
|
27
|
+
out["tags"] = capo_keyspaces.types.tag_list.serialize_aws_json_1_0(value["tags"])
|
|
28
|
+
return out
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def deserialize_aws_json_1_0(data: dict) -> UntagResourceRequest:
|
|
32
|
+
out: UntagResourceRequest = {} # type: ignore[typeddict-item]
|
|
33
|
+
if data.get("resourceArn") is not None:
|
|
34
|
+
out["resource_arn"] = data["resourceArn"]
|
|
35
|
+
else:
|
|
36
|
+
raise DeserializationError("UntagResourceRequest.resource_arn required")
|
|
37
|
+
if data.get("tags") is not None:
|
|
38
|
+
import capo_keyspaces.types.tag_list
|
|
39
|
+
|
|
40
|
+
out["tags"] = capo_keyspaces.types.tag_list.deserialize_aws_json_1_0(
|
|
41
|
+
data["tags"]
|
|
42
|
+
)
|
|
43
|
+
else:
|
|
44
|
+
raise DeserializationError("UntagResourceRequest.tags required")
|
|
45
|
+
return out
|