Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 如何获取存储在aws bucket中的对象的存储类_Amazon Web Services_Amazon S3_Storage Class Specifier - Fatal编程技术网

Amazon web services 如何获取存储在aws bucket中的对象的存储类

Amazon web services 如何获取存储在aws bucket中的对象的存储类,amazon-web-services,amazon-s3,storage-class-specifier,Amazon Web Services,Amazon S3,Storage Class Specifier,我正在尝试将存储在glacier中的数据恢复到标准存储。为此,我需要检查对象的存储类。如果它是glacier,我需要将其还原。是否有任何aws cli函数来获取存储在aws S3 bucket中的对象的存储类? 例如: aws s3api list-objects-v2 --bucket <bucket-name> --prefix <object_key> --query "Contents[*].StorageClass" --output tex

我正在尝试将存储在glacier中的数据恢复到标准存储。为此,我需要检查对象的存储类。如果它是glacier,我需要将其还原。是否有任何aws cli函数来获取存储在aws S3 bucket中的对象的存储类?

例如:

aws s3api list-objects-v2 --bucket <bucket-name> --prefix <object_key> --query "Contents[*].StorageClass" --output text

成功了,谢谢!!
GLACIER