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,39 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#S3Object``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import NotRequired, TypedDict
|
|
4
|
+
|
|
5
|
+
from capo_lambda_web.errors import DeserializationError
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class S3Object(TypedDict, closed=True):
|
|
9
|
+
bucket: "str"
|
|
10
|
+
"""<p>The name of the Amazon S3 bucket. Must be between 3 and 63 characters.</p>"""
|
|
11
|
+
key: "str"
|
|
12
|
+
"""<p>The Amazon S3 object key. Must be between 1 and 1024 characters.</p>"""
|
|
13
|
+
version_id: NotRequired["str"]
|
|
14
|
+
"""<p>The version ID of the Amazon S3 object.</p>"""
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# --- restJson1 ser/de ---
|
|
18
|
+
def serialize_json(value: S3Object) -> dict:
|
|
19
|
+
out: dict = {}
|
|
20
|
+
out["bucket"] = value["bucket"]
|
|
21
|
+
out["key"] = value["key"]
|
|
22
|
+
if "version_id" in value:
|
|
23
|
+
out["versionId"] = value["version_id"]
|
|
24
|
+
return out
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def deserialize_json(data: dict) -> S3Object:
|
|
28
|
+
out: S3Object = {} # type: ignore[typeddict-item]
|
|
29
|
+
if data.get("bucket") is not None:
|
|
30
|
+
out["bucket"] = data["bucket"]
|
|
31
|
+
else:
|
|
32
|
+
raise DeserializationError("S3Object.bucket required")
|
|
33
|
+
if data.get("key") is not None:
|
|
34
|
+
out["key"] = data["key"]
|
|
35
|
+
else:
|
|
36
|
+
raise DeserializationError("S3Object.key required")
|
|
37
|
+
if data.get("versionId") is not None:
|
|
38
|
+
out["version_id"] = data["versionId"]
|
|
39
|
+
return out
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#ScalingConfig``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import NotRequired, TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ScalingConfig(TypedDict, closed=True):
|
|
7
|
+
max_environments: NotRequired["int"]
|
|
8
|
+
"""<p>The maximum number of concurrent execution environments for the endpoint. Minimum value of 2, maximum value of 10000. There is no default value. If you don't specify a value, the scaling configuration is absent from the response. On an update, omit <code>scalingConfig</code> to keep the current value, or specify an empty object to clear a previously set value.</p>"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: ScalingConfig) -> dict:
|
|
13
|
+
out: dict = {}
|
|
14
|
+
if "max_environments" in value:
|
|
15
|
+
out["maxEnvironments"] = value["max_environments"]
|
|
16
|
+
return out
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def deserialize_json(data: dict) -> ScalingConfig:
|
|
20
|
+
out: ScalingConfig = {} # type: ignore[typeddict-item]
|
|
21
|
+
if data.get("maxEnvironments") is not None:
|
|
22
|
+
out["max_environments"] = data["maxEnvironments"]
|
|
23
|
+
return out
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#ServiceConfig``."""
|
|
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.environment_variables
|
|
11
|
+
import capo_lambda_web.types.role_arn
|
|
12
|
+
import capo_lambda_web.types.telemetry_config
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ServiceConfig(TypedDict, closed=True):
|
|
16
|
+
execution_role_arn: "capo_lambda_web.types.role_arn.RoleArn"
|
|
17
|
+
"""<p>The ARN of the IAM role that the web function assumes when it runs. This role provides permissions to access AWS services and resources.</p>"""
|
|
18
|
+
timeout_seconds: "int"
|
|
19
|
+
"""<p>The amount of time (in seconds) that Lambda allows the web function to run before stopping it. Minimum value of 3, maximum value of 900. If you don't specify a value, the default is 30, and this default is returned in the response.</p>"""
|
|
20
|
+
max_concurrency_per_environment: "int"
|
|
21
|
+
"""<p>The maximum number of concurrent requests handled per execution environment. Minimum value of 1, maximum value of 128. If you don't specify a value, the default is 64, and this default is returned in the response.</p>"""
|
|
22
|
+
environment_variables: NotRequired[
|
|
23
|
+
"capo_lambda_web.types.environment_variables.EnvironmentVariables"
|
|
24
|
+
]
|
|
25
|
+
"""<p>A map of environment variable key-value pairs available to the web function at runtime. Environment variable values are sensitive.</p>"""
|
|
26
|
+
telemetry_config: NotRequired[
|
|
27
|
+
"capo_lambda_web.types.telemetry_config.TelemetryConfig"
|
|
28
|
+
]
|
|
29
|
+
"""<p>The telemetry configuration for the web function, including logging settings.</p>"""
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# --- restJson1 ser/de ---
|
|
33
|
+
def serialize_json(value: ServiceConfig) -> dict:
|
|
34
|
+
out: dict = {}
|
|
35
|
+
out["executionRoleArn"] = value["execution_role_arn"]
|
|
36
|
+
out["timeoutSeconds"] = value.get("timeout_seconds", 30)
|
|
37
|
+
out["maxConcurrencyPerEnvironment"] = value.get(
|
|
38
|
+
"max_concurrency_per_environment", 64
|
|
39
|
+
)
|
|
40
|
+
if "environment_variables" in value:
|
|
41
|
+
import capo_lambda_web.types.environment_variables
|
|
42
|
+
|
|
43
|
+
out["environmentVariables"] = (
|
|
44
|
+
capo_lambda_web.types.environment_variables.serialize_json(
|
|
45
|
+
value["environment_variables"]
|
|
46
|
+
)
|
|
47
|
+
)
|
|
48
|
+
if "telemetry_config" in value:
|
|
49
|
+
import capo_lambda_web.types.telemetry_config
|
|
50
|
+
|
|
51
|
+
out["telemetryConfig"] = capo_lambda_web.types.telemetry_config.serialize_json(
|
|
52
|
+
value["telemetry_config"]
|
|
53
|
+
)
|
|
54
|
+
return out
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def deserialize_json(data: dict) -> ServiceConfig:
|
|
58
|
+
out: ServiceConfig = {} # type: ignore[typeddict-item]
|
|
59
|
+
if data.get("executionRoleArn") is not None:
|
|
60
|
+
out["execution_role_arn"] = data["executionRoleArn"]
|
|
61
|
+
else:
|
|
62
|
+
raise DeserializationError("ServiceConfig.execution_role_arn required")
|
|
63
|
+
if data.get("timeoutSeconds") is not None:
|
|
64
|
+
out["timeout_seconds"] = data["timeoutSeconds"]
|
|
65
|
+
else:
|
|
66
|
+
out["timeout_seconds"] = 30
|
|
67
|
+
if data.get("maxConcurrencyPerEnvironment") is not None:
|
|
68
|
+
out["max_concurrency_per_environment"] = data["maxConcurrencyPerEnvironment"]
|
|
69
|
+
else:
|
|
70
|
+
out["max_concurrency_per_environment"] = 64
|
|
71
|
+
if data.get("environmentVariables") is not None:
|
|
72
|
+
import capo_lambda_web.types.environment_variables
|
|
73
|
+
|
|
74
|
+
out["environment_variables"] = (
|
|
75
|
+
capo_lambda_web.types.environment_variables.deserialize_json(
|
|
76
|
+
data["environmentVariables"]
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
if data.get("telemetryConfig") is not None:
|
|
80
|
+
import capo_lambda_web.types.telemetry_config
|
|
81
|
+
|
|
82
|
+
out["telemetry_config"] = (
|
|
83
|
+
capo_lambda_web.types.telemetry_config.deserialize_json(
|
|
84
|
+
data["telemetryConfig"]
|
|
85
|
+
)
|
|
86
|
+
)
|
|
87
|
+
return out
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#SystemLogLevel``."""
|
|
2
|
+
|
|
3
|
+
from typing import Literal, TypeAlias, cast
|
|
4
|
+
|
|
5
|
+
"""<p>The log level for system logs from the Lambda runtime. Possible values: <code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>.</p>"""
|
|
6
|
+
SystemLogLevel: TypeAlias = Literal[
|
|
7
|
+
"DEBUG",
|
|
8
|
+
"INFO",
|
|
9
|
+
"WARN",
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
# --- restJson1 ser/de ---
|
|
14
|
+
def serialize_json(value: SystemLogLevel) -> str:
|
|
15
|
+
return value
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def deserialize_json(data: str) -> SystemLogLevel:
|
|
19
|
+
return cast(SystemLogLevel, data)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#TagKeyList``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_web.types.tag_key
|
|
7
|
+
|
|
8
|
+
TagKeyList: TypeAlias = list["capo_lambda_web.types.tag_key.TagKey"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: TagKeyList) -> list:
|
|
13
|
+
return list(value)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def deserialize_json(data: list) -> TagKeyList:
|
|
17
|
+
return [item for item in data if item is not None]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#TagResourceRequest``."""
|
|
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.resource_arn
|
|
11
|
+
import capo_lambda_web.types.tags
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class TagResourceRequest(TypedDict, closed=True):
|
|
15
|
+
resource: "capo_lambda_web.types.resource_arn.ResourceArn"
|
|
16
|
+
"""<p>The Amazon Resource Name (ARN) of the web function.</p>"""
|
|
17
|
+
tags: "capo_lambda_web.types.tags.Tags"
|
|
18
|
+
"""<p>A map of tag keys and values to add to the web function.</p>"""
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# --- restJson1 ser/de ---
|
|
22
|
+
def serialize_json(value: TagResourceRequest) -> dict:
|
|
23
|
+
out: dict = {}
|
|
24
|
+
import capo_lambda_web.types.tags
|
|
25
|
+
|
|
26
|
+
out["Tags"] = capo_lambda_web.types.tags.serialize_json(value["tags"])
|
|
27
|
+
return out
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def deserialize_json(data: dict) -> TagResourceRequest:
|
|
31
|
+
out: TagResourceRequest = {} # type: ignore[typeddict-item]
|
|
32
|
+
if data.get("Tags") is not None:
|
|
33
|
+
import capo_lambda_web.types.tags
|
|
34
|
+
|
|
35
|
+
out["tags"] = capo_lambda_web.types.tags.deserialize_json(data["Tags"])
|
|
36
|
+
else:
|
|
37
|
+
raise DeserializationError("TagResourceRequest.tags required")
|
|
38
|
+
return out
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#Tags``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING, TypeAlias
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
import capo_lambda_web.types.tag_key
|
|
7
|
+
|
|
8
|
+
Tags: TypeAlias = dict["capo_lambda_web.types.tag_key.TagKey", "str"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(input_to_serialize: Tags) -> dict:
|
|
13
|
+
out: dict = {}
|
|
14
|
+
for key, value in input_to_serialize.items():
|
|
15
|
+
out[key] = value
|
|
16
|
+
return out
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def deserialize_json(data: dict) -> Tags:
|
|
20
|
+
out: Tags = {}
|
|
21
|
+
for key, value in data.items():
|
|
22
|
+
if value is None:
|
|
23
|
+
continue
|
|
24
|
+
out[key] = value
|
|
25
|
+
return out
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#TelemetryConfig``."""
|
|
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.logging_config
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TelemetryConfig(TypedDict, closed=True):
|
|
12
|
+
logging_config: NotRequired["capo_lambda_web.types.logging_config.LoggingConfig"]
|
|
13
|
+
"""<p>The logging configuration for the web function.</p>"""
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# --- restJson1 ser/de ---
|
|
17
|
+
def serialize_json(value: TelemetryConfig) -> dict:
|
|
18
|
+
out: dict = {}
|
|
19
|
+
if "logging_config" in value:
|
|
20
|
+
import capo_lambda_web.types.logging_config
|
|
21
|
+
|
|
22
|
+
out["loggingConfig"] = capo_lambda_web.types.logging_config.serialize_json(
|
|
23
|
+
value["logging_config"]
|
|
24
|
+
)
|
|
25
|
+
return out
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def deserialize_json(data: dict) -> TelemetryConfig:
|
|
29
|
+
out: TelemetryConfig = {} # type: ignore[typeddict-item]
|
|
30
|
+
if data.get("loggingConfig") is not None:
|
|
31
|
+
import capo_lambda_web.types.logging_config
|
|
32
|
+
|
|
33
|
+
out["logging_config"] = capo_lambda_web.types.logging_config.deserialize_json(
|
|
34
|
+
data["loggingConfig"]
|
|
35
|
+
)
|
|
36
|
+
return out
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#ThrottleConfig``."""
|
|
2
|
+
|
|
3
|
+
from typing_extensions import NotRequired, TypedDict
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ThrottleConfig(TypedDict, closed=True):
|
|
7
|
+
rate_limit: NotRequired["int"]
|
|
8
|
+
"""<p>The maximum request rate per second for the endpoint. The value must be one of the following supported values: <code>0</code>, <code>100</code>, <code>200</code>, <code>300</code>, <code>400</code>, <code>500</code>, <code>600</code>, <code>700</code>, <code>800</code>, <code>900</code>, <code>1000</code>, <code>2000</code>, <code>3000</code>, <code>4000</code>, <code>5000</code>, <code>6000</code>, <code>7000</code>, <code>8000</code>, <code>9000</code>, or <code>10000</code>. The maximum effective value is also bounded by your account-level maximum total rate limit. There is no default value. If you don't specify a value, the throttling configuration is absent from the response. On an update, omit <code>throttleConfig</code> to keep the current value, or specify an empty object to clear a previously set value.</p>"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# --- restJson1 ser/de ---
|
|
12
|
+
def serialize_json(value: ThrottleConfig) -> dict:
|
|
13
|
+
out: dict = {}
|
|
14
|
+
if "rate_limit" in value:
|
|
15
|
+
out["rateLimit"] = value["rate_limit"]
|
|
16
|
+
return out
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def deserialize_json(data: dict) -> ThrottleConfig:
|
|
20
|
+
out: ThrottleConfig = {} # type: ignore[typeddict-item]
|
|
21
|
+
if data.get("rateLimit") is not None:
|
|
22
|
+
out["rate_limit"] = data["rateLimit"]
|
|
23
|
+
return out
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#UntagResourceRequest``."""
|
|
2
|
+
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
from typing_extensions import TypedDict
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
import capo_lambda_web.types.resource_arn
|
|
9
|
+
import capo_lambda_web.types.tag_key_list
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class UntagResourceRequest(TypedDict, closed=True):
|
|
13
|
+
resource: "capo_lambda_web.types.resource_arn.ResourceArn"
|
|
14
|
+
"""<p>The Amazon Resource Name (ARN) of the web function.</p>"""
|
|
15
|
+
tag_keys: "capo_lambda_web.types.tag_key_list.TagKeyList"
|
|
16
|
+
"""<p>A list of tag keys to remove from the web function.</p>"""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# --- restJson1 ser/de ---
|
|
20
|
+
def serialize_json(value: UntagResourceRequest) -> dict:
|
|
21
|
+
out: dict = {}
|
|
22
|
+
return out
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def deserialize_json(data: dict) -> UntagResourceRequest:
|
|
26
|
+
out: UntagResourceRequest = {} # type: ignore[typeddict-item]
|
|
27
|
+
return out
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"""Generated from Smithy shape ``com.amazonaws.lambdaweb#UpdateWebFunctionEndpointRequest``."""
|
|
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.auth_type
|
|
9
|
+
import capo_lambda_web.types.auto_deployment_mode
|
|
10
|
+
import capo_lambda_web.types.description
|
|
11
|
+
import capo_lambda_web.types.endpoint_name
|
|
12
|
+
import capo_lambda_web.types.function_name
|
|
13
|
+
import capo_lambda_web.types.revision_weight_list
|
|
14
|
+
import capo_lambda_web.types.scaling_config
|
|
15
|
+
import capo_lambda_web.types.throttle_config
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class UpdateWebFunctionEndpointRequest(TypedDict, closed=True):
|
|
19
|
+
function_name: "capo_lambda_web.types.function_name.FunctionName"
|
|
20
|
+
"""<p>The name of the web function. You can specify the function name or the function ARN. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length.</p>"""
|
|
21
|
+
endpoint_name: "capo_lambda_web.types.endpoint_name.EndpointName"
|
|
22
|
+
"""<p>The name of the endpoint to update. You can specify the endpoint name or the endpoint ARN. The length constraint applies only to the full ARN. If you specify only the endpoint name, it is limited to 64 characters in length.</p>"""
|
|
23
|
+
description: NotRequired["capo_lambda_web.types.description.Description"]
|
|
24
|
+
"""<p>A description of the endpoint.</p>"""
|
|
25
|
+
auth_type: NotRequired["capo_lambda_web.types.auth_type.AuthType"]
|
|
26
|
+
"""<p>The authorization type for the endpoint.</p>"""
|
|
27
|
+
auto_deployment_mode: NotRequired[
|
|
28
|
+
"capo_lambda_web.types.auto_deployment_mode.AutoDeploymentMode"
|
|
29
|
+
]
|
|
30
|
+
"""<p>The auto-deployment mode for the endpoint.</p>"""
|
|
31
|
+
revision_weights: NotRequired[
|
|
32
|
+
"capo_lambda_web.types.revision_weight_list.RevisionWeightList"
|
|
33
|
+
]
|
|
34
|
+
"""<p>A list of revision weights that determine how traffic is distributed across revisions.</p>"""
|
|
35
|
+
scaling_config: NotRequired["capo_lambda_web.types.scaling_config.ScalingConfig"]
|
|
36
|
+
"""<p>The scaling configuration for the endpoint. Omit this field to keep the current scaling configuration. To clear a previously set <code>maxEnvironments</code> value, specify an empty object.</p>"""
|
|
37
|
+
throttle_config: NotRequired["capo_lambda_web.types.throttle_config.ThrottleConfig"]
|
|
38
|
+
"""<p>The throttling configuration for the endpoint. Omit this field to keep the current throttling configuration. To clear a previously set <code>rateLimit</code> value, specify an empty object.</p>"""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# --- restJson1 ser/de ---
|
|
42
|
+
def serialize_json(value: UpdateWebFunctionEndpointRequest) -> dict:
|
|
43
|
+
out: dict = {}
|
|
44
|
+
if "description" in value:
|
|
45
|
+
out["description"] = value["description"]
|
|
46
|
+
if "auth_type" in value:
|
|
47
|
+
import capo_lambda_web.types.auth_type
|
|
48
|
+
|
|
49
|
+
out["authType"] = capo_lambda_web.types.auth_type.serialize_json(
|
|
50
|
+
value["auth_type"]
|
|
51
|
+
)
|
|
52
|
+
if "auto_deployment_mode" in value:
|
|
53
|
+
import capo_lambda_web.types.auto_deployment_mode
|
|
54
|
+
|
|
55
|
+
out["autoDeploymentMode"] = (
|
|
56
|
+
capo_lambda_web.types.auto_deployment_mode.serialize_json(
|
|
57
|
+
value["auto_deployment_mode"]
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
if "revision_weights" in value:
|
|
61
|
+
import capo_lambda_web.types.revision_weight_list
|
|
62
|
+
|
|
63
|
+
out["revisionWeights"] = (
|
|
64
|
+
capo_lambda_web.types.revision_weight_list.serialize_json(
|
|
65
|
+
value["revision_weights"]
|
|
66
|
+
)
|
|
67
|
+
)
|
|
68
|
+
if "scaling_config" in value:
|
|
69
|
+
import capo_lambda_web.types.scaling_config
|
|
70
|
+
|
|
71
|
+
out["scalingConfig"] = capo_lambda_web.types.scaling_config.serialize_json(
|
|
72
|
+
value["scaling_config"]
|
|
73
|
+
)
|
|
74
|
+
if "throttle_config" in value:
|
|
75
|
+
import capo_lambda_web.types.throttle_config
|
|
76
|
+
|
|
77
|
+
out["throttleConfig"] = capo_lambda_web.types.throttle_config.serialize_json(
|
|
78
|
+
value["throttle_config"]
|
|
79
|
+
)
|
|
80
|
+
return out
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def deserialize_json(data: dict) -> UpdateWebFunctionEndpointRequest:
|
|
84
|
+
out: UpdateWebFunctionEndpointRequest = {} # type: ignore[typeddict-item]
|
|
85
|
+
if data.get("description") is not None:
|
|
86
|
+
out["description"] = data["description"]
|
|
87
|
+
if data.get("authType") is not None:
|
|
88
|
+
import capo_lambda_web.types.auth_type
|
|
89
|
+
|
|
90
|
+
out["auth_type"] = capo_lambda_web.types.auth_type.deserialize_json(
|
|
91
|
+
data["authType"]
|
|
92
|
+
)
|
|
93
|
+
if data.get("autoDeploymentMode") is not None:
|
|
94
|
+
import capo_lambda_web.types.auto_deployment_mode
|
|
95
|
+
|
|
96
|
+
out["auto_deployment_mode"] = (
|
|
97
|
+
capo_lambda_web.types.auto_deployment_mode.deserialize_json(
|
|
98
|
+
data["autoDeploymentMode"]
|
|
99
|
+
)
|
|
100
|
+
)
|
|
101
|
+
if data.get("revisionWeights") is not None:
|
|
102
|
+
import capo_lambda_web.types.revision_weight_list
|
|
103
|
+
|
|
104
|
+
out["revision_weights"] = (
|
|
105
|
+
capo_lambda_web.types.revision_weight_list.deserialize_json(
|
|
106
|
+
data["revisionWeights"]
|
|
107
|
+
)
|
|
108
|
+
)
|
|
109
|
+
if data.get("scalingConfig") is not None:
|
|
110
|
+
import capo_lambda_web.types.scaling_config
|
|
111
|
+
|
|
112
|
+
out["scaling_config"] = capo_lambda_web.types.scaling_config.deserialize_json(
|
|
113
|
+
data["scalingConfig"]
|
|
114
|
+
)
|
|
115
|
+
if data.get("throttleConfig") is not None:
|
|
116
|
+
import capo_lambda_web.types.throttle_config
|
|
117
|
+
|
|
118
|
+
out["throttle_config"] = capo_lambda_web.types.throttle_config.deserialize_json(
|
|
119
|
+
data["throttleConfig"]
|
|
120
|
+
)
|
|
121
|
+
return out
|