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.
Files changed (107) hide show
  1. capo_cloudcontrol/__init__.py +72 -0
  2. capo_cloudcontrol/_async.py +25 -0
  3. capo_cloudcontrol/_auth/_identity.py +16 -0
  4. capo_cloudcontrol/_auth/_providers.py +886 -0
  5. capo_cloudcontrol/_auth/_signers.py +88 -0
  6. capo_cloudcontrol/_auth/_sigv4.py +434 -0
  7. capo_cloudcontrol/_auth/_zapros_handler.py +80 -0
  8. capo_cloudcontrol/_iter.py +113 -0
  9. capo_cloudcontrol/_operations/cloud_api_service/cancel_resource_request.py +155 -0
  10. capo_cloudcontrol/_operations/cloud_api_service/create_resource.py +240 -0
  11. capo_cloudcontrol/_operations/cloud_api_service/delete_resource.py +240 -0
  12. capo_cloudcontrol/_operations/cloud_api_service/get_resource.py +230 -0
  13. capo_cloudcontrol/_operations/cloud_api_service/get_resource_request_status.py +151 -0
  14. capo_cloudcontrol/_operations/cloud_api_service/list_resource_requests.py +146 -0
  15. capo_cloudcontrol/_operations/cloud_api_service/list_resources.py +230 -0
  16. capo_cloudcontrol/_operations/cloud_api_service/update_resource.py +240 -0
  17. capo_cloudcontrol/_pagination.py +21 -0
  18. capo_cloudcontrol/_protocol/__init__.py +1 -0
  19. capo_cloudcontrol/_protocol/errors.py +93 -0
  20. capo_cloudcontrol/_protocol/eventstream.py +238 -0
  21. capo_cloudcontrol/_protocol/serialize.py +47 -0
  22. capo_cloudcontrol/_protocol/xml.py +33 -0
  23. capo_cloudcontrol/_rule_engine/__init__.py +0 -0
  24. capo_cloudcontrol/_rule_engine/_aws_partition.py +160 -0
  25. capo_cloudcontrol/_rule_engine/_endpoint_rule_set.py +138 -0
  26. capo_cloudcontrol/_rule_engine/_endpoint_runtime.py +389 -0
  27. capo_cloudcontrol/_services/_aws_config.py +160 -0
  28. capo_cloudcontrol/_services/_pipeline.py +198 -0
  29. capo_cloudcontrol/_services/async_cloud_control.py +772 -0
  30. capo_cloudcontrol/_services/cloud_control.py +764 -0
  31. capo_cloudcontrol/errors/__init__.py +74 -0
  32. capo_cloudcontrol/errors/_base.py +94 -0
  33. capo_cloudcontrol/errors/already_exists_exception.py +51 -0
  34. capo_cloudcontrol/errors/client_token_conflict_exception.py +51 -0
  35. capo_cloudcontrol/errors/concurrent_modification_exception.py +53 -0
  36. capo_cloudcontrol/errors/concurrent_operation_exception.py +51 -0
  37. capo_cloudcontrol/errors/general_service_exception.py +51 -0
  38. capo_cloudcontrol/errors/handler_failure_exception.py +51 -0
  39. capo_cloudcontrol/errors/handler_internal_failure_exception.py +53 -0
  40. capo_cloudcontrol/errors/invalid_credentials_exception.py +51 -0
  41. capo_cloudcontrol/errors/invalid_request_exception.py +51 -0
  42. capo_cloudcontrol/errors/network_failure_exception.py +51 -0
  43. capo_cloudcontrol/errors/not_stabilized_exception.py +51 -0
  44. capo_cloudcontrol/errors/not_updatable_exception.py +51 -0
  45. capo_cloudcontrol/errors/private_type_exception.py +51 -0
  46. capo_cloudcontrol/errors/request_token_not_found_exception.py +53 -0
  47. capo_cloudcontrol/errors/resource_conflict_exception.py +51 -0
  48. capo_cloudcontrol/errors/resource_not_found_exception.py +51 -0
  49. capo_cloudcontrol/errors/service_internal_error_exception.py +53 -0
  50. capo_cloudcontrol/errors/service_limit_exceeded_exception.py +53 -0
  51. capo_cloudcontrol/errors/throttling_exception.py +51 -0
  52. capo_cloudcontrol/errors/type_not_found_exception.py +51 -0
  53. capo_cloudcontrol/errors/unsupported_action_exception.py +51 -0
  54. capo_cloudcontrol/py.typed +0 -0
  55. capo_cloudcontrol/types/_prelude/blob.py +12 -0
  56. capo_cloudcontrol/types/_prelude/timestamp.py +17 -0
  57. capo_cloudcontrol/types/cancel_resource_request_input.py +31 -0
  58. capo_cloudcontrol/types/cancel_resource_request_output.py +39 -0
  59. capo_cloudcontrol/types/client_token.py +5 -0
  60. capo_cloudcontrol/types/create_resource_input.py +62 -0
  61. capo_cloudcontrol/types/create_resource_output.py +40 -0
  62. capo_cloudcontrol/types/delete_resource_input.py +62 -0
  63. capo_cloudcontrol/types/delete_resource_output.py +40 -0
  64. capo_cloudcontrol/types/error_message.py +5 -0
  65. capo_cloudcontrol/types/get_resource_input.py +55 -0
  66. capo_cloudcontrol/types/get_resource_output.py +48 -0
  67. capo_cloudcontrol/types/get_resource_request_status_input.py +33 -0
  68. capo_cloudcontrol/types/get_resource_request_status_output.py +61 -0
  69. capo_cloudcontrol/types/handler_error_code.py +5 -0
  70. capo_cloudcontrol/types/handler_next_token.py +5 -0
  71. capo_cloudcontrol/types/hook_failure_mode.py +5 -0
  72. capo_cloudcontrol/types/hook_invocation_point.py +5 -0
  73. capo_cloudcontrol/types/hook_progress_event.py +95 -0
  74. capo_cloudcontrol/types/hook_status.py +5 -0
  75. capo_cloudcontrol/types/hook_type_arn.py +5 -0
  76. capo_cloudcontrol/types/hooks_progress_event.py +35 -0
  77. capo_cloudcontrol/types/identifier.py +5 -0
  78. capo_cloudcontrol/types/list_resource_requests_input.py +56 -0
  79. capo_cloudcontrol/types/list_resource_requests_output.py +49 -0
  80. capo_cloudcontrol/types/list_resources_input.py +70 -0
  81. capo_cloudcontrol/types/list_resources_output.py +58 -0
  82. capo_cloudcontrol/types/max_results.py +5 -0
  83. capo_cloudcontrol/types/next_token.py +5 -0
  84. capo_cloudcontrol/types/operation.py +5 -0
  85. capo_cloudcontrol/types/operation_status.py +5 -0
  86. capo_cloudcontrol/types/operation_statuses.py +19 -0
  87. capo_cloudcontrol/types/operations.py +17 -0
  88. capo_cloudcontrol/types/patch_document.py +6 -0
  89. capo_cloudcontrol/types/progress_event.py +118 -0
  90. capo_cloudcontrol/types/properties.py +6 -0
  91. capo_cloudcontrol/types/request_token.py +5 -0
  92. capo_cloudcontrol/types/resource_description.py +35 -0
  93. capo_cloudcontrol/types/resource_descriptions.py +35 -0
  94. capo_cloudcontrol/types/resource_request_status_filter.py +57 -0
  95. capo_cloudcontrol/types/resource_request_status_summaries.py +33 -0
  96. capo_cloudcontrol/types/role_arn.py +5 -0
  97. capo_cloudcontrol/types/status_message.py +5 -0
  98. capo_cloudcontrol/types/timestamp.py +20 -0
  99. capo_cloudcontrol/types/type_name.py +5 -0
  100. capo_cloudcontrol/types/type_version_id.py +5 -0
  101. capo_cloudcontrol/types/update_resource_input.py +70 -0
  102. capo_cloudcontrol/types/update_resource_output.py +40 -0
  103. capo_cloudcontrol-0.1.0.dist-info/METADATA +102 -0
  104. capo_cloudcontrol-0.1.0.dist-info/RECORD +107 -0
  105. capo_cloudcontrol-0.1.0.dist-info/WHEEL +5 -0
  106. capo_cloudcontrol-0.1.0.dist-info/licenses/LICENSE +21 -0
  107. capo_cloudcontrol-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,74 @@
1
+ from __future__ import annotations
2
+
3
+ from ._base import (
4
+ CloudControlError as CloudControlError,
5
+ )
6
+ from ._base import (
7
+ DeserializationError as DeserializationError,
8
+ )
9
+ from ._base import (
10
+ SerializationError as SerializationError,
11
+ )
12
+ from ._base import (
13
+ ServiceError as ServiceError,
14
+ )
15
+ from ._base import (
16
+ UnknownServiceError as UnknownServiceError,
17
+ )
18
+ from ._base import (
19
+ WaiterFailedError as WaiterFailedError,
20
+ )
21
+ from ._base import (
22
+ WaiterTimeoutError as WaiterTimeoutError,
23
+ )
24
+ from .already_exists_exception import AlreadyExistsException as AlreadyExistsException
25
+ from .client_token_conflict_exception import (
26
+ ClientTokenConflictException as ClientTokenConflictException,
27
+ )
28
+ from .concurrent_modification_exception import (
29
+ ConcurrentModificationException as ConcurrentModificationException,
30
+ )
31
+ from .concurrent_operation_exception import (
32
+ ConcurrentOperationException as ConcurrentOperationException,
33
+ )
34
+ from .general_service_exception import (
35
+ GeneralServiceException as GeneralServiceException,
36
+ )
37
+ from .handler_failure_exception import (
38
+ HandlerFailureException as HandlerFailureException,
39
+ )
40
+ from .handler_internal_failure_exception import (
41
+ HandlerInternalFailureException as HandlerInternalFailureException,
42
+ )
43
+ from .invalid_credentials_exception import (
44
+ InvalidCredentialsException as InvalidCredentialsException,
45
+ )
46
+ from .invalid_request_exception import (
47
+ InvalidRequestException as InvalidRequestException,
48
+ )
49
+ from .network_failure_exception import (
50
+ NetworkFailureException as NetworkFailureException,
51
+ )
52
+ from .not_stabilized_exception import NotStabilizedException as NotStabilizedException
53
+ from .not_updatable_exception import NotUpdatableException as NotUpdatableException
54
+ from .private_type_exception import PrivateTypeException as PrivateTypeException
55
+ from .request_token_not_found_exception import (
56
+ RequestTokenNotFoundException as RequestTokenNotFoundException,
57
+ )
58
+ from .resource_conflict_exception import (
59
+ ResourceConflictException as ResourceConflictException,
60
+ )
61
+ from .resource_not_found_exception import (
62
+ ResourceNotFoundException as ResourceNotFoundException,
63
+ )
64
+ from .service_internal_error_exception import (
65
+ ServiceInternalErrorException as ServiceInternalErrorException,
66
+ )
67
+ from .service_limit_exceeded_exception import (
68
+ ServiceLimitExceededException as ServiceLimitExceededException,
69
+ )
70
+ from .throttling_exception import ThrottlingException as ThrottlingException
71
+ from .type_not_found_exception import TypeNotFoundException as TypeNotFoundException
72
+ from .unsupported_action_exception import (
73
+ UnsupportedActionException as UnsupportedActionException,
74
+ )
@@ -0,0 +1,94 @@
1
+ from typing import Literal
2
+
3
+
4
+ class CloudControlError(Exception):
5
+ """Base class for all CloudControl service errors."""
6
+
7
+
8
+ class ServiceError(CloudControlError):
9
+ """Base class for all modeled service errors.
10
+
11
+ Args:
12
+ fault: ``"client"`` or ``"server"``.
13
+ is_throttling_error: Whether this error is a throttling error.
14
+ is_retryable: Whether this error is retryable.
15
+ code: The wire error code, or ``None``.
16
+ message: The error message, or ``None``.
17
+ """
18
+
19
+ code: str | None = None
20
+
21
+ def __init__(
22
+ self,
23
+ fault: Literal["client", "server"],
24
+ *,
25
+ is_throttling_error: bool,
26
+ is_retryable: bool,
27
+ code: str | None = None,
28
+ message: str | None = None,
29
+ ) -> None:
30
+ super().__init__(f"{code or '<no code>'}: {message or '<no message>'}")
31
+ self.fault = fault
32
+ self.is_throttling_error = is_throttling_error
33
+ self.is_retryable = is_retryable
34
+ self.code = code
35
+ self.message = message
36
+
37
+
38
+ class SerializationError(CloudControlError):
39
+ """Raised when a value cannot be serialized."""
40
+
41
+
42
+ class DeserializationError(CloudControlError):
43
+ """Raised when a value cannot be deserialized or a required member is missing."""
44
+
45
+
46
+ class UnknownServiceError(ServiceError):
47
+ """Raised when the server returns an error code the client does not model.
48
+
49
+ Args:
50
+ code: ``<Code>`` text from the response body, or ``None`` if absent.
51
+ message: ``<Message>`` text from the response body, or ``None``.
52
+ response: The original HTTP response object, for arbitrary inspection.
53
+ """
54
+
55
+ def __init__(
56
+ self, *, code: str | None, message: str | None, response: object
57
+ ) -> None:
58
+ _status = getattr(response, "status", 500)
59
+ _fault: Literal["client", "server"] = "client" if _status < 500 else "server"
60
+ _throttling = _status == 429
61
+ _retryable = _throttling or _status >= 500
62
+ super().__init__(
63
+ _fault,
64
+ is_throttling_error=_throttling,
65
+ is_retryable=_retryable,
66
+ code=code,
67
+ message=message,
68
+ )
69
+ self.response = response
70
+
71
+
72
+ class WaiterFailedError(CloudControlError):
73
+ """Raised when a waiter hits an acceptor with ``state="failure"``.
74
+
75
+ Args:
76
+ waiter_name: snake_case waiter name (e.g. ``bucket_exists``).
77
+ reason: Short description of which acceptor fired.
78
+ """
79
+
80
+ def __init__(self, waiter_name: str, reason: str) -> None:
81
+ super().__init__(f"waiter {waiter_name} failed: {reason}")
82
+ self.waiter_name = waiter_name
83
+ self.reason = reason
84
+
85
+
86
+ class WaiterTimeoutError(CloudControlError):
87
+ """Raised when a waiter exhausts ``max_wait_time`` without a terminal acceptor."""
88
+
89
+ def __init__(self, waiter_name: str, max_wait_time: float) -> None:
90
+ super().__init__(
91
+ f"waiter {waiter_name} timed out after {max_wait_time} seconds"
92
+ )
93
+ self.waiter_name = waiter_name
94
+ self.max_wait_time = max_wait_time
@@ -0,0 +1,51 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#AlreadyExistsException``."""
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 AlreadyExistsException_(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: AlreadyExistsException_) -> 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) -> AlreadyExistsException_:
26
+ out: AlreadyExistsException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class AlreadyExistsException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#AlreadyExistsException``."""
34
+
35
+ code: str | None = "AlreadyExistsException"
36
+
37
+ def __init__(self, data: AlreadyExistsException_, message: str | None = None):
38
+ super().__init__(
39
+ "client",
40
+ is_throttling_error=False,
41
+ is_retryable=False,
42
+ code="AlreadyExistsException",
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
+ ) -> "AlreadyExistsException":
51
+ return cls(deserialize_aws_json_1_0(data), message)
@@ -0,0 +1,51 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#ClientTokenConflictException``."""
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 ClientTokenConflictException_(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: ClientTokenConflictException_) -> 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) -> ClientTokenConflictException_:
26
+ out: ClientTokenConflictException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class ClientTokenConflictException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#ClientTokenConflictException``."""
34
+
35
+ code: str | None = "ClientTokenConflictException"
36
+
37
+ def __init__(self, data: ClientTokenConflictException_, message: str | None = None):
38
+ super().__init__(
39
+ "client",
40
+ is_throttling_error=False,
41
+ is_retryable=False,
42
+ code="ClientTokenConflictException",
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
+ ) -> "ClientTokenConflictException":
51
+ return cls(deserialize_aws_json_1_0(data), message)
@@ -0,0 +1,53 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#ConcurrentModificationException``."""
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 ConcurrentModificationException_(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: ConcurrentModificationException_) -> 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) -> ConcurrentModificationException_:
26
+ out: ConcurrentModificationException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class ConcurrentModificationException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#ConcurrentModificationException``."""
34
+
35
+ code: str | None = "ConcurrentModificationException"
36
+
37
+ def __init__(
38
+ self, data: ConcurrentModificationException_, message: str | None = None
39
+ ):
40
+ super().__init__(
41
+ "server",
42
+ is_throttling_error=False,
43
+ is_retryable=False,
44
+ code="ConcurrentModificationException",
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
+ ) -> "ConcurrentModificationException":
53
+ return cls(deserialize_aws_json_1_0(data), message)
@@ -0,0 +1,51 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#ConcurrentOperationException``."""
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 ConcurrentOperationException_(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: ConcurrentOperationException_) -> 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) -> ConcurrentOperationException_:
26
+ out: ConcurrentOperationException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class ConcurrentOperationException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#ConcurrentOperationException``."""
34
+
35
+ code: str | None = "ConcurrentOperationException"
36
+
37
+ def __init__(self, data: ConcurrentOperationException_, message: str | None = None):
38
+ super().__init__(
39
+ "client",
40
+ is_throttling_error=False,
41
+ is_retryable=False,
42
+ code="ConcurrentOperationException",
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
+ ) -> "ConcurrentOperationException":
51
+ return cls(deserialize_aws_json_1_0(data), message)
@@ -0,0 +1,51 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#GeneralServiceException``."""
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 GeneralServiceException_(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: GeneralServiceException_) -> 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) -> GeneralServiceException_:
26
+ out: GeneralServiceException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class GeneralServiceException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#GeneralServiceException``."""
34
+
35
+ code: str | None = "GeneralServiceException"
36
+
37
+ def __init__(self, data: GeneralServiceException_, message: str | None = None):
38
+ super().__init__(
39
+ "client",
40
+ is_throttling_error=False,
41
+ is_retryable=False,
42
+ code="GeneralServiceException",
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
+ ) -> "GeneralServiceException":
51
+ return cls(deserialize_aws_json_1_0(data), message)
@@ -0,0 +1,51 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#HandlerFailureException``."""
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 HandlerFailureException_(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: HandlerFailureException_) -> 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) -> HandlerFailureException_:
26
+ out: HandlerFailureException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class HandlerFailureException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#HandlerFailureException``."""
34
+
35
+ code: str | None = "HandlerFailureException"
36
+
37
+ def __init__(self, data: HandlerFailureException_, message: str | None = None):
38
+ super().__init__(
39
+ "server",
40
+ is_throttling_error=False,
41
+ is_retryable=False,
42
+ code="HandlerFailureException",
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
+ ) -> "HandlerFailureException":
51
+ return cls(deserialize_aws_json_1_0(data), message)
@@ -0,0 +1,53 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#HandlerInternalFailureException``."""
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 HandlerInternalFailureException_(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: HandlerInternalFailureException_) -> 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) -> HandlerInternalFailureException_:
26
+ out: HandlerInternalFailureException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class HandlerInternalFailureException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#HandlerInternalFailureException``."""
34
+
35
+ code: str | None = "HandlerInternalFailureException"
36
+
37
+ def __init__(
38
+ self, data: HandlerInternalFailureException_, message: str | None = None
39
+ ):
40
+ super().__init__(
41
+ "server",
42
+ is_throttling_error=False,
43
+ is_retryable=False,
44
+ code="HandlerInternalFailureException",
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
+ ) -> "HandlerInternalFailureException":
53
+ return cls(deserialize_aws_json_1_0(data), message)
@@ -0,0 +1,51 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#InvalidCredentialsException``."""
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 InvalidCredentialsException_(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: InvalidCredentialsException_) -> 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) -> InvalidCredentialsException_:
26
+ out: InvalidCredentialsException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class InvalidCredentialsException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#InvalidCredentialsException``."""
34
+
35
+ code: str | None = "InvalidCredentialsException"
36
+
37
+ def __init__(self, data: InvalidCredentialsException_, message: str | None = None):
38
+ super().__init__(
39
+ "client",
40
+ is_throttling_error=False,
41
+ is_retryable=False,
42
+ code="InvalidCredentialsException",
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
+ ) -> "InvalidCredentialsException":
51
+ return cls(deserialize_aws_json_1_0(data), message)
@@ -0,0 +1,51 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#InvalidRequestException``."""
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 InvalidRequestException_(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: InvalidRequestException_) -> 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) -> InvalidRequestException_:
26
+ out: InvalidRequestException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class InvalidRequestException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#InvalidRequestException``."""
34
+
35
+ code: str | None = "InvalidRequestException"
36
+
37
+ def __init__(self, data: InvalidRequestException_, message: str | None = None):
38
+ super().__init__(
39
+ "client",
40
+ is_throttling_error=False,
41
+ is_retryable=False,
42
+ code="InvalidRequestException",
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
+ ) -> "InvalidRequestException":
51
+ return cls(deserialize_aws_json_1_0(data), message)
@@ -0,0 +1,51 @@
1
+ """Generated from Smithy shape ``com.amazonaws.cloudcontrol#NetworkFailureException``."""
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 NetworkFailureException_(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: NetworkFailureException_) -> 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) -> NetworkFailureException_:
26
+ out: NetworkFailureException_ = {} # type: ignore[typeddict-item]
27
+ if data.get("Message") is not None:
28
+ out["message"] = data["Message"]
29
+ return out
30
+
31
+
32
+ class NetworkFailureException(ServiceError):
33
+ """Modeled error for Smithy shape ``com.amazonaws.cloudcontrol#NetworkFailureException``."""
34
+
35
+ code: str | None = "NetworkFailureException"
36
+
37
+ def __init__(self, data: NetworkFailureException_, message: str | None = None):
38
+ super().__init__(
39
+ "server",
40
+ is_throttling_error=False,
41
+ is_retryable=False,
42
+ code="NetworkFailureException",
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
+ ) -> "NetworkFailureException":
51
+ return cls(deserialize_aws_json_1_0(data), message)