list_volumes
async
¶
list_volumes(
*,
config_overrides: Optional[AsyncStorageGatewayClientConfig] = None,
gateway_arn: Optional[GatewayARN] = None,
marker: Optional[Marker] = None,
limit: Optional[PositiveIntObject] = None,
) -> ListVolumesOutput
Lists the iSCSI stored volumes of a gateway. Results are sorted by volume ARN. The response includes only the volume ARNs. If you want additional volume information, use the DescribeStorediSCSIVolumes or the DescribeCachediSCSIVolumes API.
The operation supports pagination. By default, the operation returns a maximum of up to 100 volumes. You can optionally specify the Limit field in the body to limit the number of volumes in the response. If the number of volumes returned in the response is truncated, the response includes a Marker field. You can use this Marker value in your subsequent request to retrieve the next set of volumes. This operation is only supported in the cached volume and stored volume gateway types.
Parameters:
-
marker(Optional[Marker], default:None) –A string that indicates the position at which to begin the returned list of volumes. Obtain the marker from the response of a previous List iSCSI Volumes request.
-
limit(Optional[PositiveIntObject], default:None) –Specifies that the list of volumes returned be limited to the specified number of items.
Raises:
-
InternalServerError–An internal server error has occurred during the request. For more information, see the error and message fields.
-
InvalidGatewayRequestException–An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To list the iSCSI stored volumes of a gateway Lists the iSCSI stored volumes of a gateway. Results are sorted by volume ARN up to a maximum of 100 volumes.
>>> await client.list_volumes(gateway_arn='arn:aws:storagegateway:us-east-1:111122223333:gateway/sgw-12A3456B', marker='1', limit=2)
Source code in docs_src/capo_storage_gateway/_services/async_storage_gateway.py
4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 | |