Skip to content

list_integrated_resources async

list_integrated_resources(
    agent_space_id: AgentSpaceId,
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
    integration_id: Optional[IntegrationId] = None,
    resource_type: Optional[ResourceType] = None,
    next_token: Optional[NextToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListIntegratedResourcesOutput

Lists the integrated resources for an agent space, optionally filtered by integration or resource type.

Parameters:

  • agent_space_id (AgentSpaceId) –

    The unique identifier of the agent space to list integrated resources for.

  • integration_id (Optional[IntegrationId], default: None ) –

    The unique identifier of the integration to filter by.

  • resource_type (Optional[ResourceType], default: None ) –

    The type of resource to filter by.

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

    A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.

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

    The maximum number of results to return in a single call.

Raises:

Source code in docs_src/capo_securityagent/_services/async_security_agent.py
async def list_integrated_resources(
    self,
    agent_space_id: "capo_securityagent.types.agent_space_id.AgentSpaceId",
    *,
    config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
    integration_id: Optional[
        "capo_securityagent.types.integration_id.IntegrationId"
    ] = None,
    resource_type: Optional[
        "capo_securityagent.types.resource_type.ResourceType"
    ] = None,
    next_token: Optional["capo_securityagent.types.next_token.NextToken"] = None,
    max_results: Optional["capo_securityagent.types.max_results.MaxResults"] = None,
) -> "capo_securityagent.types.list_integrated_resources_output.ListIntegratedResourcesOutput":
    """<p>Lists the integrated resources for an agent space, optionally filtered by integration or resource type.</p>

    Args:
        agent_space_id: <p>The unique identifier of the agent space to list integrated resources for.</p>
        integration_id: <p>The unique identifier of the integration to filter by.</p>
        resource_type: <p>The type of resource to filter by.</p>
        next_token: <p>A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request.</p>
        max_results: <p>The maximum number of results to return in a single call.</p>

    Raises:
        capo_securityagent.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_securityagent.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of your request.</p>
        capo_securityagent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found. Verify that the resource identifier is correct and that the resource exists in the specified agent space or account.</p>
        capo_securityagent.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_securityagent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_securityagent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_securityagent.types.list_integrated_resources_input.ListIntegratedResourcesInput]",
    ) -> AsyncOperationResponse[
        "capo_securityagent.types.list_integrated_resources_output.ListIntegratedResourcesOutput"
    ]:
        import capo_securityagent._operations.security_agent.list_integrated_resources

        (
            output,
            http_response,
        ) = await capo_securityagent._operations.security_agent.list_integrated_resources.async_list_integrated_resources(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListIntegratedResources")
    )
    input_: capo_securityagent.types.list_integrated_resources_input.ListIntegratedResourcesInput = {
        "agent_space_id": agent_space_id
    }
    if integration_id is not None:
        input_["integration_id"] = integration_id
    if resource_type is not None:
        input_["resource_type"] = resource_type
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

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