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.
Files changed (154) hide show
  1. capo_lambda_web/__init__.py +71 -0
  2. capo_lambda_web/_async.py +25 -0
  3. capo_lambda_web/_auth/_identity.py +16 -0
  4. capo_lambda_web/_auth/_providers.py +886 -0
  5. capo_lambda_web/_auth/_signers.py +121 -0
  6. capo_lambda_web/_auth/_sigv4.py +579 -0
  7. capo_lambda_web/_auth/_zapros_handler.py +80 -0
  8. capo_lambda_web/_body.py +221 -0
  9. capo_lambda_web/_iter.py +113 -0
  10. capo_lambda_web/_operations/lambda_web/create_web_function.py +184 -0
  11. capo_lambda_web/_operations/lambda_web/create_web_function_endpoint.py +194 -0
  12. capo_lambda_web/_operations/lambda_web/create_web_function_revision.py +188 -0
  13. capo_lambda_web/_operations/lambda_web/delete_resource_policy.py +147 -0
  14. capo_lambda_web/_operations/lambda_web/delete_web_function.py +145 -0
  15. capo_lambda_web/_operations/lambda_web/delete_web_function_endpoint.py +149 -0
  16. capo_lambda_web/_operations/lambda_web/delete_web_function_revision.py +149 -0
  17. capo_lambda_web/_operations/lambda_web/get_resource_policy.py +165 -0
  18. capo_lambda_web/_operations/lambda_web/get_web_account_settings.py +155 -0
  19. capo_lambda_web/_operations/lambda_web/get_web_function.py +171 -0
  20. capo_lambda_web/_operations/lambda_web/get_web_function_endpoint.py +180 -0
  21. capo_lambda_web/_operations/lambda_web/get_web_function_revision.py +174 -0
  22. capo_lambda_web/_operations/lambda_web/list_tags.py +164 -0
  23. capo_lambda_web/_operations/lambda_web/list_web_function_endpoints.py +176 -0
  24. capo_lambda_web/_operations/lambda_web/list_web_function_revisions.py +176 -0
  25. capo_lambda_web/_operations/lambda_web/list_web_functions.py +168 -0
  26. capo_lambda_web/_operations/lambda_web/put_resource_policy.py +179 -0
  27. capo_lambda_web/_operations/lambda_web/tag_resource.py +155 -0
  28. capo_lambda_web/_operations/lambda_web/untag_resource.py +148 -0
  29. capo_lambda_web/_operations/lambda_web/update_web_function_endpoint.py +196 -0
  30. capo_lambda_web/_pagination.py +21 -0
  31. capo_lambda_web/_protocol/__init__.py +1 -0
  32. capo_lambda_web/_protocol/errors.py +93 -0
  33. capo_lambda_web/_protocol/eventstream.py +240 -0
  34. capo_lambda_web/_protocol/serialize.py +47 -0
  35. capo_lambda_web/_protocol/xml.py +33 -0
  36. capo_lambda_web/_resources/lambda_web/web_function.py +477 -0
  37. capo_lambda_web/_rule_engine/__init__.py +0 -0
  38. capo_lambda_web/_rule_engine/_aws_partition.py +160 -0
  39. capo_lambda_web/_rule_engine/_endpoint_rule_set.py +135 -0
  40. capo_lambda_web/_rule_engine/_endpoint_runtime.py +389 -0
  41. capo_lambda_web/_services/_aws_config.py +160 -0
  42. capo_lambda_web/_services/_pipeline.py +264 -0
  43. capo_lambda_web/_services/async_lambda_web.py +1394 -0
  44. capo_lambda_web/_services/lambda_web.py +1374 -0
  45. capo_lambda_web/errors/__init__.py +36 -0
  46. capo_lambda_web/errors/_base.py +94 -0
  47. capo_lambda_web/errors/access_denied_exception.py +48 -0
  48. capo_lambda_web/errors/conflict_exception.py +58 -0
  49. capo_lambda_web/errors/internal_server_exception.py +47 -0
  50. capo_lambda_web/errors/resource_not_found_exception.py +60 -0
  51. capo_lambda_web/errors/service_quota_exceeded_exception.py +74 -0
  52. capo_lambda_web/errors/throttling_exception.py +60 -0
  53. capo_lambda_web/errors/validation_exception.py +46 -0
  54. capo_lambda_web/py.typed +0 -0
  55. capo_lambda_web/types/_prelude/blob.py +12 -0
  56. capo_lambda_web/types/_prelude/timestamp.py +17 -0
  57. capo_lambda_web/types/account_quotas.py +47 -0
  58. capo_lambda_web/types/account_usage.py +26 -0
  59. capo_lambda_web/types/application_log_level.py +22 -0
  60. capo_lambda_web/types/auth_type.py +18 -0
  61. capo_lambda_web/types/auto_deployment_mode.py +18 -0
  62. capo_lambda_web/types/build_config.py +55 -0
  63. capo_lambda_web/types/code_config.py +37 -0
  64. capo_lambda_web/types/create_web_function_endpoint_request.py +164 -0
  65. capo_lambda_web/types/create_web_function_endpoint_response.py +291 -0
  66. capo_lambda_web/types/create_web_function_request.py +72 -0
  67. capo_lambda_web/types/create_web_function_response.py +144 -0
  68. capo_lambda_web/types/create_web_function_revision_request.py +76 -0
  69. capo_lambda_web/types/create_web_function_revision_response.py +157 -0
  70. capo_lambda_web/types/date_time.py +20 -0
  71. capo_lambda_web/types/delete_resource_policy_request.py +29 -0
  72. capo_lambda_web/types/delete_web_function_endpoint_request.py +27 -0
  73. capo_lambda_web/types/delete_web_function_request.py +24 -0
  74. capo_lambda_web/types/delete_web_function_revision_request.py +27 -0
  75. capo_lambda_web/types/description.py +5 -0
  76. capo_lambda_web/types/domain_name.py +5 -0
  77. capo_lambda_web/types/endpoint_arn.py +5 -0
  78. capo_lambda_web/types/endpoint_config.py +134 -0
  79. capo_lambda_web/types/endpoint_name.py +5 -0
  80. capo_lambda_web/types/endpoint_state.py +20 -0
  81. capo_lambda_web/types/endpoint_type.py +19 -0
  82. capo_lambda_web/types/endpoint_update_status.py +19 -0
  83. capo_lambda_web/types/environment_variables.py +22 -0
  84. capo_lambda_web/types/filter.py +46 -0
  85. capo_lambda_web/types/filter_list.py +29 -0
  86. capo_lambda_web/types/filter_value_list.py +14 -0
  87. capo_lambda_web/types/function_arn.py +5 -0
  88. capo_lambda_web/types/function_endpoint_summary.py +249 -0
  89. capo_lambda_web/types/function_endpoint_summary_list.py +33 -0
  90. capo_lambda_web/types/function_name.py +5 -0
  91. capo_lambda_web/types/function_revision_summary.py +83 -0
  92. capo_lambda_web/types/function_revision_summary_list.py +33 -0
  93. capo_lambda_web/types/function_state.py +20 -0
  94. capo_lambda_web/types/function_summary.py +91 -0
  95. capo_lambda_web/types/function_summary_list.py +31 -0
  96. capo_lambda_web/types/get_resource_policy_request.py +24 -0
  97. capo_lambda_web/types/get_resource_policy_response.py +39 -0
  98. capo_lambda_web/types/get_web_account_settings_request.py +18 -0
  99. capo_lambda_web/types/get_web_account_settings_response.py +59 -0
  100. capo_lambda_web/types/get_web_function_endpoint_request.py +27 -0
  101. capo_lambda_web/types/get_web_function_endpoint_response.py +285 -0
  102. capo_lambda_web/types/get_web_function_request.py +24 -0
  103. capo_lambda_web/types/get_web_function_response.py +91 -0
  104. capo_lambda_web/types/get_web_function_revision_request.py +27 -0
  105. capo_lambda_web/types/get_web_function_revision_response.py +155 -0
  106. capo_lambda_web/types/kms_key_arn.py +5 -0
  107. capo_lambda_web/types/list_tags_request.py +24 -0
  108. capo_lambda_web/types/list_tags_response.py +32 -0
  109. capo_lambda_web/types/list_web_function_endpoints_request.py +54 -0
  110. capo_lambda_web/types/list_web_function_endpoints_response.py +52 -0
  111. capo_lambda_web/types/list_web_function_revisions_request.py +54 -0
  112. capo_lambda_web/types/list_web_function_revisions_response.py +52 -0
  113. capo_lambda_web/types/list_web_functions_request.py +51 -0
  114. capo_lambda_web/types/list_web_functions_response.py +46 -0
  115. capo_lambda_web/types/logging_config.py +67 -0
  116. capo_lambda_web/types/max_results.py +5 -0
  117. capo_lambda_web/types/next_token.py +5 -0
  118. capo_lambda_web/types/policy_revision_id.py +5 -0
  119. capo_lambda_web/types/put_resource_policy_request.py +43 -0
  120. capo_lambda_web/types/put_resource_policy_response.py +39 -0
  121. capo_lambda_web/types/region.py +5 -0
  122. capo_lambda_web/types/region_list.py +17 -0
  123. capo_lambda_web/types/regional_endpoint.py +140 -0
  124. capo_lambda_web/types/regional_endpoints.py +33 -0
  125. capo_lambda_web/types/resource_arn.py +5 -0
  126. capo_lambda_web/types/resource_policy.py +5 -0
  127. capo_lambda_web/types/revision_arn.py +5 -0
  128. capo_lambda_web/types/revision_config.py +69 -0
  129. capo_lambda_web/types/revision_error.py +40 -0
  130. capo_lambda_web/types/revision_errors.py +29 -0
  131. capo_lambda_web/types/revision_id.py +5 -0
  132. capo_lambda_web/types/revision_state.py +19 -0
  133. capo_lambda_web/types/revision_weight.py +38 -0
  134. capo_lambda_web/types/revision_weight_list.py +31 -0
  135. capo_lambda_web/types/role_arn.py +5 -0
  136. capo_lambda_web/types/runtime_config.py +26 -0
  137. capo_lambda_web/types/s3_object.py +39 -0
  138. capo_lambda_web/types/scaling_config.py +23 -0
  139. capo_lambda_web/types/service_config.py +87 -0
  140. capo_lambda_web/types/system_log_level.py +19 -0
  141. capo_lambda_web/types/tag_key.py +5 -0
  142. capo_lambda_web/types/tag_key_list.py +17 -0
  143. capo_lambda_web/types/tag_resource_request.py +38 -0
  144. capo_lambda_web/types/tags.py +25 -0
  145. capo_lambda_web/types/telemetry_config.py +36 -0
  146. capo_lambda_web/types/throttle_config.py +23 -0
  147. capo_lambda_web/types/untag_resource_request.py +27 -0
  148. capo_lambda_web/types/update_web_function_endpoint_request.py +121 -0
  149. capo_lambda_web/types/update_web_function_endpoint_response.py +291 -0
  150. capo_lambda_web-0.2.0.dist-info/METADATA +104 -0
  151. capo_lambda_web-0.2.0.dist-info/RECORD +154 -0
  152. capo_lambda_web-0.2.0.dist-info/WHEEL +5 -0
  153. capo_lambda_web-0.2.0.dist-info/licenses/LICENSE +21 -0
  154. capo_lambda_web-0.2.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1394 @@
1
+ """Generated from Smithy shape ``com.amazonaws.lambdaweb#LambdaWeb``."""
2
+
3
+ import warnings
4
+ from collections.abc import AsyncIterator
5
+ from typing import TYPE_CHECKING, Any, Iterable, Optional
6
+
7
+ from typing_extensions import Self, TypedDict
8
+ from zapros import AsyncBaseHandler, AsyncClient
9
+
10
+ import capo_lambda_web._auth._signers
11
+ import capo_lambda_web._auth._sigv4
12
+ from capo_lambda_web._auth._identity import Credentials
13
+ from capo_lambda_web._auth._providers import (
14
+ CredentialsProvider,
15
+ IdentityProvider,
16
+ StaticAwsCredentialsProvider,
17
+ default_aws_credentials_chain,
18
+ )
19
+ from capo_lambda_web._auth._zapros_handler import AuthMiddleware
20
+ from capo_lambda_web._pagination import resolve_path as _resolve_path
21
+ from capo_lambda_web._resources.lambda_web.web_function import AsyncWebFunction
22
+ from capo_lambda_web._services._aws_config import aaws_config
23
+ from capo_lambda_web._services._pipeline import (
24
+ AsyncInterceptor,
25
+ AsyncOperationOptions,
26
+ AsyncOperationRequest,
27
+ AsyncOperationResponse,
28
+ aexecute_pipeline,
29
+ aretry,
30
+ )
31
+
32
+ if TYPE_CHECKING:
33
+ import capo_lambda_web.types.auth_type
34
+ import capo_lambda_web.types.auto_deployment_mode
35
+ import capo_lambda_web.types.build_config
36
+ import capo_lambda_web.types.create_web_function_endpoint_request
37
+ import capo_lambda_web.types.create_web_function_endpoint_response
38
+ import capo_lambda_web.types.create_web_function_request
39
+ import capo_lambda_web.types.create_web_function_response
40
+ import capo_lambda_web.types.create_web_function_revision_request
41
+ import capo_lambda_web.types.create_web_function_revision_response
42
+ import capo_lambda_web.types.delete_resource_policy_request
43
+ import capo_lambda_web.types.delete_web_function_endpoint_request
44
+ import capo_lambda_web.types.delete_web_function_request
45
+ import capo_lambda_web.types.delete_web_function_revision_request
46
+ import capo_lambda_web.types.description
47
+ import capo_lambda_web.types.endpoint_config
48
+ import capo_lambda_web.types.endpoint_name
49
+ import capo_lambda_web.types.endpoint_type
50
+ import capo_lambda_web.types.filter_list
51
+ import capo_lambda_web.types.function_endpoint_summary
52
+ import capo_lambda_web.types.function_name
53
+ import capo_lambda_web.types.function_revision_summary
54
+ import capo_lambda_web.types.function_summary
55
+ import capo_lambda_web.types.get_resource_policy_request
56
+ import capo_lambda_web.types.get_resource_policy_response
57
+ import capo_lambda_web.types.get_web_account_settings_request
58
+ import capo_lambda_web.types.get_web_account_settings_response
59
+ import capo_lambda_web.types.get_web_function_endpoint_request
60
+ import capo_lambda_web.types.get_web_function_endpoint_response
61
+ import capo_lambda_web.types.get_web_function_request
62
+ import capo_lambda_web.types.get_web_function_response
63
+ import capo_lambda_web.types.get_web_function_revision_request
64
+ import capo_lambda_web.types.get_web_function_revision_response
65
+ import capo_lambda_web.types.kms_key_arn
66
+ import capo_lambda_web.types.list_tags_request
67
+ import capo_lambda_web.types.list_tags_response
68
+ import capo_lambda_web.types.list_web_function_endpoints_request
69
+ import capo_lambda_web.types.list_web_function_endpoints_response
70
+ import capo_lambda_web.types.list_web_function_revisions_request
71
+ import capo_lambda_web.types.list_web_function_revisions_response
72
+ import capo_lambda_web.types.list_web_functions_request
73
+ import capo_lambda_web.types.list_web_functions_response
74
+ import capo_lambda_web.types.max_results
75
+ import capo_lambda_web.types.next_token
76
+ import capo_lambda_web.types.policy_revision_id
77
+ import capo_lambda_web.types.put_resource_policy_request
78
+ import capo_lambda_web.types.put_resource_policy_response
79
+ import capo_lambda_web.types.region_list
80
+ import capo_lambda_web.types.resource_arn
81
+ import capo_lambda_web.types.resource_policy
82
+ import capo_lambda_web.types.revision_config
83
+ import capo_lambda_web.types.revision_id
84
+ import capo_lambda_web.types.revision_weight_list
85
+ import capo_lambda_web.types.scaling_config
86
+ import capo_lambda_web.types.service_config
87
+ import capo_lambda_web.types.tag_key_list
88
+ import capo_lambda_web.types.tag_resource_request
89
+ import capo_lambda_web.types.tags
90
+ import capo_lambda_web.types.throttle_config
91
+ import capo_lambda_web.types.untag_resource_request
92
+ import capo_lambda_web.types.update_web_function_endpoint_request
93
+ import capo_lambda_web.types.update_web_function_endpoint_response
94
+
95
+
96
+ class AsyncLambdaWebClientConfig(TypedDict, total=False, closed=True):
97
+ operation_interceptors: Iterable[AsyncInterceptor[Any, Any]]
98
+ retry_max_attempts: int | None
99
+ region: str | None
100
+ use_dual_stack: bool | None
101
+ use_fips: bool | None
102
+ endpoint: str | None
103
+ credentials_provider: IdentityProvider[Credentials] | None
104
+
105
+
106
+ class AsyncLambdaWebClient:
107
+ """A client for the ``LambdaWeb`` service.
108
+
109
+ Args:
110
+ http_handler: HTTP handler for sending requests. If not provided, creates a default handler.
111
+ operation_interceptors: Interceptors that wrap every operation call. If not provided, defaults to an empty list.
112
+ retry_max_attempts: Maximum number of times to retry a failed operation. Defaults to 3.
113
+ region: The value of the ``AWS::Region`` endpoint parameter.
114
+ use_dual_stack: The value of the ``AWS::UseDualStack`` endpoint parameter.
115
+ use_fips: The value of the ``AWS::UseFIPS`` endpoint parameter.
116
+ endpoint: The value of the ``SDK::Endpoint`` endpoint parameter.
117
+ credentials: AWS credentials for request signing.
118
+ credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
119
+ """
120
+
121
+ def __init__(
122
+ self,
123
+ http_handler: AsyncBaseHandler | None = None,
124
+ operation_interceptors: Iterable[AsyncInterceptor[Any, Any]] | None = None,
125
+ retry_max_attempts: int | None = None,
126
+ region: str | None = None,
127
+ use_dual_stack: bool | None = None,
128
+ use_fips: bool | None = None,
129
+ endpoint: str | None = None,
130
+ credentials: Credentials | None = None,
131
+ credentials_provider: CredentialsProvider | None = None,
132
+ ):
133
+ self._client = AsyncClient(http_handler).wrap_with_middleware(
134
+ lambda next: AuthMiddleware(next)
135
+ )
136
+ if credentials is not None and credentials_provider is not None:
137
+ warnings.warn(
138
+ "Both credentials and credentials_provider given; provider takes precedence"
139
+ )
140
+ resolved_credentials_provider: IdentityProvider[Credentials] | None = (
141
+ credentials_provider
142
+ )
143
+ if resolved_credentials_provider is None and credentials is not None:
144
+ resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
145
+ if resolved_credentials_provider is None and credentials is None:
146
+ resolved_credentials_provider = default_aws_credentials_chain(
147
+ AsyncClient(http_handler)
148
+ )
149
+ self._config = AsyncLambdaWebClientConfig(
150
+ {
151
+ "operation_interceptors": operation_interceptors or [],
152
+ "retry_max_attempts": retry_max_attempts,
153
+ "region": region,
154
+ "use_dual_stack": use_dual_stack,
155
+ "use_fips": use_fips,
156
+ "endpoint": endpoint,
157
+ "credentials_provider": resolved_credentials_provider,
158
+ }
159
+ )
160
+
161
+ # resources
162
+ self.web_function = AsyncWebFunction(self)
163
+
164
+ def operation_options(
165
+ self, config_overrides: Optional[AsyncLambdaWebClientConfig] = None
166
+ ) -> tuple[Iterable[AsyncInterceptor[Any, Any]], AsyncOperationOptions]:
167
+ overrides: AsyncLambdaWebClientConfig = config_overrides or {}
168
+ interceptors_: list[AsyncInterceptor[Any, Any]] = [
169
+ *overrides.get(
170
+ "operation_interceptors", self._config.get("operation_interceptors", [])
171
+ ),
172
+ aaws_config(),
173
+ aretry(),
174
+ ]
175
+ options_: AsyncOperationOptions = AsyncOperationOptions(
176
+ client=self._client,
177
+ retry_max_attempts=overrides.get(
178
+ "retry_max_attempts", self._config.get("retry_max_attempts")
179
+ ),
180
+ region=overrides.get("region", self._config.get("region")),
181
+ use_dual_stack=overrides.get(
182
+ "use_dual_stack", self._config.get("use_dual_stack")
183
+ ),
184
+ use_fips=overrides.get("use_fips", self._config.get("use_fips")),
185
+ endpoint=overrides.get("endpoint", self._config.get("endpoint")),
186
+ credentials_provider=overrides.get(
187
+ "credentials_provider", self._config.get("credentials_provider")
188
+ ),
189
+ )
190
+ return interceptors_, options_
191
+
192
+ async def delete_resource_policy(
193
+ self,
194
+ resource_arn: "capo_lambda_web.types.resource_arn.ResourceArn",
195
+ *,
196
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
197
+ revision_id: Optional[
198
+ "capo_lambda_web.types.policy_revision_id.PolicyRevisionId"
199
+ ] = None,
200
+ ) -> None:
201
+ """<p>Removes the resource-based policy from a web function.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
202
+
203
+ Args:
204
+ resource_arn: <p>The Amazon Resource Name (ARN) of the web function.</p>
205
+ revision_id: <p>The revision ID of the policy. Use this to prevent deleting a policy that has been updated since you last retrieved it. If you don't specify a value, the policy is deleted regardless of its current revision.</p>
206
+
207
+ Raises:
208
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
209
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
210
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
211
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
212
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
213
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
214
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
215
+ """
216
+
217
+ async def _handler(
218
+ req: "AsyncOperationRequest[capo_lambda_web.types.delete_resource_policy_request.DeleteResourcePolicyRequest]",
219
+ ) -> AsyncOperationResponse[None]:
220
+ import capo_lambda_web._operations.lambda_web.delete_resource_policy
221
+
222
+ (
223
+ output,
224
+ http_response,
225
+ ) = await capo_lambda_web._operations.lambda_web.delete_resource_policy.async_delete_resource_policy(
226
+ req.options, req.input
227
+ )
228
+ return AsyncOperationResponse(output=output, response=http_response)
229
+
230
+ interceptors_, options_ = self.operation_options(config_overrides)
231
+ input_: capo_lambda_web.types.delete_resource_policy_request.DeleteResourcePolicyRequest = {
232
+ "resource_arn": resource_arn
233
+ }
234
+ if revision_id is not None:
235
+ input_["revision_id"] = revision_id
236
+
237
+ response = await aexecute_pipeline(
238
+ AsyncOperationRequest(input=input_, options=options_),
239
+ handler=_handler,
240
+ interceptors=list(interceptors_),
241
+ )
242
+ await response.response.aclose()
243
+ return response.output
244
+
245
+ async def get_resource_policy(
246
+ self,
247
+ resource_arn: "capo_lambda_web.types.resource_arn.ResourceArn",
248
+ *,
249
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
250
+ ) -> "capo_lambda_web.types.get_resource_policy_response.GetResourcePolicyResponse":
251
+ """<p>Retrieves the resource-based policy attached to a web function.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
252
+
253
+ Args:
254
+ resource_arn: <p>The Amazon Resource Name (ARN) of the web function.</p>
255
+
256
+ Raises:
257
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
258
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
259
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
260
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
261
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
262
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
263
+ """
264
+
265
+ async def _handler(
266
+ req: "AsyncOperationRequest[capo_lambda_web.types.get_resource_policy_request.GetResourcePolicyRequest]",
267
+ ) -> AsyncOperationResponse[
268
+ "capo_lambda_web.types.get_resource_policy_response.GetResourcePolicyResponse"
269
+ ]:
270
+ import capo_lambda_web._operations.lambda_web.get_resource_policy
271
+
272
+ (
273
+ output,
274
+ http_response,
275
+ ) = await capo_lambda_web._operations.lambda_web.get_resource_policy.async_get_resource_policy(
276
+ req.options, req.input
277
+ )
278
+ return AsyncOperationResponse(output=output, response=http_response)
279
+
280
+ interceptors_, options_ = self.operation_options(config_overrides)
281
+ input_: capo_lambda_web.types.get_resource_policy_request.GetResourcePolicyRequest = {
282
+ "resource_arn": resource_arn
283
+ }
284
+
285
+ response = await aexecute_pipeline(
286
+ AsyncOperationRequest(input=input_, options=options_),
287
+ handler=_handler,
288
+ interceptors=list(interceptors_),
289
+ )
290
+ await response.response.aclose()
291
+ return response.output
292
+
293
+ async def get_web_account_settings(
294
+ self, *, config_overrides: Optional[AsyncLambdaWebClientConfig] = None
295
+ ) -> "capo_lambda_web.types.get_web_account_settings_response.GetWebAccountSettingsResponse":
296
+ """<p>Retrieves details about your AWS Lambda Web Functions account settings for the current AWS Region, including the quotas that apply to web functions and your current usage.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
297
+
298
+ Raises:
299
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
300
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
301
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
302
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
303
+ """
304
+
305
+ async def _handler(
306
+ req: "AsyncOperationRequest[capo_lambda_web.types.get_web_account_settings_request.GetWebAccountSettingsRequest]",
307
+ ) -> AsyncOperationResponse[
308
+ "capo_lambda_web.types.get_web_account_settings_response.GetWebAccountSettingsResponse"
309
+ ]:
310
+ import capo_lambda_web._operations.lambda_web.get_web_account_settings
311
+
312
+ (
313
+ output,
314
+ http_response,
315
+ ) = await capo_lambda_web._operations.lambda_web.get_web_account_settings.async_get_web_account_settings(
316
+ req.options, req.input
317
+ )
318
+ return AsyncOperationResponse(output=output, response=http_response)
319
+
320
+ interceptors_, options_ = self.operation_options(config_overrides)
321
+ input_: capo_lambda_web.types.get_web_account_settings_request.GetWebAccountSettingsRequest = {}
322
+
323
+ response = await aexecute_pipeline(
324
+ AsyncOperationRequest(input=input_, options=options_),
325
+ handler=_handler,
326
+ interceptors=list(interceptors_),
327
+ )
328
+ await response.response.aclose()
329
+ return response.output
330
+
331
+ async def list_tags(
332
+ self,
333
+ resource: "capo_lambda_web.types.resource_arn.ResourceArn",
334
+ *,
335
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
336
+ ) -> "capo_lambda_web.types.list_tags_response.ListTagsResponse":
337
+ """<p>Returns a list of tags applied to a web function.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
338
+
339
+ Args:
340
+ resource: <p>The Amazon Resource Name (ARN) of the web function.</p>
341
+
342
+ Raises:
343
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
344
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
345
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
346
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
347
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
348
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
349
+ """
350
+
351
+ async def _handler(
352
+ req: "AsyncOperationRequest[capo_lambda_web.types.list_tags_request.ListTagsRequest]",
353
+ ) -> AsyncOperationResponse[
354
+ "capo_lambda_web.types.list_tags_response.ListTagsResponse"
355
+ ]:
356
+ import capo_lambda_web._operations.lambda_web.list_tags
357
+
358
+ (
359
+ output,
360
+ http_response,
361
+ ) = await capo_lambda_web._operations.lambda_web.list_tags.async_list_tags(
362
+ req.options, req.input
363
+ )
364
+ return AsyncOperationResponse(output=output, response=http_response)
365
+
366
+ interceptors_, options_ = self.operation_options(config_overrides)
367
+ input_: capo_lambda_web.types.list_tags_request.ListTagsRequest = {
368
+ "resource": resource
369
+ }
370
+
371
+ response = await aexecute_pipeline(
372
+ AsyncOperationRequest(input=input_, options=options_),
373
+ handler=_handler,
374
+ interceptors=list(interceptors_),
375
+ )
376
+ await response.response.aclose()
377
+ return response.output
378
+
379
+ async def put_resource_policy(
380
+ self,
381
+ resource_arn: "capo_lambda_web.types.resource_arn.ResourceArn",
382
+ policy: "capo_lambda_web.types.resource_policy.ResourcePolicy",
383
+ *,
384
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
385
+ revision_id: Optional[
386
+ "capo_lambda_web.types.policy_revision_id.PolicyRevisionId"
387
+ ] = None,
388
+ ) -> "capo_lambda_web.types.put_resource_policy_response.PutResourcePolicyResponse":
389
+ """<p>Adds or updates a resource-based policy on a web function. A resource-based policy grants permissions to other AWS accounts or services to perform actions on the web function.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
390
+
391
+ Args:
392
+ resource_arn: <p>The Amazon Resource Name (ARN) of the web function.</p>
393
+ policy: <p>The JSON-formatted resource-based policy to attach to the web function.</p>
394
+ revision_id: <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>
395
+
396
+ Raises:
397
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
398
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
399
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
400
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
401
+ capo_lambda_web.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota was exceeded. Request a quota increase or reduce usage and try again.</p>
402
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
403
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
404
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
405
+ """
406
+
407
+ async def _handler(
408
+ req: "AsyncOperationRequest[capo_lambda_web.types.put_resource_policy_request.PutResourcePolicyRequest]",
409
+ ) -> AsyncOperationResponse[
410
+ "capo_lambda_web.types.put_resource_policy_response.PutResourcePolicyResponse"
411
+ ]:
412
+ import capo_lambda_web._operations.lambda_web.put_resource_policy
413
+
414
+ (
415
+ output,
416
+ http_response,
417
+ ) = await capo_lambda_web._operations.lambda_web.put_resource_policy.async_put_resource_policy(
418
+ req.options, req.input
419
+ )
420
+ return AsyncOperationResponse(output=output, response=http_response)
421
+
422
+ interceptors_, options_ = self.operation_options(config_overrides)
423
+ input_: capo_lambda_web.types.put_resource_policy_request.PutResourcePolicyRequest = {
424
+ "resource_arn": resource_arn,
425
+ "policy": policy,
426
+ }
427
+ if revision_id is not None:
428
+ input_["revision_id"] = revision_id
429
+
430
+ response = await aexecute_pipeline(
431
+ AsyncOperationRequest(input=input_, options=options_),
432
+ handler=_handler,
433
+ interceptors=list(interceptors_),
434
+ )
435
+ await response.response.aclose()
436
+ return response.output
437
+
438
+ async def tag_resource(
439
+ self,
440
+ resource: "capo_lambda_web.types.resource_arn.ResourceArn",
441
+ tags: "capo_lambda_web.types.tags.Tags",
442
+ *,
443
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
444
+ ) -> None:
445
+ """<p>Adds tags to a web function. If a tag key already exists, the existing value is overwritten with the new value.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
446
+
447
+ Args:
448
+ resource: <p>The Amazon Resource Name (ARN) of the web function.</p>
449
+ tags: <p>A map of tag keys and values to add to the web function.</p>
450
+
451
+ Raises:
452
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
453
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
454
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
455
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
456
+ capo_lambda_web.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota was exceeded. Request a quota increase or reduce usage and try again.</p>
457
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
458
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
459
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
460
+ """
461
+
462
+ async def _handler(
463
+ req: "AsyncOperationRequest[capo_lambda_web.types.tag_resource_request.TagResourceRequest]",
464
+ ) -> AsyncOperationResponse[None]:
465
+ import capo_lambda_web._operations.lambda_web.tag_resource
466
+
467
+ (
468
+ output,
469
+ http_response,
470
+ ) = await capo_lambda_web._operations.lambda_web.tag_resource.async_tag_resource(
471
+ req.options, req.input
472
+ )
473
+ return AsyncOperationResponse(output=output, response=http_response)
474
+
475
+ interceptors_, options_ = self.operation_options(config_overrides)
476
+ input_: capo_lambda_web.types.tag_resource_request.TagResourceRequest = {
477
+ "resource": resource,
478
+ "tags": tags,
479
+ }
480
+
481
+ response = await aexecute_pipeline(
482
+ AsyncOperationRequest(input=input_, options=options_),
483
+ handler=_handler,
484
+ interceptors=list(interceptors_),
485
+ )
486
+ await response.response.aclose()
487
+ return response.output
488
+
489
+ async def untag_resource(
490
+ self,
491
+ resource: "capo_lambda_web.types.resource_arn.ResourceArn",
492
+ tag_keys: "capo_lambda_web.types.tag_key_list.TagKeyList",
493
+ *,
494
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
495
+ ) -> None:
496
+ """<p>Removes tags from a web function.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
497
+
498
+ Args:
499
+ resource: <p>The Amazon Resource Name (ARN) of the web function.</p>
500
+ tag_keys: <p>A list of tag keys to remove from the web function.</p>
501
+
502
+ Raises:
503
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
504
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
505
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
506
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
507
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
508
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
509
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
510
+ """
511
+
512
+ async def _handler(
513
+ req: "AsyncOperationRequest[capo_lambda_web.types.untag_resource_request.UntagResourceRequest]",
514
+ ) -> AsyncOperationResponse[None]:
515
+ import capo_lambda_web._operations.lambda_web.untag_resource
516
+
517
+ (
518
+ output,
519
+ http_response,
520
+ ) = await capo_lambda_web._operations.lambda_web.untag_resource.async_untag_resource(
521
+ req.options, req.input
522
+ )
523
+ return AsyncOperationResponse(output=output, response=http_response)
524
+
525
+ interceptors_, options_ = self.operation_options(config_overrides)
526
+ input_: capo_lambda_web.types.untag_resource_request.UntagResourceRequest = {
527
+ "resource": resource,
528
+ "tag_keys": tag_keys,
529
+ }
530
+
531
+ response = await aexecute_pipeline(
532
+ AsyncOperationRequest(input=input_, options=options_),
533
+ handler=_handler,
534
+ interceptors=list(interceptors_),
535
+ )
536
+ await response.response.aclose()
537
+ return response.output
538
+
539
+ async def create_web_function(
540
+ self,
541
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
542
+ *,
543
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
544
+ revision_config: Optional[
545
+ "capo_lambda_web.types.revision_config.RevisionConfig"
546
+ ] = None,
547
+ endpoint_config: Optional[
548
+ "capo_lambda_web.types.endpoint_config.EndpointConfig"
549
+ ] = None,
550
+ tags: Optional["capo_lambda_web.types.tags.Tags"] = None,
551
+ ) -> "capo_lambda_web.types.create_web_function_response.CreateWebFunctionResponse":
552
+ """<p>Creates a web function with an initial revision and endpoint. To create a web function, you provide the function name, revision configuration (code and service settings), and endpoint configuration.</p> <p>To use this operation, you must have the <code>CreateWebFunction</code> permission on the web function. You don't need separate permissions for the initial revision or endpoint.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
553
+
554
+ Args:
555
+ function_name: <p>The name of the web function. The name can contain letters, numbers, hyphens (-), and underscores (_), and can't begin or end with a hyphen or an underscore. 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>
556
+ revision_config: <p>The configuration for the initial revision of the web function, including code and service settings.</p>
557
+ endpoint_config: <p>The configuration for the initial endpoint of the web function.</p>
558
+ tags: <p>A map of tag keys and values to apply to the web function.</p>
559
+
560
+ Raises:
561
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
562
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
563
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
564
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
565
+ capo_lambda_web.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota was exceeded. Request a quota increase or reduce usage and try again.</p>
566
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
567
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
568
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
569
+ """
570
+
571
+ async def _handler(
572
+ req: "AsyncOperationRequest[capo_lambda_web.types.create_web_function_request.CreateWebFunctionRequest]",
573
+ ) -> AsyncOperationResponse[
574
+ "capo_lambda_web.types.create_web_function_response.CreateWebFunctionResponse"
575
+ ]:
576
+ import capo_lambda_web._operations.lambda_web.create_web_function
577
+
578
+ (
579
+ output,
580
+ http_response,
581
+ ) = await capo_lambda_web._operations.lambda_web.create_web_function.async_create_web_function(
582
+ req.options, req.input
583
+ )
584
+ return AsyncOperationResponse(output=output, response=http_response)
585
+
586
+ interceptors_, options_ = self.operation_options(config_overrides)
587
+ input_: capo_lambda_web.types.create_web_function_request.CreateWebFunctionRequest = {
588
+ "function_name": function_name
589
+ }
590
+ if revision_config is not None:
591
+ input_["revision_config"] = revision_config
592
+ if endpoint_config is not None:
593
+ input_["endpoint_config"] = endpoint_config
594
+ if tags is not None:
595
+ input_["tags"] = tags
596
+
597
+ response = await aexecute_pipeline(
598
+ AsyncOperationRequest(input=input_, options=options_),
599
+ handler=_handler,
600
+ interceptors=list(interceptors_),
601
+ )
602
+ await response.response.aclose()
603
+ return response.output
604
+
605
+ async def get_web_function(
606
+ self,
607
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
608
+ *,
609
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
610
+ ) -> "capo_lambda_web.types.get_web_function_response.GetWebFunctionResponse":
611
+ """<p>Retrieves details about a web function, including its current state and configuration.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
612
+
613
+ Args:
614
+ function_name: <p>The name of the web function to retrieve. 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>
615
+
616
+ Raises:
617
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
618
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
619
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
620
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
621
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
622
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
623
+ """
624
+
625
+ async def _handler(
626
+ req: "AsyncOperationRequest[capo_lambda_web.types.get_web_function_request.GetWebFunctionRequest]",
627
+ ) -> AsyncOperationResponse[
628
+ "capo_lambda_web.types.get_web_function_response.GetWebFunctionResponse"
629
+ ]:
630
+ import capo_lambda_web._operations.lambda_web.get_web_function
631
+
632
+ (
633
+ output,
634
+ http_response,
635
+ ) = await capo_lambda_web._operations.lambda_web.get_web_function.async_get_web_function(
636
+ req.options, req.input
637
+ )
638
+ return AsyncOperationResponse(output=output, response=http_response)
639
+
640
+ interceptors_, options_ = self.operation_options(config_overrides)
641
+ input_: capo_lambda_web.types.get_web_function_request.GetWebFunctionRequest = {
642
+ "function_name": function_name
643
+ }
644
+
645
+ response = await aexecute_pipeline(
646
+ AsyncOperationRequest(input=input_, options=options_),
647
+ handler=_handler,
648
+ interceptors=list(interceptors_),
649
+ )
650
+ await response.response.aclose()
651
+ return response.output
652
+
653
+ async def delete_web_function(
654
+ self,
655
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
656
+ *,
657
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
658
+ ) -> None:
659
+ """<p>Deletes a web function and all of its associated revisions and endpoints.</p> <p>To use this operation, you must have the <code>DeleteWebFunction</code> permission on the web function. You don't need the <code>DeleteWebFunctionRevision</code> or <code>DeleteWebFunctionEndpoint</code> permission.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
660
+
661
+ Args:
662
+ function_name: <p>The name of the web function to delete. 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>
663
+
664
+ Raises:
665
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
666
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
667
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
668
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
669
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
670
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
671
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
672
+ """
673
+
674
+ async def _handler(
675
+ req: "AsyncOperationRequest[capo_lambda_web.types.delete_web_function_request.DeleteWebFunctionRequest]",
676
+ ) -> AsyncOperationResponse[None]:
677
+ import capo_lambda_web._operations.lambda_web.delete_web_function
678
+
679
+ (
680
+ output,
681
+ http_response,
682
+ ) = await capo_lambda_web._operations.lambda_web.delete_web_function.async_delete_web_function(
683
+ req.options, req.input
684
+ )
685
+ return AsyncOperationResponse(output=output, response=http_response)
686
+
687
+ interceptors_, options_ = self.operation_options(config_overrides)
688
+ input_: capo_lambda_web.types.delete_web_function_request.DeleteWebFunctionRequest = {
689
+ "function_name": function_name
690
+ }
691
+
692
+ response = await aexecute_pipeline(
693
+ AsyncOperationRequest(input=input_, options=options_),
694
+ handler=_handler,
695
+ interceptors=list(interceptors_),
696
+ )
697
+ await response.response.aclose()
698
+ return response.output
699
+
700
+ async def list_web_functions(
701
+ self,
702
+ *,
703
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
704
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
705
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
706
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
707
+ ) -> "capo_lambda_web.types.list_web_functions_response.ListWebFunctionsResponse":
708
+ """<p>Lists web functions in your account. We recommend using pagination to ensure that the operation returns quickly and successfully.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
709
+
710
+ Args:
711
+ filters: <p>A list of filters to apply to the results. The only supported filter name is <code>state</code>.</p>
712
+ max_results: <p>The maximum number of results to return in a single call. Minimum value of 1, maximum value of 50. Default is 50.</p>
713
+ next_token: <p>The pagination token that's returned by a previous request to retrieve the next page of results.</p>
714
+
715
+ Raises:
716
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
717
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
718
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
719
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
720
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
721
+ """
722
+
723
+ async def _handler(
724
+ req: "AsyncOperationRequest[capo_lambda_web.types.list_web_functions_request.ListWebFunctionsRequest]",
725
+ ) -> AsyncOperationResponse[
726
+ "capo_lambda_web.types.list_web_functions_response.ListWebFunctionsResponse"
727
+ ]:
728
+ import capo_lambda_web._operations.lambda_web.list_web_functions
729
+
730
+ (
731
+ output,
732
+ http_response,
733
+ ) = await capo_lambda_web._operations.lambda_web.list_web_functions.async_list_web_functions(
734
+ req.options, req.input
735
+ )
736
+ return AsyncOperationResponse(output=output, response=http_response)
737
+
738
+ interceptors_, options_ = self.operation_options(config_overrides)
739
+ input_: capo_lambda_web.types.list_web_functions_request.ListWebFunctionsRequest = {}
740
+ if filters is not None:
741
+ input_["filters"] = filters
742
+ if max_results is not None:
743
+ input_["max_results"] = max_results
744
+ if next_token is not None:
745
+ input_["next_token"] = next_token
746
+
747
+ response = await aexecute_pipeline(
748
+ AsyncOperationRequest(input=input_, options=options_),
749
+ handler=_handler,
750
+ interceptors=list(interceptors_),
751
+ )
752
+ await response.response.aclose()
753
+ return response.output
754
+
755
+ async def iter_list_web_functions(
756
+ self,
757
+ *,
758
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
759
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
760
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
761
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
762
+ ) -> "AsyncIterator[capo_lambda_web.types.function_summary.FunctionSummary]":
763
+ _token = next_token
764
+ while True:
765
+ _response = await self.list_web_functions(
766
+ config_overrides=config_overrides,
767
+ filters=filters,
768
+ max_results=max_results,
769
+ next_token=_token,
770
+ )
771
+ _page = _resolve_path(_response, ("functions",))
772
+ for _item in _page or []:
773
+ yield _item
774
+ _token = _resolve_path(_response, ("next_token",))
775
+ if not _token:
776
+ break
777
+
778
+ async def create_web_function_endpoint(
779
+ self,
780
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
781
+ endpoint_name: "capo_lambda_web.types.endpoint_name.EndpointName",
782
+ endpoint_type: "capo_lambda_web.types.endpoint_type.EndpointType",
783
+ auth_type: "capo_lambda_web.types.auth_type.AuthType",
784
+ *,
785
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
786
+ description: Optional["capo_lambda_web.types.description.Description"] = None,
787
+ auto_deployment_mode: Optional[
788
+ "capo_lambda_web.types.auto_deployment_mode.AutoDeploymentMode"
789
+ ] = None,
790
+ revision_weights: Optional[
791
+ "capo_lambda_web.types.revision_weight_list.RevisionWeightList"
792
+ ] = None,
793
+ regions: Optional["capo_lambda_web.types.region_list.RegionList"] = None,
794
+ scaling_config: Optional[
795
+ "capo_lambda_web.types.scaling_config.ScalingConfig"
796
+ ] = None,
797
+ throttle_config: Optional[
798
+ "capo_lambda_web.types.throttle_config.ThrottleConfig"
799
+ ] = None,
800
+ ) -> "capo_lambda_web.types.create_web_function_endpoint_response.CreateWebFunctionEndpointResponse":
801
+ """<p>Creates an endpoint for a web function. An endpoint exposes the web function over HTTPS and routes traffic to one or more revisions.</p> <p>To use this operation, you must have the <code>CreateWebFunctionEndpoint</code> permission on the web function, not on the endpoint being created.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
802
+
803
+ Args:
804
+ function_name: <p>The name of the web function to create the endpoint for. 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>
805
+ endpoint_name: <p>The name of the endpoint to create. The name can contain letters, numbers, hyphens (-), and underscores (_), and can't begin or end with a hyphen or an underscore. 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>
806
+ description: <p>A description of the endpoint.</p>
807
+ endpoint_type: <p>The type of endpoint to create. Determines how traffic is served and routed across Regions.</p>
808
+ auth_type: <p>The authorization type for the endpoint.</p>
809
+ auto_deployment_mode: <p>The auto-deployment mode for the endpoint. Controls whether the endpoint automatically serves the newest revision. If you don't specify a value, the default is <code>Disabled</code>, and this default is returned in the response.</p>
810
+ revision_weights: <p>A list of revision weights that determine how traffic is distributed across revisions. Up to two revisions can be specified for canary or blue-green deployments.</p>
811
+ regions: <p>The list of Regions for the endpoint. Required when the endpoint type is <code>MultiRegion</code> or <code>PerRegion</code>: specify at least one Region other than the Region where you create the endpoint (the home Region). The home Region is added automatically if you don't include it; specifying only the home Region isn't allowed. When the endpoint type is <code>HomeRegion</code>, omit this field or specify only the home Region.</p>
812
+ scaling_config: <p>The scaling configuration for the endpoint. There is no default value. If you don't specify a scaling configuration, it is absent from the response.</p>
813
+ throttle_config: <p>The throttling configuration for the endpoint. There is no default value. If you don't specify a throttling configuration, it is absent from the response.</p>
814
+
815
+ Raises:
816
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
817
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
818
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
819
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
820
+ capo_lambda_web.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota was exceeded. Request a quota increase or reduce usage and try again.</p>
821
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
822
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
823
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
824
+ """
825
+
826
+ async def _handler(
827
+ req: "AsyncOperationRequest[capo_lambda_web.types.create_web_function_endpoint_request.CreateWebFunctionEndpointRequest]",
828
+ ) -> AsyncOperationResponse[
829
+ "capo_lambda_web.types.create_web_function_endpoint_response.CreateWebFunctionEndpointResponse"
830
+ ]:
831
+ import capo_lambda_web._operations.lambda_web.create_web_function_endpoint
832
+
833
+ (
834
+ output,
835
+ http_response,
836
+ ) = await capo_lambda_web._operations.lambda_web.create_web_function_endpoint.async_create_web_function_endpoint(
837
+ req.options, req.input
838
+ )
839
+ return AsyncOperationResponse(output=output, response=http_response)
840
+
841
+ interceptors_, options_ = self.operation_options(config_overrides)
842
+ input_: capo_lambda_web.types.create_web_function_endpoint_request.CreateWebFunctionEndpointRequest = {
843
+ "function_name": function_name,
844
+ "endpoint_name": endpoint_name,
845
+ "endpoint_type": endpoint_type,
846
+ "auth_type": auth_type,
847
+ }
848
+ if description is not None:
849
+ input_["description"] = description
850
+ if auto_deployment_mode is not None:
851
+ input_["auto_deployment_mode"] = auto_deployment_mode
852
+ if revision_weights is not None:
853
+ input_["revision_weights"] = revision_weights
854
+ if regions is not None:
855
+ input_["regions"] = regions
856
+ if scaling_config is not None:
857
+ input_["scaling_config"] = scaling_config
858
+ if throttle_config is not None:
859
+ input_["throttle_config"] = throttle_config
860
+
861
+ response = await aexecute_pipeline(
862
+ AsyncOperationRequest(input=input_, options=options_),
863
+ handler=_handler,
864
+ interceptors=list(interceptors_),
865
+ )
866
+ await response.response.aclose()
867
+ return response.output
868
+
869
+ async def get_web_function_endpoint(
870
+ self,
871
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
872
+ endpoint_name: "capo_lambda_web.types.endpoint_name.EndpointName",
873
+ *,
874
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
875
+ ) -> "capo_lambda_web.types.get_web_function_endpoint_response.GetWebFunctionEndpointResponse":
876
+ """<p>Retrieves details about a web function endpoint, including its current state, configuration, and domain name.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
877
+
878
+ Args:
879
+ function_name: <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>
880
+ endpoint_name: <p>The name of the endpoint to retrieve. 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>
881
+
882
+ Raises:
883
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
884
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
885
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
886
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
887
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
888
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
889
+ """
890
+
891
+ async def _handler(
892
+ req: "AsyncOperationRequest[capo_lambda_web.types.get_web_function_endpoint_request.GetWebFunctionEndpointRequest]",
893
+ ) -> AsyncOperationResponse[
894
+ "capo_lambda_web.types.get_web_function_endpoint_response.GetWebFunctionEndpointResponse"
895
+ ]:
896
+ import capo_lambda_web._operations.lambda_web.get_web_function_endpoint
897
+
898
+ (
899
+ output,
900
+ http_response,
901
+ ) = await capo_lambda_web._operations.lambda_web.get_web_function_endpoint.async_get_web_function_endpoint(
902
+ req.options, req.input
903
+ )
904
+ return AsyncOperationResponse(output=output, response=http_response)
905
+
906
+ interceptors_, options_ = self.operation_options(config_overrides)
907
+ input_: capo_lambda_web.types.get_web_function_endpoint_request.GetWebFunctionEndpointRequest = {
908
+ "function_name": function_name,
909
+ "endpoint_name": endpoint_name,
910
+ }
911
+
912
+ response = await aexecute_pipeline(
913
+ AsyncOperationRequest(input=input_, options=options_),
914
+ handler=_handler,
915
+ interceptors=list(interceptors_),
916
+ )
917
+ await response.response.aclose()
918
+ return response.output
919
+
920
+ async def update_web_function_endpoint(
921
+ self,
922
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
923
+ endpoint_name: "capo_lambda_web.types.endpoint_name.EndpointName",
924
+ *,
925
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
926
+ description: Optional["capo_lambda_web.types.description.Description"] = None,
927
+ auth_type: Optional["capo_lambda_web.types.auth_type.AuthType"] = None,
928
+ auto_deployment_mode: Optional[
929
+ "capo_lambda_web.types.auto_deployment_mode.AutoDeploymentMode"
930
+ ] = None,
931
+ revision_weights: Optional[
932
+ "capo_lambda_web.types.revision_weight_list.RevisionWeightList"
933
+ ] = None,
934
+ scaling_config: Optional[
935
+ "capo_lambda_web.types.scaling_config.ScalingConfig"
936
+ ] = None,
937
+ throttle_config: Optional[
938
+ "capo_lambda_web.types.throttle_config.ThrottleConfig"
939
+ ] = None,
940
+ ) -> "capo_lambda_web.types.update_web_function_endpoint_response.UpdateWebFunctionEndpointResponse":
941
+ """<p>Updates the configuration of a web function endpoint. You can modify the authorization type, auto-deployment mode, revision weights, scaling, and throttling settings.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
942
+
943
+ Args:
944
+ function_name: <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>
945
+ endpoint_name: <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>
946
+ description: <p>A description of the endpoint.</p>
947
+ auth_type: <p>The authorization type for the endpoint.</p>
948
+ auto_deployment_mode: <p>The auto-deployment mode for the endpoint.</p>
949
+ revision_weights: <p>A list of revision weights that determine how traffic is distributed across revisions.</p>
950
+ scaling_config: <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>
951
+ throttle_config: <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>
952
+
953
+ Raises:
954
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
955
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
956
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
957
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
958
+ capo_lambda_web.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota was exceeded. Request a quota increase or reduce usage and try again.</p>
959
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
960
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
961
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
962
+ """
963
+
964
+ async def _handler(
965
+ req: "AsyncOperationRequest[capo_lambda_web.types.update_web_function_endpoint_request.UpdateWebFunctionEndpointRequest]",
966
+ ) -> AsyncOperationResponse[
967
+ "capo_lambda_web.types.update_web_function_endpoint_response.UpdateWebFunctionEndpointResponse"
968
+ ]:
969
+ import capo_lambda_web._operations.lambda_web.update_web_function_endpoint
970
+
971
+ (
972
+ output,
973
+ http_response,
974
+ ) = await capo_lambda_web._operations.lambda_web.update_web_function_endpoint.async_update_web_function_endpoint(
975
+ req.options, req.input
976
+ )
977
+ return AsyncOperationResponse(output=output, response=http_response)
978
+
979
+ interceptors_, options_ = self.operation_options(config_overrides)
980
+ input_: capo_lambda_web.types.update_web_function_endpoint_request.UpdateWebFunctionEndpointRequest = {
981
+ "function_name": function_name,
982
+ "endpoint_name": endpoint_name,
983
+ }
984
+ if description is not None:
985
+ input_["description"] = description
986
+ if auth_type is not None:
987
+ input_["auth_type"] = auth_type
988
+ if auto_deployment_mode is not None:
989
+ input_["auto_deployment_mode"] = auto_deployment_mode
990
+ if revision_weights is not None:
991
+ input_["revision_weights"] = revision_weights
992
+ if scaling_config is not None:
993
+ input_["scaling_config"] = scaling_config
994
+ if throttle_config is not None:
995
+ input_["throttle_config"] = throttle_config
996
+
997
+ response = await aexecute_pipeline(
998
+ AsyncOperationRequest(input=input_, options=options_),
999
+ handler=_handler,
1000
+ interceptors=list(interceptors_),
1001
+ )
1002
+ await response.response.aclose()
1003
+ return response.output
1004
+
1005
+ async def delete_web_function_endpoint(
1006
+ self,
1007
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1008
+ endpoint_name: "capo_lambda_web.types.endpoint_name.EndpointName",
1009
+ *,
1010
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
1011
+ ) -> None:
1012
+ """<p>Deletes a web function endpoint.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
1013
+
1014
+ Args:
1015
+ function_name: <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>
1016
+ endpoint_name: <p>The name of the endpoint to delete. 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>
1017
+
1018
+ Raises:
1019
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1020
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
1021
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1022
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1023
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1024
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1025
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1026
+ """
1027
+
1028
+ async def _handler(
1029
+ req: "AsyncOperationRequest[capo_lambda_web.types.delete_web_function_endpoint_request.DeleteWebFunctionEndpointRequest]",
1030
+ ) -> AsyncOperationResponse[None]:
1031
+ import capo_lambda_web._operations.lambda_web.delete_web_function_endpoint
1032
+
1033
+ (
1034
+ output,
1035
+ http_response,
1036
+ ) = await capo_lambda_web._operations.lambda_web.delete_web_function_endpoint.async_delete_web_function_endpoint(
1037
+ req.options, req.input
1038
+ )
1039
+ return AsyncOperationResponse(output=output, response=http_response)
1040
+
1041
+ interceptors_, options_ = self.operation_options(config_overrides)
1042
+ input_: capo_lambda_web.types.delete_web_function_endpoint_request.DeleteWebFunctionEndpointRequest = {
1043
+ "function_name": function_name,
1044
+ "endpoint_name": endpoint_name,
1045
+ }
1046
+
1047
+ response = await aexecute_pipeline(
1048
+ AsyncOperationRequest(input=input_, options=options_),
1049
+ handler=_handler,
1050
+ interceptors=list(interceptors_),
1051
+ )
1052
+ await response.response.aclose()
1053
+ return response.output
1054
+
1055
+ async def list_web_function_endpoints(
1056
+ self,
1057
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1058
+ *,
1059
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
1060
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
1061
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
1062
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
1063
+ ) -> "capo_lambda_web.types.list_web_function_endpoints_response.ListWebFunctionEndpointsResponse":
1064
+ """<p>Lists endpoints for a web function. We recommend using pagination to ensure that the operation returns quickly and successfully.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
1065
+
1066
+ Args:
1067
+ function_name: <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>
1068
+ filters: <p>A list of filters to apply to the results. Supported filter names: <code>authType</code>, <code>autoDeploymentMode</code>, <code>endpointType</code>, <code>state</code>, and <code>updateStatus</code>.</p>
1069
+ max_results: <p>The maximum number of results to return in a single call. Minimum value of 1, maximum value of 50. Default is 50.</p>
1070
+ next_token: <p>The pagination token that's returned by a previous request to retrieve the next page of results.</p>
1071
+
1072
+ Raises:
1073
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1074
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1075
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1076
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1077
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1078
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1079
+ """
1080
+
1081
+ async def _handler(
1082
+ req: "AsyncOperationRequest[capo_lambda_web.types.list_web_function_endpoints_request.ListWebFunctionEndpointsRequest]",
1083
+ ) -> AsyncOperationResponse[
1084
+ "capo_lambda_web.types.list_web_function_endpoints_response.ListWebFunctionEndpointsResponse"
1085
+ ]:
1086
+ import capo_lambda_web._operations.lambda_web.list_web_function_endpoints
1087
+
1088
+ (
1089
+ output,
1090
+ http_response,
1091
+ ) = await capo_lambda_web._operations.lambda_web.list_web_function_endpoints.async_list_web_function_endpoints(
1092
+ req.options, req.input
1093
+ )
1094
+ return AsyncOperationResponse(output=output, response=http_response)
1095
+
1096
+ interceptors_, options_ = self.operation_options(config_overrides)
1097
+ input_: capo_lambda_web.types.list_web_function_endpoints_request.ListWebFunctionEndpointsRequest = {
1098
+ "function_name": function_name
1099
+ }
1100
+ if filters is not None:
1101
+ input_["filters"] = filters
1102
+ if max_results is not None:
1103
+ input_["max_results"] = max_results
1104
+ if next_token is not None:
1105
+ input_["next_token"] = next_token
1106
+
1107
+ response = await aexecute_pipeline(
1108
+ AsyncOperationRequest(input=input_, options=options_),
1109
+ handler=_handler,
1110
+ interceptors=list(interceptors_),
1111
+ )
1112
+ await response.response.aclose()
1113
+ return response.output
1114
+
1115
+ async def iter_list_web_function_endpoints(
1116
+ self,
1117
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1118
+ *,
1119
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
1120
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
1121
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
1122
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
1123
+ ) -> "AsyncIterator[capo_lambda_web.types.function_endpoint_summary.FunctionEndpointSummary]":
1124
+ _token = next_token
1125
+ while True:
1126
+ _response = await self.list_web_function_endpoints(
1127
+ function_name,
1128
+ config_overrides=config_overrides,
1129
+ filters=filters,
1130
+ max_results=max_results,
1131
+ next_token=_token,
1132
+ )
1133
+ _page = _resolve_path(_response, ("endpoints",))
1134
+ for _item in _page or []:
1135
+ yield _item
1136
+ _token = _resolve_path(_response, ("next_token",))
1137
+ if not _token:
1138
+ break
1139
+
1140
+ async def create_web_function_revision(
1141
+ self,
1142
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1143
+ build_config: "capo_lambda_web.types.build_config.BuildConfig",
1144
+ service_config: "capo_lambda_web.types.service_config.ServiceConfig",
1145
+ *,
1146
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
1147
+ description: Optional["capo_lambda_web.types.description.Description"] = None,
1148
+ kms_key_arn: Optional["capo_lambda_web.types.kms_key_arn.KmsKeyArn"] = None,
1149
+ ) -> "capo_lambda_web.types.create_web_function_revision_response.CreateWebFunctionRevisionResponse":
1150
+ """<p>Creates an immutable revision for a web function. A revision represents a specific version of the function code and configuration.</p> <p>To use this operation, you must have the <code>CreateWebFunctionRevision</code> permission on the web function, not on the revision being created.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
1151
+
1152
+ Args:
1153
+ function_name: <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>
1154
+ description: <p>A description of the revision.</p>
1155
+ kms_key_arn: <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>
1156
+ build_config: <p>The build configuration for the revision, including code location and runtime settings.</p>
1157
+ service_config: <p>The service configuration for the revision, including execution role, timeout, and concurrency settings.</p>
1158
+
1159
+ Raises:
1160
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1161
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
1162
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1163
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1164
+ capo_lambda_web.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>A service quota was exceeded. Request a quota increase or reduce usage and try again.</p>
1165
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1166
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1167
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1168
+ """
1169
+
1170
+ async def _handler(
1171
+ req: "AsyncOperationRequest[capo_lambda_web.types.create_web_function_revision_request.CreateWebFunctionRevisionRequest]",
1172
+ ) -> AsyncOperationResponse[
1173
+ "capo_lambda_web.types.create_web_function_revision_response.CreateWebFunctionRevisionResponse"
1174
+ ]:
1175
+ import capo_lambda_web._operations.lambda_web.create_web_function_revision
1176
+
1177
+ (
1178
+ output,
1179
+ http_response,
1180
+ ) = await capo_lambda_web._operations.lambda_web.create_web_function_revision.async_create_web_function_revision(
1181
+ req.options, req.input
1182
+ )
1183
+ return AsyncOperationResponse(output=output, response=http_response)
1184
+
1185
+ interceptors_, options_ = self.operation_options(config_overrides)
1186
+ input_: capo_lambda_web.types.create_web_function_revision_request.CreateWebFunctionRevisionRequest = {
1187
+ "function_name": function_name,
1188
+ "build_config": build_config,
1189
+ "service_config": service_config,
1190
+ }
1191
+ if description is not None:
1192
+ input_["description"] = description
1193
+ if kms_key_arn is not None:
1194
+ input_["kms_key_arn"] = kms_key_arn
1195
+
1196
+ response = await aexecute_pipeline(
1197
+ AsyncOperationRequest(input=input_, options=options_),
1198
+ handler=_handler,
1199
+ interceptors=list(interceptors_),
1200
+ )
1201
+ await response.response.aclose()
1202
+ return response.output
1203
+
1204
+ async def get_web_function_revision(
1205
+ self,
1206
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1207
+ revision_id: "capo_lambda_web.types.revision_id.RevisionId",
1208
+ *,
1209
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
1210
+ ) -> "capo_lambda_web.types.get_web_function_revision_response.GetWebFunctionRevisionResponse":
1211
+ """<p>Retrieves details about a web function revision, including its state and configuration.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
1212
+
1213
+ Args:
1214
+ function_name: <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>
1215
+ revision_id: <p>The identifier of the revision to retrieve. You can specify the revision identifier or the revision ARN. The length constraint applies only to the full ARN.</p>
1216
+
1217
+ Raises:
1218
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1219
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1220
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1221
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1222
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1223
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1224
+ """
1225
+
1226
+ async def _handler(
1227
+ req: "AsyncOperationRequest[capo_lambda_web.types.get_web_function_revision_request.GetWebFunctionRevisionRequest]",
1228
+ ) -> AsyncOperationResponse[
1229
+ "capo_lambda_web.types.get_web_function_revision_response.GetWebFunctionRevisionResponse"
1230
+ ]:
1231
+ import capo_lambda_web._operations.lambda_web.get_web_function_revision
1232
+
1233
+ (
1234
+ output,
1235
+ http_response,
1236
+ ) = await capo_lambda_web._operations.lambda_web.get_web_function_revision.async_get_web_function_revision(
1237
+ req.options, req.input
1238
+ )
1239
+ return AsyncOperationResponse(output=output, response=http_response)
1240
+
1241
+ interceptors_, options_ = self.operation_options(config_overrides)
1242
+ input_: capo_lambda_web.types.get_web_function_revision_request.GetWebFunctionRevisionRequest = {
1243
+ "function_name": function_name,
1244
+ "revision_id": revision_id,
1245
+ }
1246
+
1247
+ response = await aexecute_pipeline(
1248
+ AsyncOperationRequest(input=input_, options=options_),
1249
+ handler=_handler,
1250
+ interceptors=list(interceptors_),
1251
+ )
1252
+ await response.response.aclose()
1253
+ return response.output
1254
+
1255
+ async def delete_web_function_revision(
1256
+ self,
1257
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1258
+ revision_id: "capo_lambda_web.types.revision_id.RevisionId",
1259
+ *,
1260
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
1261
+ ) -> None:
1262
+ """<p>Deletes a web function revision. You cannot delete a revision that is currently serving traffic on an endpoint.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
1263
+
1264
+ Args:
1265
+ function_name: <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>
1266
+ revision_id: <p>The identifier of the revision to delete. You can specify the revision identifier or the revision ARN. The length constraint applies only to the full ARN.</p>
1267
+
1268
+ Raises:
1269
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1270
+ capo_lambda_web.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. Resolve the conflict and try again.</p>
1271
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1272
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1273
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1274
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1275
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1276
+ """
1277
+
1278
+ async def _handler(
1279
+ req: "AsyncOperationRequest[capo_lambda_web.types.delete_web_function_revision_request.DeleteWebFunctionRevisionRequest]",
1280
+ ) -> AsyncOperationResponse[None]:
1281
+ import capo_lambda_web._operations.lambda_web.delete_web_function_revision
1282
+
1283
+ (
1284
+ output,
1285
+ http_response,
1286
+ ) = await capo_lambda_web._operations.lambda_web.delete_web_function_revision.async_delete_web_function_revision(
1287
+ req.options, req.input
1288
+ )
1289
+ return AsyncOperationResponse(output=output, response=http_response)
1290
+
1291
+ interceptors_, options_ = self.operation_options(config_overrides)
1292
+ input_: capo_lambda_web.types.delete_web_function_revision_request.DeleteWebFunctionRevisionRequest = {
1293
+ "function_name": function_name,
1294
+ "revision_id": revision_id,
1295
+ }
1296
+
1297
+ response = await aexecute_pipeline(
1298
+ AsyncOperationRequest(input=input_, options=options_),
1299
+ handler=_handler,
1300
+ interceptors=list(interceptors_),
1301
+ )
1302
+ await response.response.aclose()
1303
+ return response.output
1304
+
1305
+ async def list_web_function_revisions(
1306
+ self,
1307
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1308
+ *,
1309
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
1310
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
1311
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
1312
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
1313
+ ) -> "capo_lambda_web.types.list_web_function_revisions_response.ListWebFunctionRevisionsResponse":
1314
+ """<p>Lists revisions for a web function. We recommend using pagination to ensure that the operation returns quickly and successfully.</p> <note> <p>This API is experimental and for internal AWS use only. It is not yet available to external customers.</p> </note>
1315
+
1316
+ Args:
1317
+ function_name: <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>
1318
+ filters: <p>A list of filters to apply to the results. The only supported filter name is <code>state</code>.</p>
1319
+ max_results: <p>The maximum number of results to return in a single call. Minimum value of 1, maximum value of 50. Default is 50.</p>
1320
+ next_token: <p>The pagination token that's returned by a previous request to retrieve the next page of results.</p>
1321
+
1322
+ Raises:
1323
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1324
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1325
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1326
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1327
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1328
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1329
+ """
1330
+
1331
+ async def _handler(
1332
+ req: "AsyncOperationRequest[capo_lambda_web.types.list_web_function_revisions_request.ListWebFunctionRevisionsRequest]",
1333
+ ) -> AsyncOperationResponse[
1334
+ "capo_lambda_web.types.list_web_function_revisions_response.ListWebFunctionRevisionsResponse"
1335
+ ]:
1336
+ import capo_lambda_web._operations.lambda_web.list_web_function_revisions
1337
+
1338
+ (
1339
+ output,
1340
+ http_response,
1341
+ ) = await capo_lambda_web._operations.lambda_web.list_web_function_revisions.async_list_web_function_revisions(
1342
+ req.options, req.input
1343
+ )
1344
+ return AsyncOperationResponse(output=output, response=http_response)
1345
+
1346
+ interceptors_, options_ = self.operation_options(config_overrides)
1347
+ input_: capo_lambda_web.types.list_web_function_revisions_request.ListWebFunctionRevisionsRequest = {
1348
+ "function_name": function_name
1349
+ }
1350
+ if filters is not None:
1351
+ input_["filters"] = filters
1352
+ if max_results is not None:
1353
+ input_["max_results"] = max_results
1354
+ if next_token is not None:
1355
+ input_["next_token"] = next_token
1356
+
1357
+ response = await aexecute_pipeline(
1358
+ AsyncOperationRequest(input=input_, options=options_),
1359
+ handler=_handler,
1360
+ interceptors=list(interceptors_),
1361
+ )
1362
+ await response.response.aclose()
1363
+ return response.output
1364
+
1365
+ async def iter_list_web_function_revisions(
1366
+ self,
1367
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1368
+ *,
1369
+ config_overrides: Optional[AsyncLambdaWebClientConfig] = None,
1370
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
1371
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
1372
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
1373
+ ) -> "AsyncIterator[capo_lambda_web.types.function_revision_summary.FunctionRevisionSummary]":
1374
+ _token = next_token
1375
+ while True:
1376
+ _response = await self.list_web_function_revisions(
1377
+ function_name,
1378
+ config_overrides=config_overrides,
1379
+ filters=filters,
1380
+ max_results=max_results,
1381
+ next_token=_token,
1382
+ )
1383
+ _page = _resolve_path(_response, ("revisions",))
1384
+ for _item in _page or []:
1385
+ yield _item
1386
+ _token = _resolve_path(_response, ("next_token",))
1387
+ if not _token:
1388
+ break
1389
+
1390
+ async def __aenter__(self) -> Self:
1391
+ return self
1392
+
1393
+ async def __aexit__(self, exc_type: Any, exc: Any, tb: Any):
1394
+ await self._client.aclose()