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,62 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#CreateResourceInput``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.client_token
|
|
11
|
+
import capo_cloudcontrol.types.properties
|
|
12
|
+
import capo_cloudcontrol.types.role_arn
|
|
13
|
+
import capo_cloudcontrol.types.type_name
|
|
14
|
+
import capo_cloudcontrol.types.type_version_id
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class CreateResourceInput(TypedDict, closed=True):
|
|
18
|
+
type_name: "capo_cloudcontrol.types.type_name.TypeName"
|
|
19
|
+
"""<p>The name of the resource type.</p>"""
|
|
20
|
+
type_version_id: NotRequired[
|
|
21
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
22
|
+
]
|
|
23
|
+
"""<p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>"""
|
|
24
|
+
role_arn: NotRequired["capo_cloudcontrol.types.role_arn.RoleArn"]
|
|
25
|
+
r"""<p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the <code> <a href=\"https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers\">handlers</a> </code> section of the <a href=\"https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html\">resource type definition schema</a>.</p> <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions\">Specifying credentials</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>"""
|
|
26
|
+
client_token: NotRequired["capo_cloudcontrol.types.client_token.ClientToken"]
|
|
27
|
+
r"""<p>A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.</p> <p>A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.</p> <p>If you do not specify a client token, one is generated for inclusion in the request.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency\">Ensuring resource operation requests are unique</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>"""
|
|
28
|
+
desired_state: "capo_cloudcontrol.types.properties.Properties"
|
|
29
|
+
r"""<p>Structured data format representing the desired state of the resource, consisting of that resource's properties and their desired values.</p> <note> <p>Cloud Control API currently supports JSON as a structured data format.</p> </note> <p>Specify the desired state as one of the following:</p> <ul> <li> <p>A JSON blob</p> </li> <li> <p>A local path containing the desired state in JSON data format</p> </li> </ul> <p>For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html#resource-operations-create-desiredstate\">Composing the desired state of the resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p> <p>For more information about the properties of a specific resource, refer to the related topic for the resource in the <a href=\"https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html\">Resource and property types reference</a> in the <i>CloudFormation Users Guide</i>.</p>"""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# --- awsJson1_0 ser/de ---
|
|
33
|
+
def serialize_aws_json_1_0(value: CreateResourceInput) -> dict:
|
|
34
|
+
out: dict = {}
|
|
35
|
+
out["TypeName"] = value["type_name"]
|
|
36
|
+
if "type_version_id" in value:
|
|
37
|
+
out["TypeVersionId"] = value["type_version_id"]
|
|
38
|
+
if "role_arn" in value:
|
|
39
|
+
out["RoleArn"] = value["role_arn"]
|
|
40
|
+
if "client_token" in value:
|
|
41
|
+
out["ClientToken"] = value["client_token"]
|
|
42
|
+
out["DesiredState"] = value["desired_state"]
|
|
43
|
+
return out
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def deserialize_aws_json_1_0(data: dict) -> CreateResourceInput:
|
|
47
|
+
out: CreateResourceInput = {} # type: ignore[typeddict-item]
|
|
48
|
+
if data.get("TypeName") is not None:
|
|
49
|
+
out["type_name"] = data["TypeName"]
|
|
50
|
+
else:
|
|
51
|
+
raise DeserializationError("CreateResourceInput.type_name required")
|
|
52
|
+
if data.get("TypeVersionId") is not None:
|
|
53
|
+
out["type_version_id"] = data["TypeVersionId"]
|
|
54
|
+
if data.get("RoleArn") is not None:
|
|
55
|
+
out["role_arn"] = data["RoleArn"]
|
|
56
|
+
if data.get("ClientToken") is not None:
|
|
57
|
+
out["client_token"] = data["ClientToken"]
|
|
58
|
+
if data.get("DesiredState") is not None:
|
|
59
|
+
out["desired_state"] = data["DesiredState"]
|
|
60
|
+
else:
|
|
61
|
+
raise DeserializationError("CreateResourceInput.desired_state required")
|
|
62
|
+
return out
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#CreateResourceOutput``."""
|
|
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 CreateResourceOutput(TypedDict, closed=True):
|
|
12
|
+
progress_event: NotRequired["capo_cloudcontrol.types.progress_event.ProgressEvent"]
|
|
13
|
+
r"""<p>Represents the current status of the resource creation request.</p> <p>After you have initiated a resource creation request, you can monitor the progress of your request by calling <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html\">GetResourceRequestStatus</a> using the <code>RequestToken</code> of the <code>ProgressEvent</code> returned by <code>CreateResource</code>.</p>"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# --- awsJson1_0 ser/de ---
|
|
17
|
+
def serialize_aws_json_1_0(value: CreateResourceOutput) -> dict:
|
|
18
|
+
out: dict = {}
|
|
19
|
+
if "progress_event" in value:
|
|
20
|
+
import capo_cloudcontrol.types.progress_event
|
|
21
|
+
|
|
22
|
+
out["ProgressEvent"] = (
|
|
23
|
+
capo_cloudcontrol.types.progress_event.serialize_aws_json_1_0(
|
|
24
|
+
value["progress_event"]
|
|
25
|
+
)
|
|
26
|
+
)
|
|
27
|
+
return out
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def deserialize_aws_json_1_0(data: dict) -> CreateResourceOutput:
|
|
31
|
+
out: CreateResourceOutput = {} # type: ignore[typeddict-item]
|
|
32
|
+
if data.get("ProgressEvent") is not None:
|
|
33
|
+
import capo_cloudcontrol.types.progress_event
|
|
34
|
+
|
|
35
|
+
out["progress_event"] = (
|
|
36
|
+
capo_cloudcontrol.types.progress_event.deserialize_aws_json_1_0(
|
|
37
|
+
data["ProgressEvent"]
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
return out
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#DeleteResourceInput``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.client_token
|
|
11
|
+
import capo_cloudcontrol.types.identifier
|
|
12
|
+
import capo_cloudcontrol.types.role_arn
|
|
13
|
+
import capo_cloudcontrol.types.type_name
|
|
14
|
+
import capo_cloudcontrol.types.type_version_id
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class DeleteResourceInput(TypedDict, closed=True):
|
|
18
|
+
type_name: "capo_cloudcontrol.types.type_name.TypeName"
|
|
19
|
+
"""<p>The name of the resource type.</p>"""
|
|
20
|
+
type_version_id: NotRequired[
|
|
21
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
22
|
+
]
|
|
23
|
+
"""<p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>"""
|
|
24
|
+
role_arn: NotRequired["capo_cloudcontrol.types.role_arn.RoleArn"]
|
|
25
|
+
r"""<p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the <code> <a href=\"https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers\">handlers</a> </code> section of the <a href=\"https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html\">resource type definition schema</a>.</p> <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions\">Specifying credentials</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>"""
|
|
26
|
+
client_token: NotRequired["capo_cloudcontrol.types.client_token.ClientToken"]
|
|
27
|
+
r"""<p>A unique identifier to ensure the idempotency of the resource request. As a best practice, specify this token to ensure idempotency, so that Amazon Web Services Cloud Control API can accurately distinguish between request retries and new resource requests. You might retry a resource request to ensure that it was successfully received.</p> <p>A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request.</p> <p>If you do not specify a client token, one is generated for inclusion in the request.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-idempotency\">Ensuring resource operation requests are unique</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>"""
|
|
28
|
+
identifier: "capo_cloudcontrol.types.identifier.Identifier"
|
|
29
|
+
r"""<p>The identifier for the resource.</p> <p>You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.</p> <p>For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values <i>in the order they are specified</i> in the primary identifier definition, separated by <code>|</code>.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html\">Identifying resources</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>"""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# --- awsJson1_0 ser/de ---
|
|
33
|
+
def serialize_aws_json_1_0(value: DeleteResourceInput) -> dict:
|
|
34
|
+
out: dict = {}
|
|
35
|
+
out["TypeName"] = value["type_name"]
|
|
36
|
+
if "type_version_id" in value:
|
|
37
|
+
out["TypeVersionId"] = value["type_version_id"]
|
|
38
|
+
if "role_arn" in value:
|
|
39
|
+
out["RoleArn"] = value["role_arn"]
|
|
40
|
+
if "client_token" in value:
|
|
41
|
+
out["ClientToken"] = value["client_token"]
|
|
42
|
+
out["Identifier"] = value["identifier"]
|
|
43
|
+
return out
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def deserialize_aws_json_1_0(data: dict) -> DeleteResourceInput:
|
|
47
|
+
out: DeleteResourceInput = {} # type: ignore[typeddict-item]
|
|
48
|
+
if data.get("TypeName") is not None:
|
|
49
|
+
out["type_name"] = data["TypeName"]
|
|
50
|
+
else:
|
|
51
|
+
raise DeserializationError("DeleteResourceInput.type_name required")
|
|
52
|
+
if data.get("TypeVersionId") is not None:
|
|
53
|
+
out["type_version_id"] = data["TypeVersionId"]
|
|
54
|
+
if data.get("RoleArn") is not None:
|
|
55
|
+
out["role_arn"] = data["RoleArn"]
|
|
56
|
+
if data.get("ClientToken") is not None:
|
|
57
|
+
out["client_token"] = data["ClientToken"]
|
|
58
|
+
if data.get("Identifier") is not None:
|
|
59
|
+
out["identifier"] = data["Identifier"]
|
|
60
|
+
else:
|
|
61
|
+
raise DeserializationError("DeleteResourceInput.identifier required")
|
|
62
|
+
return out
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#DeleteResourceOutput``."""
|
|
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 DeleteResourceOutput(TypedDict, closed=True):
|
|
12
|
+
progress_event: NotRequired["capo_cloudcontrol.types.progress_event.ProgressEvent"]
|
|
13
|
+
r"""<p>Represents the current status of the resource deletion request.</p> <p>After you have initiated a resource deletion request, you can monitor the progress of your request by calling <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/APIReference/API_GetResourceRequestStatus.html\">GetResourceRequestStatus</a> using the <code>RequestToken</code> of the <code>ProgressEvent</code> returned by <code>DeleteResource</code>.</p>"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# --- awsJson1_0 ser/de ---
|
|
17
|
+
def serialize_aws_json_1_0(value: DeleteResourceOutput) -> dict:
|
|
18
|
+
out: dict = {}
|
|
19
|
+
if "progress_event" in value:
|
|
20
|
+
import capo_cloudcontrol.types.progress_event
|
|
21
|
+
|
|
22
|
+
out["ProgressEvent"] = (
|
|
23
|
+
capo_cloudcontrol.types.progress_event.serialize_aws_json_1_0(
|
|
24
|
+
value["progress_event"]
|
|
25
|
+
)
|
|
26
|
+
)
|
|
27
|
+
return out
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def deserialize_aws_json_1_0(data: dict) -> DeleteResourceOutput:
|
|
31
|
+
out: DeleteResourceOutput = {} # type: ignore[typeddict-item]
|
|
32
|
+
if data.get("ProgressEvent") is not None:
|
|
33
|
+
import capo_cloudcontrol.types.progress_event
|
|
34
|
+
|
|
35
|
+
out["progress_event"] = (
|
|
36
|
+
capo_cloudcontrol.types.progress_event.deserialize_aws_json_1_0(
|
|
37
|
+
data["ProgressEvent"]
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
return out
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#GetResourceInput``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_cloudcontrol.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_cloudcontrol.types.identifier
|
|
11
|
+
import capo_cloudcontrol.types.role_arn
|
|
12
|
+
import capo_cloudcontrol.types.type_name
|
|
13
|
+
import capo_cloudcontrol.types.type_version_id
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class GetResourceInput(TypedDict, closed=True):
|
|
17
|
+
type_name: "capo_cloudcontrol.types.type_name.TypeName"
|
|
18
|
+
"""<p>The name of the resource type.</p>"""
|
|
19
|
+
type_version_id: NotRequired[
|
|
20
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
21
|
+
]
|
|
22
|
+
"""<p>For private resource types, the type version to use in this resource operation. If you do not specify a resource version, CloudFormation uses the default version.</p>"""
|
|
23
|
+
role_arn: NotRequired["capo_cloudcontrol.types.role_arn.RoleArn"]
|
|
24
|
+
r"""<p>The Amazon Resource Name (ARN) of the Identity and Access Management (IAM) role for Cloud Control API to use when performing this resource operation. The role specified must have the permissions required for this operation. The necessary permissions for each event handler are defined in the <code> <a href=\"https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html#schema-properties-handlers\">handlers</a> </code> section of the <a href=\"https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-schema.html\">resource type definition schema</a>.</p> <p>If you do not specify a role, Cloud Control API uses a temporary session created using your Amazon Web Services user credentials.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations.html#resource-operations-permissions\">Specifying credentials</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>"""
|
|
25
|
+
identifier: "capo_cloudcontrol.types.identifier.Identifier"
|
|
26
|
+
r"""<p>The identifier for the resource.</p> <p>You can specify the primary identifier, or any secondary identifier defined for the resource type in its resource schema. You can only specify one identifier. Primary identifiers can be specified as a string or JSON; secondary identifiers must be specified as JSON.</p> <p>For compound primary identifiers (that is, one that consists of multiple resource properties strung together), to specify the primary identifier as a string, list the property values <i>in the order they are specified</i> in the primary identifier definition, separated by <code>|</code>.</p> <p>For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-identifier.html\">Identifying resources</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# --- awsJson1_0 ser/de ---
|
|
30
|
+
def serialize_aws_json_1_0(value: GetResourceInput) -> dict:
|
|
31
|
+
out: dict = {}
|
|
32
|
+
out["TypeName"] = value["type_name"]
|
|
33
|
+
if "type_version_id" in value:
|
|
34
|
+
out["TypeVersionId"] = value["type_version_id"]
|
|
35
|
+
if "role_arn" in value:
|
|
36
|
+
out["RoleArn"] = value["role_arn"]
|
|
37
|
+
out["Identifier"] = value["identifier"]
|
|
38
|
+
return out
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def deserialize_aws_json_1_0(data: dict) -> GetResourceInput:
|
|
42
|
+
out: GetResourceInput = {} # type: ignore[typeddict-item]
|
|
43
|
+
if data.get("TypeName") is not None:
|
|
44
|
+
out["type_name"] = data["TypeName"]
|
|
45
|
+
else:
|
|
46
|
+
raise DeserializationError("GetResourceInput.type_name required")
|
|
47
|
+
if data.get("TypeVersionId") is not None:
|
|
48
|
+
out["type_version_id"] = data["TypeVersionId"]
|
|
49
|
+
if data.get("RoleArn") is not None:
|
|
50
|
+
out["role_arn"] = data["RoleArn"]
|
|
51
|
+
if data.get("Identifier") is not None:
|
|
52
|
+
out["identifier"] = data["Identifier"]
|
|
53
|
+
else:
|
|
54
|
+
raise DeserializationError("GetResourceInput.identifier required")
|
|
55
|
+
return out
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#GetResourceOutput``."""
|
|
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.resource_description
|
|
9
|
+
import capo_cloudcontrol.types.type_name
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GetResourceOutput(TypedDict, closed=True):
|
|
13
|
+
type_name: NotRequired["capo_cloudcontrol.types.type_name.TypeName"]
|
|
14
|
+
"""<p>The name of the resource type.</p>"""
|
|
15
|
+
resource_description: NotRequired[
|
|
16
|
+
"capo_cloudcontrol.types.resource_description.ResourceDescription"
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# --- awsJson1_0 ser/de ---
|
|
21
|
+
def serialize_aws_json_1_0(value: GetResourceOutput) -> dict:
|
|
22
|
+
out: dict = {}
|
|
23
|
+
if "type_name" in value:
|
|
24
|
+
out["TypeName"] = value["type_name"]
|
|
25
|
+
if "resource_description" in value:
|
|
26
|
+
import capo_cloudcontrol.types.resource_description
|
|
27
|
+
|
|
28
|
+
out["ResourceDescription"] = (
|
|
29
|
+
capo_cloudcontrol.types.resource_description.serialize_aws_json_1_0(
|
|
30
|
+
value["resource_description"]
|
|
31
|
+
)
|
|
32
|
+
)
|
|
33
|
+
return out
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def deserialize_aws_json_1_0(data: dict) -> GetResourceOutput:
|
|
37
|
+
out: GetResourceOutput = {} # type: ignore[typeddict-item]
|
|
38
|
+
if data.get("TypeName") is not None:
|
|
39
|
+
out["type_name"] = data["TypeName"]
|
|
40
|
+
if data.get("ResourceDescription") is not None:
|
|
41
|
+
import capo_cloudcontrol.types.resource_description
|
|
42
|
+
|
|
43
|
+
out["resource_description"] = (
|
|
44
|
+
capo_cloudcontrol.types.resource_description.deserialize_aws_json_1_0(
|
|
45
|
+
data["ResourceDescription"]
|
|
46
|
+
)
|
|
47
|
+
)
|
|
48
|
+
return out
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#GetResourceRequestStatusInput``."""
|
|
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 GetResourceRequestStatusInput(TypedDict, closed=True):
|
|
14
|
+
request_token: "capo_cloudcontrol.types.request_token.RequestToken"
|
|
15
|
+
"""<p>A unique token used to track the progress of the resource operation request.</p> <p>Request tokens are included in the <code>ProgressEvent</code> type returned by a resource operation request.</p>"""
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# --- awsJson1_0 ser/de ---
|
|
19
|
+
def serialize_aws_json_1_0(value: GetResourceRequestStatusInput) -> dict:
|
|
20
|
+
out: dict = {}
|
|
21
|
+
out["RequestToken"] = value["request_token"]
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: dict) -> GetResourceRequestStatusInput:
|
|
26
|
+
out: GetResourceRequestStatusInput = {} # type: ignore[typeddict-item]
|
|
27
|
+
if data.get("RequestToken") is not None:
|
|
28
|
+
out["request_token"] = data["RequestToken"]
|
|
29
|
+
else:
|
|
30
|
+
raise DeserializationError(
|
|
31
|
+
"GetResourceRequestStatusInput.request_token required"
|
|
32
|
+
)
|
|
33
|
+
return out
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#GetResourceRequestStatusOutput``."""
|
|
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.hooks_progress_event
|
|
9
|
+
import capo_cloudcontrol.types.progress_event
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class GetResourceRequestStatusOutput(TypedDict, closed=True):
|
|
13
|
+
progress_event: NotRequired["capo_cloudcontrol.types.progress_event.ProgressEvent"]
|
|
14
|
+
"""<p>Represents the current status of the resource operation request.</p>"""
|
|
15
|
+
hooks_progress_event: NotRequired[
|
|
16
|
+
"capo_cloudcontrol.types.hooks_progress_event.HooksProgressEvent"
|
|
17
|
+
]
|
|
18
|
+
"""<p>Lists Hook invocations for the specified target in the request. This is a list since the same target can invoke multiple Hooks.</p>"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# --- awsJson1_0 ser/de ---
|
|
22
|
+
def serialize_aws_json_1_0(value: GetResourceRequestStatusOutput) -> dict:
|
|
23
|
+
out: dict = {}
|
|
24
|
+
if "progress_event" in value:
|
|
25
|
+
import capo_cloudcontrol.types.progress_event
|
|
26
|
+
|
|
27
|
+
out["ProgressEvent"] = (
|
|
28
|
+
capo_cloudcontrol.types.progress_event.serialize_aws_json_1_0(
|
|
29
|
+
value["progress_event"]
|
|
30
|
+
)
|
|
31
|
+
)
|
|
32
|
+
if "hooks_progress_event" in value:
|
|
33
|
+
import capo_cloudcontrol.types.hooks_progress_event
|
|
34
|
+
|
|
35
|
+
out["HooksProgressEvent"] = (
|
|
36
|
+
capo_cloudcontrol.types.hooks_progress_event.serialize_aws_json_1_0(
|
|
37
|
+
value["hooks_progress_event"]
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
return out
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def deserialize_aws_json_1_0(data: dict) -> GetResourceRequestStatusOutput:
|
|
44
|
+
out: GetResourceRequestStatusOutput = {} # type: ignore[typeddict-item]
|
|
45
|
+
if data.get("ProgressEvent") is not None:
|
|
46
|
+
import capo_cloudcontrol.types.progress_event
|
|
47
|
+
|
|
48
|
+
out["progress_event"] = (
|
|
49
|
+
capo_cloudcontrol.types.progress_event.deserialize_aws_json_1_0(
|
|
50
|
+
data["ProgressEvent"]
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
if data.get("HooksProgressEvent") is not None:
|
|
54
|
+
import capo_cloudcontrol.types.hooks_progress_event
|
|
55
|
+
|
|
56
|
+
out["hooks_progress_event"] = (
|
|
57
|
+
capo_cloudcontrol.types.hooks_progress_event.deserialize_aws_json_1_0(
|
|
58
|
+
data["HooksProgressEvent"]
|
|
59
|
+
)
|
|
60
|
+
)
|
|
61
|
+
return out
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#HookProgressEvent``."""
|
|
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.hook_failure_mode
|
|
9
|
+
import capo_cloudcontrol.types.hook_invocation_point
|
|
10
|
+
import capo_cloudcontrol.types.hook_status
|
|
11
|
+
import capo_cloudcontrol.types.hook_type_arn
|
|
12
|
+
import capo_cloudcontrol.types.status_message
|
|
13
|
+
import capo_cloudcontrol.types.timestamp
|
|
14
|
+
import capo_cloudcontrol.types.type_name
|
|
15
|
+
import capo_cloudcontrol.types.type_version_id
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class HookProgressEvent(TypedDict, closed=True):
|
|
19
|
+
hook_type_name: NotRequired["capo_cloudcontrol.types.type_name.TypeName"]
|
|
20
|
+
"""<p>The type name of the Hook being invoked.</p>"""
|
|
21
|
+
hook_type_version_id: NotRequired[
|
|
22
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
23
|
+
]
|
|
24
|
+
"""<p>The type version of the Hook being invoked.</p>"""
|
|
25
|
+
hook_type_arn: NotRequired["capo_cloudcontrol.types.hook_type_arn.HookTypeArn"]
|
|
26
|
+
"""<p>The ARN of the Hook being invoked.</p>"""
|
|
27
|
+
invocation_point: NotRequired[
|
|
28
|
+
"capo_cloudcontrol.types.hook_invocation_point.HookInvocationPoint"
|
|
29
|
+
]
|
|
30
|
+
"""<p>States whether the Hook is invoked before or after resource provisioning.</p>"""
|
|
31
|
+
hook_status: NotRequired["capo_cloudcontrol.types.hook_status.HookStatus"]
|
|
32
|
+
"""<p>The status of the Hook invocation. The following are potential statuses:</p> <ul> <li> <p> <code>HOOK_PENDING</code>: The Hook was added to the invocation plan, but not yet invoked.</p> </li> <li> <p> <code>HOOK_IN_PROGRESS</code>: The Hook was invoked, but hasn't completed.</p> </li> <li> <p> <code>HOOK_COMPLETE_SUCCEEDED</code>: The Hook invocation is complete with a successful result.</p> </li> <li> <p> <code>HOOK_COMPLETE_FAILED</code>: The Hook invocation is complete with a failed result.</p> </li> <li> <p> <code>HOOK_FAILED</code>: The Hook invocation didn't complete successfully.</p> </li> </ul>"""
|
|
33
|
+
hook_event_time: NotRequired["capo_cloudcontrol.types.timestamp.Timestamp"]
|
|
34
|
+
"""<p>The time that the Hook invocation request initiated.</p>"""
|
|
35
|
+
hook_status_message: NotRequired[
|
|
36
|
+
"capo_cloudcontrol.types.status_message.StatusMessage"
|
|
37
|
+
]
|
|
38
|
+
"""<p>The message explaining the current Hook status.</p>"""
|
|
39
|
+
failure_mode: NotRequired[
|
|
40
|
+
"capo_cloudcontrol.types.hook_failure_mode.HookFailureMode"
|
|
41
|
+
]
|
|
42
|
+
"""<p>The failure mode of the invocation. The following are the potential statuses:</p> <ul> <li> <p> <code>FAIL</code>: This will fail the Hook invocation and the request associated with it.</p> </li> <li> <p> <code>WARN</code>: This will fail the Hook invocation, but not the request associated with it.</p> </li> </ul>"""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# --- awsJson1_0 ser/de ---
|
|
46
|
+
def serialize_aws_json_1_0(value: HookProgressEvent) -> dict:
|
|
47
|
+
out: dict = {}
|
|
48
|
+
if "hook_type_name" in value:
|
|
49
|
+
out["HookTypeName"] = value["hook_type_name"]
|
|
50
|
+
if "hook_type_version_id" in value:
|
|
51
|
+
out["HookTypeVersionId"] = value["hook_type_version_id"]
|
|
52
|
+
if "hook_type_arn" in value:
|
|
53
|
+
out["HookTypeArn"] = value["hook_type_arn"]
|
|
54
|
+
if "invocation_point" in value:
|
|
55
|
+
out["InvocationPoint"] = value["invocation_point"]
|
|
56
|
+
if "hook_status" in value:
|
|
57
|
+
out["HookStatus"] = value["hook_status"]
|
|
58
|
+
if "hook_event_time" in value:
|
|
59
|
+
import capo_cloudcontrol.types.timestamp
|
|
60
|
+
|
|
61
|
+
out["HookEventTime"] = capo_cloudcontrol.types.timestamp.serialize_aws_json_1_0(
|
|
62
|
+
value["hook_event_time"]
|
|
63
|
+
)
|
|
64
|
+
if "hook_status_message" in value:
|
|
65
|
+
out["HookStatusMessage"] = value["hook_status_message"]
|
|
66
|
+
if "failure_mode" in value:
|
|
67
|
+
out["FailureMode"] = value["failure_mode"]
|
|
68
|
+
return out
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def deserialize_aws_json_1_0(data: dict) -> HookProgressEvent:
|
|
72
|
+
out: HookProgressEvent = {} # type: ignore[typeddict-item]
|
|
73
|
+
if data.get("HookTypeName") is not None:
|
|
74
|
+
out["hook_type_name"] = data["HookTypeName"]
|
|
75
|
+
if data.get("HookTypeVersionId") is not None:
|
|
76
|
+
out["hook_type_version_id"] = data["HookTypeVersionId"]
|
|
77
|
+
if data.get("HookTypeArn") is not None:
|
|
78
|
+
out["hook_type_arn"] = data["HookTypeArn"]
|
|
79
|
+
if data.get("InvocationPoint") is not None:
|
|
80
|
+
out["invocation_point"] = data["InvocationPoint"]
|
|
81
|
+
if data.get("HookStatus") is not None:
|
|
82
|
+
out["hook_status"] = data["HookStatus"]
|
|
83
|
+
if data.get("HookEventTime") is not None:
|
|
84
|
+
import capo_cloudcontrol.types.timestamp
|
|
85
|
+
|
|
86
|
+
out["hook_event_time"] = (
|
|
87
|
+
capo_cloudcontrol.types.timestamp.deserialize_aws_json_1_0(
|
|
88
|
+
data["HookEventTime"]
|
|
89
|
+
)
|
|
90
|
+
)
|
|
91
|
+
if data.get("HookStatusMessage") is not None:
|
|
92
|
+
out["hook_status_message"] = data["HookStatusMessage"]
|
|
93
|
+
if data.get("FailureMode") is not None:
|
|
94
|
+
out["failure_mode"] = data["FailureMode"]
|
|
95
|
+
return out
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#HooksProgressEvent``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_cloudcontrol.types.hook_progress_event
|
|
7
|
+
|
|
8
|
+
HooksProgressEvent: TypeAlias = list[
|
|
9
|
+
"capo_cloudcontrol.types.hook_progress_event.HookProgressEvent"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- awsJson1_0 ser/de ---
|
|
14
|
+
def serialize_aws_json_1_0(value: HooksProgressEvent) -> list:
|
|
15
|
+
import capo_cloudcontrol.types.hook_progress_event
|
|
16
|
+
|
|
17
|
+
out: list = []
|
|
18
|
+
for item in value:
|
|
19
|
+
out.append(
|
|
20
|
+
capo_cloudcontrol.types.hook_progress_event.serialize_aws_json_1_0(item)
|
|
21
|
+
)
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_aws_json_1_0(data: list) -> HooksProgressEvent:
|
|
26
|
+
import capo_cloudcontrol.types.hook_progress_event
|
|
27
|
+
|
|
28
|
+
out: HooksProgressEvent = []
|
|
29
|
+
for item in data:
|
|
30
|
+
if item is None:
|
|
31
|
+
continue
|
|
32
|
+
out.append(
|
|
33
|
+
capo_cloudcontrol.types.hook_progress_event.deserialize_aws_json_1_0(item)
|
|
34
|
+
)
|
|
35
|
+
return out
|