Skip to content

describe_workspace_configuration async

describe_workspace_configuration(
    workspace_id: WorkspaceId,
    *,
    config_overrides: Optional[AsyncampClientConfig] = None,
) -> DescribeWorkspaceConfigurationResponse

Use this operation to return information about the configuration of a workspace. The configuration details returned include workspace configuration status, label set limits, and retention period.

Parameters:

  • workspace_id (WorkspaceId) –

    The ID of the workspace that you want to retrieve information for. To find the IDs of your workspaces, use the ListWorkspaces operation.

Raises:

Source code in docs_src/capo_amp/_services/async_amp.py
async def describe_workspace_configuration(
    self,
    workspace_id: "capo_amp.types.workspace_id.WorkspaceId",
    *,
    config_overrides: Optional[AsyncampClientConfig] = None,
) -> "capo_amp.types.describe_workspace_configuration_response.DescribeWorkspaceConfigurationResponse":
    """<p>Use this operation to return information about the configuration of a workspace. The configuration details returned include workspace configuration status, label set limits, and retention period.</p>

    Args:
        workspace_id: <p>The ID of the workspace that you want to retrieve information for. To find the IDs of your workspaces, use the <a href="https://docs.aws.amazon.com/prometheus/latest/APIReference/API_ListWorkspaces.htm">ListWorkspaces</a> operation.</p>

    Raises:
        capo_amp.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_amp.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request.</p>
        capo_amp.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resources that doesn't exist.</p>
        capo_amp.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_amp.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_amp.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_amp.types.describe_workspace_configuration_request.DescribeWorkspaceConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_amp.types.describe_workspace_configuration_response.DescribeWorkspaceConfigurationResponse"
    ]:
        import capo_amp._operations.amazon_prometheus_service.describe_workspace_configuration

        (
            output,
            http_response,
        ) = await capo_amp._operations.amazon_prometheus_service.describe_workspace_configuration.async_describe_workspace_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeWorkspaceConfiguration")
    )
    input_: capo_amp.types.describe_workspace_configuration_request.DescribeWorkspaceConfigurationRequest = {
        "workspace_id": workspace_id
    }

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