Skip to content

list_agent_spaces async

list_agent_spaces(
    *,
    config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional[NextToken] = None,
    included_data: Optional[IncludedData] = None,
) -> ListAgentSpacesOutput

Lists all AgentSpaces with optional pagination.

Parameters:

  • max_results (Optional[int], default: None ) –

    Maximum number of results to return in a single call.

  • next_token (Optional[NextToken], default: None ) –

    Token for the next page of results.

  • included_data (Optional[IncludedData], default: None ) –

    How much data to include in the response.

Raises:

Source code in docs_src/capo_devops_agent/_services/async_dev_ops_agent.py
async def list_agent_spaces(
    self,
    *,
    config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
    max_results: Optional[int] = None,
    next_token: Optional["capo_devops_agent.types.next_token.NextToken"] = None,
    included_data: Optional[
        "capo_devops_agent.types.included_data.IncludedData"
    ] = None,
) -> "capo_devops_agent.types.list_agent_spaces_output.ListAgentSpacesOutput":
    """<p>Lists all AgentSpaces with optional pagination.</p>

    Args:
        max_results: <p>Maximum number of results to return in a single call.</p>
        next_token: <p>Token for the next page of results.</p>
        included_data: <p>How much data to include in the response.</p>

    Raises:
        capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
        capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
        capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
        capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
        capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
        capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
        capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_devops_agent.types.list_agent_spaces_input.ListAgentSpacesInput]",
    ) -> AsyncOperationResponse[
        "capo_devops_agent.types.list_agent_spaces_output.ListAgentSpacesOutput"
    ]:
        import capo_devops_agent._operations.dev_ops_agent.list_agent_spaces

        (
            output,
            http_response,
        ) = await capo_devops_agent._operations.dev_ops_agent.list_agent_spaces.async_list_agent_spaces(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_devops_agent.types.list_agent_spaces_output.ListAgentSpacesOutput",
    ) -> dict[str, Any]:
        import capo_devops_agent.types.list_agent_spaces_output

        return capo_devops_agent.types.list_agent_spaces_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("ListAgentSpaces", redact_output=_redact_output),
    )
    input_: capo_devops_agent.types.list_agent_spaces_input.ListAgentSpacesInput = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if included_data is not None:
        input_["included_data"] = included_data

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