list_resources
async
¶
list_resources(
resource_owner: ResourceOwner,
*,
config_overrides: Optional[AsyncRAMClientConfig] = 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/async_ram.py
2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 | |