Skip to content

delete_extension async

delete_extension(
    extension_identifier: Identifier,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    version_number: Optional[Integer] = None,
) -> None

Deletes an AppConfig extension. You must delete all associations to an extension before you delete the extension.

Parameters:

  • extension_identifier (Identifier) –

    The name, ID, or Amazon Resource Name (ARN) of the extension you want to delete.

  • version_number (Optional[Integer], default: None ) –

    A specific version of an extension to delete. If omitted, the highest version is deleted.

Raises:

Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def delete_extension(
    self,
    extension_identifier: "capo_appconfig.types.identifier.Identifier",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    version_number: Optional["capo_appconfig.types.integer.Integer"] = None,
) -> None:
    """<p>Deletes an AppConfig extension. You must delete all associations to an extension before you delete the extension.</p>

    Args:
        extension_identifier: <p>The name, ID, or Amazon Resource Name (ARN) of the extension you want to delete.</p>
        version_number: <p>A specific version of an extension to delete. If omitted, the highest version is deleted.</p>

    Raises:
        capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
        capo_appconfig.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfig.types.delete_extension_request.DeleteExtensionRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_appconfig._operations.amazon_app_config.delete_extension

        (
            output,
            http_response,
        ) = await capo_appconfig._operations.amazon_app_config.delete_extension.async_delete_extension(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteExtension")
    )
    input_: capo_appconfig.types.delete_extension_request.DeleteExtensionRequest = {
        "extension_identifier": extension_identifier
    }
    if version_number is not None:
        input_["version_number"] = version_number

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output