Deletes an existing service mesh.
You must delete all resources (virtual services, routes, virtual routers, and virtual nodes) in the service mesh before you can delete the mesh itself.
Parameters:
-
mesh_name
(ResourceName)
–
The name of the service mesh to delete.
Raises:
-
BadRequestException
–
The request syntax was malformed. Check your request syntax and try again.
-
ForbiddenException
–
You don't have permissions to perform this action.
-
InternalServerErrorException
–
The request processing has failed because of an unknown error, exception, or failure.
-
NotFoundException
–
The specified resource doesn't exist. Check your request syntax and try again.
-
ResourceInUseException
–
You can't delete the specified resource because it's in use or required by another resource.
-
ServiceUnavailableException
–
The request has failed due to a temporary failure of the service.
-
TooManyRequestsException
–
The maximum request rate permitted by the App Mesh APIs has been exceeded for your account. For best results, use an increasing or variable sleep interval between requests.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_app_mesh/_services/app_mesh.py
| def delete_mesh(
self,
mesh_name: "capo_app_mesh.types.resource_name.ResourceName",
*,
config_overrides: Optional[AppMeshClientConfig] = None,
) -> "capo_app_mesh.types.delete_mesh_output.DeleteMeshOutput":
"""<p>Deletes an existing service mesh.</p> <p>You must delete all resources (virtual services, routes, virtual routers, and virtual nodes) in the service mesh before you can delete the mesh itself.</p>
Args:
mesh_name: <p>The name of the service mesh to delete.</p>
Raises:
capo_app_mesh.errors.bad_request_exception.BadRequestException: <p>The request syntax was malformed. Check your request syntax and try again.</p>
capo_app_mesh.errors.forbidden_exception.ForbiddenException: <p>You don't have permissions to perform this action.</p>
capo_app_mesh.errors.internal_server_error_exception.InternalServerErrorException: <p>The request processing has failed because of an unknown error, exception, or failure.</p>
capo_app_mesh.errors.not_found_exception.NotFoundException: <p>The specified resource doesn't exist. Check your request syntax and try again.</p>
capo_app_mesh.errors.resource_in_use_exception.ResourceInUseException: <p>You can't delete the specified resource because it's in use or required by another resource.</p>
capo_app_mesh.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request has failed due to a temporary failure of the service.</p>
capo_app_mesh.errors.too_many_requests_exception.TooManyRequestsException: <p>The maximum request rate permitted by the App Mesh APIs has been exceeded for your account. For best results, use an increasing or variable sleep interval between requests.</p>
capo_app_mesh.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_app_mesh.types.delete_mesh_input.DeleteMeshInput]",
) -> OperationResponse[
"capo_app_mesh.types.delete_mesh_output.DeleteMeshOutput"
]:
import capo_app_mesh._operations.app_mesh.delete_mesh
output, http_response = (
capo_app_mesh._operations.app_mesh.delete_mesh.delete_mesh(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteMesh")
)
input_: capo_app_mesh.types.delete_mesh_input.DeleteMeshInput = {
"mesh_name": mesh_name
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|