Deletes a version of a component from IoT Greengrass.
This operation deletes the component's recipe and artifacts. As a result, deployments that refer to this component version will fail. If you have deployments that use this component version, you can remove the component from the deployment or update the deployment to use a valid version.
Parameters:
Raises:
-
AccessDeniedException
–
You don't have permission to perform the action.
-
ConflictException
–
Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.
-
InternalServerException
–
IoT Greengrass can't process your request right now. Try again later.
-
ResourceNotFoundException
–
The requested resource can't be found.
-
ThrottlingException
–
Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.
-
ValidationException
–
The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_greengrassv2/_services/greengrass_v2.py
| def delete_component(
self,
arn: "capo_greengrassv2.types.component_version_arn.ComponentVersionARN",
*,
config_overrides: Optional[GreengrassV2ClientConfig] = None,
) -> None:
"""<p>Deletes a version of a component from IoT Greengrass.</p> <note> <p>This operation deletes the component's recipe and artifacts. As a result, deployments that refer to this component version will fail. If you have deployments that use this component version, you can remove the component from the deployment or update the deployment to use a valid version.</p> </note>
Args:
arn: <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a> of the component version.</p>
Raises:
capo_greengrassv2.errors.access_denied_exception.AccessDeniedException: <p>You don't have permission to perform the action.</p>
capo_greengrassv2.errors.conflict_exception.ConflictException: <p>Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time.</p>
capo_greengrassv2.errors.internal_server_exception.InternalServerException: <p>IoT Greengrass can't process your request right now. Try again later.</p>
capo_greengrassv2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource can't be found.</p>
capo_greengrassv2.errors.throttling_exception.ThrottlingException: <p>Your request exceeded a request rate quota. For example, you might have exceeded the amount of times that you can retrieve device or deployment status per second.</p>
capo_greengrassv2.errors.validation_exception.ValidationException: <p>The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.</p>
capo_greengrassv2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_greengrassv2.types.delete_component_request.DeleteComponentRequest]",
) -> OperationResponse[None]:
import capo_greengrassv2._operations.greengrass_v2.delete_component
output, http_response = (
capo_greengrassv2._operations.greengrass_v2.delete_component.delete_component(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteComponent")
)
input_: capo_greengrassv2.types.delete_component_request.DeleteComponentRequest = {
"arn": arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|