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,1467 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.keyspaces#KeyspacesService``."""
|
|
2
|
+
|
|
3
|
+
import warnings
|
|
4
|
+
from collections.abc import AsyncIterator
|
|
5
|
+
from typing import TYPE_CHECKING, Any, Iterable, Optional
|
|
6
|
+
|
|
7
|
+
from typing_extensions import Self, TypedDict
|
|
8
|
+
from zapros import AsyncBaseHandler, AsyncClient
|
|
9
|
+
|
|
10
|
+
import capo_keyspaces._auth._signers
|
|
11
|
+
import capo_keyspaces._auth._sigv4
|
|
12
|
+
from capo_keyspaces._auth._identity import Credentials
|
|
13
|
+
from capo_keyspaces._auth._providers import (
|
|
14
|
+
CredentialsProvider,
|
|
15
|
+
IdentityProvider,
|
|
16
|
+
StaticAwsCredentialsProvider,
|
|
17
|
+
default_aws_credentials_chain,
|
|
18
|
+
)
|
|
19
|
+
from capo_keyspaces._auth._zapros_handler import AuthMiddleware
|
|
20
|
+
from capo_keyspaces._pagination import resolve_path as _resolve_path
|
|
21
|
+
from capo_keyspaces._services._aws_config import aaws_config
|
|
22
|
+
from capo_keyspaces._services._pipeline import (
|
|
23
|
+
AsyncInterceptor,
|
|
24
|
+
AsyncOperationOptions,
|
|
25
|
+
AsyncOperationRequest,
|
|
26
|
+
AsyncOperationResponse,
|
|
27
|
+
aexecute_pipeline,
|
|
28
|
+
aretry,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
if TYPE_CHECKING:
|
|
32
|
+
import capo_keyspaces.types.arn
|
|
33
|
+
import capo_keyspaces.types.auto_scaling_specification
|
|
34
|
+
import capo_keyspaces.types.capacity_specification
|
|
35
|
+
import capo_keyspaces.types.cdc_specification
|
|
36
|
+
import capo_keyspaces.types.client_side_timestamps
|
|
37
|
+
import capo_keyspaces.types.column_definition_list
|
|
38
|
+
import capo_keyspaces.types.comment
|
|
39
|
+
import capo_keyspaces.types.create_keyspace_request
|
|
40
|
+
import capo_keyspaces.types.create_keyspace_response
|
|
41
|
+
import capo_keyspaces.types.create_table_request
|
|
42
|
+
import capo_keyspaces.types.create_table_response
|
|
43
|
+
import capo_keyspaces.types.create_type_request
|
|
44
|
+
import capo_keyspaces.types.create_type_response
|
|
45
|
+
import capo_keyspaces.types.default_time_to_live
|
|
46
|
+
import capo_keyspaces.types.delete_keyspace_request
|
|
47
|
+
import capo_keyspaces.types.delete_keyspace_response
|
|
48
|
+
import capo_keyspaces.types.delete_table_request
|
|
49
|
+
import capo_keyspaces.types.delete_table_response
|
|
50
|
+
import capo_keyspaces.types.delete_type_request
|
|
51
|
+
import capo_keyspaces.types.delete_type_response
|
|
52
|
+
import capo_keyspaces.types.encryption_specification
|
|
53
|
+
import capo_keyspaces.types.field_list
|
|
54
|
+
import capo_keyspaces.types.get_keyspace_request
|
|
55
|
+
import capo_keyspaces.types.get_keyspace_response
|
|
56
|
+
import capo_keyspaces.types.get_table_auto_scaling_settings_request
|
|
57
|
+
import capo_keyspaces.types.get_table_auto_scaling_settings_response
|
|
58
|
+
import capo_keyspaces.types.get_table_request
|
|
59
|
+
import capo_keyspaces.types.get_table_response
|
|
60
|
+
import capo_keyspaces.types.get_type_request
|
|
61
|
+
import capo_keyspaces.types.get_type_response
|
|
62
|
+
import capo_keyspaces.types.keyspace_name
|
|
63
|
+
import capo_keyspaces.types.keyspace_summary
|
|
64
|
+
import capo_keyspaces.types.list_keyspaces_request
|
|
65
|
+
import capo_keyspaces.types.list_keyspaces_response
|
|
66
|
+
import capo_keyspaces.types.list_tables_request
|
|
67
|
+
import capo_keyspaces.types.list_tables_response
|
|
68
|
+
import capo_keyspaces.types.list_tags_for_resource_request
|
|
69
|
+
import capo_keyspaces.types.list_tags_for_resource_response
|
|
70
|
+
import capo_keyspaces.types.list_types_request
|
|
71
|
+
import capo_keyspaces.types.list_types_response
|
|
72
|
+
import capo_keyspaces.types.max_results
|
|
73
|
+
import capo_keyspaces.types.next_token
|
|
74
|
+
import capo_keyspaces.types.point_in_time_recovery
|
|
75
|
+
import capo_keyspaces.types.replica_specification_list
|
|
76
|
+
import capo_keyspaces.types.replication_specification
|
|
77
|
+
import capo_keyspaces.types.restore_table_request
|
|
78
|
+
import capo_keyspaces.types.restore_table_response
|
|
79
|
+
import capo_keyspaces.types.schema_definition
|
|
80
|
+
import capo_keyspaces.types.table_name
|
|
81
|
+
import capo_keyspaces.types.table_summary
|
|
82
|
+
import capo_keyspaces.types.tag
|
|
83
|
+
import capo_keyspaces.types.tag_list
|
|
84
|
+
import capo_keyspaces.types.tag_resource_request
|
|
85
|
+
import capo_keyspaces.types.tag_resource_response
|
|
86
|
+
import capo_keyspaces.types.time_to_live
|
|
87
|
+
import capo_keyspaces.types.timestamp
|
|
88
|
+
import capo_keyspaces.types.type_name
|
|
89
|
+
import capo_keyspaces.types.untag_resource_request
|
|
90
|
+
import capo_keyspaces.types.untag_resource_response
|
|
91
|
+
import capo_keyspaces.types.update_keyspace_request
|
|
92
|
+
import capo_keyspaces.types.update_keyspace_response
|
|
93
|
+
import capo_keyspaces.types.update_table_request
|
|
94
|
+
import capo_keyspaces.types.update_table_response
|
|
95
|
+
import capo_keyspaces.types.warm_throughput_specification
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class AsyncKeyspacesClientConfig(TypedDict, total=False, closed=True):
|
|
99
|
+
operation_interceptors: Iterable[AsyncInterceptor[Any, Any]]
|
|
100
|
+
retry_max_attempts: int | None
|
|
101
|
+
region: str | None
|
|
102
|
+
use_dual_stack: bool | None
|
|
103
|
+
use_fips: bool | None
|
|
104
|
+
endpoint: str | None
|
|
105
|
+
credentials_provider: IdentityProvider[Credentials] | None
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class AsyncKeyspacesClient:
|
|
109
|
+
"""A client for the ``Keyspaces`` service.
|
|
110
|
+
|
|
111
|
+
Args:
|
|
112
|
+
http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
|
|
113
|
+
operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
|
|
114
|
+
retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
|
|
115
|
+
region: The value of the ``AWS::Region`` endpoint parameter.
|
|
116
|
+
use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
|
|
117
|
+
use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
|
|
118
|
+
endpoint: The value of the ``SDK::Endpoint`` endpoint parameter.
|
|
119
|
+
credentials: AWS credentials for request signing.
|
|
120
|
+
credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
def __init__(
|
|
124
|
+
self,
|
|
125
|
+
http_handler: AsyncBaseHandler | None = None,
|
|
126
|
+
operation_interceptors: Iterable[AsyncInterceptor[Any, Any]] | None = None,
|
|
127
|
+
retry_max_attempts: int | None = None,
|
|
128
|
+
region: str | None = None,
|
|
129
|
+
use_dual_stack: bool | None = None,
|
|
130
|
+
use_fips: bool | None = None,
|
|
131
|
+
endpoint: str | None = None,
|
|
132
|
+
credentials: Credentials | None = None,
|
|
133
|
+
credentials_provider: CredentialsProvider | None = None,
|
|
134
|
+
):
|
|
135
|
+
self._client = AsyncClient(http_handler).wrap_with_middleware(
|
|
136
|
+
lambda next: AuthMiddleware(next)
|
|
137
|
+
)
|
|
138
|
+
if credentials is not None and credentials_provider is not None:
|
|
139
|
+
warnings.warn(
|
|
140
|
+
"Both credentials and credentials_provider given; provider takes precedence"
|
|
141
|
+
)
|
|
142
|
+
resolved_credentials_provider: IdentityProvider[Credentials] | None = (
|
|
143
|
+
credentials_provider
|
|
144
|
+
)
|
|
145
|
+
if resolved_credentials_provider is None and credentials is not None:
|
|
146
|
+
resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
|
|
147
|
+
if resolved_credentials_provider is None and credentials is None:
|
|
148
|
+
resolved_credentials_provider = default_aws_credentials_chain(
|
|
149
|
+
AsyncClient(http_handler)
|
|
150
|
+
)
|
|
151
|
+
self._config = AsyncKeyspacesClientConfig(
|
|
152
|
+
{
|
|
153
|
+
"operation_interceptors": operation_interceptors or [],
|
|
154
|
+
"retry_max_attempts": retry_max_attempts,
|
|
155
|
+
"region": region,
|
|
156
|
+
"use_dual_stack": use_dual_stack,
|
|
157
|
+
"use_fips": use_fips,
|
|
158
|
+
"endpoint": endpoint,
|
|
159
|
+
"credentials_provider": resolved_credentials_provider,
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
def operation_options(
|
|
164
|
+
self, config_overrides: Optional[AsyncKeyspacesClientConfig] = None
|
|
165
|
+
) -> tuple[Iterable[AsyncInterceptor[Any, Any]], AsyncOperationOptions]:
|
|
166
|
+
overrides: AsyncKeyspacesClientConfig = config_overrides or {}
|
|
167
|
+
interceptors_: list[AsyncInterceptor[Any, Any]] = [
|
|
168
|
+
*overrides.get(
|
|
169
|
+
"operation_interceptors", self._config.get("operation_interceptors", [])
|
|
170
|
+
),
|
|
171
|
+
aaws_config(),
|
|
172
|
+
aretry(),
|
|
173
|
+
]
|
|
174
|
+
options_: AsyncOperationOptions = AsyncOperationOptions(
|
|
175
|
+
client=self._client,
|
|
176
|
+
retry_max_attempts=overrides.get(
|
|
177
|
+
"retry_max_attempts", self._config.get("retry_max_attempts")
|
|
178
|
+
),
|
|
179
|
+
region=overrides.get("region", self._config.get("region")),
|
|
180
|
+
use_dual_stack=overrides.get(
|
|
181
|
+
"use_dual_stack", self._config.get("use_dual_stack")
|
|
182
|
+
),
|
|
183
|
+
use_fips=overrides.get("use_fips", self._config.get("use_fips")),
|
|
184
|
+
endpoint=overrides.get("endpoint", self._config.get("endpoint")),
|
|
185
|
+
credentials_provider=overrides.get(
|
|
186
|
+
"credentials_provider", self._config.get("credentials_provider")
|
|
187
|
+
),
|
|
188
|
+
)
|
|
189
|
+
return interceptors_, options_
|
|
190
|
+
|
|
191
|
+
async def create_keyspace(
|
|
192
|
+
self,
|
|
193
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
194
|
+
*,
|
|
195
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
196
|
+
tags: Optional["capo_keyspaces.types.tag_list.TagList"] = None,
|
|
197
|
+
replication_specification: Optional[
|
|
198
|
+
"capo_keyspaces.types.replication_specification.ReplicationSpecification"
|
|
199
|
+
] = None,
|
|
200
|
+
) -> "capo_keyspaces.types.create_keyspace_response.CreateKeyspaceResponse":
|
|
201
|
+
r"""<p>The <code>CreateKeyspace</code> operation adds a new keyspace to your account. In an Amazon Web Services account, keyspace names must be unique within each Region.</p> <p> <code>CreateKeyspace</code> is an asynchronous operation. You can monitor the creation status of the new keyspace by using the <code>GetKeyspace</code> operation.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/getting-started.keyspaces.html\">Create a keyspace</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
202
|
+
|
|
203
|
+
Args:
|
|
204
|
+
keyspace_name: <p>The name of the keyspace to be created.</p>
|
|
205
|
+
tags: <p>A list of key-value pair tags to be attached to the keyspace.</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>
|
|
206
|
+
replication_specification: <p> The replication specification of the keyspace includes:</p> <ul> <li> <p> <code>replicationStrategy</code> - the required value is <code>SINGLE_REGION</code> or <code>MULTI_REGION</code>.</p> </li> <li> <p> <code>regionList</code> - if the <code>replicationStrategy</code> is <code>MULTI_REGION</code>, the <code>regionList</code> requires the current Region and at least one additional Amazon Web Services Region where the keyspace is going to be replicated in.</p> </li> </ul>
|
|
207
|
+
|
|
208
|
+
Raises:
|
|
209
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
210
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
211
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
212
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
213
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
214
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
215
|
+
"""
|
|
216
|
+
|
|
217
|
+
async def _handler(
|
|
218
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.create_keyspace_request.CreateKeyspaceRequest]",
|
|
219
|
+
) -> AsyncOperationResponse[
|
|
220
|
+
"capo_keyspaces.types.create_keyspace_response.CreateKeyspaceResponse"
|
|
221
|
+
]:
|
|
222
|
+
import capo_keyspaces._operations.keyspaces_service.create_keyspace
|
|
223
|
+
|
|
224
|
+
(
|
|
225
|
+
output,
|
|
226
|
+
http_response,
|
|
227
|
+
) = await capo_keyspaces._operations.keyspaces_service.create_keyspace.async_create_keyspace(
|
|
228
|
+
req.options, req.input
|
|
229
|
+
)
|
|
230
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
231
|
+
|
|
232
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
233
|
+
input_: capo_keyspaces.types.create_keyspace_request.CreateKeyspaceRequest = {
|
|
234
|
+
"keyspace_name": keyspace_name
|
|
235
|
+
}
|
|
236
|
+
if tags is not None:
|
|
237
|
+
input_["tags"] = tags
|
|
238
|
+
if replication_specification is not None:
|
|
239
|
+
input_["replication_specification"] = replication_specification
|
|
240
|
+
|
|
241
|
+
response = await aexecute_pipeline(
|
|
242
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
243
|
+
handler=_handler,
|
|
244
|
+
interceptors=list(interceptors_),
|
|
245
|
+
)
|
|
246
|
+
await response.response.aclose()
|
|
247
|
+
return response.output
|
|
248
|
+
|
|
249
|
+
async def create_table(
|
|
250
|
+
self,
|
|
251
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
252
|
+
table_name: "capo_keyspaces.types.table_name.TableName",
|
|
253
|
+
schema_definition: "capo_keyspaces.types.schema_definition.SchemaDefinition",
|
|
254
|
+
*,
|
|
255
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
256
|
+
comment: Optional["capo_keyspaces.types.comment.Comment"] = None,
|
|
257
|
+
capacity_specification: Optional[
|
|
258
|
+
"capo_keyspaces.types.capacity_specification.CapacitySpecification"
|
|
259
|
+
] = None,
|
|
260
|
+
encryption_specification: Optional[
|
|
261
|
+
"capo_keyspaces.types.encryption_specification.EncryptionSpecification"
|
|
262
|
+
] = None,
|
|
263
|
+
point_in_time_recovery: Optional[
|
|
264
|
+
"capo_keyspaces.types.point_in_time_recovery.PointInTimeRecovery"
|
|
265
|
+
] = None,
|
|
266
|
+
ttl: Optional["capo_keyspaces.types.time_to_live.TimeToLive"] = None,
|
|
267
|
+
default_time_to_live: Optional[
|
|
268
|
+
"capo_keyspaces.types.default_time_to_live.DefaultTimeToLive"
|
|
269
|
+
] = None,
|
|
270
|
+
tags: Optional["capo_keyspaces.types.tag_list.TagList"] = None,
|
|
271
|
+
client_side_timestamps: Optional[
|
|
272
|
+
"capo_keyspaces.types.client_side_timestamps.ClientSideTimestamps"
|
|
273
|
+
] = None,
|
|
274
|
+
auto_scaling_specification: Optional[
|
|
275
|
+
"capo_keyspaces.types.auto_scaling_specification.AutoScalingSpecification"
|
|
276
|
+
] = None,
|
|
277
|
+
replica_specifications: Optional[
|
|
278
|
+
"capo_keyspaces.types.replica_specification_list.ReplicaSpecificationList"
|
|
279
|
+
] = None,
|
|
280
|
+
cdc_specification: Optional[
|
|
281
|
+
"capo_keyspaces.types.cdc_specification.CdcSpecification"
|
|
282
|
+
] = None,
|
|
283
|
+
warm_throughput_specification: Optional[
|
|
284
|
+
"capo_keyspaces.types.warm_throughput_specification.WarmThroughputSpecification"
|
|
285
|
+
] = None,
|
|
286
|
+
) -> "capo_keyspaces.types.create_table_response.CreateTableResponse":
|
|
287
|
+
r"""<p>The <code>CreateTable</code> operation adds a new table to the specified keyspace. Within a keyspace, table names must be unique.</p> <p> <code>CreateTable</code> is an asynchronous operation. When the request is received, the status of the table is set to <code>CREATING</code>. You can monitor the creation status of the new table by using the <code>GetTable</code> operation, which returns the current <code>status</code> of the table. You can start using a table when the status is <code>ACTIVE</code>.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/getting-started.tables.html\">Create a table</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
288
|
+
|
|
289
|
+
Args:
|
|
290
|
+
keyspace_name: <p>The name of the keyspace that the table is going to be created in.</p>
|
|
291
|
+
table_name: <p>The name of the table.</p>
|
|
292
|
+
schema_definition: <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>
|
|
293
|
+
comment: <p>This parameter allows to enter a description of the table.</p>
|
|
294
|
+
capacity_specification: <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>
|
|
295
|
+
encryption_specification: <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>
|
|
296
|
+
point_in_time_recovery: <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>
|
|
297
|
+
ttl: <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>
|
|
298
|
+
default_time_to_live: <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>
|
|
299
|
+
tags: <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>
|
|
300
|
+
client_side_timestamps: <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>
|
|
301
|
+
auto_scaling_specification: <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>
|
|
302
|
+
replica_specifications: <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>
|
|
303
|
+
cdc_specification: <p>The CDC stream settings of the table.</p>
|
|
304
|
+
warm_throughput_specification: <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>
|
|
305
|
+
|
|
306
|
+
Raises:
|
|
307
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
308
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
309
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
310
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
311
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
312
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
313
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
314
|
+
"""
|
|
315
|
+
|
|
316
|
+
async def _handler(
|
|
317
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.create_table_request.CreateTableRequest]",
|
|
318
|
+
) -> AsyncOperationResponse[
|
|
319
|
+
"capo_keyspaces.types.create_table_response.CreateTableResponse"
|
|
320
|
+
]:
|
|
321
|
+
import capo_keyspaces._operations.keyspaces_service.create_table
|
|
322
|
+
|
|
323
|
+
(
|
|
324
|
+
output,
|
|
325
|
+
http_response,
|
|
326
|
+
) = await capo_keyspaces._operations.keyspaces_service.create_table.async_create_table(
|
|
327
|
+
req.options, req.input
|
|
328
|
+
)
|
|
329
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
330
|
+
|
|
331
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
332
|
+
input_: capo_keyspaces.types.create_table_request.CreateTableRequest = {
|
|
333
|
+
"keyspace_name": keyspace_name,
|
|
334
|
+
"table_name": table_name,
|
|
335
|
+
"schema_definition": schema_definition,
|
|
336
|
+
}
|
|
337
|
+
if comment is not None:
|
|
338
|
+
input_["comment"] = comment
|
|
339
|
+
if capacity_specification is not None:
|
|
340
|
+
input_["capacity_specification"] = capacity_specification
|
|
341
|
+
if encryption_specification is not None:
|
|
342
|
+
input_["encryption_specification"] = encryption_specification
|
|
343
|
+
if point_in_time_recovery is not None:
|
|
344
|
+
input_["point_in_time_recovery"] = point_in_time_recovery
|
|
345
|
+
if ttl is not None:
|
|
346
|
+
input_["ttl"] = ttl
|
|
347
|
+
if default_time_to_live is not None:
|
|
348
|
+
input_["default_time_to_live"] = default_time_to_live
|
|
349
|
+
if tags is not None:
|
|
350
|
+
input_["tags"] = tags
|
|
351
|
+
if client_side_timestamps is not None:
|
|
352
|
+
input_["client_side_timestamps"] = client_side_timestamps
|
|
353
|
+
if auto_scaling_specification is not None:
|
|
354
|
+
input_["auto_scaling_specification"] = auto_scaling_specification
|
|
355
|
+
if replica_specifications is not None:
|
|
356
|
+
input_["replica_specifications"] = replica_specifications
|
|
357
|
+
if cdc_specification is not None:
|
|
358
|
+
input_["cdc_specification"] = cdc_specification
|
|
359
|
+
if warm_throughput_specification is not None:
|
|
360
|
+
input_["warm_throughput_specification"] = warm_throughput_specification
|
|
361
|
+
|
|
362
|
+
response = await aexecute_pipeline(
|
|
363
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
364
|
+
handler=_handler,
|
|
365
|
+
interceptors=list(interceptors_),
|
|
366
|
+
)
|
|
367
|
+
await response.response.aclose()
|
|
368
|
+
return response.output
|
|
369
|
+
|
|
370
|
+
async def create_type(
|
|
371
|
+
self,
|
|
372
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
373
|
+
type_name: "capo_keyspaces.types.type_name.TypeName",
|
|
374
|
+
field_definitions: "capo_keyspaces.types.field_list.FieldList",
|
|
375
|
+
*,
|
|
376
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
377
|
+
) -> "capo_keyspaces.types.create_type_response.CreateTypeResponse":
|
|
378
|
+
r"""<p> The <code>CreateType</code> operation creates a new user-defined type in the specified keyspace. </p> <p>To configure the required permissions, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/configure-udt-permissions.html#udt-permissions-create\">Permissions to create a UDT</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/udts.html\">User-defined types (UDTs)</a> in the <i>Amazon Keyspaces Developer Guide</i>. </p>
|
|
379
|
+
|
|
380
|
+
Args:
|
|
381
|
+
keyspace_name: <p> The name of the keyspace. </p>
|
|
382
|
+
type_name: <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>
|
|
383
|
+
field_definitions: <p> The field definitions, consisting of names and types, that define this type. </p>
|
|
384
|
+
|
|
385
|
+
Raises:
|
|
386
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
387
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
388
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
389
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
390
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
391
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
392
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
393
|
+
"""
|
|
394
|
+
|
|
395
|
+
async def _handler(
|
|
396
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.create_type_request.CreateTypeRequest]",
|
|
397
|
+
) -> AsyncOperationResponse[
|
|
398
|
+
"capo_keyspaces.types.create_type_response.CreateTypeResponse"
|
|
399
|
+
]:
|
|
400
|
+
import capo_keyspaces._operations.keyspaces_service.create_type
|
|
401
|
+
|
|
402
|
+
(
|
|
403
|
+
output,
|
|
404
|
+
http_response,
|
|
405
|
+
) = await capo_keyspaces._operations.keyspaces_service.create_type.async_create_type(
|
|
406
|
+
req.options, req.input
|
|
407
|
+
)
|
|
408
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
409
|
+
|
|
410
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
411
|
+
input_: capo_keyspaces.types.create_type_request.CreateTypeRequest = {
|
|
412
|
+
"keyspace_name": keyspace_name,
|
|
413
|
+
"type_name": type_name,
|
|
414
|
+
"field_definitions": field_definitions,
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
response = await aexecute_pipeline(
|
|
418
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
419
|
+
handler=_handler,
|
|
420
|
+
interceptors=list(interceptors_),
|
|
421
|
+
)
|
|
422
|
+
await response.response.aclose()
|
|
423
|
+
return response.output
|
|
424
|
+
|
|
425
|
+
async def delete_keyspace(
|
|
426
|
+
self,
|
|
427
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
428
|
+
*,
|
|
429
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
430
|
+
) -> "capo_keyspaces.types.delete_keyspace_response.DeleteKeyspaceResponse":
|
|
431
|
+
"""<p>The <code>DeleteKeyspace</code> operation deletes a keyspace and all of its tables. </p>
|
|
432
|
+
|
|
433
|
+
Args:
|
|
434
|
+
keyspace_name: <p>The name of the keyspace to be deleted.</p>
|
|
435
|
+
|
|
436
|
+
Raises:
|
|
437
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
438
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
439
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
440
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
441
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
442
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
443
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
444
|
+
"""
|
|
445
|
+
|
|
446
|
+
async def _handler(
|
|
447
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.delete_keyspace_request.DeleteKeyspaceRequest]",
|
|
448
|
+
) -> AsyncOperationResponse[
|
|
449
|
+
"capo_keyspaces.types.delete_keyspace_response.DeleteKeyspaceResponse"
|
|
450
|
+
]:
|
|
451
|
+
import capo_keyspaces._operations.keyspaces_service.delete_keyspace
|
|
452
|
+
|
|
453
|
+
(
|
|
454
|
+
output,
|
|
455
|
+
http_response,
|
|
456
|
+
) = await capo_keyspaces._operations.keyspaces_service.delete_keyspace.async_delete_keyspace(
|
|
457
|
+
req.options, req.input
|
|
458
|
+
)
|
|
459
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
460
|
+
|
|
461
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
462
|
+
input_: capo_keyspaces.types.delete_keyspace_request.DeleteKeyspaceRequest = {
|
|
463
|
+
"keyspace_name": keyspace_name
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
response = await aexecute_pipeline(
|
|
467
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
468
|
+
handler=_handler,
|
|
469
|
+
interceptors=list(interceptors_),
|
|
470
|
+
)
|
|
471
|
+
await response.response.aclose()
|
|
472
|
+
return response.output
|
|
473
|
+
|
|
474
|
+
async def delete_table(
|
|
475
|
+
self,
|
|
476
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
477
|
+
table_name: "capo_keyspaces.types.table_name.TableName",
|
|
478
|
+
*,
|
|
479
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
480
|
+
) -> "capo_keyspaces.types.delete_table_response.DeleteTableResponse":
|
|
481
|
+
"""<p>The <code>DeleteTable</code> operation deletes a table and all of its data. After a <code>DeleteTable</code> request is received, the specified table is in the <code>DELETING</code> state until Amazon Keyspaces completes the deletion. If the table is in the <code>ACTIVE</code> state, you can delete it. If a table is either in the <code>CREATING</code> or <code>UPDATING</code> states, then Amazon Keyspaces returns a <code>ResourceInUseException</code>. If the specified table does not exist, Amazon Keyspaces returns a <code>ResourceNotFoundException</code>. If the table is already in the <code>DELETING</code> state, no error is returned.</p>
|
|
482
|
+
|
|
483
|
+
Args:
|
|
484
|
+
keyspace_name: <p>The name of the keyspace of the to be deleted table.</p>
|
|
485
|
+
table_name: <p>The name of the table to be deleted.</p>
|
|
486
|
+
|
|
487
|
+
Raises:
|
|
488
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
489
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
490
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
491
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
492
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
493
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
494
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
495
|
+
"""
|
|
496
|
+
|
|
497
|
+
async def _handler(
|
|
498
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.delete_table_request.DeleteTableRequest]",
|
|
499
|
+
) -> AsyncOperationResponse[
|
|
500
|
+
"capo_keyspaces.types.delete_table_response.DeleteTableResponse"
|
|
501
|
+
]:
|
|
502
|
+
import capo_keyspaces._operations.keyspaces_service.delete_table
|
|
503
|
+
|
|
504
|
+
(
|
|
505
|
+
output,
|
|
506
|
+
http_response,
|
|
507
|
+
) = await capo_keyspaces._operations.keyspaces_service.delete_table.async_delete_table(
|
|
508
|
+
req.options, req.input
|
|
509
|
+
)
|
|
510
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
511
|
+
|
|
512
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
513
|
+
input_: capo_keyspaces.types.delete_table_request.DeleteTableRequest = {
|
|
514
|
+
"keyspace_name": keyspace_name,
|
|
515
|
+
"table_name": table_name,
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
response = await aexecute_pipeline(
|
|
519
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
520
|
+
handler=_handler,
|
|
521
|
+
interceptors=list(interceptors_),
|
|
522
|
+
)
|
|
523
|
+
await response.response.aclose()
|
|
524
|
+
return response.output
|
|
525
|
+
|
|
526
|
+
async def delete_type(
|
|
527
|
+
self,
|
|
528
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
529
|
+
type_name: "capo_keyspaces.types.type_name.TypeName",
|
|
530
|
+
*,
|
|
531
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
532
|
+
) -> "capo_keyspaces.types.delete_type_response.DeleteTypeResponse":
|
|
533
|
+
r"""<p> The <code>DeleteType</code> operation deletes a user-defined type (UDT). You can only delete a type that is not used in a table or another UDT. </p> <p>To configure the required permissions, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/configure-udt-permissions.html#udt-permissions-drop\">Permissions to delete a UDT</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
534
|
+
|
|
535
|
+
Args:
|
|
536
|
+
keyspace_name: <p> The name of the keyspace of the to be deleted type. </p>
|
|
537
|
+
type_name: <p> The name of the type to be deleted. </p>
|
|
538
|
+
|
|
539
|
+
Raises:
|
|
540
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
541
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
542
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
543
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
544
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
545
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
546
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
547
|
+
"""
|
|
548
|
+
|
|
549
|
+
async def _handler(
|
|
550
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.delete_type_request.DeleteTypeRequest]",
|
|
551
|
+
) -> AsyncOperationResponse[
|
|
552
|
+
"capo_keyspaces.types.delete_type_response.DeleteTypeResponse"
|
|
553
|
+
]:
|
|
554
|
+
import capo_keyspaces._operations.keyspaces_service.delete_type
|
|
555
|
+
|
|
556
|
+
(
|
|
557
|
+
output,
|
|
558
|
+
http_response,
|
|
559
|
+
) = await capo_keyspaces._operations.keyspaces_service.delete_type.async_delete_type(
|
|
560
|
+
req.options, req.input
|
|
561
|
+
)
|
|
562
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
563
|
+
|
|
564
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
565
|
+
input_: capo_keyspaces.types.delete_type_request.DeleteTypeRequest = {
|
|
566
|
+
"keyspace_name": keyspace_name,
|
|
567
|
+
"type_name": type_name,
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
response = await aexecute_pipeline(
|
|
571
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
572
|
+
handler=_handler,
|
|
573
|
+
interceptors=list(interceptors_),
|
|
574
|
+
)
|
|
575
|
+
await response.response.aclose()
|
|
576
|
+
return response.output
|
|
577
|
+
|
|
578
|
+
async def get_keyspace(
|
|
579
|
+
self,
|
|
580
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
581
|
+
*,
|
|
582
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
583
|
+
) -> "capo_keyspaces.types.get_keyspace_response.GetKeyspaceResponse":
|
|
584
|
+
"""<p>Returns the name of the specified keyspace, the Amazon Resource Name (ARN), the replication strategy, the Amazon Web Services Regions of a multi-Region keyspace, and the status of newly added Regions after an <code>UpdateKeyspace</code> operation.</p>
|
|
585
|
+
|
|
586
|
+
Args:
|
|
587
|
+
keyspace_name: <p>The name of the keyspace.</p>
|
|
588
|
+
|
|
589
|
+
Raises:
|
|
590
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
591
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
592
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
593
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
594
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
595
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
596
|
+
"""
|
|
597
|
+
|
|
598
|
+
async def _handler(
|
|
599
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.get_keyspace_request.GetKeyspaceRequest]",
|
|
600
|
+
) -> AsyncOperationResponse[
|
|
601
|
+
"capo_keyspaces.types.get_keyspace_response.GetKeyspaceResponse"
|
|
602
|
+
]:
|
|
603
|
+
import capo_keyspaces._operations.keyspaces_service.get_keyspace
|
|
604
|
+
|
|
605
|
+
(
|
|
606
|
+
output,
|
|
607
|
+
http_response,
|
|
608
|
+
) = await capo_keyspaces._operations.keyspaces_service.get_keyspace.async_get_keyspace(
|
|
609
|
+
req.options, req.input
|
|
610
|
+
)
|
|
611
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
612
|
+
|
|
613
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
614
|
+
input_: capo_keyspaces.types.get_keyspace_request.GetKeyspaceRequest = {
|
|
615
|
+
"keyspace_name": keyspace_name
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
response = await aexecute_pipeline(
|
|
619
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
620
|
+
handler=_handler,
|
|
621
|
+
interceptors=list(interceptors_),
|
|
622
|
+
)
|
|
623
|
+
await response.response.aclose()
|
|
624
|
+
return response.output
|
|
625
|
+
|
|
626
|
+
async def get_table(
|
|
627
|
+
self,
|
|
628
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
629
|
+
table_name: "capo_keyspaces.types.table_name.TableName",
|
|
630
|
+
*,
|
|
631
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
632
|
+
) -> "capo_keyspaces.types.get_table_response.GetTableResponse":
|
|
633
|
+
"""<p>Returns information about the table, including the table's name and current status, the keyspace name, configuration settings, and metadata.</p> <p>To read table metadata using <code>GetTable</code>, the IAM principal needs <code>Select</code> action permissions for the table and the system keyspace.</p>
|
|
634
|
+
|
|
635
|
+
Args:
|
|
636
|
+
keyspace_name: <p>The name of the keyspace that the table is stored in.</p>
|
|
637
|
+
table_name: <p>The name of the table.</p>
|
|
638
|
+
|
|
639
|
+
Raises:
|
|
640
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
641
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
642
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
643
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
644
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
645
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
646
|
+
"""
|
|
647
|
+
|
|
648
|
+
async def _handler(
|
|
649
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.get_table_request.GetTableRequest]",
|
|
650
|
+
) -> AsyncOperationResponse[
|
|
651
|
+
"capo_keyspaces.types.get_table_response.GetTableResponse"
|
|
652
|
+
]:
|
|
653
|
+
import capo_keyspaces._operations.keyspaces_service.get_table
|
|
654
|
+
|
|
655
|
+
(
|
|
656
|
+
output,
|
|
657
|
+
http_response,
|
|
658
|
+
) = await capo_keyspaces._operations.keyspaces_service.get_table.async_get_table(
|
|
659
|
+
req.options, req.input
|
|
660
|
+
)
|
|
661
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
662
|
+
|
|
663
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
664
|
+
input_: capo_keyspaces.types.get_table_request.GetTableRequest = {
|
|
665
|
+
"keyspace_name": keyspace_name,
|
|
666
|
+
"table_name": table_name,
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
response = await aexecute_pipeline(
|
|
670
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
671
|
+
handler=_handler,
|
|
672
|
+
interceptors=list(interceptors_),
|
|
673
|
+
)
|
|
674
|
+
await response.response.aclose()
|
|
675
|
+
return response.output
|
|
676
|
+
|
|
677
|
+
async def get_table_auto_scaling_settings(
|
|
678
|
+
self,
|
|
679
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
680
|
+
table_name: "capo_keyspaces.types.table_name.TableName",
|
|
681
|
+
*,
|
|
682
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
683
|
+
) -> "capo_keyspaces.types.get_table_auto_scaling_settings_response.GetTableAutoScalingSettingsResponse":
|
|
684
|
+
r"""<p>Returns auto scaling related settings of the specified table in JSON format. If the table is a multi-Region table, the Amazon Web Services Region specific auto scaling settings of the table are included.</p> <p>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. 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> <important> <p> <code>GetTableAutoScalingSettings</code> can't be used as an action in an IAM policy.</p> </important> <p>To define permissions for <code>GetTableAutoScalingSettings</code>, you must allow the following two actions in the IAM policy statement's <code>Action</code> element:</p> <ul> <li> <p> <code>application-autoscaling:DescribeScalableTargets</code> </p> </li> <li> <p> <code>application-autoscaling:DescribeScalingPolicies</code> </p> </li> </ul>
|
|
685
|
+
|
|
686
|
+
Args:
|
|
687
|
+
keyspace_name: <p>The name of the keyspace.</p>
|
|
688
|
+
table_name: <p>The name of the table.</p>
|
|
689
|
+
|
|
690
|
+
Raises:
|
|
691
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
692
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
693
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
694
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
695
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
696
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
697
|
+
"""
|
|
698
|
+
|
|
699
|
+
async def _handler(
|
|
700
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.get_table_auto_scaling_settings_request.GetTableAutoScalingSettingsRequest]",
|
|
701
|
+
) -> AsyncOperationResponse[
|
|
702
|
+
"capo_keyspaces.types.get_table_auto_scaling_settings_response.GetTableAutoScalingSettingsResponse"
|
|
703
|
+
]:
|
|
704
|
+
import capo_keyspaces._operations.keyspaces_service.get_table_auto_scaling_settings
|
|
705
|
+
|
|
706
|
+
(
|
|
707
|
+
output,
|
|
708
|
+
http_response,
|
|
709
|
+
) = await capo_keyspaces._operations.keyspaces_service.get_table_auto_scaling_settings.async_get_table_auto_scaling_settings(
|
|
710
|
+
req.options, req.input
|
|
711
|
+
)
|
|
712
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
713
|
+
|
|
714
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
715
|
+
input_: capo_keyspaces.types.get_table_auto_scaling_settings_request.GetTableAutoScalingSettingsRequest = {
|
|
716
|
+
"keyspace_name": keyspace_name,
|
|
717
|
+
"table_name": table_name,
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
response = await aexecute_pipeline(
|
|
721
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
722
|
+
handler=_handler,
|
|
723
|
+
interceptors=list(interceptors_),
|
|
724
|
+
)
|
|
725
|
+
await response.response.aclose()
|
|
726
|
+
return response.output
|
|
727
|
+
|
|
728
|
+
async def get_type(
|
|
729
|
+
self,
|
|
730
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
731
|
+
type_name: "capo_keyspaces.types.type_name.TypeName",
|
|
732
|
+
*,
|
|
733
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
734
|
+
) -> "capo_keyspaces.types.get_type_response.GetTypeResponse":
|
|
735
|
+
r"""<p> The <code>GetType</code> operation returns information about the type, for example the field definitions, the timestamp when the type was last modified, the level of nesting, the status, and details about if the type is used in other types and tables. </p> <p>To read keyspace metadata using <code>GetType</code>, the IAM principal needs <code>Select</code> action permissions for the system keyspace. To configure the required permissions, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/configure-udt-permissions.html#udt-permissions-view\">Permissions to view a UDT</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
736
|
+
|
|
737
|
+
Args:
|
|
738
|
+
keyspace_name: <p> The name of the keyspace that contains this type. </p>
|
|
739
|
+
type_name: <p>The formatted name of the type. For example, if the name of the type was created without double quotes, Amazon Keyspaces saved the name in lower-case characters. If the name was created in double quotes, you must use double quotes to specify the type name. </p>
|
|
740
|
+
|
|
741
|
+
Raises:
|
|
742
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
743
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
744
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
745
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
746
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
747
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
748
|
+
"""
|
|
749
|
+
|
|
750
|
+
async def _handler(
|
|
751
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.get_type_request.GetTypeRequest]",
|
|
752
|
+
) -> AsyncOperationResponse[
|
|
753
|
+
"capo_keyspaces.types.get_type_response.GetTypeResponse"
|
|
754
|
+
]:
|
|
755
|
+
import capo_keyspaces._operations.keyspaces_service.get_type
|
|
756
|
+
|
|
757
|
+
(
|
|
758
|
+
output,
|
|
759
|
+
http_response,
|
|
760
|
+
) = await capo_keyspaces._operations.keyspaces_service.get_type.async_get_type(
|
|
761
|
+
req.options, req.input
|
|
762
|
+
)
|
|
763
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
764
|
+
|
|
765
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
766
|
+
input_: capo_keyspaces.types.get_type_request.GetTypeRequest = {
|
|
767
|
+
"keyspace_name": keyspace_name,
|
|
768
|
+
"type_name": type_name,
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
response = await aexecute_pipeline(
|
|
772
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
773
|
+
handler=_handler,
|
|
774
|
+
interceptors=list(interceptors_),
|
|
775
|
+
)
|
|
776
|
+
await response.response.aclose()
|
|
777
|
+
return response.output
|
|
778
|
+
|
|
779
|
+
async def list_keyspaces(
|
|
780
|
+
self,
|
|
781
|
+
*,
|
|
782
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
783
|
+
next_token: Optional["capo_keyspaces.types.next_token.NextToken"] = None,
|
|
784
|
+
max_results: Optional["capo_keyspaces.types.max_results.MaxResults"] = None,
|
|
785
|
+
) -> "capo_keyspaces.types.list_keyspaces_response.ListKeyspacesResponse":
|
|
786
|
+
"""<p>The <code>ListKeyspaces</code> operation returns a list of keyspaces.</p>
|
|
787
|
+
|
|
788
|
+
Args:
|
|
789
|
+
next_token: <p>The pagination token. To resume pagination, provide the <code>NextToken</code> value as argument of a subsequent API invocation.</p>
|
|
790
|
+
max_results: <p>The total number of keyspaces to return in the output. If the total number of keyspaces available is more than the value specified, a <code>NextToken</code> is provided in the output. To resume pagination, provide the <code>NextToken</code> value as an argument of a subsequent API invocation.</p>
|
|
791
|
+
|
|
792
|
+
Raises:
|
|
793
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
794
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
795
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
796
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
797
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
798
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
799
|
+
"""
|
|
800
|
+
|
|
801
|
+
async def _handler(
|
|
802
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.list_keyspaces_request.ListKeyspacesRequest]",
|
|
803
|
+
) -> AsyncOperationResponse[
|
|
804
|
+
"capo_keyspaces.types.list_keyspaces_response.ListKeyspacesResponse"
|
|
805
|
+
]:
|
|
806
|
+
import capo_keyspaces._operations.keyspaces_service.list_keyspaces
|
|
807
|
+
|
|
808
|
+
(
|
|
809
|
+
output,
|
|
810
|
+
http_response,
|
|
811
|
+
) = await capo_keyspaces._operations.keyspaces_service.list_keyspaces.async_list_keyspaces(
|
|
812
|
+
req.options, req.input
|
|
813
|
+
)
|
|
814
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
815
|
+
|
|
816
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
817
|
+
input_: capo_keyspaces.types.list_keyspaces_request.ListKeyspacesRequest = {}
|
|
818
|
+
if next_token is not None:
|
|
819
|
+
input_["next_token"] = next_token
|
|
820
|
+
if max_results is not None:
|
|
821
|
+
input_["max_results"] = max_results
|
|
822
|
+
|
|
823
|
+
response = await aexecute_pipeline(
|
|
824
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
825
|
+
handler=_handler,
|
|
826
|
+
interceptors=list(interceptors_),
|
|
827
|
+
)
|
|
828
|
+
await response.response.aclose()
|
|
829
|
+
return response.output
|
|
830
|
+
|
|
831
|
+
async def iter_list_keyspaces(
|
|
832
|
+
self,
|
|
833
|
+
*,
|
|
834
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
835
|
+
next_token: Optional["capo_keyspaces.types.next_token.NextToken"] = None,
|
|
836
|
+
max_results: Optional["capo_keyspaces.types.max_results.MaxResults"] = None,
|
|
837
|
+
) -> "AsyncIterator[capo_keyspaces.types.keyspace_summary.KeyspaceSummary]":
|
|
838
|
+
_token = next_token
|
|
839
|
+
while True:
|
|
840
|
+
_response = await self.list_keyspaces(
|
|
841
|
+
config_overrides=config_overrides,
|
|
842
|
+
next_token=_token,
|
|
843
|
+
max_results=max_results,
|
|
844
|
+
)
|
|
845
|
+
_page = _resolve_path(_response, ("keyspaces",))
|
|
846
|
+
for _item in _page or []:
|
|
847
|
+
yield _item
|
|
848
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
849
|
+
if not _token:
|
|
850
|
+
break
|
|
851
|
+
|
|
852
|
+
async def list_tables(
|
|
853
|
+
self,
|
|
854
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
855
|
+
*,
|
|
856
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
857
|
+
next_token: Optional["capo_keyspaces.types.next_token.NextToken"] = None,
|
|
858
|
+
max_results: Optional["capo_keyspaces.types.max_results.MaxResults"] = None,
|
|
859
|
+
) -> "capo_keyspaces.types.list_tables_response.ListTablesResponse":
|
|
860
|
+
"""<p>The <code>ListTables</code> operation returns a list of tables for a specified keyspace.</p> <p>To read keyspace metadata using <code>ListTables</code>, the IAM principal needs <code>Select</code> action permissions for the system keyspace.</p>
|
|
861
|
+
|
|
862
|
+
Args:
|
|
863
|
+
next_token: <p>The pagination token. To resume pagination, provide the <code>NextToken</code> value as an argument of a subsequent API invocation.</p>
|
|
864
|
+
max_results: <p>The total number of tables to return in the output. If the total number of tables available is more than the value specified, a <code>NextToken</code> is provided in the output. To resume pagination, provide the <code>NextToken</code> value as an argument of a subsequent API invocation.</p>
|
|
865
|
+
keyspace_name: <p>The name of the keyspace.</p>
|
|
866
|
+
|
|
867
|
+
Raises:
|
|
868
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
869
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
870
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
871
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
872
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
873
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
874
|
+
"""
|
|
875
|
+
|
|
876
|
+
async def _handler(
|
|
877
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.list_tables_request.ListTablesRequest]",
|
|
878
|
+
) -> AsyncOperationResponse[
|
|
879
|
+
"capo_keyspaces.types.list_tables_response.ListTablesResponse"
|
|
880
|
+
]:
|
|
881
|
+
import capo_keyspaces._operations.keyspaces_service.list_tables
|
|
882
|
+
|
|
883
|
+
(
|
|
884
|
+
output,
|
|
885
|
+
http_response,
|
|
886
|
+
) = await capo_keyspaces._operations.keyspaces_service.list_tables.async_list_tables(
|
|
887
|
+
req.options, req.input
|
|
888
|
+
)
|
|
889
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
890
|
+
|
|
891
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
892
|
+
input_: capo_keyspaces.types.list_tables_request.ListTablesRequest = {
|
|
893
|
+
"keyspace_name": keyspace_name
|
|
894
|
+
}
|
|
895
|
+
if next_token is not None:
|
|
896
|
+
input_["next_token"] = next_token
|
|
897
|
+
if max_results is not None:
|
|
898
|
+
input_["max_results"] = max_results
|
|
899
|
+
|
|
900
|
+
response = await aexecute_pipeline(
|
|
901
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
902
|
+
handler=_handler,
|
|
903
|
+
interceptors=list(interceptors_),
|
|
904
|
+
)
|
|
905
|
+
await response.response.aclose()
|
|
906
|
+
return response.output
|
|
907
|
+
|
|
908
|
+
async def iter_list_tables(
|
|
909
|
+
self,
|
|
910
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
911
|
+
*,
|
|
912
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
913
|
+
next_token: Optional["capo_keyspaces.types.next_token.NextToken"] = None,
|
|
914
|
+
max_results: Optional["capo_keyspaces.types.max_results.MaxResults"] = None,
|
|
915
|
+
) -> "AsyncIterator[capo_keyspaces.types.table_summary.TableSummary]":
|
|
916
|
+
_token = next_token
|
|
917
|
+
while True:
|
|
918
|
+
_response = await self.list_tables(
|
|
919
|
+
keyspace_name,
|
|
920
|
+
config_overrides=config_overrides,
|
|
921
|
+
next_token=_token,
|
|
922
|
+
max_results=max_results,
|
|
923
|
+
)
|
|
924
|
+
_page = _resolve_path(_response, ("tables",))
|
|
925
|
+
for _item in _page or []:
|
|
926
|
+
yield _item
|
|
927
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
928
|
+
if not _token:
|
|
929
|
+
break
|
|
930
|
+
|
|
931
|
+
async def list_tags_for_resource(
|
|
932
|
+
self,
|
|
933
|
+
resource_arn: "capo_keyspaces.types.arn.ARN",
|
|
934
|
+
*,
|
|
935
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
936
|
+
next_token: Optional["capo_keyspaces.types.next_token.NextToken"] = None,
|
|
937
|
+
max_results: Optional["capo_keyspaces.types.max_results.MaxResults"] = None,
|
|
938
|
+
) -> "capo_keyspaces.types.list_tags_for_resource_response.ListTagsForResourceResponse":
|
|
939
|
+
"""<p>Returns a list of all tags associated with the specified Amazon Keyspaces resource.</p> <p>To read keyspace metadata using <code>ListTagsForResource</code>, the IAM principal needs <code>Select</code> action permissions for the specified resource and the system keyspace.</p>
|
|
940
|
+
|
|
941
|
+
Args:
|
|
942
|
+
resource_arn: <p>The Amazon Resource Name (ARN) of the Amazon Keyspaces resource.</p>
|
|
943
|
+
next_token: <p>The pagination token. To resume pagination, provide the <code>NextToken</code> value as argument of a subsequent API invocation.</p>
|
|
944
|
+
max_results: <p>The total number of tags to return in the output. If the total number of tags available is more than the value specified, a <code>NextToken</code> is provided in the output. To resume pagination, provide the <code>NextToken</code> value as an argument of a subsequent API invocation.</p>
|
|
945
|
+
|
|
946
|
+
Raises:
|
|
947
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
948
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
949
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
950
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
951
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
952
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
953
|
+
"""
|
|
954
|
+
|
|
955
|
+
async def _handler(
|
|
956
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.list_tags_for_resource_request.ListTagsForResourceRequest]",
|
|
957
|
+
) -> AsyncOperationResponse[
|
|
958
|
+
"capo_keyspaces.types.list_tags_for_resource_response.ListTagsForResourceResponse"
|
|
959
|
+
]:
|
|
960
|
+
import capo_keyspaces._operations.keyspaces_service.list_tags_for_resource
|
|
961
|
+
|
|
962
|
+
(
|
|
963
|
+
output,
|
|
964
|
+
http_response,
|
|
965
|
+
) = await capo_keyspaces._operations.keyspaces_service.list_tags_for_resource.async_list_tags_for_resource(
|
|
966
|
+
req.options, req.input
|
|
967
|
+
)
|
|
968
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
969
|
+
|
|
970
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
971
|
+
input_: capo_keyspaces.types.list_tags_for_resource_request.ListTagsForResourceRequest = {
|
|
972
|
+
"resource_arn": resource_arn
|
|
973
|
+
}
|
|
974
|
+
if next_token is not None:
|
|
975
|
+
input_["next_token"] = next_token
|
|
976
|
+
if max_results is not None:
|
|
977
|
+
input_["max_results"] = max_results
|
|
978
|
+
|
|
979
|
+
response = await aexecute_pipeline(
|
|
980
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
981
|
+
handler=_handler,
|
|
982
|
+
interceptors=list(interceptors_),
|
|
983
|
+
)
|
|
984
|
+
await response.response.aclose()
|
|
985
|
+
return response.output
|
|
986
|
+
|
|
987
|
+
async def iter_list_tags_for_resource(
|
|
988
|
+
self,
|
|
989
|
+
resource_arn: "capo_keyspaces.types.arn.ARN",
|
|
990
|
+
*,
|
|
991
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
992
|
+
next_token: Optional["capo_keyspaces.types.next_token.NextToken"] = None,
|
|
993
|
+
max_results: Optional["capo_keyspaces.types.max_results.MaxResults"] = None,
|
|
994
|
+
) -> "AsyncIterator[capo_keyspaces.types.tag.Tag]":
|
|
995
|
+
_token = next_token
|
|
996
|
+
while True:
|
|
997
|
+
_response = await self.list_tags_for_resource(
|
|
998
|
+
resource_arn,
|
|
999
|
+
config_overrides=config_overrides,
|
|
1000
|
+
next_token=_token,
|
|
1001
|
+
max_results=max_results,
|
|
1002
|
+
)
|
|
1003
|
+
_page = _resolve_path(_response, ("tags",))
|
|
1004
|
+
for _item in _page or []:
|
|
1005
|
+
yield _item
|
|
1006
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
1007
|
+
if not _token:
|
|
1008
|
+
break
|
|
1009
|
+
|
|
1010
|
+
async def list_types(
|
|
1011
|
+
self,
|
|
1012
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
1013
|
+
*,
|
|
1014
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
1015
|
+
next_token: Optional["capo_keyspaces.types.next_token.NextToken"] = None,
|
|
1016
|
+
max_results: Optional["capo_keyspaces.types.max_results.MaxResults"] = None,
|
|
1017
|
+
) -> "capo_keyspaces.types.list_types_response.ListTypesResponse":
|
|
1018
|
+
r"""<p> The <code>ListTypes</code> operation returns a list of types for a specified keyspace. </p> <p>To read keyspace metadata using <code>ListTypes</code>, the IAM principal needs <code>Select</code> action permissions for the system keyspace. To configure the required permissions, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/configure-udt-permissions.html#udt-permissions-view\">Permissions to view a UDT</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
1019
|
+
|
|
1020
|
+
Args:
|
|
1021
|
+
next_token: <p> The pagination token. To resume pagination, provide the <code>NextToken</code> value as an argument of a subsequent API invocation. </p>
|
|
1022
|
+
max_results: <p> The total number of types to return in the output. If the total number of types available is more than the value specified, a <code>NextToken</code> is provided in the output. To resume pagination, provide the <code>NextToken</code> value as an argument of a subsequent API invocation. </p>
|
|
1023
|
+
keyspace_name: <p> The name of the keyspace that contains the listed types. </p>
|
|
1024
|
+
|
|
1025
|
+
Raises:
|
|
1026
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
1027
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
1028
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
1029
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
1030
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
1031
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1032
|
+
"""
|
|
1033
|
+
|
|
1034
|
+
async def _handler(
|
|
1035
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.list_types_request.ListTypesRequest]",
|
|
1036
|
+
) -> AsyncOperationResponse[
|
|
1037
|
+
"capo_keyspaces.types.list_types_response.ListTypesResponse"
|
|
1038
|
+
]:
|
|
1039
|
+
import capo_keyspaces._operations.keyspaces_service.list_types
|
|
1040
|
+
|
|
1041
|
+
(
|
|
1042
|
+
output,
|
|
1043
|
+
http_response,
|
|
1044
|
+
) = await capo_keyspaces._operations.keyspaces_service.list_types.async_list_types(
|
|
1045
|
+
req.options, req.input
|
|
1046
|
+
)
|
|
1047
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1048
|
+
|
|
1049
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1050
|
+
input_: capo_keyspaces.types.list_types_request.ListTypesRequest = {
|
|
1051
|
+
"keyspace_name": keyspace_name
|
|
1052
|
+
}
|
|
1053
|
+
if next_token is not None:
|
|
1054
|
+
input_["next_token"] = next_token
|
|
1055
|
+
if max_results is not None:
|
|
1056
|
+
input_["max_results"] = max_results
|
|
1057
|
+
|
|
1058
|
+
response = await aexecute_pipeline(
|
|
1059
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1060
|
+
handler=_handler,
|
|
1061
|
+
interceptors=list(interceptors_),
|
|
1062
|
+
)
|
|
1063
|
+
await response.response.aclose()
|
|
1064
|
+
return response.output
|
|
1065
|
+
|
|
1066
|
+
async def iter_list_types(
|
|
1067
|
+
self,
|
|
1068
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
1069
|
+
*,
|
|
1070
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
1071
|
+
next_token: Optional["capo_keyspaces.types.next_token.NextToken"] = None,
|
|
1072
|
+
max_results: Optional["capo_keyspaces.types.max_results.MaxResults"] = None,
|
|
1073
|
+
) -> "AsyncIterator[capo_keyspaces.types.type_name.TypeName]":
|
|
1074
|
+
_token = next_token
|
|
1075
|
+
while True:
|
|
1076
|
+
_response = await self.list_types(
|
|
1077
|
+
keyspace_name,
|
|
1078
|
+
config_overrides=config_overrides,
|
|
1079
|
+
next_token=_token,
|
|
1080
|
+
max_results=max_results,
|
|
1081
|
+
)
|
|
1082
|
+
_page = _resolve_path(_response, ("types",))
|
|
1083
|
+
for _item in _page or []:
|
|
1084
|
+
yield _item
|
|
1085
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
1086
|
+
if not _token:
|
|
1087
|
+
break
|
|
1088
|
+
|
|
1089
|
+
async def restore_table(
|
|
1090
|
+
self,
|
|
1091
|
+
source_keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
1092
|
+
source_table_name: "capo_keyspaces.types.table_name.TableName",
|
|
1093
|
+
target_keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
1094
|
+
target_table_name: "capo_keyspaces.types.table_name.TableName",
|
|
1095
|
+
*,
|
|
1096
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
1097
|
+
restore_timestamp: Optional["capo_keyspaces.types.timestamp.Timestamp"] = None,
|
|
1098
|
+
capacity_specification_override: Optional[
|
|
1099
|
+
"capo_keyspaces.types.capacity_specification.CapacitySpecification"
|
|
1100
|
+
] = None,
|
|
1101
|
+
encryption_specification_override: Optional[
|
|
1102
|
+
"capo_keyspaces.types.encryption_specification.EncryptionSpecification"
|
|
1103
|
+
] = None,
|
|
1104
|
+
point_in_time_recovery_override: Optional[
|
|
1105
|
+
"capo_keyspaces.types.point_in_time_recovery.PointInTimeRecovery"
|
|
1106
|
+
] = None,
|
|
1107
|
+
tags_override: Optional["capo_keyspaces.types.tag_list.TagList"] = None,
|
|
1108
|
+
auto_scaling_specification: Optional[
|
|
1109
|
+
"capo_keyspaces.types.auto_scaling_specification.AutoScalingSpecification"
|
|
1110
|
+
] = None,
|
|
1111
|
+
replica_specifications: Optional[
|
|
1112
|
+
"capo_keyspaces.types.replica_specification_list.ReplicaSpecificationList"
|
|
1113
|
+
] = None,
|
|
1114
|
+
) -> "capo_keyspaces.types.restore_table_response.RestoreTableResponse":
|
|
1115
|
+
r"""<p>Restores the table to the specified point in time within the <code>earliest_restorable_timestamp</code> and the current time. For more information about restore points, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_window\"> Time window for PITR continuous backups</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p> <p>Any number of users can execute up to 4 concurrent restores (any type of restore) in a given account.</p> <p>When you restore using point in time recovery, Amazon Keyspaces restores your source table's schema and data to the state based on the selected timestamp <code>(day:hour:minute:second)</code> to a new table. The Time to Live (TTL) settings are also restored to the state based on the selected timestamp.</p> <p>In addition to the table's schema, data, and TTL settings, <code>RestoreTable</code> restores the capacity mode, auto scaling settings, encryption settings, and point-in-time recovery settings from the source table. Unlike the table's schema data and TTL settings, which are restored based on the selected timestamp, these settings are always restored based on the table's settings as of the current time or when the table was deleted.</p> <p>You can also overwrite these settings during restore:</p> <ul> <li> <p>Read/write capacity mode</p> </li> <li> <p>Provisioned throughput capacity units</p> </li> <li> <p>Auto scaling settings</p> </li> <li> <p>Point-in-time (PITR) settings</p> </li> <li> <p>Tags</p> </li> </ul> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/PointInTimeRecovery_HowItWorks.html#howitworks_backup_settings\">PITR restore settings</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p> <p>Note that the following settings are not restored, and you must configure them manually for the new table:</p> <ul> <li> <p>Identity and Access Management (IAM) policies</p> </li> <li> <p>Amazon CloudWatch metrics and alarms</p> </li> </ul>
|
|
1116
|
+
|
|
1117
|
+
Args:
|
|
1118
|
+
source_keyspace_name: <p>The keyspace name of the source table.</p>
|
|
1119
|
+
source_table_name: <p>The name of the source table.</p>
|
|
1120
|
+
target_keyspace_name: <p>The name of the target keyspace.</p>
|
|
1121
|
+
target_table_name: <p>The name of the target table.</p>
|
|
1122
|
+
restore_timestamp: <p>The restore timestamp in ISO 8601 format.</p>
|
|
1123
|
+
capacity_specification_override: <p>Specifies the read/write throughput capacity mode for the target table. The options are:</p> <ul> <li> <p> <code>throughputMode:PAY_PER_REQUEST</code> </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>
|
|
1124
|
+
encryption_specification_override: <p>Specifies the encryption settings for the target 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>
|
|
1125
|
+
point_in_time_recovery_override: <p>Specifies the <code>pointInTimeRecovery</code> settings for the target 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>
|
|
1126
|
+
tags_override: <p>A list of key-value pair tags to be attached to the restored table. </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>
|
|
1127
|
+
auto_scaling_specification: <p>The optional auto scaling settings for the restored 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>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>
|
|
1128
|
+
replica_specifications: <p>The optional Region specific settings of a multi-Regional table.</p>
|
|
1129
|
+
|
|
1130
|
+
Raises:
|
|
1131
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
1132
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
1133
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
1134
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
1135
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
1136
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
1137
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1138
|
+
"""
|
|
1139
|
+
|
|
1140
|
+
async def _handler(
|
|
1141
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.restore_table_request.RestoreTableRequest]",
|
|
1142
|
+
) -> AsyncOperationResponse[
|
|
1143
|
+
"capo_keyspaces.types.restore_table_response.RestoreTableResponse"
|
|
1144
|
+
]:
|
|
1145
|
+
import capo_keyspaces._operations.keyspaces_service.restore_table
|
|
1146
|
+
|
|
1147
|
+
(
|
|
1148
|
+
output,
|
|
1149
|
+
http_response,
|
|
1150
|
+
) = await capo_keyspaces._operations.keyspaces_service.restore_table.async_restore_table(
|
|
1151
|
+
req.options, req.input
|
|
1152
|
+
)
|
|
1153
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1154
|
+
|
|
1155
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1156
|
+
input_: capo_keyspaces.types.restore_table_request.RestoreTableRequest = {
|
|
1157
|
+
"source_keyspace_name": source_keyspace_name,
|
|
1158
|
+
"source_table_name": source_table_name,
|
|
1159
|
+
"target_keyspace_name": target_keyspace_name,
|
|
1160
|
+
"target_table_name": target_table_name,
|
|
1161
|
+
}
|
|
1162
|
+
if restore_timestamp is not None:
|
|
1163
|
+
input_["restore_timestamp"] = restore_timestamp
|
|
1164
|
+
if capacity_specification_override is not None:
|
|
1165
|
+
input_["capacity_specification_override"] = capacity_specification_override
|
|
1166
|
+
if encryption_specification_override is not None:
|
|
1167
|
+
input_["encryption_specification_override"] = (
|
|
1168
|
+
encryption_specification_override
|
|
1169
|
+
)
|
|
1170
|
+
if point_in_time_recovery_override is not None:
|
|
1171
|
+
input_["point_in_time_recovery_override"] = point_in_time_recovery_override
|
|
1172
|
+
if tags_override is not None:
|
|
1173
|
+
input_["tags_override"] = tags_override
|
|
1174
|
+
if auto_scaling_specification is not None:
|
|
1175
|
+
input_["auto_scaling_specification"] = auto_scaling_specification
|
|
1176
|
+
if replica_specifications is not None:
|
|
1177
|
+
input_["replica_specifications"] = replica_specifications
|
|
1178
|
+
|
|
1179
|
+
response = await aexecute_pipeline(
|
|
1180
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1181
|
+
handler=_handler,
|
|
1182
|
+
interceptors=list(interceptors_),
|
|
1183
|
+
)
|
|
1184
|
+
await response.response.aclose()
|
|
1185
|
+
return response.output
|
|
1186
|
+
|
|
1187
|
+
async def tag_resource(
|
|
1188
|
+
self,
|
|
1189
|
+
resource_arn: "capo_keyspaces.types.arn.ARN",
|
|
1190
|
+
tags: "capo_keyspaces.types.tag_list.TagList",
|
|
1191
|
+
*,
|
|
1192
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
1193
|
+
) -> "capo_keyspaces.types.tag_resource_response.TagResourceResponse":
|
|
1194
|
+
r"""<p>Associates a set of tags with a Amazon Keyspaces resource. You can then activate these user-defined tags so that they appear on the Cost Management Console for cost allocation tracking. 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> <p>For IAM policy examples that show how to control access to Amazon Keyspaces resources based on tags, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-tags\">Amazon Keyspaces resource access based on tags</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
1195
|
+
|
|
1196
|
+
Args:
|
|
1197
|
+
resource_arn: <p>The Amazon Resource Name (ARN) of the Amazon Keyspaces resource to which to add tags.</p>
|
|
1198
|
+
tags: <p>The tags to be assigned to the Amazon Keyspaces resource.</p>
|
|
1199
|
+
|
|
1200
|
+
Raises:
|
|
1201
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
1202
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
1203
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
1204
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
1205
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
1206
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
1207
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1208
|
+
"""
|
|
1209
|
+
|
|
1210
|
+
async def _handler(
|
|
1211
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.tag_resource_request.TagResourceRequest]",
|
|
1212
|
+
) -> AsyncOperationResponse[
|
|
1213
|
+
"capo_keyspaces.types.tag_resource_response.TagResourceResponse"
|
|
1214
|
+
]:
|
|
1215
|
+
import capo_keyspaces._operations.keyspaces_service.tag_resource
|
|
1216
|
+
|
|
1217
|
+
(
|
|
1218
|
+
output,
|
|
1219
|
+
http_response,
|
|
1220
|
+
) = await capo_keyspaces._operations.keyspaces_service.tag_resource.async_tag_resource(
|
|
1221
|
+
req.options, req.input
|
|
1222
|
+
)
|
|
1223
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1224
|
+
|
|
1225
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1226
|
+
input_: capo_keyspaces.types.tag_resource_request.TagResourceRequest = {
|
|
1227
|
+
"resource_arn": resource_arn,
|
|
1228
|
+
"tags": tags,
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
response = await aexecute_pipeline(
|
|
1232
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1233
|
+
handler=_handler,
|
|
1234
|
+
interceptors=list(interceptors_),
|
|
1235
|
+
)
|
|
1236
|
+
await response.response.aclose()
|
|
1237
|
+
return response.output
|
|
1238
|
+
|
|
1239
|
+
async def untag_resource(
|
|
1240
|
+
self,
|
|
1241
|
+
resource_arn: "capo_keyspaces.types.arn.ARN",
|
|
1242
|
+
tags: "capo_keyspaces.types.tag_list.TagList",
|
|
1243
|
+
*,
|
|
1244
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
1245
|
+
) -> "capo_keyspaces.types.untag_resource_response.UntagResourceResponse":
|
|
1246
|
+
"""<p>Removes the association of tags from a Amazon Keyspaces resource.</p>
|
|
1247
|
+
|
|
1248
|
+
Args:
|
|
1249
|
+
resource_arn: <p>The Amazon Keyspaces resource that the tags will be removed from. This value is an Amazon Resource Name (ARN).</p>
|
|
1250
|
+
tags: <p>A list of existing tags to be removed from the Amazon Keyspaces resource.</p>
|
|
1251
|
+
|
|
1252
|
+
Raises:
|
|
1253
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
1254
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
1255
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
1256
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
1257
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
1258
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
1259
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1260
|
+
"""
|
|
1261
|
+
|
|
1262
|
+
async def _handler(
|
|
1263
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.untag_resource_request.UntagResourceRequest]",
|
|
1264
|
+
) -> AsyncOperationResponse[
|
|
1265
|
+
"capo_keyspaces.types.untag_resource_response.UntagResourceResponse"
|
|
1266
|
+
]:
|
|
1267
|
+
import capo_keyspaces._operations.keyspaces_service.untag_resource
|
|
1268
|
+
|
|
1269
|
+
(
|
|
1270
|
+
output,
|
|
1271
|
+
http_response,
|
|
1272
|
+
) = await capo_keyspaces._operations.keyspaces_service.untag_resource.async_untag_resource(
|
|
1273
|
+
req.options, req.input
|
|
1274
|
+
)
|
|
1275
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1276
|
+
|
|
1277
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1278
|
+
input_: capo_keyspaces.types.untag_resource_request.UntagResourceRequest = {
|
|
1279
|
+
"resource_arn": resource_arn,
|
|
1280
|
+
"tags": tags,
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
response = await aexecute_pipeline(
|
|
1284
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1285
|
+
handler=_handler,
|
|
1286
|
+
interceptors=list(interceptors_),
|
|
1287
|
+
)
|
|
1288
|
+
await response.response.aclose()
|
|
1289
|
+
return response.output
|
|
1290
|
+
|
|
1291
|
+
async def update_keyspace(
|
|
1292
|
+
self,
|
|
1293
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
1294
|
+
replication_specification: "capo_keyspaces.types.replication_specification.ReplicationSpecification",
|
|
1295
|
+
*,
|
|
1296
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
1297
|
+
client_side_timestamps: Optional[
|
|
1298
|
+
"capo_keyspaces.types.client_side_timestamps.ClientSideTimestamps"
|
|
1299
|
+
] = None,
|
|
1300
|
+
) -> "capo_keyspaces.types.update_keyspace_response.UpdateKeyspaceResponse":
|
|
1301
|
+
r"""<p> Adds a new Amazon Web Services Region to the keyspace. You can add a new Region to a keyspace that is either a single or a multi-Region keyspace. Amazon Keyspaces is going to replicate all tables in the keyspace to the new Region. To successfully replicate all tables to the new Region, they must use client-side timestamps for conflict resolution. To enable client-side timestamps, specify <code>clientSideTimestamps.status = enabled</code> when invoking the API. For more information about client-side timestamps, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/client-side-timestamps.html\">Client-side timestamps in Amazon Keyspaces</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p> <p>To add a Region to a keyspace using the <code>UpdateKeyspace</code> API, the IAM principal needs permissions for the following IAM actions:</p> <ul> <li> <p> <code>cassandra:Alter</code> </p> </li> <li> <p> <code>cassandra:AlterMultiRegionResource</code> </p> </li> <li> <p> <code>cassandra:Create</code> </p> </li> <li> <p> <code>cassandra:CreateMultiRegionResource</code> </p> </li> <li> <p> <code>cassandra:Select</code> </p> </li> <li> <p> <code>cassandra:SelectMultiRegionResource</code> </p> </li> <li> <p> <code>cassandra:Modify</code> </p> </li> <li> <p> <code>cassandra:ModifyMultiRegionResource</code> </p> </li> </ul> <p>If the keyspace contains a table that is configured in provisioned mode with auto scaling enabled, the following additional IAM actions need to be allowed.</p> <ul> <li> <p> <code>application-autoscaling:RegisterScalableTarget</code> </p> </li> <li> <p> <code>application-autoscaling:DeregisterScalableTarget</code> </p> </li> <li> <p> <code>application-autoscaling:DescribeScalableTargets</code> </p> </li> <li> <p> <code>application-autoscaling:PutScalingPolicy</code> </p> </li> <li> <p> <code>application-autoscaling:DescribeScalingPolicies</code> </p> </li> </ul> <p>To use the <code>UpdateKeyspace</code> API, the IAM principal also needs permissions to create a service-linked role with the following elements:</p> <ul> <li> <p> <code>iam:CreateServiceLinkedRole</code> - The <b>action</b> the principal can perform.</p> </li> <li> <p> <code>arn:aws:iam::*:role/aws-service-role/replication.cassandra.amazonaws.com/AWSServiceRoleForKeyspacesReplication</code> - The <b>resource</b> that the action can be performed on. </p> </li> <li> <p> <code>iam:AWSServiceName: replication.cassandra.amazonaws.com</code> - The only Amazon Web Services service that this role can be attached to is Amazon Keyspaces.</p> </li> </ul> <p>For more information, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/howitworks_replication_permissions_addReplica.html\">Configure the IAM permissions required to add an Amazon Web Services Region to a keyspace</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
1302
|
+
|
|
1303
|
+
Args:
|
|
1304
|
+
keyspace_name: <p> The name of the keyspace. </p>
|
|
1305
|
+
|
|
1306
|
+
Raises:
|
|
1307
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
1308
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
1309
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
1310
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
1311
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
1312
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
1313
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1314
|
+
"""
|
|
1315
|
+
|
|
1316
|
+
async def _handler(
|
|
1317
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.update_keyspace_request.UpdateKeyspaceRequest]",
|
|
1318
|
+
) -> AsyncOperationResponse[
|
|
1319
|
+
"capo_keyspaces.types.update_keyspace_response.UpdateKeyspaceResponse"
|
|
1320
|
+
]:
|
|
1321
|
+
import capo_keyspaces._operations.keyspaces_service.update_keyspace
|
|
1322
|
+
|
|
1323
|
+
(
|
|
1324
|
+
output,
|
|
1325
|
+
http_response,
|
|
1326
|
+
) = await capo_keyspaces._operations.keyspaces_service.update_keyspace.async_update_keyspace(
|
|
1327
|
+
req.options, req.input
|
|
1328
|
+
)
|
|
1329
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1330
|
+
|
|
1331
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1332
|
+
input_: capo_keyspaces.types.update_keyspace_request.UpdateKeyspaceRequest = {
|
|
1333
|
+
"keyspace_name": keyspace_name,
|
|
1334
|
+
"replication_specification": replication_specification,
|
|
1335
|
+
}
|
|
1336
|
+
if client_side_timestamps is not None:
|
|
1337
|
+
input_["client_side_timestamps"] = client_side_timestamps
|
|
1338
|
+
|
|
1339
|
+
response = await aexecute_pipeline(
|
|
1340
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1341
|
+
handler=_handler,
|
|
1342
|
+
interceptors=list(interceptors_),
|
|
1343
|
+
)
|
|
1344
|
+
await response.response.aclose()
|
|
1345
|
+
return response.output
|
|
1346
|
+
|
|
1347
|
+
async def update_table(
|
|
1348
|
+
self,
|
|
1349
|
+
keyspace_name: "capo_keyspaces.types.keyspace_name.KeyspaceName",
|
|
1350
|
+
table_name: "capo_keyspaces.types.table_name.TableName",
|
|
1351
|
+
*,
|
|
1352
|
+
config_overrides: Optional[AsyncKeyspacesClientConfig] = None,
|
|
1353
|
+
add_columns: Optional[
|
|
1354
|
+
"capo_keyspaces.types.column_definition_list.ColumnDefinitionList"
|
|
1355
|
+
] = None,
|
|
1356
|
+
capacity_specification: Optional[
|
|
1357
|
+
"capo_keyspaces.types.capacity_specification.CapacitySpecification"
|
|
1358
|
+
] = None,
|
|
1359
|
+
encryption_specification: Optional[
|
|
1360
|
+
"capo_keyspaces.types.encryption_specification.EncryptionSpecification"
|
|
1361
|
+
] = None,
|
|
1362
|
+
point_in_time_recovery: Optional[
|
|
1363
|
+
"capo_keyspaces.types.point_in_time_recovery.PointInTimeRecovery"
|
|
1364
|
+
] = None,
|
|
1365
|
+
ttl: Optional["capo_keyspaces.types.time_to_live.TimeToLive"] = None,
|
|
1366
|
+
default_time_to_live: Optional[
|
|
1367
|
+
"capo_keyspaces.types.default_time_to_live.DefaultTimeToLive"
|
|
1368
|
+
] = None,
|
|
1369
|
+
client_side_timestamps: Optional[
|
|
1370
|
+
"capo_keyspaces.types.client_side_timestamps.ClientSideTimestamps"
|
|
1371
|
+
] = None,
|
|
1372
|
+
auto_scaling_specification: Optional[
|
|
1373
|
+
"capo_keyspaces.types.auto_scaling_specification.AutoScalingSpecification"
|
|
1374
|
+
] = None,
|
|
1375
|
+
replica_specifications: Optional[
|
|
1376
|
+
"capo_keyspaces.types.replica_specification_list.ReplicaSpecificationList"
|
|
1377
|
+
] = None,
|
|
1378
|
+
cdc_specification: Optional[
|
|
1379
|
+
"capo_keyspaces.types.cdc_specification.CdcSpecification"
|
|
1380
|
+
] = None,
|
|
1381
|
+
warm_throughput_specification: Optional[
|
|
1382
|
+
"capo_keyspaces.types.warm_throughput_specification.WarmThroughputSpecification"
|
|
1383
|
+
] = None,
|
|
1384
|
+
) -> "capo_keyspaces.types.update_table_response.UpdateTableResponse":
|
|
1385
|
+
r"""<p>Adds new columns to the table or updates one of the table's settings, for example capacity mode, auto scaling, encryption, point-in-time recovery, or ttl settings. Note that you can only update one specific table setting per update operation.</p>
|
|
1386
|
+
|
|
1387
|
+
Args:
|
|
1388
|
+
keyspace_name: <p>The name of the keyspace the specified table is stored in.</p>
|
|
1389
|
+
table_name: <p>The name of the table.</p>
|
|
1390
|
+
add_columns: <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>
|
|
1391
|
+
capacity_specification: <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>
|
|
1392
|
+
encryption_specification: <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>
|
|
1393
|
+
point_in_time_recovery: <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>
|
|
1394
|
+
ttl: <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>
|
|
1395
|
+
default_time_to_live: <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>
|
|
1396
|
+
client_side_timestamps: <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>
|
|
1397
|
+
auto_scaling_specification: <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>
|
|
1398
|
+
replica_specifications: <p>The Region specific settings of a multi-Regional table.</p>
|
|
1399
|
+
cdc_specification: <p>The CDC stream settings of the table.</p>
|
|
1400
|
+
warm_throughput_specification: <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>
|
|
1401
|
+
|
|
1402
|
+
Raises:
|
|
1403
|
+
capo_keyspaces.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access permissions to perform this action. </p>
|
|
1404
|
+
capo_keyspaces.errors.conflict_exception.ConflictException: <p>Amazon Keyspaces couldn't complete the requested action. This error may occur if you try to perform an action and the same or a different action is already in progress, or if you try to create a resource that already exists. </p>
|
|
1405
|
+
capo_keyspaces.errors.internal_server_exception.InternalServerException: <p>Amazon Keyspaces was unable to fully process this request because of an internal server error.</p>
|
|
1406
|
+
capo_keyspaces.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a keyspace, table, or type that doesn't exist. The resource might not be specified correctly, or its status might not be <code>ACTIVE</code>.</p>
|
|
1407
|
+
capo_keyspaces.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The operation exceeded the service quota for this resource. For more information on service quotas, see <a href=\"https://docs.aws.amazon.com/keyspaces/latest/devguide/quotas.html\">Quotas</a> in the <i>Amazon Keyspaces Developer Guide</i>.</p>
|
|
1408
|
+
capo_keyspaces.errors.validation_exception.ValidationException: <p>The operation failed due to an invalid or malformed request.</p>
|
|
1409
|
+
capo_keyspaces.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
1410
|
+
"""
|
|
1411
|
+
|
|
1412
|
+
async def _handler(
|
|
1413
|
+
req: "AsyncOperationRequest[capo_keyspaces.types.update_table_request.UpdateTableRequest]",
|
|
1414
|
+
) -> AsyncOperationResponse[
|
|
1415
|
+
"capo_keyspaces.types.update_table_response.UpdateTableResponse"
|
|
1416
|
+
]:
|
|
1417
|
+
import capo_keyspaces._operations.keyspaces_service.update_table
|
|
1418
|
+
|
|
1419
|
+
(
|
|
1420
|
+
output,
|
|
1421
|
+
http_response,
|
|
1422
|
+
) = await capo_keyspaces._operations.keyspaces_service.update_table.async_update_table(
|
|
1423
|
+
req.options, req.input
|
|
1424
|
+
)
|
|
1425
|
+
return AsyncOperationResponse(output=output, response=http_response)
|
|
1426
|
+
|
|
1427
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
1428
|
+
input_: capo_keyspaces.types.update_table_request.UpdateTableRequest = {
|
|
1429
|
+
"keyspace_name": keyspace_name,
|
|
1430
|
+
"table_name": table_name,
|
|
1431
|
+
}
|
|
1432
|
+
if add_columns is not None:
|
|
1433
|
+
input_["add_columns"] = add_columns
|
|
1434
|
+
if capacity_specification is not None:
|
|
1435
|
+
input_["capacity_specification"] = capacity_specification
|
|
1436
|
+
if encryption_specification is not None:
|
|
1437
|
+
input_["encryption_specification"] = encryption_specification
|
|
1438
|
+
if point_in_time_recovery is not None:
|
|
1439
|
+
input_["point_in_time_recovery"] = point_in_time_recovery
|
|
1440
|
+
if ttl is not None:
|
|
1441
|
+
input_["ttl"] = ttl
|
|
1442
|
+
if default_time_to_live is not None:
|
|
1443
|
+
input_["default_time_to_live"] = default_time_to_live
|
|
1444
|
+
if client_side_timestamps is not None:
|
|
1445
|
+
input_["client_side_timestamps"] = client_side_timestamps
|
|
1446
|
+
if auto_scaling_specification is not None:
|
|
1447
|
+
input_["auto_scaling_specification"] = auto_scaling_specification
|
|
1448
|
+
if replica_specifications is not None:
|
|
1449
|
+
input_["replica_specifications"] = replica_specifications
|
|
1450
|
+
if cdc_specification is not None:
|
|
1451
|
+
input_["cdc_specification"] = cdc_specification
|
|
1452
|
+
if warm_throughput_specification is not None:
|
|
1453
|
+
input_["warm_throughput_specification"] = warm_throughput_specification
|
|
1454
|
+
|
|
1455
|
+
response = await aexecute_pipeline(
|
|
1456
|
+
AsyncOperationRequest(input=input_, options=options_),
|
|
1457
|
+
handler=_handler,
|
|
1458
|
+
interceptors=list(interceptors_),
|
|
1459
|
+
)
|
|
1460
|
+
await response.response.aclose()
|
|
1461
|
+
return response.output
|
|
1462
|
+
|
|
1463
|
+
async def __aenter__(self) -> Self:
|
|
1464
|
+
return self
|
|
1465
|
+
|
|
1466
|
+
async def __aexit__(self, exc_type: Any, exc: Any, tb: Any):
|
|
1467
|
+
await self._client.aclose()
|