Skip to content

list_pending_invitation_resources async

list_pending_invitation_resources(
    resource_share_invitation_arn: String,
    *,
    config_overrides: Optional[AsyncRAMClientConfig] = None,
    next_token: Optional[String] = None,
    max_results: Optional[MaxResults] = None,
    resource_region_scope: Optional[ResourceRegionScopeFilter] = None,
) -> ListPendingInvitationResourcesResponse

Lists the resources in a resource share that is shared with you but for which the invitation is still PENDING. That means that you haven't accepted or rejected the invitation and the invitation hasn't expired.

Always check the NextToken response parameter for a null value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The NextToken response parameter value is null only when there are no more results to display.

Parameters:

  • resource_share_invitation_arn (String) –

    Specifies the Amazon Resource Name (ARN) of the invitation. You can use GetResourceShareInvitations to find the ARN of the invitation.

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

    Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's NextToken response to request the next page of results.

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

    Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.

  • resource_region_scope (Optional[ResourceRegionScopeFilter], default: None ) –

    Specifies that you want the results to include only resources that have the specified scope.

    • ALL – the results include both global and regional resources or resource types.

    • GLOBAL – the results include only global resources or resource types.

    • REGIONAL – the results include only regional resources or resource types.

    The default value is ALL.

Raises:

Source code in docs_src/capo_ram/_services/async_ram.py
async def list_pending_invitation_resources(
    self,
    resource_share_invitation_arn: "capo_ram.types.string.String",
    *,
    config_overrides: Optional[AsyncRAMClientConfig] = None,
    next_token: Optional["capo_ram.types.string.String"] = None,
    max_results: Optional["capo_ram.types.max_results.MaxResults"] = None,
    resource_region_scope: Optional[
        "capo_ram.types.resource_region_scope_filter.ResourceRegionScopeFilter"
    ] = None,
) -> "capo_ram.types.list_pending_invitation_resources_response.ListPendingInvitationResourcesResponse":
    """<p>Lists the resources in a resource share that is shared with you but for which the invitation is still <code>PENDING</code>. That means that you haven't accepted or rejected the invitation and the invitation hasn't expired.</p> <note> <p>Always check the <code>NextToken</code> response parameter for a <code>null</code> value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The <code>NextToken</code> response parameter value is <code>null</code> <i>only</i> when there are no more results to display.</p> </note>

    Args:
        resource_share_invitation_arn: <p>Specifies the <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the invitation. You can use <a>GetResourceShareInvitations</a> to find the ARN of the invitation.</p>
        next_token: <p>Specifies that you want to receive the next page of results. Valid only if you received a <code>NextToken</code> response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's <code>NextToken</code> response to request the next page of results.</p>
        max_results: <p>Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the <code>NextToken</code> response element is returned with a value (not null). Include the specified value as the <code>NextToken</code> request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check <code>NextToken</code> after every operation to ensure that you receive all of the results.</p>
        resource_region_scope: <p>Specifies that you want the results to include only resources that have the specified scope.</p> <ul> <li> <p> <code>ALL</code> – the results include both global and regional resources or resource types.</p> </li> <li> <p> <code>GLOBAL</code> – the results include only global resources or resource types.</p> </li> <li> <p> <code>REGIONAL</code> – the results include only regional resources or resource types.</p> </li> </ul> <p>The default value is <code>ALL</code>.</p>

    Raises:
        capo_ram.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The operation failed because the specified value for <code>NextToken</code> isn't valid. You must specify a value you received in the <code>NextToken</code> response of a previous call to this operation.</p>
        capo_ram.errors.invalid_parameter_exception.InvalidParameterException: <p>The operation failed because a parameter you specified isn't valid.</p>
        capo_ram.errors.malformed_arn_exception.MalformedArnException: <p>The operation failed because the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> has a format that isn't valid.</p>
        capo_ram.errors.missing_required_parameter_exception.MissingRequiredParameterException: <p>The operation failed because a required input parameter is missing.</p>
        capo_ram.errors.resource_share_invitation_already_rejected_exception.ResourceShareInvitationAlreadyRejectedException: <p>The operation failed because the specified invitation was already rejected.</p>
        capo_ram.errors.resource_share_invitation_arn_not_found_exception.ResourceShareInvitationArnNotFoundException: <p>The operation failed because the specified <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> for an invitation was not found.</p>
        capo_ram.errors.resource_share_invitation_expired_exception.ResourceShareInvitationExpiredException: <p>The operation failed because the specified invitation is past its expiration date and time.</p>
        capo_ram.errors.server_internal_exception.ServerInternalException: <p>The operation failed because the service could not respond to the request due to an internal problem. Try again later.</p>
        capo_ram.errors.service_unavailable_exception.ServiceUnavailableException: <p>The operation failed because the service isn't available. Try again later.</p>
        capo_ram.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ram.types.list_pending_invitation_resources_request.ListPendingInvitationResourcesRequest]",
    ) -> AsyncOperationResponse[
        "capo_ram.types.list_pending_invitation_resources_response.ListPendingInvitationResourcesResponse"
    ]:
        import capo_ram._operations.amazon_resource_sharing.list_pending_invitation_resources

        (
            output,
            http_response,
        ) = await capo_ram._operations.amazon_resource_sharing.list_pending_invitation_resources.async_list_pending_invitation_resources(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListPendingInvitationResources")
    )
    input_: capo_ram.types.list_pending_invitation_resources_request.ListPendingInvitationResourcesRequest = {
        "resource_share_invitation_arn": resource_share_invitation_arn
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if resource_region_scope is not None:
        input_["resource_region_scope"] = resource_region_scope

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