Skip to content

list_cross_account_resources async

list_cross_account_resources(
    resource_owner_aws_account_id: AwsAccountId,
    *,
    config_overrides: Optional[AsyncGlobalAcceleratorClientConfig] = None,
    accelerator_arn: Optional[GenericString] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[GenericString] = None,
) -> ListCrossAccountResourcesResponse

List the cross-account resources available to work with.

Parameters:

  • accelerator_arn (Optional[GenericString], default: None ) –

    The Amazon Resource Name (ARN) of an accelerator in a cross-account attachment.

  • resource_owner_aws_account_id (AwsAccountId) –

    The account ID of a resource owner in a cross-account attachment.

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

    The number of cross-account resource objects that you want to return with this call. The default value is 10.

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

    The token for the next set of results. You receive this token from a previous call.

Raises:

Source code in docs_src/capo_global_accelerator/_services/async_global_accelerator.py
async def list_cross_account_resources(
    self,
    resource_owner_aws_account_id: "capo_global_accelerator.types.aws_account_id.AwsAccountId",
    *,
    config_overrides: Optional[AsyncGlobalAcceleratorClientConfig] = None,
    accelerator_arn: Optional[
        "capo_global_accelerator.types.generic_string.GenericString"
    ] = None,
    max_results: Optional[
        "capo_global_accelerator.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_global_accelerator.types.generic_string.GenericString"
    ] = None,
) -> "capo_global_accelerator.types.list_cross_account_resources_response.ListCrossAccountResourcesResponse":
    """<p>List the cross-account resources available to work with.</p>

    Args:
        accelerator_arn: <p>The Amazon Resource Name (ARN) of an accelerator in a cross-account attachment.</p>
        resource_owner_aws_account_id: <p>The account ID of a resource owner in a cross-account attachment.</p>
        max_results: <p>The number of cross-account resource objects that you want to return with this call. The default value is 10.</p>
        next_token: <p>The token for the next set of results. You receive this token from a previous call.</p>

    Raises:
        capo_global_accelerator.errors.accelerator_not_found_exception.AcceleratorNotFoundException: <p>The accelerator that you specified doesn't exist.</p>
        capo_global_accelerator.errors.access_denied_exception.AccessDeniedException: <p>You don't have access permission.</p>
        capo_global_accelerator.errors.internal_service_error_exception.InternalServiceErrorException: <p>There was an internal error for Global Accelerator.</p>
        capo_global_accelerator.errors.invalid_argument_exception.InvalidArgumentException: <p>An argument that you specified is invalid.</p>
        capo_global_accelerator.errors.invalid_next_token_exception.InvalidNextTokenException: <p>There isn't another item to return.</p>
        capo_global_accelerator.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_global_accelerator.types.list_cross_account_resources_request.ListCrossAccountResourcesRequest]",
    ) -> AsyncOperationResponse[
        "capo_global_accelerator.types.list_cross_account_resources_response.ListCrossAccountResourcesResponse"
    ]:
        import capo_global_accelerator._operations.global_accelerator_v20180706.list_cross_account_resources

        (
            output,
            http_response,
        ) = await capo_global_accelerator._operations.global_accelerator_v20180706.list_cross_account_resources.async_list_cross_account_resources(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCrossAccountResources")
    )
    input_: capo_global_accelerator.types.list_cross_account_resources_request.ListCrossAccountResourcesRequest = {
        "resource_owner_aws_account_id": resource_owner_aws_account_id
    }
    if accelerator_arn is not None:
        input_["accelerator_arn"] = accelerator_arn
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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