Skip to content

delete_platform_version

delete_platform_version(
    *,
    config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
    platform_arn: Optional[PlatformArn] = None,
) -> DeletePlatformVersionResult

Deletes the specified version of a custom platform.

Parameters:

  • platform_arn (Optional[PlatformArn], default: None ) –

    The ARN of the version of the custom platform.

Raises:

Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
def delete_platform_version(
    self,
    *,
    config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
    platform_arn: Optional[
        "capo_elastic_beanstalk.types.platform_arn.PlatformArn"
    ] = None,
) -> "capo_elastic_beanstalk.types.delete_platform_version_result.DeletePlatformVersionResult":
    """<p>Deletes the specified version of a custom platform.</p>

    Args:
        platform_arn: <p>The ARN of the version of the custom platform.</p>

    Raises:
        capo_elastic_beanstalk.errors.elastic_beanstalk_service_exception.ElasticBeanstalkServiceException: <p>A generic service exception has occurred.</p>
        capo_elastic_beanstalk.errors.insufficient_privileges_exception.InsufficientPrivilegesException: <p>The specified account does not have sufficient privileges for one or more Amazon Web Services services.</p>
        capo_elastic_beanstalk.errors.operation_in_progress_exception.OperationInProgressException: <p>Unable to perform the specified operation because another operation that effects an element in this activity is already in progress.</p>
        capo_elastic_beanstalk.errors.platform_version_still_referenced_exception.PlatformVersionStillReferencedException: <p>You cannot delete the platform version because there are still environments running on it.</p>
        capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_elastic_beanstalk.types.delete_platform_version_request.DeletePlatformVersionRequest]",
    ) -> OperationResponse[
        "capo_elastic_beanstalk.types.delete_platform_version_result.DeletePlatformVersionResult"
    ]:
        import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.delete_platform_version

        output, http_response = (
            capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.delete_platform_version.delete_platform_version(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeletePlatformVersion")
    )
    input_: capo_elastic_beanstalk.types.delete_platform_version_request.DeletePlatformVersionRequest = {}
    if platform_arn is not None:
        input_["platform_arn"] = platform_arn

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output