capo-lambda-web 0.2.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_lambda_web/__init__.py +71 -0
- capo_lambda_web/_async.py +25 -0
- capo_lambda_web/_auth/_identity.py +16 -0
- capo_lambda_web/_auth/_providers.py +886 -0
- capo_lambda_web/_auth/_signers.py +121 -0
- capo_lambda_web/_auth/_sigv4.py +579 -0
- capo_lambda_web/_auth/_zapros_handler.py +80 -0
- capo_lambda_web/_body.py +221 -0
- capo_lambda_web/_iter.py +113 -0
- capo_lambda_web/_operations/lambda_web/create_web_function.py +184 -0
- capo_lambda_web/_operations/lambda_web/create_web_function_endpoint.py +194 -0
- capo_lambda_web/_operations/lambda_web/create_web_function_revision.py +188 -0
- capo_lambda_web/_operations/lambda_web/delete_resource_policy.py +147 -0
- capo_lambda_web/_operations/lambda_web/delete_web_function.py +145 -0
- capo_lambda_web/_operations/lambda_web/delete_web_function_endpoint.py +149 -0
- capo_lambda_web/_operations/lambda_web/delete_web_function_revision.py +149 -0
- capo_lambda_web/_operations/lambda_web/get_resource_policy.py +165 -0
- capo_lambda_web/_operations/lambda_web/get_web_account_settings.py +155 -0
- capo_lambda_web/_operations/lambda_web/get_web_function.py +171 -0
- capo_lambda_web/_operations/lambda_web/get_web_function_endpoint.py +180 -0
- capo_lambda_web/_operations/lambda_web/get_web_function_revision.py +174 -0
- capo_lambda_web/_operations/lambda_web/list_tags.py +164 -0
- capo_lambda_web/_operations/lambda_web/list_web_function_endpoints.py +176 -0
- capo_lambda_web/_operations/lambda_web/list_web_function_revisions.py +176 -0
- capo_lambda_web/_operations/lambda_web/list_web_functions.py +168 -0
- capo_lambda_web/_operations/lambda_web/put_resource_policy.py +179 -0
- capo_lambda_web/_operations/lambda_web/tag_resource.py +155 -0
- capo_lambda_web/_operations/lambda_web/untag_resource.py +148 -0
- capo_lambda_web/_operations/lambda_web/update_web_function_endpoint.py +196 -0
- capo_lambda_web/_pagination.py +21 -0
- capo_lambda_web/_protocol/__init__.py +1 -0
- capo_lambda_web/_protocol/errors.py +93 -0
- capo_lambda_web/_protocol/eventstream.py +240 -0
- capo_lambda_web/_protocol/serialize.py +47 -0
- capo_lambda_web/_protocol/xml.py +33 -0
- capo_lambda_web/_resources/lambda_web/web_function.py +477 -0
- capo_lambda_web/_rule_engine/__init__.py +0 -0
- capo_lambda_web/_rule_engine/_aws_partition.py +160 -0
- capo_lambda_web/_rule_engine/_endpoint_rule_set.py +135 -0
- capo_lambda_web/_rule_engine/_endpoint_runtime.py +389 -0
- capo_lambda_web/_services/_aws_config.py +160 -0
- capo_lambda_web/_services/_pipeline.py +264 -0
- capo_lambda_web/_services/async_lambda_web.py +1394 -0
- capo_lambda_web/_services/lambda_web.py +1374 -0
- capo_lambda_web/errors/__init__.py +36 -0
- capo_lambda_web/errors/_base.py +94 -0
- capo_lambda_web/errors/access_denied_exception.py +48 -0
- capo_lambda_web/errors/conflict_exception.py +58 -0
- capo_lambda_web/errors/internal_server_exception.py +47 -0
- capo_lambda_web/errors/resource_not_found_exception.py +60 -0
- capo_lambda_web/errors/service_quota_exceeded_exception.py +74 -0
- capo_lambda_web/errors/throttling_exception.py +60 -0
- capo_lambda_web/errors/validation_exception.py +46 -0
- capo_lambda_web/py.typed +0 -0
- capo_lambda_web/types/_prelude/blob.py +12 -0
- capo_lambda_web/types/_prelude/timestamp.py +17 -0
- capo_lambda_web/types/account_quotas.py +47 -0
- capo_lambda_web/types/account_usage.py +26 -0
- capo_lambda_web/types/application_log_level.py +22 -0
- capo_lambda_web/types/auth_type.py +18 -0
- capo_lambda_web/types/auto_deployment_mode.py +18 -0
- capo_lambda_web/types/build_config.py +55 -0
- capo_lambda_web/types/code_config.py +37 -0
- capo_lambda_web/types/create_web_function_endpoint_request.py +164 -0
- capo_lambda_web/types/create_web_function_endpoint_response.py +291 -0
- capo_lambda_web/types/create_web_function_request.py +72 -0
- capo_lambda_web/types/create_web_function_response.py +144 -0
- capo_lambda_web/types/create_web_function_revision_request.py +76 -0
- capo_lambda_web/types/create_web_function_revision_response.py +157 -0
- capo_lambda_web/types/date_time.py +20 -0
- capo_lambda_web/types/delete_resource_policy_request.py +29 -0
- capo_lambda_web/types/delete_web_function_endpoint_request.py +27 -0
- capo_lambda_web/types/delete_web_function_request.py +24 -0
- capo_lambda_web/types/delete_web_function_revision_request.py +27 -0
- capo_lambda_web/types/description.py +5 -0
- capo_lambda_web/types/domain_name.py +5 -0
- capo_lambda_web/types/endpoint_arn.py +5 -0
- capo_lambda_web/types/endpoint_config.py +134 -0
- capo_lambda_web/types/endpoint_name.py +5 -0
- capo_lambda_web/types/endpoint_state.py +20 -0
- capo_lambda_web/types/endpoint_type.py +19 -0
- capo_lambda_web/types/endpoint_update_status.py +19 -0
- capo_lambda_web/types/environment_variables.py +22 -0
- capo_lambda_web/types/filter.py +46 -0
- capo_lambda_web/types/filter_list.py +29 -0
- capo_lambda_web/types/filter_value_list.py +14 -0
- capo_lambda_web/types/function_arn.py +5 -0
- capo_lambda_web/types/function_endpoint_summary.py +249 -0
- capo_lambda_web/types/function_endpoint_summary_list.py +33 -0
- capo_lambda_web/types/function_name.py +5 -0
- capo_lambda_web/types/function_revision_summary.py +83 -0
- capo_lambda_web/types/function_revision_summary_list.py +33 -0
- capo_lambda_web/types/function_state.py +20 -0
- capo_lambda_web/types/function_summary.py +91 -0
- capo_lambda_web/types/function_summary_list.py +31 -0
- capo_lambda_web/types/get_resource_policy_request.py +24 -0
- capo_lambda_web/types/get_resource_policy_response.py +39 -0
- capo_lambda_web/types/get_web_account_settings_request.py +18 -0
- capo_lambda_web/types/get_web_account_settings_response.py +59 -0
- capo_lambda_web/types/get_web_function_endpoint_request.py +27 -0
- capo_lambda_web/types/get_web_function_endpoint_response.py +285 -0
- capo_lambda_web/types/get_web_function_request.py +24 -0
- capo_lambda_web/types/get_web_function_response.py +91 -0
- capo_lambda_web/types/get_web_function_revision_request.py +27 -0
- capo_lambda_web/types/get_web_function_revision_response.py +155 -0
- capo_lambda_web/types/kms_key_arn.py +5 -0
- capo_lambda_web/types/list_tags_request.py +24 -0
- capo_lambda_web/types/list_tags_response.py +32 -0
- capo_lambda_web/types/list_web_function_endpoints_request.py +54 -0
- capo_lambda_web/types/list_web_function_endpoints_response.py +52 -0
- capo_lambda_web/types/list_web_function_revisions_request.py +54 -0
- capo_lambda_web/types/list_web_function_revisions_response.py +52 -0
- capo_lambda_web/types/list_web_functions_request.py +51 -0
- capo_lambda_web/types/list_web_functions_response.py +46 -0
- capo_lambda_web/types/logging_config.py +67 -0
- capo_lambda_web/types/max_results.py +5 -0
- capo_lambda_web/types/next_token.py +5 -0
- capo_lambda_web/types/policy_revision_id.py +5 -0
- capo_lambda_web/types/put_resource_policy_request.py +43 -0
- capo_lambda_web/types/put_resource_policy_response.py +39 -0
- capo_lambda_web/types/region.py +5 -0
- capo_lambda_web/types/region_list.py +17 -0
- capo_lambda_web/types/regional_endpoint.py +140 -0
- capo_lambda_web/types/regional_endpoints.py +33 -0
- capo_lambda_web/types/resource_arn.py +5 -0
- capo_lambda_web/types/resource_policy.py +5 -0
- capo_lambda_web/types/revision_arn.py +5 -0
- capo_lambda_web/types/revision_config.py +69 -0
- capo_lambda_web/types/revision_error.py +40 -0
- capo_lambda_web/types/revision_errors.py +29 -0
- capo_lambda_web/types/revision_id.py +5 -0
- capo_lambda_web/types/revision_state.py +19 -0
- capo_lambda_web/types/revision_weight.py +38 -0
- capo_lambda_web/types/revision_weight_list.py +31 -0
- capo_lambda_web/types/role_arn.py +5 -0
- capo_lambda_web/types/runtime_config.py +26 -0
- capo_lambda_web/types/s3_object.py +39 -0
- capo_lambda_web/types/scaling_config.py +23 -0
- capo_lambda_web/types/service_config.py +87 -0
- capo_lambda_web/types/system_log_level.py +19 -0
- capo_lambda_web/types/tag_key.py +5 -0
- capo_lambda_web/types/tag_key_list.py +17 -0
- capo_lambda_web/types/tag_resource_request.py +38 -0
- capo_lambda_web/types/tags.py +25 -0
- capo_lambda_web/types/telemetry_config.py +36 -0
- capo_lambda_web/types/throttle_config.py +23 -0
- capo_lambda_web/types/untag_resource_request.py +27 -0
- capo_lambda_web/types/update_web_function_endpoint_request.py +121 -0
- capo_lambda_web/types/update_web_function_endpoint_response.py +291 -0
- capo_lambda_web-0.2.0.dist-info/METADATA +104 -0
- capo_lambda_web-0.2.0.dist-info/RECORD +154 -0
- capo_lambda_web-0.2.0.dist-info/WHEEL +5 -0
- capo_lambda_web-0.2.0.dist-info/licenses/LICENSE +21 -0
- capo_lambda_web-0.2.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#LoggingConfig``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_lambda_web.types.application_log_level
|
|
9
|
+
import capo_lambda_web.types.system_log_level
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class LoggingConfig(TypedDict, closed=True):
|
|
13
|
+
log_group: NotRequired["str"]
|
|
14
|
+
"""<p>The name of the Amazon CloudWatch Logs log group the web function sends logs to. If you don't specify a value, the default is <code>/aws/lambda/web/{functionName}</code>, and this default is returned in the response.</p>"""
|
|
15
|
+
application_log_level: NotRequired[
|
|
16
|
+
"capo_lambda_web.types.application_log_level.ApplicationLogLevel"
|
|
17
|
+
]
|
|
18
|
+
"""<p>The log level for application logs emitted by the web function. If you don't specify a value, the default is <code>INFO</code>, and this default is returned in the response.</p>"""
|
|
19
|
+
system_log_level: NotRequired[
|
|
20
|
+
"capo_lambda_web.types.system_log_level.SystemLogLevel"
|
|
21
|
+
]
|
|
22
|
+
"""<p>The log level for system logs emitted by the Lambda runtime. If you don't specify a value, the default is <code>INFO</code>, and this default is returned in the response.</p>"""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# --- restJson1 ser/de ---
|
|
26
|
+
def serialize_json(value: LoggingConfig) -> dict:
|
|
27
|
+
out: dict = {}
|
|
28
|
+
if "log_group" in value:
|
|
29
|
+
out["logGroup"] = value["log_group"]
|
|
30
|
+
if "application_log_level" in value:
|
|
31
|
+
import capo_lambda_web.types.application_log_level
|
|
32
|
+
|
|
33
|
+
out["applicationLogLevel"] = (
|
|
34
|
+
capo_lambda_web.types.application_log_level.serialize_json(
|
|
35
|
+
value["application_log_level"]
|
|
36
|
+
)
|
|
37
|
+
)
|
|
38
|
+
if "system_log_level" in value:
|
|
39
|
+
import capo_lambda_web.types.system_log_level
|
|
40
|
+
|
|
41
|
+
out["systemLogLevel"] = capo_lambda_web.types.system_log_level.serialize_json(
|
|
42
|
+
value["system_log_level"]
|
|
43
|
+
)
|
|
44
|
+
return out
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def deserialize_json(data: dict) -> LoggingConfig:
|
|
48
|
+
out: LoggingConfig = {} # type: ignore[typeddict-item]
|
|
49
|
+
if data.get("logGroup") is not None:
|
|
50
|
+
out["log_group"] = data["logGroup"]
|
|
51
|
+
if data.get("applicationLogLevel") is not None:
|
|
52
|
+
import capo_lambda_web.types.application_log_level
|
|
53
|
+
|
|
54
|
+
out["application_log_level"] = (
|
|
55
|
+
capo_lambda_web.types.application_log_level.deserialize_json(
|
|
56
|
+
data["applicationLogLevel"]
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
if data.get("systemLogLevel") is not None:
|
|
60
|
+
import capo_lambda_web.types.system_log_level
|
|
61
|
+
|
|
62
|
+
out["system_log_level"] = (
|
|
63
|
+
capo_lambda_web.types.system_log_level.deserialize_json(
|
|
64
|
+
data["systemLogLevel"]
|
|
65
|
+
)
|
|
66
|
+
)
|
|
67
|
+
return out
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#PutResourcePolicyRequest``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_web.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_web.types.policy_revision_id
|
|
11
|
+
import capo_lambda_web.types.resource_arn
|
|
12
|
+
import capo_lambda_web.types.resource_policy
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class PutResourcePolicyRequest(TypedDict, closed=True):
|
|
16
|
+
resource_arn: "capo_lambda_web.types.resource_arn.ResourceArn"
|
|
17
|
+
"""<p>The Amazon Resource Name (ARN) of the web function.</p>"""
|
|
18
|
+
policy: "capo_lambda_web.types.resource_policy.ResourcePolicy"
|
|
19
|
+
"""<p>The JSON-formatted resource-based policy to attach to the web function.</p>"""
|
|
20
|
+
revision_id: NotRequired[
|
|
21
|
+
"capo_lambda_web.types.policy_revision_id.PolicyRevisionId"
|
|
22
|
+
]
|
|
23
|
+
"""<p>The revision ID of the existing policy. Use this to prevent conflicts when updating a policy concurrently. If you don't specify a value, the update proceeds without checking the current revision.</p>"""
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# --- restJson1 ser/de ---
|
|
27
|
+
def serialize_json(value: PutResourcePolicyRequest) -> dict:
|
|
28
|
+
out: dict = {}
|
|
29
|
+
out["Policy"] = value["policy"]
|
|
30
|
+
if "revision_id" in value:
|
|
31
|
+
out["RevisionId"] = value["revision_id"]
|
|
32
|
+
return out
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def deserialize_json(data: dict) -> PutResourcePolicyRequest:
|
|
36
|
+
out: PutResourcePolicyRequest = {} # type: ignore[typeddict-item]
|
|
37
|
+
if data.get("Policy") is not None:
|
|
38
|
+
out["policy"] = data["Policy"]
|
|
39
|
+
else:
|
|
40
|
+
raise DeserializationError("PutResourcePolicyRequest.policy required")
|
|
41
|
+
if data.get("RevisionId") is not None:
|
|
42
|
+
out["revision_id"] = data["RevisionId"]
|
|
43
|
+
return out
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#PutResourcePolicyResponse``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_web.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_web.types.policy_revision_id
|
|
11
|
+
import capo_lambda_web.types.resource_policy
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class PutResourcePolicyResponse(TypedDict, closed=True):
|
|
15
|
+
policy: "capo_lambda_web.types.resource_policy.ResourcePolicy"
|
|
16
|
+
"""<p>The JSON-formatted resource-based policy attached to the web function.</p>"""
|
|
17
|
+
revision_id: "capo_lambda_web.types.policy_revision_id.PolicyRevisionId"
|
|
18
|
+
"""<p>The revision ID of the policy. Use this value in subsequent <code>PutResourcePolicy</code> or <code>DeleteResourcePolicy</code> requests to prevent conflicts.</p>"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# --- restJson1 ser/de ---
|
|
22
|
+
def serialize_json(value: PutResourcePolicyResponse) -> dict:
|
|
23
|
+
out: dict = {}
|
|
24
|
+
out["Policy"] = value["policy"]
|
|
25
|
+
out["RevisionId"] = value["revision_id"]
|
|
26
|
+
return out
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def deserialize_json(data: dict) -> PutResourcePolicyResponse:
|
|
30
|
+
out: PutResourcePolicyResponse = {} # type: ignore[typeddict-item]
|
|
31
|
+
if data.get("Policy") is not None:
|
|
32
|
+
out["policy"] = data["Policy"]
|
|
33
|
+
else:
|
|
34
|
+
raise DeserializationError("PutResourcePolicyResponse.policy required")
|
|
35
|
+
if data.get("RevisionId") is not None:
|
|
36
|
+
out["revision_id"] = data["RevisionId"]
|
|
37
|
+
else:
|
|
38
|
+
raise DeserializationError("PutResourcePolicyResponse.revision_id required")
|
|
39
|
+
return out
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RegionList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_web.types.region
|
|
7
|
+
|
|
8
|
+
RegionList: TypeAlias = list["capo_lambda_web.types.region.Region"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: RegionList) -> list:
|
|
13
|
+
return list(value)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_json(data: list) -> RegionList:
|
|
17
|
+
return [item for item in data if item is not None]
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RegionalEndpoint``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_web.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_web.types.auth_type
|
|
11
|
+
import capo_lambda_web.types.domain_name
|
|
12
|
+
import capo_lambda_web.types.endpoint_state
|
|
13
|
+
import capo_lambda_web.types.endpoint_update_status
|
|
14
|
+
import capo_lambda_web.types.revision_weight_list
|
|
15
|
+
import capo_lambda_web.types.scaling_config
|
|
16
|
+
import capo_lambda_web.types.throttle_config
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class RegionalEndpoint(TypedDict, closed=True):
|
|
20
|
+
domain_name: NotRequired["capo_lambda_web.types.domain_name.DomainName"]
|
|
21
|
+
"""<p>The domain name of the regional endpoint.</p>"""
|
|
22
|
+
auth_type: "capo_lambda_web.types.auth_type.AuthType"
|
|
23
|
+
"""<p>The authorization type for the regional endpoint.</p>"""
|
|
24
|
+
revision_weights: "capo_lambda_web.types.revision_weight_list.RevisionWeightList"
|
|
25
|
+
"""<p>The revision weights for the regional endpoint.</p>"""
|
|
26
|
+
scaling_config: NotRequired["capo_lambda_web.types.scaling_config.ScalingConfig"]
|
|
27
|
+
"""<p>The scaling configuration for the regional endpoint. This field is absent if the endpoint has no scaling configuration.</p>"""
|
|
28
|
+
throttle_config: NotRequired["capo_lambda_web.types.throttle_config.ThrottleConfig"]
|
|
29
|
+
"""<p>The throttling configuration for the regional endpoint. This field is absent if the endpoint has no throttling configuration.</p>"""
|
|
30
|
+
state: "capo_lambda_web.types.endpoint_state.EndpointState"
|
|
31
|
+
"""<p>The current state of the regional endpoint.</p>"""
|
|
32
|
+
state_reason: "str"
|
|
33
|
+
"""<p>The reason for the current state of the regional endpoint.</p>"""
|
|
34
|
+
update_status: NotRequired[
|
|
35
|
+
"capo_lambda_web.types.endpoint_update_status.EndpointUpdateStatus"
|
|
36
|
+
]
|
|
37
|
+
"""<p>The status of the most recent update to the regional endpoint.</p>"""
|
|
38
|
+
update_status_reason: NotRequired["str"]
|
|
39
|
+
"""<p>The reason for the current update status of the regional endpoint.</p>"""
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# --- restJson1 ser/de ---
|
|
43
|
+
def serialize_json(value: RegionalEndpoint) -> dict:
|
|
44
|
+
out: dict = {}
|
|
45
|
+
if "domain_name" in value:
|
|
46
|
+
out["domainName"] = value["domain_name"]
|
|
47
|
+
import capo_lambda_web.types.auth_type
|
|
48
|
+
|
|
49
|
+
out["authType"] = capo_lambda_web.types.auth_type.serialize_json(value["auth_type"])
|
|
50
|
+
import capo_lambda_web.types.revision_weight_list
|
|
51
|
+
|
|
52
|
+
out["revisionWeights"] = capo_lambda_web.types.revision_weight_list.serialize_json(
|
|
53
|
+
value["revision_weights"]
|
|
54
|
+
)
|
|
55
|
+
if "scaling_config" in value:
|
|
56
|
+
import capo_lambda_web.types.scaling_config
|
|
57
|
+
|
|
58
|
+
out["scalingConfig"] = capo_lambda_web.types.scaling_config.serialize_json(
|
|
59
|
+
value["scaling_config"]
|
|
60
|
+
)
|
|
61
|
+
if "throttle_config" in value:
|
|
62
|
+
import capo_lambda_web.types.throttle_config
|
|
63
|
+
|
|
64
|
+
out["throttleConfig"] = capo_lambda_web.types.throttle_config.serialize_json(
|
|
65
|
+
value["throttle_config"]
|
|
66
|
+
)
|
|
67
|
+
import capo_lambda_web.types.endpoint_state
|
|
68
|
+
|
|
69
|
+
out["state"] = capo_lambda_web.types.endpoint_state.serialize_json(value["state"])
|
|
70
|
+
out["stateReason"] = value["state_reason"]
|
|
71
|
+
if "update_status" in value:
|
|
72
|
+
import capo_lambda_web.types.endpoint_update_status
|
|
73
|
+
|
|
74
|
+
out["updateStatus"] = (
|
|
75
|
+
capo_lambda_web.types.endpoint_update_status.serialize_json(
|
|
76
|
+
value["update_status"]
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
if "update_status_reason" in value:
|
|
80
|
+
out["updateStatusReason"] = value["update_status_reason"]
|
|
81
|
+
return out
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def deserialize_json(data: dict) -> RegionalEndpoint:
|
|
85
|
+
out: RegionalEndpoint = {} # type: ignore[typeddict-item]
|
|
86
|
+
if data.get("domainName") is not None:
|
|
87
|
+
out["domain_name"] = data["domainName"]
|
|
88
|
+
if data.get("authType") is not None:
|
|
89
|
+
import capo_lambda_web.types.auth_type
|
|
90
|
+
|
|
91
|
+
out["auth_type"] = capo_lambda_web.types.auth_type.deserialize_json(
|
|
92
|
+
data["authType"]
|
|
93
|
+
)
|
|
94
|
+
else:
|
|
95
|
+
raise DeserializationError("RegionalEndpoint.auth_type required")
|
|
96
|
+
if data.get("revisionWeights") is not None:
|
|
97
|
+
import capo_lambda_web.types.revision_weight_list
|
|
98
|
+
|
|
99
|
+
out["revision_weights"] = (
|
|
100
|
+
capo_lambda_web.types.revision_weight_list.deserialize_json(
|
|
101
|
+
data["revisionWeights"]
|
|
102
|
+
)
|
|
103
|
+
)
|
|
104
|
+
else:
|
|
105
|
+
raise DeserializationError("RegionalEndpoint.revision_weights required")
|
|
106
|
+
if data.get("scalingConfig") is not None:
|
|
107
|
+
import capo_lambda_web.types.scaling_config
|
|
108
|
+
|
|
109
|
+
out["scaling_config"] = capo_lambda_web.types.scaling_config.deserialize_json(
|
|
110
|
+
data["scalingConfig"]
|
|
111
|
+
)
|
|
112
|
+
if data.get("throttleConfig") is not None:
|
|
113
|
+
import capo_lambda_web.types.throttle_config
|
|
114
|
+
|
|
115
|
+
out["throttle_config"] = capo_lambda_web.types.throttle_config.deserialize_json(
|
|
116
|
+
data["throttleConfig"]
|
|
117
|
+
)
|
|
118
|
+
if data.get("state") is not None:
|
|
119
|
+
import capo_lambda_web.types.endpoint_state
|
|
120
|
+
|
|
121
|
+
out["state"] = capo_lambda_web.types.endpoint_state.deserialize_json(
|
|
122
|
+
data["state"]
|
|
123
|
+
)
|
|
124
|
+
else:
|
|
125
|
+
raise DeserializationError("RegionalEndpoint.state required")
|
|
126
|
+
if data.get("stateReason") is not None:
|
|
127
|
+
out["state_reason"] = data["stateReason"]
|
|
128
|
+
else:
|
|
129
|
+
raise DeserializationError("RegionalEndpoint.state_reason required")
|
|
130
|
+
if data.get("updateStatus") is not None:
|
|
131
|
+
import capo_lambda_web.types.endpoint_update_status
|
|
132
|
+
|
|
133
|
+
out["update_status"] = (
|
|
134
|
+
capo_lambda_web.types.endpoint_update_status.deserialize_json(
|
|
135
|
+
data["updateStatus"]
|
|
136
|
+
)
|
|
137
|
+
)
|
|
138
|
+
if data.get("updateStatusReason") is not None:
|
|
139
|
+
out["update_status_reason"] = data["updateStatusReason"]
|
|
140
|
+
return out
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RegionalEndpoints``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_web.types.region
|
|
7
|
+
import capo_lambda_web.types.regional_endpoint
|
|
8
|
+
|
|
9
|
+
RegionalEndpoints: TypeAlias = dict[
|
|
10
|
+
"capo_lambda_web.types.region.Region",
|
|
11
|
+
"capo_lambda_web.types.regional_endpoint.RegionalEndpoint",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# --- restJson1 ser/de ---
|
|
16
|
+
def serialize_json(input_to_serialize: RegionalEndpoints) -> dict:
|
|
17
|
+
out: dict = {}
|
|
18
|
+
for key, value in input_to_serialize.items():
|
|
19
|
+
import capo_lambda_web.types.regional_endpoint
|
|
20
|
+
|
|
21
|
+
out[key] = capo_lambda_web.types.regional_endpoint.serialize_json(value)
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_json(data: dict) -> RegionalEndpoints:
|
|
26
|
+
out: RegionalEndpoints = {}
|
|
27
|
+
for key, value in data.items():
|
|
28
|
+
if value is None:
|
|
29
|
+
continue
|
|
30
|
+
import capo_lambda_web.types.regional_endpoint
|
|
31
|
+
|
|
32
|
+
out[key] = capo_lambda_web.types.regional_endpoint.deserialize_json(value)
|
|
33
|
+
return out
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RevisionConfig``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import NotRequired, TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_web.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_web.types.build_config
|
|
11
|
+
import capo_lambda_web.types.description
|
|
12
|
+
import capo_lambda_web.types.kms_key_arn
|
|
13
|
+
import capo_lambda_web.types.service_config
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class RevisionConfig(TypedDict, closed=True):
|
|
17
|
+
description: NotRequired["capo_lambda_web.types.description.Description"]
|
|
18
|
+
"""<p>A description of the revision.</p>"""
|
|
19
|
+
kms_key_arn: NotRequired["capo_lambda_web.types.kms_key_arn.KmsKeyArn"]
|
|
20
|
+
"""<p>The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) key used to encrypt the revision's code and environment variables.</p>"""
|
|
21
|
+
build_config: "capo_lambda_web.types.build_config.BuildConfig"
|
|
22
|
+
"""<p>The build configuration for the revision.</p>"""
|
|
23
|
+
service_config: "capo_lambda_web.types.service_config.ServiceConfig"
|
|
24
|
+
"""<p>The service configuration for the revision.</p>"""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# --- restJson1 ser/de ---
|
|
28
|
+
def serialize_json(value: RevisionConfig) -> dict:
|
|
29
|
+
out: dict = {}
|
|
30
|
+
if "description" in value:
|
|
31
|
+
out["description"] = value["description"]
|
|
32
|
+
if "kms_key_arn" in value:
|
|
33
|
+
out["kmsKeyArn"] = value["kms_key_arn"]
|
|
34
|
+
import capo_lambda_web.types.build_config
|
|
35
|
+
|
|
36
|
+
out["buildConfig"] = capo_lambda_web.types.build_config.serialize_json(
|
|
37
|
+
value["build_config"]
|
|
38
|
+
)
|
|
39
|
+
import capo_lambda_web.types.service_config
|
|
40
|
+
|
|
41
|
+
out["serviceConfig"] = capo_lambda_web.types.service_config.serialize_json(
|
|
42
|
+
value["service_config"]
|
|
43
|
+
)
|
|
44
|
+
return out
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def deserialize_json(data: dict) -> RevisionConfig:
|
|
48
|
+
out: RevisionConfig = {} # type: ignore[typeddict-item]
|
|
49
|
+
if data.get("description") is not None:
|
|
50
|
+
out["description"] = data["description"]
|
|
51
|
+
if data.get("kmsKeyArn") is not None:
|
|
52
|
+
out["kms_key_arn"] = data["kmsKeyArn"]
|
|
53
|
+
if data.get("buildConfig") is not None:
|
|
54
|
+
import capo_lambda_web.types.build_config
|
|
55
|
+
|
|
56
|
+
out["build_config"] = capo_lambda_web.types.build_config.deserialize_json(
|
|
57
|
+
data["buildConfig"]
|
|
58
|
+
)
|
|
59
|
+
else:
|
|
60
|
+
raise DeserializationError("RevisionConfig.build_config required")
|
|
61
|
+
if data.get("serviceConfig") is not None:
|
|
62
|
+
import capo_lambda_web.types.service_config
|
|
63
|
+
|
|
64
|
+
out["service_config"] = capo_lambda_web.types.service_config.deserialize_json(
|
|
65
|
+
data["serviceConfig"]
|
|
66
|
+
)
|
|
67
|
+
else:
|
|
68
|
+
raise DeserializationError("RevisionConfig.service_config required")
|
|
69
|
+
return out
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RevisionError``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import TypedDict
|
|
4
|
+
|
|
5
|
+
from capo_lambda_web.errors import DeserializationError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RevisionError(TypedDict, closed=True):
|
|
9
|
+
attribute: "str"
|
|
10
|
+
"""<p>The name of the revision attribute that the error applies to. Must be between 1 and 64 characters.</p>"""
|
|
11
|
+
error_code: "str"
|
|
12
|
+
"""<p>A short, machine-readable code that identifies the error. Must be between 1 and 64 characters.</p>"""
|
|
13
|
+
error_message: "str"
|
|
14
|
+
"""<p>A human-readable message describing the error. Must be between 1 and 2048 characters.</p>"""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- restJson1 ser/de ---
|
|
18
|
+
def serialize_json(value: RevisionError) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
out["attribute"] = value["attribute"]
|
|
21
|
+
out["errorCode"] = value["error_code"]
|
|
22
|
+
out["errorMessage"] = value["error_message"]
|
|
23
|
+
return out
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def deserialize_json(data: dict) -> RevisionError:
|
|
27
|
+
out: RevisionError = {} # type: ignore[typeddict-item]
|
|
28
|
+
if data.get("attribute") is not None:
|
|
29
|
+
out["attribute"] = data["attribute"]
|
|
30
|
+
else:
|
|
31
|
+
raise DeserializationError("RevisionError.attribute required")
|
|
32
|
+
if data.get("errorCode") is not None:
|
|
33
|
+
out["error_code"] = data["errorCode"]
|
|
34
|
+
else:
|
|
35
|
+
raise DeserializationError("RevisionError.error_code required")
|
|
36
|
+
if data.get("errorMessage") is not None:
|
|
37
|
+
out["error_message"] = data["errorMessage"]
|
|
38
|
+
else:
|
|
39
|
+
raise DeserializationError("RevisionError.error_message required")
|
|
40
|
+
return out
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RevisionErrors``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_web.types.revision_error
|
|
7
|
+
|
|
8
|
+
RevisionErrors: TypeAlias = list["capo_lambda_web.types.revision_error.RevisionError"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: RevisionErrors) -> list:
|
|
13
|
+
import capo_lambda_web.types.revision_error
|
|
14
|
+
|
|
15
|
+
out: list = []
|
|
16
|
+
for item in value:
|
|
17
|
+
out.append(capo_lambda_web.types.revision_error.serialize_json(item))
|
|
18
|
+
return out
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def deserialize_json(data: list) -> RevisionErrors:
|
|
22
|
+
import capo_lambda_web.types.revision_error
|
|
23
|
+
|
|
24
|
+
out: RevisionErrors = []
|
|
25
|
+
for item in data:
|
|
26
|
+
if item is None:
|
|
27
|
+
continue
|
|
28
|
+
out.append(capo_lambda_web.types.revision_error.deserialize_json(item))
|
|
29
|
+
return out
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RevisionState``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
"""<p>The state of a web function revision. Possible values: <code>Pending</code> (revision is being built), <code>Active</code> (revision is ready to serve traffic), <code>Failed</code> (revision build failed).</p>"""
|
|
6
|
+
RevisionState: TypeAlias = Literal[
|
|
7
|
+
"Pending",
|
|
8
|
+
"Active",
|
|
9
|
+
"Failed",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- restJson1 ser/de ---
|
|
14
|
+
def serialize_json(value: RevisionState) -> str:
|
|
15
|
+
return value
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def deserialize_json(data: str) -> RevisionState:
|
|
19
|
+
return cast(RevisionState, data)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RevisionWeight``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
from capo_lambda_web.errors import DeserializationError
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import capo_lambda_web.types.revision_id
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class RevisionWeight(TypedDict, closed=True):
|
|
14
|
+
revision_id: "capo_lambda_web.types.revision_id.RevisionId"
|
|
15
|
+
"""<p>The identifier of the revision.</p>"""
|
|
16
|
+
weight: "int"
|
|
17
|
+
"""<p>The percentage of traffic to route to this revision. Minimum value of 1, maximum value of 100.</p>"""
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# --- restJson1 ser/de ---
|
|
21
|
+
def serialize_json(value: RevisionWeight) -> dict:
|
|
22
|
+
out: dict = {}
|
|
23
|
+
out["revisionId"] = value["revision_id"]
|
|
24
|
+
out["weight"] = value["weight"]
|
|
25
|
+
return out
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def deserialize_json(data: dict) -> RevisionWeight:
|
|
29
|
+
out: RevisionWeight = {} # type: ignore[typeddict-item]
|
|
30
|
+
if data.get("revisionId") is not None:
|
|
31
|
+
out["revision_id"] = data["revisionId"]
|
|
32
|
+
else:
|
|
33
|
+
raise DeserializationError("RevisionWeight.revision_id required")
|
|
34
|
+
if data.get("weight") is not None:
|
|
35
|
+
out["weight"] = data["weight"]
|
|
36
|
+
else:
|
|
37
|
+
raise DeserializationError("RevisionWeight.weight required")
|
|
38
|
+
return out
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RevisionWeightList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_web.types.revision_weight
|
|
7
|
+
|
|
8
|
+
RevisionWeightList: TypeAlias = list[
|
|
9
|
+
"capo_lambda_web.types.revision_weight.RevisionWeight"
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- restJson1 ser/de ---
|
|
14
|
+
def serialize_json(value: RevisionWeightList) -> list:
|
|
15
|
+
import capo_lambda_web.types.revision_weight
|
|
16
|
+
|
|
17
|
+
out: list = []
|
|
18
|
+
for item in value:
|
|
19
|
+
out.append(capo_lambda_web.types.revision_weight.serialize_json(item))
|
|
20
|
+
return out
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def deserialize_json(data: list) -> RevisionWeightList:
|
|
24
|
+
import capo_lambda_web.types.revision_weight
|
|
25
|
+
|
|
26
|
+
out: RevisionWeightList = []
|
|
27
|
+
for item in data:
|
|
28
|
+
if item is None:
|
|
29
|
+
continue
|
|
30
|
+
out.append(capo_lambda_web.types.revision_weight.deserialize_json(item))
|
|
31
|
+
return out
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#RuntimeConfig``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import TypedDict
|
|
4
|
+
|
|
5
|
+
from capo_lambda_web.errors import DeserializationError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RuntimeConfig(TypedDict, closed=True):
|
|
9
|
+
runtime: "str"
|
|
10
|
+
"""<p>The runtime identifier for the web function (for example, a Node.js runtime identifier).</p>"""
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- restJson1 ser/de ---
|
|
14
|
+
def serialize_json(value: RuntimeConfig) -> dict:
|
|
15
|
+
out: dict = {}
|
|
16
|
+
out["runtime"] = value["runtime"]
|
|
17
|
+
return out
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def deserialize_json(data: dict) -> RuntimeConfig:
|
|
21
|
+
out: RuntimeConfig = {} # type: ignore[typeddict-item]
|
|
22
|
+
if data.get("runtime") is not None:
|
|
23
|
+
out["runtime"] = data["runtime"]
|
|
24
|
+
else:
|
|
25
|
+
raise DeserializationError("RuntimeConfig.runtime required")
|
|
26
|
+
return out
|