list_locations
async
¶
list_locations(
*,
config_overrides: Optional[AsyncDataSyncClientConfig] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[NextToken] = None,
filters: Optional[LocationFilters] = None,
) -> ListLocationsResponse
Returns a list of source and destination locations.
If you have more locations than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a token that you can specify in your next request to fetch the next page of locations.
Parameters:
-
max_results(Optional[MaxResults], default:None) –The maximum number of locations to return.
-
next_token(Optional[NextToken], default:None) –An opaque string that indicates the position at which to begin the next list of locations.
-
filters(Optional[LocationFilters], default:None) –You can use API filters to narrow down the list of resources returned by
ListLocations. For example, to retrieve all tasks on a specific source location, you can useListLocationswith filter nameLocationType S3andOperator Equals.
Raises:
-
InternalException–This exception is thrown when an error occurs in the DataSync service.
-
InvalidRequestException–This exception is thrown when the client submits a malformed request.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_datasync/_services/async_data_sync.py
2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 | |