list_resources
¶
list_resources(
resource_owner: ResourceOwner,
*,
config_overrides: Optional[RAMClientConfig] = None,
principal: Optional[String] = None,
resource_type: Optional[String] = None,
resource_arns: Optional[ResourceArnList] = None,
resource_share_arns: Optional[ResourceShareArnList] = None,
next_token: Optional[String] = None,
max_results: Optional[MaxResults] = None,
resource_region_scope: Optional[ResourceRegionScopeFilter] = None,
) -> ListResourcesResponse
Lists the resources that you added to a resource share or the resources 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_owner(ResourceOwner) –Specifies that you want to list only the resource shares that match the following:
-
SELF– resources that your account shares with other accounts -
OTHER-ACCOUNTS– resources that other accounts share with your account
-
-
principal(Optional[String], default:None) –Specifies that you want to list only the resource shares that are associated with the specified principal.
-
resource_type(Optional[String], default:None) –Specifies that you want to list only the resource shares that include resources of the specified resource type.
For valid values, query the ListResourceTypes operation.
-
resource_arns(Optional[ResourceArnList], default:None) –Specifies that you want to list only the resource shares that include resources with the specified Amazon Resource Names (ARNs).
-
resource_share_arns(Optional[ResourceShareArnList], default:None) –Specifies that you want to list only resources in the resource shares identified by the specified Amazon Resource Names (ARNs).
-
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. -
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:
-
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.
-
InvalidResourceTypeException–The operation failed because the specified resource type 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.
Source code in docs_src/capo_ram/_services/ram.py
2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 | |