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,764 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.cloudcontrol#CloudApiService``."""
|
|
2
|
+
|
|
3
|
+
import uuid
|
|
4
|
+
import warnings
|
|
5
|
+
from collections.abc import Iterator
|
|
6
|
+
from typing import TYPE_CHECKING, Any, Iterable, Optional
|
|
7
|
+
|
|
8
|
+
from typing_extensions import Self, TypedDict
|
|
9
|
+
from zapros import BaseHandler, Client
|
|
10
|
+
|
|
11
|
+
import capo_cloudcontrol._auth._signers
|
|
12
|
+
import capo_cloudcontrol._auth._sigv4
|
|
13
|
+
from capo_cloudcontrol._auth._identity import Credentials
|
|
14
|
+
from capo_cloudcontrol._auth._providers import (
|
|
15
|
+
CredentialsProvider,
|
|
16
|
+
IdentityProvider,
|
|
17
|
+
StaticAwsCredentialsProvider,
|
|
18
|
+
default_aws_credentials_chain,
|
|
19
|
+
)
|
|
20
|
+
from capo_cloudcontrol._auth._zapros_handler import AuthMiddleware
|
|
21
|
+
from capo_cloudcontrol._pagination import resolve_path as _resolve_path
|
|
22
|
+
from capo_cloudcontrol._services._aws_config import aws_config
|
|
23
|
+
from capo_cloudcontrol._services._pipeline import (
|
|
24
|
+
Interceptor,
|
|
25
|
+
OperationOptions,
|
|
26
|
+
OperationRequest,
|
|
27
|
+
OperationResponse,
|
|
28
|
+
execute_pipeline,
|
|
29
|
+
retry,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
if TYPE_CHECKING:
|
|
33
|
+
import capo_cloudcontrol.types.cancel_resource_request_input
|
|
34
|
+
import capo_cloudcontrol.types.cancel_resource_request_output
|
|
35
|
+
import capo_cloudcontrol.types.client_token
|
|
36
|
+
import capo_cloudcontrol.types.create_resource_input
|
|
37
|
+
import capo_cloudcontrol.types.create_resource_output
|
|
38
|
+
import capo_cloudcontrol.types.delete_resource_input
|
|
39
|
+
import capo_cloudcontrol.types.delete_resource_output
|
|
40
|
+
import capo_cloudcontrol.types.get_resource_input
|
|
41
|
+
import capo_cloudcontrol.types.get_resource_output
|
|
42
|
+
import capo_cloudcontrol.types.get_resource_request_status_input
|
|
43
|
+
import capo_cloudcontrol.types.get_resource_request_status_output
|
|
44
|
+
import capo_cloudcontrol.types.handler_next_token
|
|
45
|
+
import capo_cloudcontrol.types.identifier
|
|
46
|
+
import capo_cloudcontrol.types.list_resource_requests_input
|
|
47
|
+
import capo_cloudcontrol.types.list_resource_requests_output
|
|
48
|
+
import capo_cloudcontrol.types.list_resources_input
|
|
49
|
+
import capo_cloudcontrol.types.list_resources_output
|
|
50
|
+
import capo_cloudcontrol.types.max_results
|
|
51
|
+
import capo_cloudcontrol.types.next_token
|
|
52
|
+
import capo_cloudcontrol.types.patch_document
|
|
53
|
+
import capo_cloudcontrol.types.progress_event
|
|
54
|
+
import capo_cloudcontrol.types.properties
|
|
55
|
+
import capo_cloudcontrol.types.request_token
|
|
56
|
+
import capo_cloudcontrol.types.resource_description
|
|
57
|
+
import capo_cloudcontrol.types.resource_request_status_filter
|
|
58
|
+
import capo_cloudcontrol.types.role_arn
|
|
59
|
+
import capo_cloudcontrol.types.type_name
|
|
60
|
+
import capo_cloudcontrol.types.type_version_id
|
|
61
|
+
import capo_cloudcontrol.types.update_resource_input
|
|
62
|
+
import capo_cloudcontrol.types.update_resource_output
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class CloudControlClientConfig(TypedDict, total=False, closed=True):
|
|
66
|
+
operation_interceptors: Iterable[Interceptor[Any, Any]]
|
|
67
|
+
retry_max_attempts: int | None
|
|
68
|
+
region: str | None
|
|
69
|
+
use_dual_stack: bool | None
|
|
70
|
+
use_fips: bool | None
|
|
71
|
+
endpoint: str | None
|
|
72
|
+
credentials_provider: IdentityProvider[Credentials] | None
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class CloudControlClient:
|
|
76
|
+
"""A client for the ``CloudControl`` service.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
|
|
80
|
+
operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
|
|
81
|
+
retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
|
|
82
|
+
region: The value of the ``AWS::Region`` endpoint parameter.
|
|
83
|
+
use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
|
|
84
|
+
use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
|
|
85
|
+
endpoint: The value of the ``SDK::Endpoint`` endpoint parameter.
|
|
86
|
+
credentials: AWS credentials for request signing.
|
|
87
|
+
credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
def __init__(
|
|
91
|
+
self,
|
|
92
|
+
http_handler: BaseHandler | None = None,
|
|
93
|
+
operation_interceptors: Iterable[Interceptor[Any, Any]] | None = None,
|
|
94
|
+
retry_max_attempts: int | None = None,
|
|
95
|
+
region: str | None = None,
|
|
96
|
+
use_dual_stack: bool | None = None,
|
|
97
|
+
use_fips: bool | None = None,
|
|
98
|
+
endpoint: str | None = None,
|
|
99
|
+
credentials: Credentials | None = None,
|
|
100
|
+
credentials_provider: CredentialsProvider | None = None,
|
|
101
|
+
):
|
|
102
|
+
self._client = Client(http_handler).wrap_with_middleware(
|
|
103
|
+
lambda next: AuthMiddleware(next)
|
|
104
|
+
)
|
|
105
|
+
if credentials is not None and credentials_provider is not None:
|
|
106
|
+
warnings.warn(
|
|
107
|
+
"Both credentials and credentials_provider given; provider takes precedence"
|
|
108
|
+
)
|
|
109
|
+
resolved_credentials_provider: IdentityProvider[Credentials] | None = (
|
|
110
|
+
credentials_provider
|
|
111
|
+
)
|
|
112
|
+
if resolved_credentials_provider is None and credentials is not None:
|
|
113
|
+
resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
|
|
114
|
+
if resolved_credentials_provider is None and credentials is None:
|
|
115
|
+
resolved_credentials_provider = default_aws_credentials_chain(
|
|
116
|
+
Client(http_handler)
|
|
117
|
+
)
|
|
118
|
+
self._config = CloudControlClientConfig(
|
|
119
|
+
{
|
|
120
|
+
"operation_interceptors": operation_interceptors or [],
|
|
121
|
+
"retry_max_attempts": retry_max_attempts,
|
|
122
|
+
"region": region,
|
|
123
|
+
"use_dual_stack": use_dual_stack,
|
|
124
|
+
"use_fips": use_fips,
|
|
125
|
+
"endpoint": endpoint,
|
|
126
|
+
"credentials_provider": resolved_credentials_provider,
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
def operation_options(
|
|
131
|
+
self, config_overrides: Optional[CloudControlClientConfig] = None
|
|
132
|
+
) -> tuple[Iterable[Interceptor[Any, Any]], OperationOptions]:
|
|
133
|
+
overrides: CloudControlClientConfig = config_overrides or {}
|
|
134
|
+
interceptors_: list[Interceptor[Any, Any]] = [
|
|
135
|
+
*overrides.get(
|
|
136
|
+
"operation_interceptors", self._config.get("operation_interceptors", [])
|
|
137
|
+
),
|
|
138
|
+
aws_config(),
|
|
139
|
+
retry(),
|
|
140
|
+
]
|
|
141
|
+
options_: OperationOptions = OperationOptions(
|
|
142
|
+
client=self._client,
|
|
143
|
+
retry_max_attempts=overrides.get(
|
|
144
|
+
"retry_max_attempts", self._config.get("retry_max_attempts")
|
|
145
|
+
),
|
|
146
|
+
region=overrides.get("region", self._config.get("region")),
|
|
147
|
+
use_dual_stack=overrides.get(
|
|
148
|
+
"use_dual_stack", self._config.get("use_dual_stack")
|
|
149
|
+
),
|
|
150
|
+
use_fips=overrides.get("use_fips", self._config.get("use_fips")),
|
|
151
|
+
endpoint=overrides.get("endpoint", self._config.get("endpoint")),
|
|
152
|
+
credentials_provider=overrides.get(
|
|
153
|
+
"credentials_provider", self._config.get("credentials_provider")
|
|
154
|
+
),
|
|
155
|
+
)
|
|
156
|
+
return interceptors_, options_
|
|
157
|
+
|
|
158
|
+
def cancel_resource_request(
|
|
159
|
+
self,
|
|
160
|
+
request_token: "capo_cloudcontrol.types.request_token.RequestToken",
|
|
161
|
+
*,
|
|
162
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
163
|
+
) -> "capo_cloudcontrol.types.cancel_resource_request_output.CancelResourceRequestOutput":
|
|
164
|
+
r"""<p>Cancels the specified resource operation request. For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-cancel\">Canceling resource operation requests</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p> <p>Only resource operations requests with a status of <code>PENDING</code> or <code>IN_PROGRESS</code> can be canceled.</p>
|
|
165
|
+
|
|
166
|
+
Args:
|
|
167
|
+
request_token: <p>The <code>RequestToken</code> of the <code>ProgressEvent</code> object returned by the resource operation request.</p>
|
|
168
|
+
|
|
169
|
+
Raises:
|
|
170
|
+
capo_cloudcontrol.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource is currently being modified by another operation.</p>
|
|
171
|
+
capo_cloudcontrol.errors.request_token_not_found_exception.RequestTokenNotFoundException: <p>A resource operation with the specified request token can't be found.</p>
|
|
172
|
+
capo_cloudcontrol.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
173
|
+
"""
|
|
174
|
+
|
|
175
|
+
def _handler(
|
|
176
|
+
req: "OperationRequest[capo_cloudcontrol.types.cancel_resource_request_input.CancelResourceRequestInput]",
|
|
177
|
+
) -> OperationResponse[
|
|
178
|
+
"capo_cloudcontrol.types.cancel_resource_request_output.CancelResourceRequestOutput"
|
|
179
|
+
]:
|
|
180
|
+
import capo_cloudcontrol._operations.cloud_api_service.cancel_resource_request
|
|
181
|
+
|
|
182
|
+
output, http_response = (
|
|
183
|
+
capo_cloudcontrol._operations.cloud_api_service.cancel_resource_request.cancel_resource_request(
|
|
184
|
+
req.options, req.input
|
|
185
|
+
)
|
|
186
|
+
)
|
|
187
|
+
return OperationResponse(output=output, response=http_response)
|
|
188
|
+
|
|
189
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
190
|
+
input_: capo_cloudcontrol.types.cancel_resource_request_input.CancelResourceRequestInput = {
|
|
191
|
+
"request_token": request_token
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
response = execute_pipeline(
|
|
195
|
+
OperationRequest(input=input_, options=options_),
|
|
196
|
+
handler=_handler,
|
|
197
|
+
interceptors=list(interceptors_),
|
|
198
|
+
)
|
|
199
|
+
response.response.close()
|
|
200
|
+
return response.output
|
|
201
|
+
|
|
202
|
+
def create_resource(
|
|
203
|
+
self,
|
|
204
|
+
type_name: "capo_cloudcontrol.types.type_name.TypeName",
|
|
205
|
+
desired_state: "capo_cloudcontrol.types.properties.Properties",
|
|
206
|
+
*,
|
|
207
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
208
|
+
type_version_id: Optional[
|
|
209
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
210
|
+
] = None,
|
|
211
|
+
role_arn: Optional["capo_cloudcontrol.types.role_arn.RoleArn"] = None,
|
|
212
|
+
client_token: Optional[
|
|
213
|
+
"capo_cloudcontrol.types.client_token.ClientToken"
|
|
214
|
+
] = None,
|
|
215
|
+
) -> "capo_cloudcontrol.types.create_resource_output.CreateResourceOutput":
|
|
216
|
+
r"""<p>Creates the specified resource. For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-create.html\">Creating a resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</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> type returned by <code>CreateResource</code>.</p>
|
|
217
|
+
|
|
218
|
+
Args:
|
|
219
|
+
type_name: <p>The name of the resource type.</p>
|
|
220
|
+
type_version_id: <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>
|
|
221
|
+
role_arn: <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>
|
|
222
|
+
client_token: <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>
|
|
223
|
+
desired_state: <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>
|
|
224
|
+
|
|
225
|
+
Raises:
|
|
226
|
+
capo_cloudcontrol.errors.already_exists_exception.AlreadyExistsException: <p>The resource with the name requested already exists.</p>
|
|
227
|
+
capo_cloudcontrol.errors.client_token_conflict_exception.ClientTokenConflictException: <p>The specified client token has already been used in another resource request.</p> <p>It's best practice for client tokens to be unique for each resource operation request. However, client token expire after 36 hours.</p>
|
|
228
|
+
capo_cloudcontrol.errors.concurrent_operation_exception.ConcurrentOperationException: <p>Another resource operation is currently being performed on this resource.</p>
|
|
229
|
+
capo_cloudcontrol.errors.general_service_exception.GeneralServiceException: <p>The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.</p>
|
|
230
|
+
capo_cloudcontrol.errors.handler_failure_exception.HandlerFailureException: <p>The resource handler has failed without a returning a more specific error code. This can include timeouts.</p>
|
|
231
|
+
capo_cloudcontrol.errors.handler_internal_failure_exception.HandlerInternalFailureException: <p>The resource handler has returned that an unexpected error occurred within the resource handler.</p>
|
|
232
|
+
capo_cloudcontrol.errors.invalid_credentials_exception.InvalidCredentialsException: <p>The resource handler has returned that the credentials provided by the user are invalid.</p>
|
|
233
|
+
capo_cloudcontrol.errors.invalid_request_exception.InvalidRequestException: <p>The resource handler has returned that invalid input from the user has generated a generic exception.</p>
|
|
234
|
+
capo_cloudcontrol.errors.network_failure_exception.NetworkFailureException: <p>The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.</p>
|
|
235
|
+
capo_cloudcontrol.errors.not_stabilized_exception.NotStabilizedException: <p>The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.</p>
|
|
236
|
+
capo_cloudcontrol.errors.not_updatable_exception.NotUpdatableException: <p>One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.</p>
|
|
237
|
+
capo_cloudcontrol.errors.private_type_exception.PrivateTypeException: <p>Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.</p>
|
|
238
|
+
capo_cloudcontrol.errors.resource_conflict_exception.ResourceConflictException: <p>The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.</p>
|
|
239
|
+
capo_cloudcontrol.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource with the specified identifier can't be found.</p>
|
|
240
|
+
capo_cloudcontrol.errors.service_internal_error_exception.ServiceInternalErrorException: <p>The resource handler has returned that the downstream service returned an internal error, typically with a <code>5XX HTTP</code> status code.</p>
|
|
241
|
+
capo_cloudcontrol.errors.service_limit_exceeded_exception.ServiceLimitExceededException: <p>The resource handler has returned that a non-transient resource limit was reached on the service side.</p>
|
|
242
|
+
capo_cloudcontrol.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
|
|
243
|
+
capo_cloudcontrol.errors.type_not_found_exception.TypeNotFoundException: <p>The specified extension doesn't exist in the CloudFormation registry.</p>
|
|
244
|
+
capo_cloudcontrol.errors.unsupported_action_exception.UnsupportedActionException: <p>The specified resource doesn't support this resource operation.</p>
|
|
245
|
+
capo_cloudcontrol.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
246
|
+
"""
|
|
247
|
+
|
|
248
|
+
def _handler(
|
|
249
|
+
req: "OperationRequest[capo_cloudcontrol.types.create_resource_input.CreateResourceInput]",
|
|
250
|
+
) -> OperationResponse[
|
|
251
|
+
"capo_cloudcontrol.types.create_resource_output.CreateResourceOutput"
|
|
252
|
+
]:
|
|
253
|
+
import capo_cloudcontrol._operations.cloud_api_service.create_resource
|
|
254
|
+
|
|
255
|
+
output, http_response = (
|
|
256
|
+
capo_cloudcontrol._operations.cloud_api_service.create_resource.create_resource(
|
|
257
|
+
req.options, req.input
|
|
258
|
+
)
|
|
259
|
+
)
|
|
260
|
+
return OperationResponse(output=output, response=http_response)
|
|
261
|
+
|
|
262
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
263
|
+
input_: capo_cloudcontrol.types.create_resource_input.CreateResourceInput = {
|
|
264
|
+
"type_name": type_name,
|
|
265
|
+
"desired_state": desired_state,
|
|
266
|
+
}
|
|
267
|
+
if type_version_id is not None:
|
|
268
|
+
input_["type_version_id"] = type_version_id
|
|
269
|
+
if role_arn is not None:
|
|
270
|
+
input_["role_arn"] = role_arn
|
|
271
|
+
if client_token is None:
|
|
272
|
+
client_token = str(uuid.uuid4())
|
|
273
|
+
input_["client_token"] = client_token
|
|
274
|
+
|
|
275
|
+
response = execute_pipeline(
|
|
276
|
+
OperationRequest(input=input_, options=options_),
|
|
277
|
+
handler=_handler,
|
|
278
|
+
interceptors=list(interceptors_),
|
|
279
|
+
)
|
|
280
|
+
response.response.close()
|
|
281
|
+
return response.output
|
|
282
|
+
|
|
283
|
+
def delete_resource(
|
|
284
|
+
self,
|
|
285
|
+
type_name: "capo_cloudcontrol.types.type_name.TypeName",
|
|
286
|
+
identifier: "capo_cloudcontrol.types.identifier.Identifier",
|
|
287
|
+
*,
|
|
288
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
289
|
+
type_version_id: Optional[
|
|
290
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
291
|
+
] = None,
|
|
292
|
+
role_arn: Optional["capo_cloudcontrol.types.role_arn.RoleArn"] = None,
|
|
293
|
+
client_token: Optional[
|
|
294
|
+
"capo_cloudcontrol.types.client_token.ClientToken"
|
|
295
|
+
] = None,
|
|
296
|
+
) -> "capo_cloudcontrol.types.delete_resource_output.DeleteResourceOutput":
|
|
297
|
+
r"""<p>Deletes the specified resource. For details, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-delete.html\">Deleting a resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</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>
|
|
298
|
+
|
|
299
|
+
Args:
|
|
300
|
+
type_name: <p>The name of the resource type.</p>
|
|
301
|
+
type_version_id: <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>
|
|
302
|
+
role_arn: <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>
|
|
303
|
+
client_token: <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>
|
|
304
|
+
identifier: <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>
|
|
305
|
+
|
|
306
|
+
Raises:
|
|
307
|
+
capo_cloudcontrol.errors.already_exists_exception.AlreadyExistsException: <p>The resource with the name requested already exists.</p>
|
|
308
|
+
capo_cloudcontrol.errors.client_token_conflict_exception.ClientTokenConflictException: <p>The specified client token has already been used in another resource request.</p> <p>It's best practice for client tokens to be unique for each resource operation request. However, client token expire after 36 hours.</p>
|
|
309
|
+
capo_cloudcontrol.errors.concurrent_operation_exception.ConcurrentOperationException: <p>Another resource operation is currently being performed on this resource.</p>
|
|
310
|
+
capo_cloudcontrol.errors.general_service_exception.GeneralServiceException: <p>The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.</p>
|
|
311
|
+
capo_cloudcontrol.errors.handler_failure_exception.HandlerFailureException: <p>The resource handler has failed without a returning a more specific error code. This can include timeouts.</p>
|
|
312
|
+
capo_cloudcontrol.errors.handler_internal_failure_exception.HandlerInternalFailureException: <p>The resource handler has returned that an unexpected error occurred within the resource handler.</p>
|
|
313
|
+
capo_cloudcontrol.errors.invalid_credentials_exception.InvalidCredentialsException: <p>The resource handler has returned that the credentials provided by the user are invalid.</p>
|
|
314
|
+
capo_cloudcontrol.errors.invalid_request_exception.InvalidRequestException: <p>The resource handler has returned that invalid input from the user has generated a generic exception.</p>
|
|
315
|
+
capo_cloudcontrol.errors.network_failure_exception.NetworkFailureException: <p>The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.</p>
|
|
316
|
+
capo_cloudcontrol.errors.not_stabilized_exception.NotStabilizedException: <p>The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.</p>
|
|
317
|
+
capo_cloudcontrol.errors.not_updatable_exception.NotUpdatableException: <p>One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.</p>
|
|
318
|
+
capo_cloudcontrol.errors.private_type_exception.PrivateTypeException: <p>Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.</p>
|
|
319
|
+
capo_cloudcontrol.errors.resource_conflict_exception.ResourceConflictException: <p>The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.</p>
|
|
320
|
+
capo_cloudcontrol.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource with the specified identifier can't be found.</p>
|
|
321
|
+
capo_cloudcontrol.errors.service_internal_error_exception.ServiceInternalErrorException: <p>The resource handler has returned that the downstream service returned an internal error, typically with a <code>5XX HTTP</code> status code.</p>
|
|
322
|
+
capo_cloudcontrol.errors.service_limit_exceeded_exception.ServiceLimitExceededException: <p>The resource handler has returned that a non-transient resource limit was reached on the service side.</p>
|
|
323
|
+
capo_cloudcontrol.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
|
|
324
|
+
capo_cloudcontrol.errors.type_not_found_exception.TypeNotFoundException: <p>The specified extension doesn't exist in the CloudFormation registry.</p>
|
|
325
|
+
capo_cloudcontrol.errors.unsupported_action_exception.UnsupportedActionException: <p>The specified resource doesn't support this resource operation.</p>
|
|
326
|
+
capo_cloudcontrol.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
327
|
+
"""
|
|
328
|
+
|
|
329
|
+
def _handler(
|
|
330
|
+
req: "OperationRequest[capo_cloudcontrol.types.delete_resource_input.DeleteResourceInput]",
|
|
331
|
+
) -> OperationResponse[
|
|
332
|
+
"capo_cloudcontrol.types.delete_resource_output.DeleteResourceOutput"
|
|
333
|
+
]:
|
|
334
|
+
import capo_cloudcontrol._operations.cloud_api_service.delete_resource
|
|
335
|
+
|
|
336
|
+
output, http_response = (
|
|
337
|
+
capo_cloudcontrol._operations.cloud_api_service.delete_resource.delete_resource(
|
|
338
|
+
req.options, req.input
|
|
339
|
+
)
|
|
340
|
+
)
|
|
341
|
+
return OperationResponse(output=output, response=http_response)
|
|
342
|
+
|
|
343
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
344
|
+
input_: capo_cloudcontrol.types.delete_resource_input.DeleteResourceInput = {
|
|
345
|
+
"type_name": type_name,
|
|
346
|
+
"identifier": identifier,
|
|
347
|
+
}
|
|
348
|
+
if type_version_id is not None:
|
|
349
|
+
input_["type_version_id"] = type_version_id
|
|
350
|
+
if role_arn is not None:
|
|
351
|
+
input_["role_arn"] = role_arn
|
|
352
|
+
if client_token is None:
|
|
353
|
+
client_token = str(uuid.uuid4())
|
|
354
|
+
input_["client_token"] = client_token
|
|
355
|
+
|
|
356
|
+
response = execute_pipeline(
|
|
357
|
+
OperationRequest(input=input_, options=options_),
|
|
358
|
+
handler=_handler,
|
|
359
|
+
interceptors=list(interceptors_),
|
|
360
|
+
)
|
|
361
|
+
response.response.close()
|
|
362
|
+
return response.output
|
|
363
|
+
|
|
364
|
+
def get_resource(
|
|
365
|
+
self,
|
|
366
|
+
type_name: "capo_cloudcontrol.types.type_name.TypeName",
|
|
367
|
+
identifier: "capo_cloudcontrol.types.identifier.Identifier",
|
|
368
|
+
*,
|
|
369
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
370
|
+
type_version_id: Optional[
|
|
371
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
372
|
+
] = None,
|
|
373
|
+
role_arn: Optional["capo_cloudcontrol.types.role_arn.RoleArn"] = None,
|
|
374
|
+
) -> "capo_cloudcontrol.types.get_resource_output.GetResourceOutput":
|
|
375
|
+
r"""<p>Returns information about the current state of the specified resource. For details, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-read.html\">Reading a resource's current state</a>.</p> <p>You can use this action to return information about an existing resource in your account and Amazon Web Services Region, whether those resources were provisioned using Cloud Control API.</p>
|
|
376
|
+
|
|
377
|
+
Args:
|
|
378
|
+
type_name: <p>The name of the resource type.</p>
|
|
379
|
+
type_version_id: <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>
|
|
380
|
+
role_arn: <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>
|
|
381
|
+
identifier: <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>
|
|
382
|
+
|
|
383
|
+
Raises:
|
|
384
|
+
capo_cloudcontrol.errors.already_exists_exception.AlreadyExistsException: <p>The resource with the name requested already exists.</p>
|
|
385
|
+
capo_cloudcontrol.errors.general_service_exception.GeneralServiceException: <p>The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.</p>
|
|
386
|
+
capo_cloudcontrol.errors.handler_failure_exception.HandlerFailureException: <p>The resource handler has failed without a returning a more specific error code. This can include timeouts.</p>
|
|
387
|
+
capo_cloudcontrol.errors.handler_internal_failure_exception.HandlerInternalFailureException: <p>The resource handler has returned that an unexpected error occurred within the resource handler.</p>
|
|
388
|
+
capo_cloudcontrol.errors.invalid_credentials_exception.InvalidCredentialsException: <p>The resource handler has returned that the credentials provided by the user are invalid.</p>
|
|
389
|
+
capo_cloudcontrol.errors.invalid_request_exception.InvalidRequestException: <p>The resource handler has returned that invalid input from the user has generated a generic exception.</p>
|
|
390
|
+
capo_cloudcontrol.errors.network_failure_exception.NetworkFailureException: <p>The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.</p>
|
|
391
|
+
capo_cloudcontrol.errors.not_stabilized_exception.NotStabilizedException: <p>The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.</p>
|
|
392
|
+
capo_cloudcontrol.errors.not_updatable_exception.NotUpdatableException: <p>One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.</p>
|
|
393
|
+
capo_cloudcontrol.errors.private_type_exception.PrivateTypeException: <p>Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.</p>
|
|
394
|
+
capo_cloudcontrol.errors.resource_conflict_exception.ResourceConflictException: <p>The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.</p>
|
|
395
|
+
capo_cloudcontrol.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource with the specified identifier can't be found.</p>
|
|
396
|
+
capo_cloudcontrol.errors.service_internal_error_exception.ServiceInternalErrorException: <p>The resource handler has returned that the downstream service returned an internal error, typically with a <code>5XX HTTP</code> status code.</p>
|
|
397
|
+
capo_cloudcontrol.errors.service_limit_exceeded_exception.ServiceLimitExceededException: <p>The resource handler has returned that a non-transient resource limit was reached on the service side.</p>
|
|
398
|
+
capo_cloudcontrol.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
|
|
399
|
+
capo_cloudcontrol.errors.type_not_found_exception.TypeNotFoundException: <p>The specified extension doesn't exist in the CloudFormation registry.</p>
|
|
400
|
+
capo_cloudcontrol.errors.unsupported_action_exception.UnsupportedActionException: <p>The specified resource doesn't support this resource operation.</p>
|
|
401
|
+
capo_cloudcontrol.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
402
|
+
"""
|
|
403
|
+
|
|
404
|
+
def _handler(
|
|
405
|
+
req: "OperationRequest[capo_cloudcontrol.types.get_resource_input.GetResourceInput]",
|
|
406
|
+
) -> OperationResponse[
|
|
407
|
+
"capo_cloudcontrol.types.get_resource_output.GetResourceOutput"
|
|
408
|
+
]:
|
|
409
|
+
import capo_cloudcontrol._operations.cloud_api_service.get_resource
|
|
410
|
+
|
|
411
|
+
output, http_response = (
|
|
412
|
+
capo_cloudcontrol._operations.cloud_api_service.get_resource.get_resource(
|
|
413
|
+
req.options, req.input
|
|
414
|
+
)
|
|
415
|
+
)
|
|
416
|
+
return OperationResponse(output=output, response=http_response)
|
|
417
|
+
|
|
418
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
419
|
+
input_: capo_cloudcontrol.types.get_resource_input.GetResourceInput = {
|
|
420
|
+
"type_name": type_name,
|
|
421
|
+
"identifier": identifier,
|
|
422
|
+
}
|
|
423
|
+
if type_version_id is not None:
|
|
424
|
+
input_["type_version_id"] = type_version_id
|
|
425
|
+
if role_arn is not None:
|
|
426
|
+
input_["role_arn"] = role_arn
|
|
427
|
+
|
|
428
|
+
response = execute_pipeline(
|
|
429
|
+
OperationRequest(input=input_, options=options_),
|
|
430
|
+
handler=_handler,
|
|
431
|
+
interceptors=list(interceptors_),
|
|
432
|
+
)
|
|
433
|
+
response.response.close()
|
|
434
|
+
return response.output
|
|
435
|
+
|
|
436
|
+
def get_resource_request_status(
|
|
437
|
+
self,
|
|
438
|
+
request_token: "capo_cloudcontrol.types.request_token.RequestToken",
|
|
439
|
+
*,
|
|
440
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
441
|
+
) -> "capo_cloudcontrol.types.get_resource_request_status_output.GetResourceRequestStatusOutput":
|
|
442
|
+
r"""<p>Returns the current status of a resource operation request. For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-track\">Tracking the progress of resource operation requests</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
|
|
443
|
+
|
|
444
|
+
Args:
|
|
445
|
+
request_token: <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>
|
|
446
|
+
|
|
447
|
+
Raises:
|
|
448
|
+
capo_cloudcontrol.errors.request_token_not_found_exception.RequestTokenNotFoundException: <p>A resource operation with the specified request token can't be found.</p>
|
|
449
|
+
capo_cloudcontrol.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
450
|
+
"""
|
|
451
|
+
|
|
452
|
+
def _handler(
|
|
453
|
+
req: "OperationRequest[capo_cloudcontrol.types.get_resource_request_status_input.GetResourceRequestStatusInput]",
|
|
454
|
+
) -> OperationResponse[
|
|
455
|
+
"capo_cloudcontrol.types.get_resource_request_status_output.GetResourceRequestStatusOutput"
|
|
456
|
+
]:
|
|
457
|
+
import capo_cloudcontrol._operations.cloud_api_service.get_resource_request_status
|
|
458
|
+
|
|
459
|
+
output, http_response = (
|
|
460
|
+
capo_cloudcontrol._operations.cloud_api_service.get_resource_request_status.get_resource_request_status(
|
|
461
|
+
req.options, req.input
|
|
462
|
+
)
|
|
463
|
+
)
|
|
464
|
+
return OperationResponse(output=output, response=http_response)
|
|
465
|
+
|
|
466
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
467
|
+
input_: capo_cloudcontrol.types.get_resource_request_status_input.GetResourceRequestStatusInput = {
|
|
468
|
+
"request_token": request_token
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
response = execute_pipeline(
|
|
472
|
+
OperationRequest(input=input_, options=options_),
|
|
473
|
+
handler=_handler,
|
|
474
|
+
interceptors=list(interceptors_),
|
|
475
|
+
)
|
|
476
|
+
response.response.close()
|
|
477
|
+
return response.output
|
|
478
|
+
|
|
479
|
+
def list_resource_requests(
|
|
480
|
+
self,
|
|
481
|
+
*,
|
|
482
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
483
|
+
max_results: Optional["capo_cloudcontrol.types.max_results.MaxResults"] = None,
|
|
484
|
+
next_token: Optional["capo_cloudcontrol.types.next_token.NextToken"] = None,
|
|
485
|
+
resource_request_status_filter: Optional[
|
|
486
|
+
"capo_cloudcontrol.types.resource_request_status_filter.ResourceRequestStatusFilter"
|
|
487
|
+
] = None,
|
|
488
|
+
) -> "capo_cloudcontrol.types.list_resource_requests_output.ListResourceRequestsOutput":
|
|
489
|
+
r"""<p>Returns existing resource operation requests. This includes requests of all status types. For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-manage-requests.html#resource-operations-manage-requests-list\">Listing active resource operation requests</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p> <note> <p>Resource operation requests expire after 7 days.</p> </note>
|
|
490
|
+
|
|
491
|
+
Args:
|
|
492
|
+
max_results: <p>The maximum number of results to be returned with a single call. If the number of available results exceeds this maximum, the response includes a <code>NextToken</code> value that you can assign to the <code>NextToken</code> request parameter to get the next set of results.</p> <p>The default is <code>20</code>.</p>
|
|
493
|
+
next_token: <p>If the previous paginated request didn't return all of the remaining results, the response object's <code>NextToken</code> parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's <code>NextToken</code> parameter. If there are no remaining results, the previous response object's <code>NextToken</code> parameter is set to <code>null</code>.</p>
|
|
494
|
+
resource_request_status_filter: <p>The filter criteria to apply to the requests returned.</p>
|
|
495
|
+
|
|
496
|
+
Raises:
|
|
497
|
+
capo_cloudcontrol.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
498
|
+
"""
|
|
499
|
+
|
|
500
|
+
def _handler(
|
|
501
|
+
req: "OperationRequest[capo_cloudcontrol.types.list_resource_requests_input.ListResourceRequestsInput]",
|
|
502
|
+
) -> OperationResponse[
|
|
503
|
+
"capo_cloudcontrol.types.list_resource_requests_output.ListResourceRequestsOutput"
|
|
504
|
+
]:
|
|
505
|
+
import capo_cloudcontrol._operations.cloud_api_service.list_resource_requests
|
|
506
|
+
|
|
507
|
+
output, http_response = (
|
|
508
|
+
capo_cloudcontrol._operations.cloud_api_service.list_resource_requests.list_resource_requests(
|
|
509
|
+
req.options, req.input
|
|
510
|
+
)
|
|
511
|
+
)
|
|
512
|
+
return OperationResponse(output=output, response=http_response)
|
|
513
|
+
|
|
514
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
515
|
+
input_: capo_cloudcontrol.types.list_resource_requests_input.ListResourceRequestsInput = {}
|
|
516
|
+
if max_results is not None:
|
|
517
|
+
input_["max_results"] = max_results
|
|
518
|
+
if next_token is not None:
|
|
519
|
+
input_["next_token"] = next_token
|
|
520
|
+
if resource_request_status_filter is not None:
|
|
521
|
+
input_["resource_request_status_filter"] = resource_request_status_filter
|
|
522
|
+
|
|
523
|
+
response = execute_pipeline(
|
|
524
|
+
OperationRequest(input=input_, options=options_),
|
|
525
|
+
handler=_handler,
|
|
526
|
+
interceptors=list(interceptors_),
|
|
527
|
+
)
|
|
528
|
+
response.response.close()
|
|
529
|
+
return response.output
|
|
530
|
+
|
|
531
|
+
def iter_list_resource_requests(
|
|
532
|
+
self,
|
|
533
|
+
*,
|
|
534
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
535
|
+
max_results: Optional["capo_cloudcontrol.types.max_results.MaxResults"] = None,
|
|
536
|
+
next_token: Optional["capo_cloudcontrol.types.next_token.NextToken"] = None,
|
|
537
|
+
resource_request_status_filter: Optional[
|
|
538
|
+
"capo_cloudcontrol.types.resource_request_status_filter.ResourceRequestStatusFilter"
|
|
539
|
+
] = None,
|
|
540
|
+
) -> "Iterator[capo_cloudcontrol.types.progress_event.ProgressEvent]":
|
|
541
|
+
_token = next_token
|
|
542
|
+
while True:
|
|
543
|
+
_response = self.list_resource_requests(
|
|
544
|
+
config_overrides=config_overrides,
|
|
545
|
+
max_results=max_results,
|
|
546
|
+
next_token=_token,
|
|
547
|
+
resource_request_status_filter=resource_request_status_filter,
|
|
548
|
+
)
|
|
549
|
+
_page = _resolve_path(_response, ("resource_request_status_summaries",))
|
|
550
|
+
for _item in _page or []:
|
|
551
|
+
yield _item
|
|
552
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
553
|
+
if not _token:
|
|
554
|
+
break
|
|
555
|
+
|
|
556
|
+
def list_resources(
|
|
557
|
+
self,
|
|
558
|
+
type_name: "capo_cloudcontrol.types.type_name.TypeName",
|
|
559
|
+
*,
|
|
560
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
561
|
+
type_version_id: Optional[
|
|
562
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
563
|
+
] = None,
|
|
564
|
+
role_arn: Optional["capo_cloudcontrol.types.role_arn.RoleArn"] = None,
|
|
565
|
+
next_token: Optional[
|
|
566
|
+
"capo_cloudcontrol.types.handler_next_token.HandlerNextToken"
|
|
567
|
+
] = None,
|
|
568
|
+
max_results: Optional["capo_cloudcontrol.types.max_results.MaxResults"] = None,
|
|
569
|
+
resource_model: Optional[
|
|
570
|
+
"capo_cloudcontrol.types.properties.Properties"
|
|
571
|
+
] = None,
|
|
572
|
+
) -> "capo_cloudcontrol.types.list_resources_output.ListResourcesOutput":
|
|
573
|
+
r"""<p>Returns information about the specified resources. For more information, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-list.html\">Discovering resources</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p> <p>You can use this action to return information about existing resources in your account and Amazon Web Services Region, whether those resources were provisioned using Cloud Control API.</p>
|
|
574
|
+
|
|
575
|
+
Args:
|
|
576
|
+
type_name: <p>The name of the resource type.</p>
|
|
577
|
+
type_version_id: <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>
|
|
578
|
+
role_arn: <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>
|
|
579
|
+
next_token: <p>If the previous paginated request didn't return all of the remaining results, the response object's <code>NextToken</code> parameter value is set to a token. To retrieve the next set of results, call this action again and assign that token to the request object's <code>NextToken</code> parameter. If there are no remaining results, the previous response object's <code>NextToken</code> parameter is set to <code>null</code>.</p>
|
|
580
|
+
max_results: <p>Reserved.</p>
|
|
581
|
+
resource_model: <p>The resource model to use to select the resources to return.</p>
|
|
582
|
+
|
|
583
|
+
Raises:
|
|
584
|
+
capo_cloudcontrol.errors.already_exists_exception.AlreadyExistsException: <p>The resource with the name requested already exists.</p>
|
|
585
|
+
capo_cloudcontrol.errors.general_service_exception.GeneralServiceException: <p>The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.</p>
|
|
586
|
+
capo_cloudcontrol.errors.handler_failure_exception.HandlerFailureException: <p>The resource handler has failed without a returning a more specific error code. This can include timeouts.</p>
|
|
587
|
+
capo_cloudcontrol.errors.handler_internal_failure_exception.HandlerInternalFailureException: <p>The resource handler has returned that an unexpected error occurred within the resource handler.</p>
|
|
588
|
+
capo_cloudcontrol.errors.invalid_credentials_exception.InvalidCredentialsException: <p>The resource handler has returned that the credentials provided by the user are invalid.</p>
|
|
589
|
+
capo_cloudcontrol.errors.invalid_request_exception.InvalidRequestException: <p>The resource handler has returned that invalid input from the user has generated a generic exception.</p>
|
|
590
|
+
capo_cloudcontrol.errors.network_failure_exception.NetworkFailureException: <p>The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.</p>
|
|
591
|
+
capo_cloudcontrol.errors.not_stabilized_exception.NotStabilizedException: <p>The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.</p>
|
|
592
|
+
capo_cloudcontrol.errors.not_updatable_exception.NotUpdatableException: <p>One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.</p>
|
|
593
|
+
capo_cloudcontrol.errors.private_type_exception.PrivateTypeException: <p>Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.</p>
|
|
594
|
+
capo_cloudcontrol.errors.resource_conflict_exception.ResourceConflictException: <p>The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.</p>
|
|
595
|
+
capo_cloudcontrol.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource with the specified identifier can't be found.</p>
|
|
596
|
+
capo_cloudcontrol.errors.service_internal_error_exception.ServiceInternalErrorException: <p>The resource handler has returned that the downstream service returned an internal error, typically with a <code>5XX HTTP</code> status code.</p>
|
|
597
|
+
capo_cloudcontrol.errors.service_limit_exceeded_exception.ServiceLimitExceededException: <p>The resource handler has returned that a non-transient resource limit was reached on the service side.</p>
|
|
598
|
+
capo_cloudcontrol.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
|
|
599
|
+
capo_cloudcontrol.errors.type_not_found_exception.TypeNotFoundException: <p>The specified extension doesn't exist in the CloudFormation registry.</p>
|
|
600
|
+
capo_cloudcontrol.errors.unsupported_action_exception.UnsupportedActionException: <p>The specified resource doesn't support this resource operation.</p>
|
|
601
|
+
capo_cloudcontrol.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
602
|
+
"""
|
|
603
|
+
|
|
604
|
+
def _handler(
|
|
605
|
+
req: "OperationRequest[capo_cloudcontrol.types.list_resources_input.ListResourcesInput]",
|
|
606
|
+
) -> OperationResponse[
|
|
607
|
+
"capo_cloudcontrol.types.list_resources_output.ListResourcesOutput"
|
|
608
|
+
]:
|
|
609
|
+
import capo_cloudcontrol._operations.cloud_api_service.list_resources
|
|
610
|
+
|
|
611
|
+
output, http_response = (
|
|
612
|
+
capo_cloudcontrol._operations.cloud_api_service.list_resources.list_resources(
|
|
613
|
+
req.options, req.input
|
|
614
|
+
)
|
|
615
|
+
)
|
|
616
|
+
return OperationResponse(output=output, response=http_response)
|
|
617
|
+
|
|
618
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
619
|
+
input_: capo_cloudcontrol.types.list_resources_input.ListResourcesInput = {
|
|
620
|
+
"type_name": type_name
|
|
621
|
+
}
|
|
622
|
+
if type_version_id is not None:
|
|
623
|
+
input_["type_version_id"] = type_version_id
|
|
624
|
+
if role_arn is not None:
|
|
625
|
+
input_["role_arn"] = role_arn
|
|
626
|
+
if next_token is not None:
|
|
627
|
+
input_["next_token"] = next_token
|
|
628
|
+
if max_results is not None:
|
|
629
|
+
input_["max_results"] = max_results
|
|
630
|
+
if resource_model is not None:
|
|
631
|
+
input_["resource_model"] = resource_model
|
|
632
|
+
|
|
633
|
+
response = execute_pipeline(
|
|
634
|
+
OperationRequest(input=input_, options=options_),
|
|
635
|
+
handler=_handler,
|
|
636
|
+
interceptors=list(interceptors_),
|
|
637
|
+
)
|
|
638
|
+
response.response.close()
|
|
639
|
+
return response.output
|
|
640
|
+
|
|
641
|
+
def iter_list_resources(
|
|
642
|
+
self,
|
|
643
|
+
type_name: "capo_cloudcontrol.types.type_name.TypeName",
|
|
644
|
+
*,
|
|
645
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
646
|
+
type_version_id: Optional[
|
|
647
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
648
|
+
] = None,
|
|
649
|
+
role_arn: Optional["capo_cloudcontrol.types.role_arn.RoleArn"] = None,
|
|
650
|
+
next_token: Optional[
|
|
651
|
+
"capo_cloudcontrol.types.handler_next_token.HandlerNextToken"
|
|
652
|
+
] = None,
|
|
653
|
+
max_results: Optional["capo_cloudcontrol.types.max_results.MaxResults"] = None,
|
|
654
|
+
resource_model: Optional[
|
|
655
|
+
"capo_cloudcontrol.types.properties.Properties"
|
|
656
|
+
] = None,
|
|
657
|
+
) -> "Iterator[capo_cloudcontrol.types.resource_description.ResourceDescription]":
|
|
658
|
+
_token = next_token
|
|
659
|
+
while True:
|
|
660
|
+
_response = self.list_resources(
|
|
661
|
+
type_name,
|
|
662
|
+
config_overrides=config_overrides,
|
|
663
|
+
type_version_id=type_version_id,
|
|
664
|
+
role_arn=role_arn,
|
|
665
|
+
next_token=_token,
|
|
666
|
+
max_results=max_results,
|
|
667
|
+
resource_model=resource_model,
|
|
668
|
+
)
|
|
669
|
+
_page = _resolve_path(_response, ("resource_descriptions",))
|
|
670
|
+
for _item in _page or []:
|
|
671
|
+
yield _item
|
|
672
|
+
_token = _resolve_path(_response, ("next_token",))
|
|
673
|
+
if not _token:
|
|
674
|
+
break
|
|
675
|
+
|
|
676
|
+
def update_resource(
|
|
677
|
+
self,
|
|
678
|
+
type_name: "capo_cloudcontrol.types.type_name.TypeName",
|
|
679
|
+
identifier: "capo_cloudcontrol.types.identifier.Identifier",
|
|
680
|
+
patch_document: "capo_cloudcontrol.types.patch_document.PatchDocument",
|
|
681
|
+
*,
|
|
682
|
+
config_overrides: Optional[CloudControlClientConfig] = None,
|
|
683
|
+
type_version_id: Optional[
|
|
684
|
+
"capo_cloudcontrol.types.type_version_id.TypeVersionId"
|
|
685
|
+
] = None,
|
|
686
|
+
role_arn: Optional["capo_cloudcontrol.types.role_arn.RoleArn"] = None,
|
|
687
|
+
client_token: Optional[
|
|
688
|
+
"capo_cloudcontrol.types.client_token.ClientToken"
|
|
689
|
+
] = None,
|
|
690
|
+
) -> "capo_cloudcontrol.types.update_resource_output.UpdateResourceOutput":
|
|
691
|
+
r"""<p>Updates the specified property values in the resource.</p> <p>You specify your resource property updates as a list of patch operations contained in a JSON patch document that adheres to the <a href=\"https://datatracker.ietf.org/doc/html/rfc6902\"> <i>RFC 6902 - JavaScript Object Notation (JSON) Patch</i> </a> standard.</p> <p>For details on how Cloud Control API performs resource update operations, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html\">Updating a resource</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p> <p>After you have initiated a resource update 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>UpdateResource</code>.</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>
|
|
692
|
+
|
|
693
|
+
Args:
|
|
694
|
+
type_name: <p>The name of the resource type.</p>
|
|
695
|
+
type_version_id: <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>
|
|
696
|
+
role_arn: <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>
|
|
697
|
+
client_token: <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>
|
|
698
|
+
identifier: <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>
|
|
699
|
+
patch_document: <p>A JavaScript Object Notation (JSON) document listing the patch operations that represent the updates to apply to the current resource properties. For details, see <a href=\"https://docs.aws.amazon.com/cloudcontrolapi/latest/userguide/resource-operations-update.html#resource-operations-update-patch\">Composing the patch document</a> in the <i>Amazon Web Services Cloud Control API User Guide</i>.</p>
|
|
700
|
+
|
|
701
|
+
Raises:
|
|
702
|
+
capo_cloudcontrol.errors.already_exists_exception.AlreadyExistsException: <p>The resource with the name requested already exists.</p>
|
|
703
|
+
capo_cloudcontrol.errors.client_token_conflict_exception.ClientTokenConflictException: <p>The specified client token has already been used in another resource request.</p> <p>It's best practice for client tokens to be unique for each resource operation request. However, client token expire after 36 hours.</p>
|
|
704
|
+
capo_cloudcontrol.errors.concurrent_operation_exception.ConcurrentOperationException: <p>Another resource operation is currently being performed on this resource.</p>
|
|
705
|
+
capo_cloudcontrol.errors.general_service_exception.GeneralServiceException: <p>The resource handler has returned that the downstream service generated an error that doesn't map to any other handler error code.</p>
|
|
706
|
+
capo_cloudcontrol.errors.handler_failure_exception.HandlerFailureException: <p>The resource handler has failed without a returning a more specific error code. This can include timeouts.</p>
|
|
707
|
+
capo_cloudcontrol.errors.handler_internal_failure_exception.HandlerInternalFailureException: <p>The resource handler has returned that an unexpected error occurred within the resource handler.</p>
|
|
708
|
+
capo_cloudcontrol.errors.invalid_credentials_exception.InvalidCredentialsException: <p>The resource handler has returned that the credentials provided by the user are invalid.</p>
|
|
709
|
+
capo_cloudcontrol.errors.invalid_request_exception.InvalidRequestException: <p>The resource handler has returned that invalid input from the user has generated a generic exception.</p>
|
|
710
|
+
capo_cloudcontrol.errors.network_failure_exception.NetworkFailureException: <p>The resource handler has returned that the request couldn't be completed due to networking issues, such as a failure to receive a response from the server.</p>
|
|
711
|
+
capo_cloudcontrol.errors.not_stabilized_exception.NotStabilizedException: <p>The resource handler has returned that the downstream resource failed to complete all of its ready-state checks.</p>
|
|
712
|
+
capo_cloudcontrol.errors.not_updatable_exception.NotUpdatableException: <p>One or more properties included in this resource operation are defined as create-only, and therefore can't be updated.</p>
|
|
713
|
+
capo_cloudcontrol.errors.private_type_exception.PrivateTypeException: <p>Cloud Control API hasn't received a valid response from the resource handler, due to a configuration error. This includes issues such as the resource handler returning an invalid response, or timing out.</p>
|
|
714
|
+
capo_cloudcontrol.errors.resource_conflict_exception.ResourceConflictException: <p>The resource is temporarily unavailable to be acted upon. For example, if the resource is currently undergoing an operation and can't be acted upon until that operation is finished.</p>
|
|
715
|
+
capo_cloudcontrol.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource with the specified identifier can't be found.</p>
|
|
716
|
+
capo_cloudcontrol.errors.service_internal_error_exception.ServiceInternalErrorException: <p>The resource handler has returned that the downstream service returned an internal error, typically with a <code>5XX HTTP</code> status code.</p>
|
|
717
|
+
capo_cloudcontrol.errors.service_limit_exceeded_exception.ServiceLimitExceededException: <p>The resource handler has returned that a non-transient resource limit was reached on the service side.</p>
|
|
718
|
+
capo_cloudcontrol.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
|
|
719
|
+
capo_cloudcontrol.errors.type_not_found_exception.TypeNotFoundException: <p>The specified extension doesn't exist in the CloudFormation registry.</p>
|
|
720
|
+
capo_cloudcontrol.errors.unsupported_action_exception.UnsupportedActionException: <p>The specified resource doesn't support this resource operation.</p>
|
|
721
|
+
capo_cloudcontrol.errors.UnknownServiceError: The service returned an error code this client does not model.
|
|
722
|
+
"""
|
|
723
|
+
|
|
724
|
+
def _handler(
|
|
725
|
+
req: "OperationRequest[capo_cloudcontrol.types.update_resource_input.UpdateResourceInput]",
|
|
726
|
+
) -> OperationResponse[
|
|
727
|
+
"capo_cloudcontrol.types.update_resource_output.UpdateResourceOutput"
|
|
728
|
+
]:
|
|
729
|
+
import capo_cloudcontrol._operations.cloud_api_service.update_resource
|
|
730
|
+
|
|
731
|
+
output, http_response = (
|
|
732
|
+
capo_cloudcontrol._operations.cloud_api_service.update_resource.update_resource(
|
|
733
|
+
req.options, req.input
|
|
734
|
+
)
|
|
735
|
+
)
|
|
736
|
+
return OperationResponse(output=output, response=http_response)
|
|
737
|
+
|
|
738
|
+
interceptors_, options_ = self.operation_options(config_overrides)
|
|
739
|
+
input_: capo_cloudcontrol.types.update_resource_input.UpdateResourceInput = {
|
|
740
|
+
"type_name": type_name,
|
|
741
|
+
"identifier": identifier,
|
|
742
|
+
"patch_document": patch_document,
|
|
743
|
+
}
|
|
744
|
+
if type_version_id is not None:
|
|
745
|
+
input_["type_version_id"] = type_version_id
|
|
746
|
+
if role_arn is not None:
|
|
747
|
+
input_["role_arn"] = role_arn
|
|
748
|
+
if client_token is None:
|
|
749
|
+
client_token = str(uuid.uuid4())
|
|
750
|
+
input_["client_token"] = client_token
|
|
751
|
+
|
|
752
|
+
response = execute_pipeline(
|
|
753
|
+
OperationRequest(input=input_, options=options_),
|
|
754
|
+
handler=_handler,
|
|
755
|
+
interceptors=list(interceptors_),
|
|
756
|
+
)
|
|
757
|
+
response.response.close()
|
|
758
|
+
return response.output
|
|
759
|
+
|
|
760
|
+
def __enter__(self) -> Self:
|
|
761
|
+
return self
|
|
762
|
+
|
|
763
|
+
def __exit__(self, exc_type: Any, exc: Any, tb: Any):
|
|
764
|
+
self._client.close()
|