list_locations
¶
list_locations(
*,
config_overrides: Optional[DataSyncClientConfig] = 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/data_sync.py
2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 | |