Skip to content

delete_space

delete_space(
    space_id: SpaceId, *, config_overrides: Optional[CloudWatchOmniClientConfig] = None
) -> DeleteSpaceOutput

Removes a space and all of its resources.

Parameters:

  • space_id (SpaceId) –

    The unique ID of the space to delete.

Raises:

Examples:

Delete a space The following example removes a space and all of its resources. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> client.delete_space(space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d')
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
def delete_space(
    self,
    space_id: "capo_cloudwatchomni.types.space_id.SpaceId",
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
) -> "capo_cloudwatchomni.types.delete_space_output.DeleteSpaceOutput":
    """Removes a space and all of its resources.

    Args:
        space_id: The unique ID of the space to delete.

    Raises:
        capo_cloudwatchomni.errors.access_denied_exception.AccessDeniedException: The caller is not authorized to perform this action.
        capo_cloudwatchomni.errors.conflict_exception.ConflictException: The operation could not be completed because of a conflict with the current state of the resource.
        capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
        capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
        capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Delete a space
        The following example removes a space and all of its resources. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> client.delete_space(space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d')
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatchomni.types.delete_space_input.DeleteSpaceInput]",
    ) -> OperationResponse[
        "capo_cloudwatchomni.types.delete_space_output.DeleteSpaceOutput"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.delete_space

        output, http_response = (
            capo_cloudwatchomni._operations.cloud_watch_omni_frontend.delete_space.delete_space(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteSpace")
    )
    input_: capo_cloudwatchomni.types.delete_space_input.DeleteSpaceInput = {
        "space_id": space_id
    }

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