Deletes the specified deployment.
Parameters:
-
deployment_identifier
(DeploymentIdentifier)
–
The identifier of the deployment. This is the deployment's Amazon Resource Name (ARN).
Raises:
-
AccessDeniedException
–
You do not have sufficient permissions to perform this action.
-
ConflictException
–
The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.
-
InternalServerException
–
The request processing failed because of an internal error in the service. This is a retryable error.
-
ThrottlingException
–
The request was denied because of request throttling. Reduce your request rate and try again.
-
ValidationException
–
The request failed validation. For details, see the reason and fieldList members of the response.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
Delete a deployment
Deletes a deployment by its ARN. Deleting an active deployment stops enforcement and triggers cleanup of managed firewall resources.
>>> client.delete_deployment(deployment_identifier='arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456')
Source code in docs_src/capo_network_security_manager/_services/network_security_manager.py
| def delete_deployment(
self,
deployment_identifier: "capo_network_security_manager.types.deployment_identifier.DeploymentIdentifier",
*,
config_overrides: Optional[NetworkSecurityManagerClientConfig] = None,
) -> None:
"""<p>Deletes the specified deployment.</p>
Args:
deployment_identifier: <p>The identifier of the deployment. This is the deployment's Amazon Resource Name (ARN).</p>
Raises:
capo_network_security_manager.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient permissions to perform this action.</p>
capo_network_security_manager.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource. For example, the resource was modified concurrently, or it is in a state that does not allow the requested operation.</p>
capo_network_security_manager.errors.internal_server_exception.InternalServerException: <p>The request processing failed because of an internal error in the service. This is a retryable error.</p>
capo_network_security_manager.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling. Reduce your request rate and try again.</p>
capo_network_security_manager.errors.validation_exception.ValidationException: <p>The request failed validation. For details, see the <code>reason</code> and <code>fieldList</code> members of the response.</p>
capo_network_security_manager.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Delete a deployment
Deletes a deployment by its ARN. Deleting an active deployment stops enforcement and triggers cleanup of managed firewall resources.
>>> client.delete_deployment(deployment_identifier='arn:aws:network-security-manager:us-east-1:123456789012:deployment:def456')
"""
def _handler(
req: "OperationRequest[capo_network_security_manager.types.delete_deployment_input.DeleteDeploymentInput]",
) -> OperationResponse[None]:
import capo_network_security_manager._operations.piccolo_customer_api_service.delete_deployment
output, http_response = (
capo_network_security_manager._operations.piccolo_customer_api_service.delete_deployment.delete_deployment(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDeployment")
)
input_: capo_network_security_manager.types.delete_deployment_input.DeleteDeploymentInput = {
"deployment_identifier": deployment_identifier
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|