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,1374 @@
1
+ """Generated from Smithy shape ``com.amazonaws.lambdaweb#LambdaWeb``."""
2
+
3
+ import warnings
4
+ from collections.abc import Iterator
5
+ from typing import TYPE_CHECKING, Any, Iterable, Optional
6
+
7
+ from typing_extensions import Self, TypedDict
8
+ from zapros import BaseHandler, Client
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 WebFunction
22
+ from capo_lambda_web._services._aws_config import aws_config
23
+ from capo_lambda_web._services._pipeline import (
24
+ Interceptor,
25
+ OperationOptions,
26
+ OperationRequest,
27
+ OperationResponse,
28
+ execute_pipeline,
29
+ retry,
30
+ )
31
+
32
+ if TYPE_CHECKING:
33
+ import capo_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 LambdaWebClientConfig(TypedDict, total=False, closed=True):
97
+ operation_interceptors: Iterable[Interceptor[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 LambdaWebClient:
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: BaseHandler | None = None,
124
+ operation_interceptors: Iterable[Interceptor[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 = Client(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
+ Client(http_handler)
148
+ )
149
+ self._config = LambdaWebClientConfig(
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 = WebFunction(self)
163
+
164
+ def operation_options(
165
+ self, config_overrides: Optional[LambdaWebClientConfig] = None
166
+ ) -> tuple[Iterable[Interceptor[Any, Any]], OperationOptions]:
167
+ overrides: LambdaWebClientConfig = config_overrides or {}
168
+ interceptors_: list[Interceptor[Any, Any]] = [
169
+ *overrides.get(
170
+ "operation_interceptors", self._config.get("operation_interceptors", [])
171
+ ),
172
+ aws_config(),
173
+ retry(),
174
+ ]
175
+ options_: OperationOptions = OperationOptions(
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
+ def delete_resource_policy(
193
+ self,
194
+ resource_arn: "capo_lambda_web.types.resource_arn.ResourceArn",
195
+ *,
196
+ config_overrides: Optional[LambdaWebClientConfig] = 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
+ def _handler(
218
+ req: "OperationRequest[capo_lambda_web.types.delete_resource_policy_request.DeleteResourcePolicyRequest]",
219
+ ) -> OperationResponse[None]:
220
+ import capo_lambda_web._operations.lambda_web.delete_resource_policy
221
+
222
+ output, http_response = (
223
+ capo_lambda_web._operations.lambda_web.delete_resource_policy.delete_resource_policy(
224
+ req.options, req.input
225
+ )
226
+ )
227
+ return OperationResponse(output=output, response=http_response)
228
+
229
+ interceptors_, options_ = self.operation_options(config_overrides)
230
+ input_: capo_lambda_web.types.delete_resource_policy_request.DeleteResourcePolicyRequest = {
231
+ "resource_arn": resource_arn
232
+ }
233
+ if revision_id is not None:
234
+ input_["revision_id"] = revision_id
235
+
236
+ response = execute_pipeline(
237
+ OperationRequest(input=input_, options=options_),
238
+ handler=_handler,
239
+ interceptors=list(interceptors_),
240
+ )
241
+ response.response.close()
242
+ return response.output
243
+
244
+ def get_resource_policy(
245
+ self,
246
+ resource_arn: "capo_lambda_web.types.resource_arn.ResourceArn",
247
+ *,
248
+ config_overrides: Optional[LambdaWebClientConfig] = None,
249
+ ) -> "capo_lambda_web.types.get_resource_policy_response.GetResourcePolicyResponse":
250
+ """<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>
251
+
252
+ Args:
253
+ resource_arn: <p>The Amazon Resource Name (ARN) of the web function.</p>
254
+
255
+ Raises:
256
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
257
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
258
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
259
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
260
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
261
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
262
+ """
263
+
264
+ def _handler(
265
+ req: "OperationRequest[capo_lambda_web.types.get_resource_policy_request.GetResourcePolicyRequest]",
266
+ ) -> OperationResponse[
267
+ "capo_lambda_web.types.get_resource_policy_response.GetResourcePolicyResponse"
268
+ ]:
269
+ import capo_lambda_web._operations.lambda_web.get_resource_policy
270
+
271
+ output, http_response = (
272
+ capo_lambda_web._operations.lambda_web.get_resource_policy.get_resource_policy(
273
+ req.options, req.input
274
+ )
275
+ )
276
+ return OperationResponse(output=output, response=http_response)
277
+
278
+ interceptors_, options_ = self.operation_options(config_overrides)
279
+ input_: capo_lambda_web.types.get_resource_policy_request.GetResourcePolicyRequest = {
280
+ "resource_arn": resource_arn
281
+ }
282
+
283
+ response = execute_pipeline(
284
+ OperationRequest(input=input_, options=options_),
285
+ handler=_handler,
286
+ interceptors=list(interceptors_),
287
+ )
288
+ response.response.close()
289
+ return response.output
290
+
291
+ def get_web_account_settings(
292
+ self, *, config_overrides: Optional[LambdaWebClientConfig] = None
293
+ ) -> "capo_lambda_web.types.get_web_account_settings_response.GetWebAccountSettingsResponse":
294
+ """<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>
295
+
296
+ Raises:
297
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
298
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
299
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
300
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
301
+ """
302
+
303
+ def _handler(
304
+ req: "OperationRequest[capo_lambda_web.types.get_web_account_settings_request.GetWebAccountSettingsRequest]",
305
+ ) -> OperationResponse[
306
+ "capo_lambda_web.types.get_web_account_settings_response.GetWebAccountSettingsResponse"
307
+ ]:
308
+ import capo_lambda_web._operations.lambda_web.get_web_account_settings
309
+
310
+ output, http_response = (
311
+ capo_lambda_web._operations.lambda_web.get_web_account_settings.get_web_account_settings(
312
+ req.options, req.input
313
+ )
314
+ )
315
+ return OperationResponse(output=output, response=http_response)
316
+
317
+ interceptors_, options_ = self.operation_options(config_overrides)
318
+ input_: capo_lambda_web.types.get_web_account_settings_request.GetWebAccountSettingsRequest = {}
319
+
320
+ response = execute_pipeline(
321
+ OperationRequest(input=input_, options=options_),
322
+ handler=_handler,
323
+ interceptors=list(interceptors_),
324
+ )
325
+ response.response.close()
326
+ return response.output
327
+
328
+ def list_tags(
329
+ self,
330
+ resource: "capo_lambda_web.types.resource_arn.ResourceArn",
331
+ *,
332
+ config_overrides: Optional[LambdaWebClientConfig] = None,
333
+ ) -> "capo_lambda_web.types.list_tags_response.ListTagsResponse":
334
+ """<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>
335
+
336
+ Args:
337
+ resource: <p>The Amazon Resource Name (ARN) of the web function.</p>
338
+
339
+ Raises:
340
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
341
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
342
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
343
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
344
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
345
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
346
+ """
347
+
348
+ def _handler(
349
+ req: "OperationRequest[capo_lambda_web.types.list_tags_request.ListTagsRequest]",
350
+ ) -> OperationResponse[
351
+ "capo_lambda_web.types.list_tags_response.ListTagsResponse"
352
+ ]:
353
+ import capo_lambda_web._operations.lambda_web.list_tags
354
+
355
+ output, http_response = (
356
+ capo_lambda_web._operations.lambda_web.list_tags.list_tags(
357
+ req.options, req.input
358
+ )
359
+ )
360
+ return OperationResponse(output=output, response=http_response)
361
+
362
+ interceptors_, options_ = self.operation_options(config_overrides)
363
+ input_: capo_lambda_web.types.list_tags_request.ListTagsRequest = {
364
+ "resource": resource
365
+ }
366
+
367
+ response = execute_pipeline(
368
+ OperationRequest(input=input_, options=options_),
369
+ handler=_handler,
370
+ interceptors=list(interceptors_),
371
+ )
372
+ response.response.close()
373
+ return response.output
374
+
375
+ def put_resource_policy(
376
+ self,
377
+ resource_arn: "capo_lambda_web.types.resource_arn.ResourceArn",
378
+ policy: "capo_lambda_web.types.resource_policy.ResourcePolicy",
379
+ *,
380
+ config_overrides: Optional[LambdaWebClientConfig] = None,
381
+ revision_id: Optional[
382
+ "capo_lambda_web.types.policy_revision_id.PolicyRevisionId"
383
+ ] = None,
384
+ ) -> "capo_lambda_web.types.put_resource_policy_response.PutResourcePolicyResponse":
385
+ """<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>
386
+
387
+ Args:
388
+ resource_arn: <p>The Amazon Resource Name (ARN) of the web function.</p>
389
+ policy: <p>The JSON-formatted resource-based policy to attach to the web function.</p>
390
+ 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>
391
+
392
+ Raises:
393
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
394
+ 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>
395
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
396
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
397
+ 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>
398
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
399
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
400
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
401
+ """
402
+
403
+ def _handler(
404
+ req: "OperationRequest[capo_lambda_web.types.put_resource_policy_request.PutResourcePolicyRequest]",
405
+ ) -> OperationResponse[
406
+ "capo_lambda_web.types.put_resource_policy_response.PutResourcePolicyResponse"
407
+ ]:
408
+ import capo_lambda_web._operations.lambda_web.put_resource_policy
409
+
410
+ output, http_response = (
411
+ capo_lambda_web._operations.lambda_web.put_resource_policy.put_resource_policy(
412
+ req.options, req.input
413
+ )
414
+ )
415
+ return OperationResponse(output=output, response=http_response)
416
+
417
+ interceptors_, options_ = self.operation_options(config_overrides)
418
+ input_: capo_lambda_web.types.put_resource_policy_request.PutResourcePolicyRequest = {
419
+ "resource_arn": resource_arn,
420
+ "policy": policy,
421
+ }
422
+ if revision_id is not None:
423
+ input_["revision_id"] = revision_id
424
+
425
+ response = execute_pipeline(
426
+ OperationRequest(input=input_, options=options_),
427
+ handler=_handler,
428
+ interceptors=list(interceptors_),
429
+ )
430
+ response.response.close()
431
+ return response.output
432
+
433
+ def tag_resource(
434
+ self,
435
+ resource: "capo_lambda_web.types.resource_arn.ResourceArn",
436
+ tags: "capo_lambda_web.types.tags.Tags",
437
+ *,
438
+ config_overrides: Optional[LambdaWebClientConfig] = None,
439
+ ) -> None:
440
+ """<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>
441
+
442
+ Args:
443
+ resource: <p>The Amazon Resource Name (ARN) of the web function.</p>
444
+ tags: <p>A map of tag keys and values to add to the web function.</p>
445
+
446
+ Raises:
447
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
448
+ 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>
449
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
450
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
451
+ 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>
452
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
453
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
454
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
455
+ """
456
+
457
+ def _handler(
458
+ req: "OperationRequest[capo_lambda_web.types.tag_resource_request.TagResourceRequest]",
459
+ ) -> OperationResponse[None]:
460
+ import capo_lambda_web._operations.lambda_web.tag_resource
461
+
462
+ output, http_response = (
463
+ capo_lambda_web._operations.lambda_web.tag_resource.tag_resource(
464
+ req.options, req.input
465
+ )
466
+ )
467
+ return OperationResponse(output=output, response=http_response)
468
+
469
+ interceptors_, options_ = self.operation_options(config_overrides)
470
+ input_: capo_lambda_web.types.tag_resource_request.TagResourceRequest = {
471
+ "resource": resource,
472
+ "tags": tags,
473
+ }
474
+
475
+ response = execute_pipeline(
476
+ OperationRequest(input=input_, options=options_),
477
+ handler=_handler,
478
+ interceptors=list(interceptors_),
479
+ )
480
+ response.response.close()
481
+ return response.output
482
+
483
+ def untag_resource(
484
+ self,
485
+ resource: "capo_lambda_web.types.resource_arn.ResourceArn",
486
+ tag_keys: "capo_lambda_web.types.tag_key_list.TagKeyList",
487
+ *,
488
+ config_overrides: Optional[LambdaWebClientConfig] = None,
489
+ ) -> None:
490
+ """<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>
491
+
492
+ Args:
493
+ resource: <p>The Amazon Resource Name (ARN) of the web function.</p>
494
+ tag_keys: <p>A list of tag keys to remove from the web function.</p>
495
+
496
+ Raises:
497
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
498
+ 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>
499
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
500
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
501
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
502
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
503
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
504
+ """
505
+
506
+ def _handler(
507
+ req: "OperationRequest[capo_lambda_web.types.untag_resource_request.UntagResourceRequest]",
508
+ ) -> OperationResponse[None]:
509
+ import capo_lambda_web._operations.lambda_web.untag_resource
510
+
511
+ output, http_response = (
512
+ capo_lambda_web._operations.lambda_web.untag_resource.untag_resource(
513
+ req.options, req.input
514
+ )
515
+ )
516
+ return OperationResponse(output=output, response=http_response)
517
+
518
+ interceptors_, options_ = self.operation_options(config_overrides)
519
+ input_: capo_lambda_web.types.untag_resource_request.UntagResourceRequest = {
520
+ "resource": resource,
521
+ "tag_keys": tag_keys,
522
+ }
523
+
524
+ response = execute_pipeline(
525
+ OperationRequest(input=input_, options=options_),
526
+ handler=_handler,
527
+ interceptors=list(interceptors_),
528
+ )
529
+ response.response.close()
530
+ return response.output
531
+
532
+ def create_web_function(
533
+ self,
534
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
535
+ *,
536
+ config_overrides: Optional[LambdaWebClientConfig] = None,
537
+ revision_config: Optional[
538
+ "capo_lambda_web.types.revision_config.RevisionConfig"
539
+ ] = None,
540
+ endpoint_config: Optional[
541
+ "capo_lambda_web.types.endpoint_config.EndpointConfig"
542
+ ] = None,
543
+ tags: Optional["capo_lambda_web.types.tags.Tags"] = None,
544
+ ) -> "capo_lambda_web.types.create_web_function_response.CreateWebFunctionResponse":
545
+ """<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>
546
+
547
+ Args:
548
+ 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>
549
+ revision_config: <p>The configuration for the initial revision of the web function, including code and service settings.</p>
550
+ endpoint_config: <p>The configuration for the initial endpoint of the web function.</p>
551
+ tags: <p>A map of tag keys and values to apply to the web function.</p>
552
+
553
+ Raises:
554
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
555
+ 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>
556
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
557
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
558
+ 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>
559
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
560
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
561
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
562
+ """
563
+
564
+ def _handler(
565
+ req: "OperationRequest[capo_lambda_web.types.create_web_function_request.CreateWebFunctionRequest]",
566
+ ) -> OperationResponse[
567
+ "capo_lambda_web.types.create_web_function_response.CreateWebFunctionResponse"
568
+ ]:
569
+ import capo_lambda_web._operations.lambda_web.create_web_function
570
+
571
+ output, http_response = (
572
+ capo_lambda_web._operations.lambda_web.create_web_function.create_web_function(
573
+ req.options, req.input
574
+ )
575
+ )
576
+ return OperationResponse(output=output, response=http_response)
577
+
578
+ interceptors_, options_ = self.operation_options(config_overrides)
579
+ input_: capo_lambda_web.types.create_web_function_request.CreateWebFunctionRequest = {
580
+ "function_name": function_name
581
+ }
582
+ if revision_config is not None:
583
+ input_["revision_config"] = revision_config
584
+ if endpoint_config is not None:
585
+ input_["endpoint_config"] = endpoint_config
586
+ if tags is not None:
587
+ input_["tags"] = tags
588
+
589
+ response = execute_pipeline(
590
+ OperationRequest(input=input_, options=options_),
591
+ handler=_handler,
592
+ interceptors=list(interceptors_),
593
+ )
594
+ response.response.close()
595
+ return response.output
596
+
597
+ def get_web_function(
598
+ self,
599
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
600
+ *,
601
+ config_overrides: Optional[LambdaWebClientConfig] = None,
602
+ ) -> "capo_lambda_web.types.get_web_function_response.GetWebFunctionResponse":
603
+ """<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>
604
+
605
+ Args:
606
+ 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>
607
+
608
+ Raises:
609
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
610
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
611
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
612
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
613
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
614
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
615
+ """
616
+
617
+ def _handler(
618
+ req: "OperationRequest[capo_lambda_web.types.get_web_function_request.GetWebFunctionRequest]",
619
+ ) -> OperationResponse[
620
+ "capo_lambda_web.types.get_web_function_response.GetWebFunctionResponse"
621
+ ]:
622
+ import capo_lambda_web._operations.lambda_web.get_web_function
623
+
624
+ output, http_response = (
625
+ capo_lambda_web._operations.lambda_web.get_web_function.get_web_function(
626
+ req.options, req.input
627
+ )
628
+ )
629
+ return OperationResponse(output=output, response=http_response)
630
+
631
+ interceptors_, options_ = self.operation_options(config_overrides)
632
+ input_: capo_lambda_web.types.get_web_function_request.GetWebFunctionRequest = {
633
+ "function_name": function_name
634
+ }
635
+
636
+ response = execute_pipeline(
637
+ OperationRequest(input=input_, options=options_),
638
+ handler=_handler,
639
+ interceptors=list(interceptors_),
640
+ )
641
+ response.response.close()
642
+ return response.output
643
+
644
+ def delete_web_function(
645
+ self,
646
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
647
+ *,
648
+ config_overrides: Optional[LambdaWebClientConfig] = None,
649
+ ) -> None:
650
+ """<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>
651
+
652
+ Args:
653
+ 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>
654
+
655
+ Raises:
656
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
657
+ 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>
658
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
659
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
660
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
661
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
662
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
663
+ """
664
+
665
+ def _handler(
666
+ req: "OperationRequest[capo_lambda_web.types.delete_web_function_request.DeleteWebFunctionRequest]",
667
+ ) -> OperationResponse[None]:
668
+ import capo_lambda_web._operations.lambda_web.delete_web_function
669
+
670
+ output, http_response = (
671
+ capo_lambda_web._operations.lambda_web.delete_web_function.delete_web_function(
672
+ req.options, req.input
673
+ )
674
+ )
675
+ return OperationResponse(output=output, response=http_response)
676
+
677
+ interceptors_, options_ = self.operation_options(config_overrides)
678
+ input_: capo_lambda_web.types.delete_web_function_request.DeleteWebFunctionRequest = {
679
+ "function_name": function_name
680
+ }
681
+
682
+ response = execute_pipeline(
683
+ OperationRequest(input=input_, options=options_),
684
+ handler=_handler,
685
+ interceptors=list(interceptors_),
686
+ )
687
+ response.response.close()
688
+ return response.output
689
+
690
+ def list_web_functions(
691
+ self,
692
+ *,
693
+ config_overrides: Optional[LambdaWebClientConfig] = None,
694
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
695
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
696
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
697
+ ) -> "capo_lambda_web.types.list_web_functions_response.ListWebFunctionsResponse":
698
+ """<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>
699
+
700
+ Args:
701
+ filters: <p>A list of filters to apply to the results. The only supported filter name is <code>state</code>.</p>
702
+ 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>
703
+ next_token: <p>The pagination token that's returned by a previous request to retrieve the next page of results.</p>
704
+
705
+ Raises:
706
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
707
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
708
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
709
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
710
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
711
+ """
712
+
713
+ def _handler(
714
+ req: "OperationRequest[capo_lambda_web.types.list_web_functions_request.ListWebFunctionsRequest]",
715
+ ) -> OperationResponse[
716
+ "capo_lambda_web.types.list_web_functions_response.ListWebFunctionsResponse"
717
+ ]:
718
+ import capo_lambda_web._operations.lambda_web.list_web_functions
719
+
720
+ output, http_response = (
721
+ capo_lambda_web._operations.lambda_web.list_web_functions.list_web_functions(
722
+ req.options, req.input
723
+ )
724
+ )
725
+ return OperationResponse(output=output, response=http_response)
726
+
727
+ interceptors_, options_ = self.operation_options(config_overrides)
728
+ input_: capo_lambda_web.types.list_web_functions_request.ListWebFunctionsRequest = {}
729
+ if filters is not None:
730
+ input_["filters"] = filters
731
+ if max_results is not None:
732
+ input_["max_results"] = max_results
733
+ if next_token is not None:
734
+ input_["next_token"] = next_token
735
+
736
+ response = execute_pipeline(
737
+ OperationRequest(input=input_, options=options_),
738
+ handler=_handler,
739
+ interceptors=list(interceptors_),
740
+ )
741
+ response.response.close()
742
+ return response.output
743
+
744
+ def iter_list_web_functions(
745
+ self,
746
+ *,
747
+ config_overrides: Optional[LambdaWebClientConfig] = None,
748
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
749
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
750
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
751
+ ) -> "Iterator[capo_lambda_web.types.function_summary.FunctionSummary]":
752
+ _token = next_token
753
+ while True:
754
+ _response = self.list_web_functions(
755
+ config_overrides=config_overrides,
756
+ filters=filters,
757
+ max_results=max_results,
758
+ next_token=_token,
759
+ )
760
+ _page = _resolve_path(_response, ("functions",))
761
+ for _item in _page or []:
762
+ yield _item
763
+ _token = _resolve_path(_response, ("next_token",))
764
+ if not _token:
765
+ break
766
+
767
+ def create_web_function_endpoint(
768
+ self,
769
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
770
+ endpoint_name: "capo_lambda_web.types.endpoint_name.EndpointName",
771
+ endpoint_type: "capo_lambda_web.types.endpoint_type.EndpointType",
772
+ auth_type: "capo_lambda_web.types.auth_type.AuthType",
773
+ *,
774
+ config_overrides: Optional[LambdaWebClientConfig] = None,
775
+ description: Optional["capo_lambda_web.types.description.Description"] = None,
776
+ auto_deployment_mode: Optional[
777
+ "capo_lambda_web.types.auto_deployment_mode.AutoDeploymentMode"
778
+ ] = None,
779
+ revision_weights: Optional[
780
+ "capo_lambda_web.types.revision_weight_list.RevisionWeightList"
781
+ ] = None,
782
+ regions: Optional["capo_lambda_web.types.region_list.RegionList"] = None,
783
+ scaling_config: Optional[
784
+ "capo_lambda_web.types.scaling_config.ScalingConfig"
785
+ ] = None,
786
+ throttle_config: Optional[
787
+ "capo_lambda_web.types.throttle_config.ThrottleConfig"
788
+ ] = None,
789
+ ) -> "capo_lambda_web.types.create_web_function_endpoint_response.CreateWebFunctionEndpointResponse":
790
+ """<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>
791
+
792
+ Args:
793
+ 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>
794
+ 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>
795
+ description: <p>A description of the endpoint.</p>
796
+ endpoint_type: <p>The type of endpoint to create. Determines how traffic is served and routed across Regions.</p>
797
+ auth_type: <p>The authorization type for the endpoint.</p>
798
+ 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>
799
+ 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>
800
+ 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>
801
+ 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>
802
+ 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>
803
+
804
+ Raises:
805
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
806
+ 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>
807
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
808
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
809
+ 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>
810
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
811
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
812
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
813
+ """
814
+
815
+ def _handler(
816
+ req: "OperationRequest[capo_lambda_web.types.create_web_function_endpoint_request.CreateWebFunctionEndpointRequest]",
817
+ ) -> OperationResponse[
818
+ "capo_lambda_web.types.create_web_function_endpoint_response.CreateWebFunctionEndpointResponse"
819
+ ]:
820
+ import capo_lambda_web._operations.lambda_web.create_web_function_endpoint
821
+
822
+ output, http_response = (
823
+ capo_lambda_web._operations.lambda_web.create_web_function_endpoint.create_web_function_endpoint(
824
+ req.options, req.input
825
+ )
826
+ )
827
+ return OperationResponse(output=output, response=http_response)
828
+
829
+ interceptors_, options_ = self.operation_options(config_overrides)
830
+ input_: capo_lambda_web.types.create_web_function_endpoint_request.CreateWebFunctionEndpointRequest = {
831
+ "function_name": function_name,
832
+ "endpoint_name": endpoint_name,
833
+ "endpoint_type": endpoint_type,
834
+ "auth_type": auth_type,
835
+ }
836
+ if description is not None:
837
+ input_["description"] = description
838
+ if auto_deployment_mode is not None:
839
+ input_["auto_deployment_mode"] = auto_deployment_mode
840
+ if revision_weights is not None:
841
+ input_["revision_weights"] = revision_weights
842
+ if regions is not None:
843
+ input_["regions"] = regions
844
+ if scaling_config is not None:
845
+ input_["scaling_config"] = scaling_config
846
+ if throttle_config is not None:
847
+ input_["throttle_config"] = throttle_config
848
+
849
+ response = execute_pipeline(
850
+ OperationRequest(input=input_, options=options_),
851
+ handler=_handler,
852
+ interceptors=list(interceptors_),
853
+ )
854
+ response.response.close()
855
+ return response.output
856
+
857
+ def get_web_function_endpoint(
858
+ self,
859
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
860
+ endpoint_name: "capo_lambda_web.types.endpoint_name.EndpointName",
861
+ *,
862
+ config_overrides: Optional[LambdaWebClientConfig] = None,
863
+ ) -> "capo_lambda_web.types.get_web_function_endpoint_response.GetWebFunctionEndpointResponse":
864
+ """<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>
865
+
866
+ Args:
867
+ 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>
868
+ 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>
869
+
870
+ Raises:
871
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
872
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
873
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
874
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
875
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
876
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
877
+ """
878
+
879
+ def _handler(
880
+ req: "OperationRequest[capo_lambda_web.types.get_web_function_endpoint_request.GetWebFunctionEndpointRequest]",
881
+ ) -> OperationResponse[
882
+ "capo_lambda_web.types.get_web_function_endpoint_response.GetWebFunctionEndpointResponse"
883
+ ]:
884
+ import capo_lambda_web._operations.lambda_web.get_web_function_endpoint
885
+
886
+ output, http_response = (
887
+ capo_lambda_web._operations.lambda_web.get_web_function_endpoint.get_web_function_endpoint(
888
+ req.options, req.input
889
+ )
890
+ )
891
+ return OperationResponse(output=output, response=http_response)
892
+
893
+ interceptors_, options_ = self.operation_options(config_overrides)
894
+ input_: capo_lambda_web.types.get_web_function_endpoint_request.GetWebFunctionEndpointRequest = {
895
+ "function_name": function_name,
896
+ "endpoint_name": endpoint_name,
897
+ }
898
+
899
+ response = execute_pipeline(
900
+ OperationRequest(input=input_, options=options_),
901
+ handler=_handler,
902
+ interceptors=list(interceptors_),
903
+ )
904
+ response.response.close()
905
+ return response.output
906
+
907
+ def update_web_function_endpoint(
908
+ self,
909
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
910
+ endpoint_name: "capo_lambda_web.types.endpoint_name.EndpointName",
911
+ *,
912
+ config_overrides: Optional[LambdaWebClientConfig] = None,
913
+ description: Optional["capo_lambda_web.types.description.Description"] = None,
914
+ auth_type: Optional["capo_lambda_web.types.auth_type.AuthType"] = None,
915
+ auto_deployment_mode: Optional[
916
+ "capo_lambda_web.types.auto_deployment_mode.AutoDeploymentMode"
917
+ ] = None,
918
+ revision_weights: Optional[
919
+ "capo_lambda_web.types.revision_weight_list.RevisionWeightList"
920
+ ] = None,
921
+ scaling_config: Optional[
922
+ "capo_lambda_web.types.scaling_config.ScalingConfig"
923
+ ] = None,
924
+ throttle_config: Optional[
925
+ "capo_lambda_web.types.throttle_config.ThrottleConfig"
926
+ ] = None,
927
+ ) -> "capo_lambda_web.types.update_web_function_endpoint_response.UpdateWebFunctionEndpointResponse":
928
+ """<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>
929
+
930
+ Args:
931
+ 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>
932
+ 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>
933
+ description: <p>A description of the endpoint.</p>
934
+ auth_type: <p>The authorization type for the endpoint.</p>
935
+ auto_deployment_mode: <p>The auto-deployment mode for the endpoint.</p>
936
+ revision_weights: <p>A list of revision weights that determine how traffic is distributed across revisions.</p>
937
+ 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>
938
+ 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>
939
+
940
+ Raises:
941
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
942
+ 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>
943
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
944
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
945
+ 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>
946
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
947
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
948
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
949
+ """
950
+
951
+ def _handler(
952
+ req: "OperationRequest[capo_lambda_web.types.update_web_function_endpoint_request.UpdateWebFunctionEndpointRequest]",
953
+ ) -> OperationResponse[
954
+ "capo_lambda_web.types.update_web_function_endpoint_response.UpdateWebFunctionEndpointResponse"
955
+ ]:
956
+ import capo_lambda_web._operations.lambda_web.update_web_function_endpoint
957
+
958
+ output, http_response = (
959
+ capo_lambda_web._operations.lambda_web.update_web_function_endpoint.update_web_function_endpoint(
960
+ req.options, req.input
961
+ )
962
+ )
963
+ return OperationResponse(output=output, response=http_response)
964
+
965
+ interceptors_, options_ = self.operation_options(config_overrides)
966
+ input_: capo_lambda_web.types.update_web_function_endpoint_request.UpdateWebFunctionEndpointRequest = {
967
+ "function_name": function_name,
968
+ "endpoint_name": endpoint_name,
969
+ }
970
+ if description is not None:
971
+ input_["description"] = description
972
+ if auth_type is not None:
973
+ input_["auth_type"] = auth_type
974
+ if auto_deployment_mode is not None:
975
+ input_["auto_deployment_mode"] = auto_deployment_mode
976
+ if revision_weights is not None:
977
+ input_["revision_weights"] = revision_weights
978
+ if scaling_config is not None:
979
+ input_["scaling_config"] = scaling_config
980
+ if throttle_config is not None:
981
+ input_["throttle_config"] = throttle_config
982
+
983
+ response = execute_pipeline(
984
+ OperationRequest(input=input_, options=options_),
985
+ handler=_handler,
986
+ interceptors=list(interceptors_),
987
+ )
988
+ response.response.close()
989
+ return response.output
990
+
991
+ def delete_web_function_endpoint(
992
+ self,
993
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
994
+ endpoint_name: "capo_lambda_web.types.endpoint_name.EndpointName",
995
+ *,
996
+ config_overrides: Optional[LambdaWebClientConfig] = None,
997
+ ) -> None:
998
+ """<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>
999
+
1000
+ Args:
1001
+ 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>
1002
+ 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>
1003
+
1004
+ Raises:
1005
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1006
+ 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>
1007
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1008
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1009
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1010
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1011
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1012
+ """
1013
+
1014
+ def _handler(
1015
+ req: "OperationRequest[capo_lambda_web.types.delete_web_function_endpoint_request.DeleteWebFunctionEndpointRequest]",
1016
+ ) -> OperationResponse[None]:
1017
+ import capo_lambda_web._operations.lambda_web.delete_web_function_endpoint
1018
+
1019
+ output, http_response = (
1020
+ capo_lambda_web._operations.lambda_web.delete_web_function_endpoint.delete_web_function_endpoint(
1021
+ req.options, req.input
1022
+ )
1023
+ )
1024
+ return OperationResponse(output=output, response=http_response)
1025
+
1026
+ interceptors_, options_ = self.operation_options(config_overrides)
1027
+ input_: capo_lambda_web.types.delete_web_function_endpoint_request.DeleteWebFunctionEndpointRequest = {
1028
+ "function_name": function_name,
1029
+ "endpoint_name": endpoint_name,
1030
+ }
1031
+
1032
+ response = execute_pipeline(
1033
+ OperationRequest(input=input_, options=options_),
1034
+ handler=_handler,
1035
+ interceptors=list(interceptors_),
1036
+ )
1037
+ response.response.close()
1038
+ return response.output
1039
+
1040
+ def list_web_function_endpoints(
1041
+ self,
1042
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1043
+ *,
1044
+ config_overrides: Optional[LambdaWebClientConfig] = None,
1045
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
1046
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
1047
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
1048
+ ) -> "capo_lambda_web.types.list_web_function_endpoints_response.ListWebFunctionEndpointsResponse":
1049
+ """<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>
1050
+
1051
+ Args:
1052
+ 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>
1053
+ 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>
1054
+ 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>
1055
+ next_token: <p>The pagination token that's returned by a previous request to retrieve the next page of results.</p>
1056
+
1057
+ Raises:
1058
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1059
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1060
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1061
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1062
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1063
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1064
+ """
1065
+
1066
+ def _handler(
1067
+ req: "OperationRequest[capo_lambda_web.types.list_web_function_endpoints_request.ListWebFunctionEndpointsRequest]",
1068
+ ) -> OperationResponse[
1069
+ "capo_lambda_web.types.list_web_function_endpoints_response.ListWebFunctionEndpointsResponse"
1070
+ ]:
1071
+ import capo_lambda_web._operations.lambda_web.list_web_function_endpoints
1072
+
1073
+ output, http_response = (
1074
+ capo_lambda_web._operations.lambda_web.list_web_function_endpoints.list_web_function_endpoints(
1075
+ req.options, req.input
1076
+ )
1077
+ )
1078
+ return OperationResponse(output=output, response=http_response)
1079
+
1080
+ interceptors_, options_ = self.operation_options(config_overrides)
1081
+ input_: capo_lambda_web.types.list_web_function_endpoints_request.ListWebFunctionEndpointsRequest = {
1082
+ "function_name": function_name
1083
+ }
1084
+ if filters is not None:
1085
+ input_["filters"] = filters
1086
+ if max_results is not None:
1087
+ input_["max_results"] = max_results
1088
+ if next_token is not None:
1089
+ input_["next_token"] = next_token
1090
+
1091
+ response = execute_pipeline(
1092
+ OperationRequest(input=input_, options=options_),
1093
+ handler=_handler,
1094
+ interceptors=list(interceptors_),
1095
+ )
1096
+ response.response.close()
1097
+ return response.output
1098
+
1099
+ def iter_list_web_function_endpoints(
1100
+ self,
1101
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1102
+ *,
1103
+ config_overrides: Optional[LambdaWebClientConfig] = None,
1104
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
1105
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
1106
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
1107
+ ) -> "Iterator[capo_lambda_web.types.function_endpoint_summary.FunctionEndpointSummary]":
1108
+ _token = next_token
1109
+ while True:
1110
+ _response = self.list_web_function_endpoints(
1111
+ function_name,
1112
+ config_overrides=config_overrides,
1113
+ filters=filters,
1114
+ max_results=max_results,
1115
+ next_token=_token,
1116
+ )
1117
+ _page = _resolve_path(_response, ("endpoints",))
1118
+ for _item in _page or []:
1119
+ yield _item
1120
+ _token = _resolve_path(_response, ("next_token",))
1121
+ if not _token:
1122
+ break
1123
+
1124
+ def create_web_function_revision(
1125
+ self,
1126
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1127
+ build_config: "capo_lambda_web.types.build_config.BuildConfig",
1128
+ service_config: "capo_lambda_web.types.service_config.ServiceConfig",
1129
+ *,
1130
+ config_overrides: Optional[LambdaWebClientConfig] = None,
1131
+ description: Optional["capo_lambda_web.types.description.Description"] = None,
1132
+ kms_key_arn: Optional["capo_lambda_web.types.kms_key_arn.KmsKeyArn"] = None,
1133
+ ) -> "capo_lambda_web.types.create_web_function_revision_response.CreateWebFunctionRevisionResponse":
1134
+ """<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>
1135
+
1136
+ Args:
1137
+ 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>
1138
+ description: <p>A description of the revision.</p>
1139
+ 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>
1140
+ build_config: <p>The build configuration for the revision, including code location and runtime settings.</p>
1141
+ service_config: <p>The service configuration for the revision, including execution role, timeout, and concurrency settings.</p>
1142
+
1143
+ Raises:
1144
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1145
+ 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>
1146
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1147
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1148
+ 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>
1149
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1150
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1151
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1152
+ """
1153
+
1154
+ def _handler(
1155
+ req: "OperationRequest[capo_lambda_web.types.create_web_function_revision_request.CreateWebFunctionRevisionRequest]",
1156
+ ) -> OperationResponse[
1157
+ "capo_lambda_web.types.create_web_function_revision_response.CreateWebFunctionRevisionResponse"
1158
+ ]:
1159
+ import capo_lambda_web._operations.lambda_web.create_web_function_revision
1160
+
1161
+ output, http_response = (
1162
+ capo_lambda_web._operations.lambda_web.create_web_function_revision.create_web_function_revision(
1163
+ req.options, req.input
1164
+ )
1165
+ )
1166
+ return OperationResponse(output=output, response=http_response)
1167
+
1168
+ interceptors_, options_ = self.operation_options(config_overrides)
1169
+ input_: capo_lambda_web.types.create_web_function_revision_request.CreateWebFunctionRevisionRequest = {
1170
+ "function_name": function_name,
1171
+ "build_config": build_config,
1172
+ "service_config": service_config,
1173
+ }
1174
+ if description is not None:
1175
+ input_["description"] = description
1176
+ if kms_key_arn is not None:
1177
+ input_["kms_key_arn"] = kms_key_arn
1178
+
1179
+ response = execute_pipeline(
1180
+ OperationRequest(input=input_, options=options_),
1181
+ handler=_handler,
1182
+ interceptors=list(interceptors_),
1183
+ )
1184
+ response.response.close()
1185
+ return response.output
1186
+
1187
+ def get_web_function_revision(
1188
+ self,
1189
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1190
+ revision_id: "capo_lambda_web.types.revision_id.RevisionId",
1191
+ *,
1192
+ config_overrides: Optional[LambdaWebClientConfig] = None,
1193
+ ) -> "capo_lambda_web.types.get_web_function_revision_response.GetWebFunctionRevisionResponse":
1194
+ """<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>
1195
+
1196
+ Args:
1197
+ 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>
1198
+ 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>
1199
+
1200
+ Raises:
1201
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1202
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1203
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1204
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1205
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1206
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1207
+ """
1208
+
1209
+ def _handler(
1210
+ req: "OperationRequest[capo_lambda_web.types.get_web_function_revision_request.GetWebFunctionRevisionRequest]",
1211
+ ) -> OperationResponse[
1212
+ "capo_lambda_web.types.get_web_function_revision_response.GetWebFunctionRevisionResponse"
1213
+ ]:
1214
+ import capo_lambda_web._operations.lambda_web.get_web_function_revision
1215
+
1216
+ output, http_response = (
1217
+ capo_lambda_web._operations.lambda_web.get_web_function_revision.get_web_function_revision(
1218
+ req.options, req.input
1219
+ )
1220
+ )
1221
+ return OperationResponse(output=output, response=http_response)
1222
+
1223
+ interceptors_, options_ = self.operation_options(config_overrides)
1224
+ input_: capo_lambda_web.types.get_web_function_revision_request.GetWebFunctionRevisionRequest = {
1225
+ "function_name": function_name,
1226
+ "revision_id": revision_id,
1227
+ }
1228
+
1229
+ response = execute_pipeline(
1230
+ OperationRequest(input=input_, options=options_),
1231
+ handler=_handler,
1232
+ interceptors=list(interceptors_),
1233
+ )
1234
+ response.response.close()
1235
+ return response.output
1236
+
1237
+ def delete_web_function_revision(
1238
+ self,
1239
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1240
+ revision_id: "capo_lambda_web.types.revision_id.RevisionId",
1241
+ *,
1242
+ config_overrides: Optional[LambdaWebClientConfig] = None,
1243
+ ) -> None:
1244
+ """<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>
1245
+
1246
+ Args:
1247
+ 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>
1248
+ 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>
1249
+
1250
+ Raises:
1251
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1252
+ 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>
1253
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1254
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1255
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1256
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1257
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1258
+ """
1259
+
1260
+ def _handler(
1261
+ req: "OperationRequest[capo_lambda_web.types.delete_web_function_revision_request.DeleteWebFunctionRevisionRequest]",
1262
+ ) -> OperationResponse[None]:
1263
+ import capo_lambda_web._operations.lambda_web.delete_web_function_revision
1264
+
1265
+ output, http_response = (
1266
+ capo_lambda_web._operations.lambda_web.delete_web_function_revision.delete_web_function_revision(
1267
+ req.options, req.input
1268
+ )
1269
+ )
1270
+ return OperationResponse(output=output, response=http_response)
1271
+
1272
+ interceptors_, options_ = self.operation_options(config_overrides)
1273
+ input_: capo_lambda_web.types.delete_web_function_revision_request.DeleteWebFunctionRevisionRequest = {
1274
+ "function_name": function_name,
1275
+ "revision_id": revision_id,
1276
+ }
1277
+
1278
+ response = execute_pipeline(
1279
+ OperationRequest(input=input_, options=options_),
1280
+ handler=_handler,
1281
+ interceptors=list(interceptors_),
1282
+ )
1283
+ response.response.close()
1284
+ return response.output
1285
+
1286
+ def list_web_function_revisions(
1287
+ self,
1288
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1289
+ *,
1290
+ config_overrides: Optional[LambdaWebClientConfig] = None,
1291
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
1292
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
1293
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
1294
+ ) -> "capo_lambda_web.types.list_web_function_revisions_response.ListWebFunctionRevisionsResponse":
1295
+ """<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>
1296
+
1297
+ Args:
1298
+ 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>
1299
+ filters: <p>A list of filters to apply to the results. The only supported filter name is <code>state</code>.</p>
1300
+ 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>
1301
+ next_token: <p>The pagination token that's returned by a previous request to retrieve the next page of results.</p>
1302
+
1303
+ Raises:
1304
+ capo_lambda_web.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this operation.</p>
1305
+ capo_lambda_web.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Try again later.</p>
1306
+ capo_lambda_web.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify the resource identifier and try again.</p>
1307
+ capo_lambda_web.errors.throttling_exception.ThrottlingException: <p>The request was throttled. Reduce the frequency of requests and try again.</p>
1308
+ capo_lambda_web.errors.validation_exception.ValidationException: <p>The request failed validation. Check the request parameters and try again.</p>
1309
+ capo_lambda_web.errors.UnknownServiceError: The service returned an error code this client does not model.
1310
+ """
1311
+
1312
+ def _handler(
1313
+ req: "OperationRequest[capo_lambda_web.types.list_web_function_revisions_request.ListWebFunctionRevisionsRequest]",
1314
+ ) -> OperationResponse[
1315
+ "capo_lambda_web.types.list_web_function_revisions_response.ListWebFunctionRevisionsResponse"
1316
+ ]:
1317
+ import capo_lambda_web._operations.lambda_web.list_web_function_revisions
1318
+
1319
+ output, http_response = (
1320
+ capo_lambda_web._operations.lambda_web.list_web_function_revisions.list_web_function_revisions(
1321
+ req.options, req.input
1322
+ )
1323
+ )
1324
+ return OperationResponse(output=output, response=http_response)
1325
+
1326
+ interceptors_, options_ = self.operation_options(config_overrides)
1327
+ input_: capo_lambda_web.types.list_web_function_revisions_request.ListWebFunctionRevisionsRequest = {
1328
+ "function_name": function_name
1329
+ }
1330
+ if filters is not None:
1331
+ input_["filters"] = filters
1332
+ if max_results is not None:
1333
+ input_["max_results"] = max_results
1334
+ if next_token is not None:
1335
+ input_["next_token"] = next_token
1336
+
1337
+ response = execute_pipeline(
1338
+ OperationRequest(input=input_, options=options_),
1339
+ handler=_handler,
1340
+ interceptors=list(interceptors_),
1341
+ )
1342
+ response.response.close()
1343
+ return response.output
1344
+
1345
+ def iter_list_web_function_revisions(
1346
+ self,
1347
+ function_name: "capo_lambda_web.types.function_name.FunctionName",
1348
+ *,
1349
+ config_overrides: Optional[LambdaWebClientConfig] = None,
1350
+ filters: Optional["capo_lambda_web.types.filter_list.FilterList"] = None,
1351
+ max_results: Optional["capo_lambda_web.types.max_results.MaxResults"] = None,
1352
+ next_token: Optional["capo_lambda_web.types.next_token.NextToken"] = None,
1353
+ ) -> "Iterator[capo_lambda_web.types.function_revision_summary.FunctionRevisionSummary]":
1354
+ _token = next_token
1355
+ while True:
1356
+ _response = self.list_web_function_revisions(
1357
+ function_name,
1358
+ config_overrides=config_overrides,
1359
+ filters=filters,
1360
+ max_results=max_results,
1361
+ next_token=_token,
1362
+ )
1363
+ _page = _resolve_path(_response, ("revisions",))
1364
+ for _item in _page or []:
1365
+ yield _item
1366
+ _token = _resolve_path(_response, ("next_token",))
1367
+ if not _token:
1368
+ break
1369
+
1370
+ def __enter__(self) -> Self:
1371
+ return self
1372
+
1373
+ def __exit__(self, exc_type: Any, exc: Any, tb: Any):
1374
+ self._client.close()