函数 restoreObject 不使用 Tier 字段?

Function restoreObject don't use Tier field?

我正在使用 PHP SDK 中的 S3Client 从 Glacier 恢复对象,我想使用 Expedited 标志。 我查看了文档,发现 "Tier" 字段是 required 字段但不起作用。始终使用标准。我尝试在没有 "Tier"(必需)的情况下使用,它也可以使用标准模式。

我用这个:

 $restoreArray = [
     'Bucket'         => $bucket,     // REQUIRED
     'Key'            => $fileName,   // REQUIRED
     'RestoreRequest' => [
         'Days'       => 1,           // REQUIRED
         'GlacierJobParameters' => [
              'Tier'  => 'Expedited', //Standard|Bulk|Expedited REQUIRED
         ],
     ],
 ];
 $client->restoreObject( $restoreArray );

我在 AWS 控制台中尝试过,加速层有效。使用 restoreObject 函数总是 "Standard",数组中有或没有 'Tier' 字段。

我解决了我的问题。我有一个 API 版本 3.18.6,它引用了 restoreObject 函数上的 Tier 字段。

但是我发现它是在3.19.32版本上实现的:

Aws\S3 - Added support for Glacier retrieval tier information

对于给您带来的不便,我们深表歉意。