capo-cloudcontrol 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_cloudcontrol/__init__.py +72 -0
- capo_cloudcontrol/_async.py +25 -0
- capo_cloudcontrol/_auth/_identity.py +16 -0
- capo_cloudcontrol/_auth/_providers.py +886 -0
- capo_cloudcontrol/_auth/_signers.py +88 -0
- capo_cloudcontrol/_auth/_sigv4.py +434 -0
- capo_cloudcontrol/_auth/_zapros_handler.py +80 -0
- capo_cloudcontrol/_iter.py +113 -0
- capo_cloudcontrol/_operations/cloud_api_service/cancel_resource_request.py +155 -0
- capo_cloudcontrol/_operations/cloud_api_service/create_resource.py +240 -0
- capo_cloudcontrol/_operations/cloud_api_service/delete_resource.py +240 -0
- capo_cloudcontrol/_operations/cloud_api_service/get_resource.py +230 -0
- capo_cloudcontrol/_operations/cloud_api_service/get_resource_request_status.py +151 -0
- capo_cloudcontrol/_operations/cloud_api_service/list_resource_requests.py +146 -0
- capo_cloudcontrol/_operations/cloud_api_service/list_resources.py +230 -0
- capo_cloudcontrol/_operations/cloud_api_service/update_resource.py +240 -0
- capo_cloudcontrol/_pagination.py +21 -0
- capo_cloudcontrol/_protocol/__init__.py +1 -0
- capo_cloudcontrol/_protocol/errors.py +93 -0
- capo_cloudcontrol/_protocol/eventstream.py +238 -0
- capo_cloudcontrol/_protocol/serialize.py +47 -0
- capo_cloudcontrol/_protocol/xml.py +33 -0
- capo_cloudcontrol/_rule_engine/__init__.py +0 -0
- capo_cloudcontrol/_rule_engine/_aws_partition.py +160 -0
- capo_cloudcontrol/_rule_engine/_endpoint_rule_set.py +138 -0
- capo_cloudcontrol/_rule_engine/_endpoint_runtime.py +389 -0
- capo_cloudcontrol/_services/_aws_config.py +160 -0
- capo_cloudcontrol/_services/_pipeline.py +198 -0
- capo_cloudcontrol/_services/async_cloud_control.py +772 -0
- capo_cloudcontrol/_services/cloud_control.py +764 -0
- capo_cloudcontrol/errors/__init__.py +74 -0
- capo_cloudcontrol/errors/_base.py +94 -0
- capo_cloudcontrol/errors/already_exists_exception.py +51 -0
- capo_cloudcontrol/errors/client_token_conflict_exception.py +51 -0
- capo_cloudcontrol/errors/concurrent_modification_exception.py +53 -0
- capo_cloudcontrol/errors/concurrent_operation_exception.py +51 -0
- capo_cloudcontrol/errors/general_service_exception.py +51 -0
- capo_cloudcontrol/errors/handler_failure_exception.py +51 -0
- capo_cloudcontrol/errors/handler_internal_failure_exception.py +53 -0
- capo_cloudcontrol/errors/invalid_credentials_exception.py +51 -0
- capo_cloudcontrol/errors/invalid_request_exception.py +51 -0
- capo_cloudcontrol/errors/network_failure_exception.py +51 -0
- capo_cloudcontrol/errors/not_stabilized_exception.py +51 -0
- capo_cloudcontrol/errors/not_updatable_exception.py +51 -0
- capo_cloudcontrol/errors/private_type_exception.py +51 -0
- capo_cloudcontrol/errors/request_token_not_found_exception.py +53 -0
- capo_cloudcontrol/errors/resource_conflict_exception.py +51 -0
- capo_cloudcontrol/errors/resource_not_found_exception.py +51 -0
- capo_cloudcontrol/errors/service_internal_error_exception.py +53 -0
- capo_cloudcontrol/errors/service_limit_exceeded_exception.py +53 -0
- capo_cloudcontrol/errors/throttling_exception.py +51 -0
- capo_cloudcontrol/errors/type_not_found_exception.py +51 -0
- capo_cloudcontrol/errors/unsupported_action_exception.py +51 -0
- capo_cloudcontrol/py.typed +0 -0
- capo_cloudcontrol/types/_prelude/blob.py +12 -0
- capo_cloudcontrol/types/_prelude/timestamp.py +17 -0
- capo_cloudcontrol/types/cancel_resource_request_input.py +31 -0
- capo_cloudcontrol/types/cancel_resource_request_output.py +39 -0
- capo_cloudcontrol/types/client_token.py +5 -0
- capo_cloudcontrol/types/create_resource_input.py +62 -0
- capo_cloudcontrol/types/create_resource_output.py +40 -0
- capo_cloudcontrol/types/delete_resource_input.py +62 -0
- capo_cloudcontrol/types/delete_resource_output.py +40 -0
- capo_cloudcontrol/types/error_message.py +5 -0
- capo_cloudcontrol/types/get_resource_input.py +55 -0
- capo_cloudcontrol/types/get_resource_output.py +48 -0
- capo_cloudcontrol/types/get_resource_request_status_input.py +33 -0
- capo_cloudcontrol/types/get_resource_request_status_output.py +61 -0
- capo_cloudcontrol/types/handler_error_code.py +5 -0
- capo_cloudcontrol/types/handler_next_token.py +5 -0
- capo_cloudcontrol/types/hook_failure_mode.py +5 -0
- capo_cloudcontrol/types/hook_invocation_point.py +5 -0
- capo_cloudcontrol/types/hook_progress_event.py +95 -0
- capo_cloudcontrol/types/hook_status.py +5 -0
- capo_cloudcontrol/types/hook_type_arn.py +5 -0
- capo_cloudcontrol/types/hooks_progress_event.py +35 -0
- capo_cloudcontrol/types/identifier.py +5 -0
- capo_cloudcontrol/types/list_resource_requests_input.py +56 -0
- capo_cloudcontrol/types/list_resource_requests_output.py +49 -0
- capo_cloudcontrol/types/list_resources_input.py +70 -0
- capo_cloudcontrol/types/list_resources_output.py +58 -0
- capo_cloudcontrol/types/max_results.py +5 -0
- capo_cloudcontrol/types/next_token.py +5 -0
- capo_cloudcontrol/types/operation.py +5 -0
- capo_cloudcontrol/types/operation_status.py +5 -0
- capo_cloudcontrol/types/operation_statuses.py +19 -0
- capo_cloudcontrol/types/operations.py +17 -0
- capo_cloudcontrol/types/patch_document.py +6 -0
- capo_cloudcontrol/types/progress_event.py +118 -0
- capo_cloudcontrol/types/properties.py +6 -0
- capo_cloudcontrol/types/request_token.py +5 -0
- capo_cloudcontrol/types/resource_description.py +35 -0
- capo_cloudcontrol/types/resource_descriptions.py +35 -0
- capo_cloudcontrol/types/resource_request_status_filter.py +57 -0
- capo_cloudcontrol/types/resource_request_status_summaries.py +33 -0
- capo_cloudcontrol/types/role_arn.py +5 -0
- capo_cloudcontrol/types/status_message.py +5 -0
- capo_cloudcontrol/types/timestamp.py +20 -0
- capo_cloudcontrol/types/type_name.py +5 -0
- capo_cloudcontrol/types/type_version_id.py +5 -0
- capo_cloudcontrol/types/update_resource_input.py +70 -0
- capo_cloudcontrol/types/update_resource_output.py +40 -0
- capo_cloudcontrol-0.1.0.dist-info/METADATA +102 -0
- capo_cloudcontrol-0.1.0.dist-info/RECORD +107 -0
- capo_cloudcontrol-0.1.0.dist-info/WHEEL +5 -0
- capo_cloudcontrol-0.1.0.dist-info/licenses/LICENSE +21 -0
- capo_cloudcontrol-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#NotStabilizedException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class NotStabilizedException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: NotStabilizedException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> NotStabilizedException_:
|
|
26
|
+
out: NotStabilizedException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class NotStabilizedException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#NotStabilizedException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "NotStabilizedException"
|
|
36
|
+
|
|
37
|
+
def __init__(self, data: NotStabilizedException_, message: str | None = None):
|
|
38
|
+
super().__init__(
|
|
39
|
+
"client",
|
|
40
|
+
is_throttling_error=False,
|
|
41
|
+
is_retryable=False,
|
|
42
|
+
code="NotStabilizedException",
|
|
43
|
+
message=message,
|
|
44
|
+
)
|
|
45
|
+
self.data = data
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_aws_json_1_0(
|
|
49
|
+
cls, data: dict, message: str | None = None
|
|
50
|
+
) -> "NotStabilizedException":
|
|
51
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#NotUpdatableException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class NotUpdatableException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: NotUpdatableException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> NotUpdatableException_:
|
|
26
|
+
out: NotUpdatableException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class NotUpdatableException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#NotUpdatableException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "NotUpdatableException"
|
|
36
|
+
|
|
37
|
+
def __init__(self, data: NotUpdatableException_, message: str | None = None):
|
|
38
|
+
super().__init__(
|
|
39
|
+
"client",
|
|
40
|
+
is_throttling_error=False,
|
|
41
|
+
is_retryable=False,
|
|
42
|
+
code="NotUpdatableException",
|
|
43
|
+
message=message,
|
|
44
|
+
)
|
|
45
|
+
self.data = data
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_aws_json_1_0(
|
|
49
|
+
cls, data: dict, message: str | None = None
|
|
50
|
+
) -> "NotUpdatableException":
|
|
51
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#PrivateTypeException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PrivateTypeException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: PrivateTypeException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> PrivateTypeException_:
|
|
26
|
+
out: PrivateTypeException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class PrivateTypeException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#PrivateTypeException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "PrivateTypeException"
|
|
36
|
+
|
|
37
|
+
def __init__(self, data: PrivateTypeException_, message: str | None = None):
|
|
38
|
+
super().__init__(
|
|
39
|
+
"client",
|
|
40
|
+
is_throttling_error=False,
|
|
41
|
+
is_retryable=False,
|
|
42
|
+
code="PrivateTypeException",
|
|
43
|
+
message=message,
|
|
44
|
+
)
|
|
45
|
+
self.data = data
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_aws_json_1_0(
|
|
49
|
+
cls, data: dict, message: str | None = None
|
|
50
|
+
) -> "PrivateTypeException":
|
|
51
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#RequestTokenNotFoundException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class RequestTokenNotFoundException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: RequestTokenNotFoundException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> RequestTokenNotFoundException_:
|
|
26
|
+
out: RequestTokenNotFoundException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class RequestTokenNotFoundException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#RequestTokenNotFoundException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "RequestTokenNotFoundException"
|
|
36
|
+
|
|
37
|
+
def __init__(
|
|
38
|
+
self, data: RequestTokenNotFoundException_, message: str | None = None
|
|
39
|
+
):
|
|
40
|
+
super().__init__(
|
|
41
|
+
"client",
|
|
42
|
+
is_throttling_error=False,
|
|
43
|
+
is_retryable=False,
|
|
44
|
+
code="RequestTokenNotFoundException",
|
|
45
|
+
message=message,
|
|
46
|
+
)
|
|
47
|
+
self.data = data
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_aws_json_1_0(
|
|
51
|
+
cls, data: dict, message: str | None = None
|
|
52
|
+
) -> "RequestTokenNotFoundException":
|
|
53
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#ResourceConflictException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ResourceConflictException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: ResourceConflictException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> ResourceConflictException_:
|
|
26
|
+
out: ResourceConflictException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ResourceConflictException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#ResourceConflictException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "ResourceConflictException"
|
|
36
|
+
|
|
37
|
+
def __init__(self, data: ResourceConflictException_, message: str | None = None):
|
|
38
|
+
super().__init__(
|
|
39
|
+
"client",
|
|
40
|
+
is_throttling_error=False,
|
|
41
|
+
is_retryable=False,
|
|
42
|
+
code="ResourceConflictException",
|
|
43
|
+
message=message,
|
|
44
|
+
)
|
|
45
|
+
self.data = data
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_aws_json_1_0(
|
|
49
|
+
cls, data: dict, message: str | None = None
|
|
50
|
+
) -> "ResourceConflictException":
|
|
51
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#ResourceNotFoundException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ResourceNotFoundException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: ResourceNotFoundException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> ResourceNotFoundException_:
|
|
26
|
+
out: ResourceNotFoundException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ResourceNotFoundException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#ResourceNotFoundException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "ResourceNotFoundException"
|
|
36
|
+
|
|
37
|
+
def __init__(self, data: ResourceNotFoundException_, message: str | None = None):
|
|
38
|
+
super().__init__(
|
|
39
|
+
"client",
|
|
40
|
+
is_throttling_error=False,
|
|
41
|
+
is_retryable=False,
|
|
42
|
+
code="ResourceNotFoundException",
|
|
43
|
+
message=message,
|
|
44
|
+
)
|
|
45
|
+
self.data = data
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_aws_json_1_0(
|
|
49
|
+
cls, data: dict, message: str | None = None
|
|
50
|
+
) -> "ResourceNotFoundException":
|
|
51
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#ServiceInternalErrorException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ServiceInternalErrorException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: ServiceInternalErrorException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> ServiceInternalErrorException_:
|
|
26
|
+
out: ServiceInternalErrorException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ServiceInternalErrorException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#ServiceInternalErrorException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "ServiceInternalErrorException"
|
|
36
|
+
|
|
37
|
+
def __init__(
|
|
38
|
+
self, data: ServiceInternalErrorException_, message: str | None = None
|
|
39
|
+
):
|
|
40
|
+
super().__init__(
|
|
41
|
+
"server",
|
|
42
|
+
is_throttling_error=False,
|
|
43
|
+
is_retryable=False,
|
|
44
|
+
code="ServiceInternalErrorException",
|
|
45
|
+
message=message,
|
|
46
|
+
)
|
|
47
|
+
self.data = data
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_aws_json_1_0(
|
|
51
|
+
cls, data: dict, message: str | None = None
|
|
52
|
+
) -> "ServiceInternalErrorException":
|
|
53
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#ServiceLimitExceededException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ServiceLimitExceededException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: ServiceLimitExceededException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> ServiceLimitExceededException_:
|
|
26
|
+
out: ServiceLimitExceededException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ServiceLimitExceededException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#ServiceLimitExceededException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "ServiceLimitExceededException"
|
|
36
|
+
|
|
37
|
+
def __init__(
|
|
38
|
+
self, data: ServiceLimitExceededException_, message: str | None = None
|
|
39
|
+
):
|
|
40
|
+
super().__init__(
|
|
41
|
+
"client",
|
|
42
|
+
is_throttling_error=False,
|
|
43
|
+
is_retryable=False,
|
|
44
|
+
code="ServiceLimitExceededException",
|
|
45
|
+
message=message,
|
|
46
|
+
)
|
|
47
|
+
self.data = data
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_aws_json_1_0(
|
|
51
|
+
cls, data: dict, message: str | None = None
|
|
52
|
+
) -> "ServiceLimitExceededException":
|
|
53
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#ThrottlingException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ThrottlingException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: ThrottlingException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> ThrottlingException_:
|
|
26
|
+
out: ThrottlingException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class ThrottlingException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#ThrottlingException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "ThrottlingException"
|
|
36
|
+
|
|
37
|
+
def __init__(self, data: ThrottlingException_, message: str | None = None):
|
|
38
|
+
super().__init__(
|
|
39
|
+
"client",
|
|
40
|
+
is_throttling_error=False,
|
|
41
|
+
is_retryable=False,
|
|
42
|
+
code="ThrottlingException",
|
|
43
|
+
message=message,
|
|
44
|
+
)
|
|
45
|
+
self.data = data
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_aws_json_1_0(
|
|
49
|
+
cls, data: dict, message: str | None = None
|
|
50
|
+
) -> "ThrottlingException":
|
|
51
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#TypeNotFoundException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TypeNotFoundException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: TypeNotFoundException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> TypeNotFoundException_:
|
|
26
|
+
out: TypeNotFoundException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class TypeNotFoundException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#TypeNotFoundException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "TypeNotFoundException"
|
|
36
|
+
|
|
37
|
+
def __init__(self, data: TypeNotFoundException_, message: str | None = None):
|
|
38
|
+
super().__init__(
|
|
39
|
+
"client",
|
|
40
|
+
is_throttling_error=False,
|
|
41
|
+
is_retryable=False,
|
|
42
|
+
code="TypeNotFoundException",
|
|
43
|
+
message=message,
|
|
44
|
+
)
|
|
45
|
+
self.data = data
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_aws_json_1_0(
|
|
49
|
+
cls, data: dict, message: str | None = None
|
|
50
|
+
) -> "TypeNotFoundException":
|
|
51
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#UnsupportedActionException``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import ServiceError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.error_message
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class UnsupportedActionException_(TypedDict, closed=True):
|
|
14
|
+
message: NotRequired["capo_cloudcontrol.types.error_message.ErrorMessage"]
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- awsJson1_0 ser/de ---
|
|
18
|
+
def serialize_aws_json_1_0(value: UnsupportedActionException_) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
if "message" in value:
|
|
21
|
+
out["Message"] = value["message"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> UnsupportedActionException_:
|
|
26
|
+
out: UnsupportedActionException_ = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("Message") is not None:
|
|
28
|
+
out["message"] = data["Message"]
|
|
29
|
+
return out
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class UnsupportedActionException(ServiceError):
|
|
33
|
+
"""Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#UnsupportedActionException``."""
|
|
34
|
+
|
|
35
|
+
code: str | None = "UnsupportedActionException"
|
|
36
|
+
|
|
37
|
+
def __init__(self, data: UnsupportedActionException_, message: str | None = None):
|
|
38
|
+
super().__init__(
|
|
39
|
+
"client",
|
|
40
|
+
is_throttling_error=False,
|
|
41
|
+
is_retryable=False,
|
|
42
|
+
code="UnsupportedActionException",
|
|
43
|
+
message=message,
|
|
44
|
+
)
|
|
45
|
+
self.data = data
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_aws_json_1_0(
|
|
49
|
+
cls, data: dict, message: str | None = None
|
|
50
|
+
) -> "UnsupportedActionException":
|
|
51
|
+
return cls(deserialize_aws_json_1_0(data), message)
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Generated from Smithy prelude shape ``smithy.api#Blob``."""
|
|
2
|
+
|
|
3
|
+
import base64
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# --- awsJson1_0 ser/de ---
|
|
7
|
+
def serialize_aws_json_1_0(value: bytes) -> str:
|
|
8
|
+
return base64.b64encode(value).decode("ascii")
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def deserialize_aws_json_1_0(data: str) -> bytes:
|
|
12
|
+
return base64.b64decode(data)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy prelude shape ``smithy.api#Timestamp``."""
|
|
2
|
+
|
|
3
|
+
import datetime
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# --- awsJson1_0 ser/de ---
|
|
7
|
+
def serialize_aws_json_1_0(value: datetime.datetime) -> float:
|
|
8
|
+
value = (
|
|
9
|
+
value.astimezone(datetime.timezone.utc)
|
|
10
|
+
if value.tzinfo
|
|
11
|
+
else value.replace(tzinfo=datetime.timezone.utc)
|
|
12
|
+
)
|
|
13
|
+
return value.timestamp()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_aws_json_1_0(data: float) -> datetime.datetime:
|
|
17
|
+
return datetime.datetime.fromtimestamp(float(data), tz=datetime.timezone.utc)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#CancelResourceRequestInput``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.request_token
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class CancelResourceRequestInput(TypedDict, closed=True):
|
|
14
|
+
request_token: "capo_cloudcontrol.types.request_token.RequestToken"
|
|
15
|
+
"""<p>The <code>RequestToken</code> of the <code>ProgressEvent</code> object returned by the resource operation request.</p>"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# --- awsJson1_0 ser/de ---
|
|
19
|
+
def serialize_aws_json_1_0(value: CancelResourceRequestInput) -> dict:
|
|
20
|
+
out: dict = {}
|
|
21
|
+
out["RequestToken"] = value["request_token"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> CancelResourceRequestInput:
|
|
26
|
+
out: CancelResourceRequestInput = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("RequestToken") is not None:
|
|
28
|
+
out["request_token"] = data["RequestToken"]
|
|
29
|
+
else:
|
|
30
|
+
raise DeserializationError("CancelResourceRequestInput.request_token required")
|
|
31
|
+
return out
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#CancelResourceRequestOutput``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_cloudcontrol.types.progress_event
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class CancelResourceRequestOutput(TypedDict, closed=True):
|
|
12
|
+
progress_event: NotRequired["capo_cloudcontrol.types.progress_event.ProgressEvent"]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# --- awsJson1_0 ser/de ---
|
|
16
|
+
def serialize_aws_json_1_0(value: CancelResourceRequestOutput) -> dict:
|
|
17
|
+
out: dict = {}
|
|
18
|
+
if "progress_event" in value:
|
|
19
|
+
import capo_cloudcontrol.types.progress_event
|
|
20
|
+
|
|
21
|
+
out["ProgressEvent"] = (
|
|
22
|
+
capo_cloudcontrol.types.progress_event.serialize_aws_json_1_0(
|
|
23
|
+
value["progress_event"]
|
|
24
|
+
)
|
|
25
|
+
)
|
|
26
|
+
return out
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def deserialize_aws_json_1_0(data: dict) -> CancelResourceRequestOutput:
|
|
30
|
+
out: CancelResourceRequestOutput = {} # type: ignore[typeddict-item]
|
|
31
|
+
if data.get("ProgressEvent") is not None:
|
|
32
|
+
import capo_cloudcontrol.types.progress_event
|
|
33
|
+
|
|
34
|
+
out["progress_event"] = (
|
|
35
|
+
capo_cloudcontrol.types.progress_event.deserialize_aws_json_1_0(
|
|
36
|
+
data["ProgressEvent"]
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
return out
|