get_resource_shares
async
¶
get_resource_shares(
resource_owner: ResourceOwner,
*,
config_overrides: Optional[AsyncRAMClientConfig] = None,
resource_share_arns: Optional[ResourceShareArnList] = None,
resource_share_status: Optional[ResourceShareStatus] = None,
name: Optional[String] = None,
tag_filters: Optional[TagFilters] = None,
next_token: Optional[String] = None,
max_results: Optional[MaxResults] = None,
permission_arn: Optional[String] = None,
permission_version: Optional[Integer] = None,
) -> GetResourceSharesResponse
Retrieves details about the resource shares that you own or that are shared with you.
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_arns(Optional[ResourceShareArnList], default:None) –Specifies the Amazon Resource Names (ARNs) of individual resource shares that you want information about.
-
resource_share_status(Optional[ResourceShareStatus], default:None) –Specifies that you want to retrieve details of only those resource shares that have this status.
-
resource_owner(ResourceOwner) –Specifies that you want to retrieve details of only those resource shares that match the following:
-
SELF– resource shares that your account shares with other accounts -
OTHER-ACCOUNTS– resource shares that other accounts share with your account
-
-
name(Optional[String], default:None) –Specifies the name of an individual resource share that you want to retrieve details about.
-
tag_filters(Optional[TagFilters], default:None) –Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.
-
next_token(Optional[String], default:None) –Specifies that you want to receive the next page of results. Valid only if you received a
NextTokenresponse 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'sNextTokenresponse 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
NextTokenresponse element is returned with a value (not null). Include the specified value as theNextTokenrequest 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 checkNextTokenafter every operation to ensure that you receive all of the results. -
permission_arn(Optional[String], default:None) –Specifies that you want to retrieve details of only those resource shares that use the managed permission with this Amazon Resource Name (ARN).
-
permission_version(Optional[Integer], default:None) –Specifies that you want to retrieve details for only those resource shares that use the specified version of the managed permission.
Raises:
-
InvalidNextTokenException–The operation failed because the specified value for
NextTokenisn't valid. You must specify a value you received in theNextTokenresponse of a previous call to this operation. -
InvalidParameterException–The operation failed because a parameter you specified isn't valid.
-
MalformedArnException–The operation failed because the specified Amazon Resource Name (ARN) has a format that isn't valid.
-
ServerInternalException–The operation failed because the service could not respond to the request due to an internal problem. Try again later.
-
ServiceUnavailableException–The operation failed because the service isn't available. Try again later.
-
UnknownResourceException–The operation failed because a specified resource couldn't be found.
-
UnknownServiceError–The service returned an error code this client does not model.