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,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