Skip to content

delete_connection_group async

delete_connection_group(
    id: string,
    if_match: string,
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
) -> None

Deletes a connection group.

Parameters:

  • id (string) –

    The ID of the connection group to delete.

  • if_match (string) –

    The value of the ETag header that you received when retrieving the connection group to delete.

Raises:

Source code in docs_src/capo_cloudfront/_services/async_cloud_front.py
async def delete_connection_group(
    self,
    id: "capo_cloudfront.types.string.string",
    if_match: "capo_cloudfront.types.string.string",
    *,
    config_overrides: Optional[AsyncCloudFrontClientConfig] = None,
) -> None:
    """<p>Deletes a connection group.</p>

    Args:
        id: <p>The ID of the connection group to delete.</p>
        if_match: <p>The value of the <code>ETag</code> header that you received when retrieving the connection group to delete.</p>

    Raises:
        capo_cloudfront.errors.access_denied.AccessDenied: <p>Access denied.</p>
        capo_cloudfront.errors.cannot_delete_entity_while_in_use.CannotDeleteEntityWhileInUse: <p>The entity cannot be deleted while it is in use.</p>
        capo_cloudfront.errors.entity_not_found.EntityNotFound: <p>The entity was not found.</p>
        capo_cloudfront.errors.invalid_if_match_version.InvalidIfMatchVersion: <p>The <code>If-Match</code> version is missing or not valid.</p>
        capo_cloudfront.errors.precondition_failed.PreconditionFailed: <p>The precondition in one or more of the request fields evaluated to <code>false</code>.</p>
        capo_cloudfront.errors.resource_not_disabled.ResourceNotDisabled: <p>The specified CloudFront resource hasn't been disabled yet.</p>
        capo_cloudfront.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudfront.types.delete_connection_group_request.DeleteConnectionGroupRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_cloudfront._operations.cloudfront2020_05_31.delete_connection_group

        (
            output,
            http_response,
        ) = await capo_cloudfront._operations.cloudfront2020_05_31.delete_connection_group.async_delete_connection_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteConnectionGroup")
    )
    input_: capo_cloudfront.types.delete_connection_group_request.DeleteConnectionGroupRequest = {
        "id": id,
        "if_match": if_match,
    }

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