Get Bucket cors#

バケットに設定されているCors(Cross-Origin Resource Sharing)構成情報を表示します。

APIエンドポイント#

リージョン APIエンドポイント
西日本リージョン3の場合 https://objectstorage-s.jp-west-3.cloud.global.fujitsu.com
東日本リージョン3の場合 https://objectstorage-s.jp-east-3.cloud.global.fujitsu.com

HTTPメソッドとURI#

GET

/{bucket}?cors

HTTPステータスコード#

正常時:200

エラー時:400, 403, 404, 405, 409, 411, 412, 416, 422, 500, 501, 503

リクエストパラメータの説明#

名前 In Type デフォルト値
/必須指定
Description
Bucket path string 必須 バケット名
x-amz-content-sha256 header string 必須 ペイロード全体の計算されたSHA256チェックサム
x-amz-date header string 必須 リクエスト側で生成した現在日時
Authorization header string 必須 リクエスト認証に用いる文字列

レスポンスヘッダーの説明#

名前 Type Description
x-amz-date string トランザクションが実行された日時
Content-Type string コンテンツのMIMEタイプ
Content-Length string レスポンスボディのバイト数
Connection string 持続接続の状態を表示します。
x-amz-request-id string このリクエストに付与されるID
トラブルについて問い合わせる際に利用されます。
x-amz-id-2 string このリクエストに対する処理ID
トラブルについて問い合わせる際に利用されます。
x-ntap-sg-trace-id string このリクエストに対する処理ID
トラブルについて問い合わせる際に利用されます。
X-Fcx-Endpoint-Request string APIエンドポイントとしてリクエストを受け付けたことを示す番号

レスポンスボディ(正常系)の説明#

名前 Type Description
CORSConfiguration container 最大100個のCORSRules要素用のコンテナ
CORSRule container 許可するクロスオリジンアクセス(最大100個)
AllowedOrigin string クロスサイトリクエストを許可するオリジン
AllowedHeader string クロスサイトリクエストに含めることができるヘッダー
AllowedMethod enum クロスサイトリクエストで許可するHTTPメソッド
MaxAgeSeconds integer プリフライトリクエストをブラウザでキャッシュできる時間
ExposeHeader string Access-Control-Expose-Headers としてクライアントに示すクロスサイトリクエストで指定可能なヘッダ

リクエスト例#

GET /general-bucket?cors HTTP/1.1
User-Agent: curl/7.29.0
Host: objectstorage-s.jp-east-3.cloud.global.fujitsu.com
Accept: */*
x-amz-content-sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
x-amz-date:20190604T022522Z
Authorization:AWS4-HMAC-SHA256 Credential=XK8Z3830NBL1BT9WD3HD/20190604/jp-east-3/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256;x-amz-date,Signature=add71907bfade4548865bccd2721ce01dae46004f25209104420b56cd84eb44d

レスポンス例#

レスポンスヘッダ

HTTP/1.1 200 OK
Date: Tue, 04 Jun 2019 02:25:23 GMT
Content-Type: application/xml
Content-Length: 557
Connection: keep-alive
x-amz-request-id: 2327732986
x-amz-id-2: 12174498
x-ntap-sg-trace-id: 32b3111a2806ed47
X-Fcx-Endpoint-Request: EXECUTED_api2-rmp1.management.jp-east-3.local-28168-754045-1_200

レスポンスボディ

<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <CORSRule>
    <AllowedOrigin>http://www.example.com</AllowedOrigin>
    <AllowedHeader>*</AllowedHeader>
    <AllowedMethod>PUT</AllowedMethod>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedMethod>DELETE</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
    <ExposeHeader>x-amz-server-side-encryption</ExposeHeader>
  </CORSRule>
  <CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedHeader>Authorization</AllowedHeader>
    <AllowedMethod>GET</AllowedMethod>
    <MaxAgeSeconds>3000</MaxAgeSeconds>
  </CORSRule>
</CORSConfiguration>