次の方法で共有


Blob Services - Set Service Properties

ストレージ アカウントの BLOB サービスのプロパティ (Storage Analytics および CORS (クロスオリジン リソース共有) ルールのプロパティを含む) を設定します。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default?api-version=2024-01-01

URI パラメーター

名前 / 必須 説明
accountName
path True

string

minLength: 3
maxLength: 24
pattern: ^[a-z0-9]+$

指定したリソース グループ内のストレージ アカウントの名前。 ストレージ アカウント名の長さは 3 ~ 24 文字で、数字と小文字のみを使用する必要があります。

BlobServicesName
path True

BlobServicesName

指定したストレージ アカウント内の BLOB サービスの名前。 Blob Service 名は 'default' である必要があります

resourceGroupName
path True

string

minLength: 1
maxLength: 90
pattern: ^[-\w\._\(\)]+$

ユーザーのサブスクリプション内のリソース グループの名前。 名前では大文字と小文字が区別されません。

subscriptionId
path True

string

minLength: 1

ターゲット サブスクリプションの ID。

api-version
query True

string

minLength: 1

この操作に使用する API バージョン。

要求本文

名前 説明
properties.automaticSnapshotPolicyEnabled

boolean

isVersioningEnabled プロパティを優先して非推奨になりました。

properties.changeFeed

ChangeFeed

変更フィード イベントの BLOB サービスプロパティ。

properties.containerDeleteRetentionPolicy

DeleteRetentionPolicy

コンテナーの論理的な削除の BLOB サービスのプロパティ。

properties.cors

CorsRules

BLOB サービスの CORS 規則を指定します。 要求には、最大 5 つの CorsRule 要素を含めることができます。 要求本文に CorsRule 要素が含まれていない場合、すべての CORS ルールが削除され、BLOB サービスに対して CORS が無効になります。

properties.defaultServiceVersion

string

DefaultServiceVersion は、受信要求のバージョンが指定されていない場合に BLOB サービスへの要求に使用する既定のバージョンを示します。 使用可能な値には、バージョン 2008-10-27 と、より新しいバージョンがすべて含まれます。

properties.deleteRetentionPolicy

DeleteRetentionPolicy

BLOB 論理的な削除の BLOB サービスのプロパティ。

properties.isVersioningEnabled

boolean

true に設定すると、バージョン管理が有効になります。

properties.lastAccessTimeTrackingPolicy

LastAccessTimeTrackingPolicy

最終アクセス時間ベースの追跡ポリシーを構成する BLOB サービス プロパティ。

properties.restorePolicy

RestorePolicyProperties

BLOB 復元ポリシーの BLOB サービスプロパティ。

応答

名前 説明
200 OK

BlobServiceProperties

OK -- ストレージ アカウントの BLOB サービスのプロパティを正常に設定します。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
user_impersonation ユーザー アカウントを偽装する

BlobServicesPutAllowPermanentDelete
BlobServicesPutLastAccessTimeBasedTracking
PutBlobServices

BlobServicesPutAllowPermanentDelete

要求のサンプル

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default?api-version=2024-01-01

{
  "properties": {
    "deleteRetentionPolicy": {
      "enabled": true,
      "days": 300,
      "allowPermanentDelete": true
    },
    "isVersioningEnabled": true
  }
}

応答のサンプル

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default",
  "name": "default",
  "type": "Microsoft.Storage/storageAccounts/blobServices",
  "properties": {
    "deleteRetentionPolicy": {
      "enabled": true,
      "days": 300,
      "allowPermanentDelete": true
    },
    "isVersioningEnabled": true
  }
}

BlobServicesPutLastAccessTimeBasedTracking

要求のサンプル

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default?api-version=2024-01-01

{
  "properties": {
    "lastAccessTimeTrackingPolicy": {
      "enable": true,
      "name": "AccessTimeTracking",
      "trackingGranularityInDays": 1,
      "blobType": [
        "blockBlob"
      ]
    }
  }
}

応答のサンプル

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default",
  "name": "default",
  "type": "Microsoft.Storage/storageAccounts/blobServices",
  "properties": {
    "lastAccessTimeTrackingPolicy": {
      "enable": true,
      "name": "AccessTimeTracking",
      "trackingGranularityInDays": 1,
      "blobType": [
        "blockBlob"
      ]
    }
  }
}

PutBlobServices

要求のサンプル

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default?api-version=2024-01-01

{
  "properties": {
    "cors": {
      "corsRules": [
        {
          "allowedOrigins": [
            "http://www.contoso.com",
            "http://www.fabrikam.com"
          ],
          "allowedMethods": [
            "GET",
            "HEAD",
            "POST",
            "OPTIONS",
            "MERGE",
            "PUT"
          ],
          "maxAgeInSeconds": 100,
          "exposedHeaders": [
            "x-ms-meta-*"
          ],
          "allowedHeaders": [
            "x-ms-meta-abc",
            "x-ms-meta-data*",
            "x-ms-meta-target*"
          ]
        },
        {
          "allowedOrigins": [
            "*"
          ],
          "allowedMethods": [
            "GET"
          ],
          "maxAgeInSeconds": 2,
          "exposedHeaders": [
            "*"
          ],
          "allowedHeaders": [
            "*"
          ]
        },
        {
          "allowedOrigins": [
            "http://www.abc23.com",
            "https://www.fabrikam.com/*"
          ],
          "allowedMethods": [
            "GET",
            "PUT"
          ],
          "maxAgeInSeconds": 2000,
          "exposedHeaders": [
            "x-ms-meta-abc",
            "x-ms-meta-data*",
            "x -ms-meta-target*"
          ],
          "allowedHeaders": [
            "x-ms-meta-12345675754564*"
          ]
        }
      ]
    },
    "defaultServiceVersion": "2017-07-29",
    "deleteRetentionPolicy": {
      "enabled": true,
      "days": 300
    },
    "isVersioningEnabled": true,
    "changeFeed": {
      "enabled": true,
      "retentionInDays": 7
    }
  }
}

応答のサンプル

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default",
  "name": "default",
  "type": "Microsoft.Storage/storageAccounts/blobServices",
  "properties": {
    "cors": {
      "corsRules": [
        {
          "allowedOrigins": [
            "http://www.contoso.com",
            "http://www.fabrikam.com"
          ],
          "allowedMethods": [
            "GET",
            "HEAD",
            "POST",
            "OPTIONS",
            "MERGE",
            "PUT"
          ],
          "maxAgeInSeconds": 100,
          "exposedHeaders": [
            "x-ms-meta-*"
          ],
          "allowedHeaders": [
            "x-ms-meta-abc",
            "x-ms-meta-data*",
            "x-ms-meta-target*"
          ]
        },
        {
          "allowedOrigins": [
            "*"
          ],
          "allowedMethods": [
            "GET"
          ],
          "maxAgeInSeconds": 2,
          "exposedHeaders": [
            "*"
          ],
          "allowedHeaders": [
            "*"
          ]
        },
        {
          "allowedOrigins": [
            "http://www.abc23.com",
            "https://www.fabrikam.com/*"
          ],
          "allowedMethods": [
            "GET",
            "PUT"
          ],
          "maxAgeInSeconds": 2000,
          "exposedHeaders": [
            "x-ms-meta-abc",
            "x-ms-meta-data*",
            "x -ms-meta-target*"
          ],
          "allowedHeaders": [
            "x-ms-meta-12345675754564*"
          ]
        }
      ]
    },
    "defaultServiceVersion": "2017-07-29",
    "deleteRetentionPolicy": {
      "enabled": true,
      "days": 300
    },
    "isVersioningEnabled": true,
    "changeFeed": {
      "enabled": true,
      "retentionInDays": 7
    }
  },
  "sku": {
    "name": "Standard_GRS",
    "tier": "Standard"
  }
}

定義

名前 説明
AllowedMethods

CorsRule 要素が存在する場合は必須。 配信元によって実行できる HTTP メソッドの一覧。

BlobServiceProperties

ストレージ アカウントの BLOB サービスのプロパティ。

BlobServicesName

指定したストレージ アカウント内の BLOB サービスの名前。 Blob Service 名は 'default' である必要があります

ChangeFeed

変更フィード イベントの BLOB サービスプロパティ。

CorsRule

BLOB サービスの CORS 規則を指定します。

CorsRules

CORS 規則を設定します。 要求には、最大 5 つの CorsRule 要素を含めることができます。

DeleteRetentionPolicy

論理的な削除のサービス プロパティ。

LastAccessTimeTrackingPolicy

最終アクセス時間ベースの追跡ポリシーの BLOB サービスプロパティ。

name

ポリシーの名前。 有効な値は AccessTimeTracking です。 このフィールドは現在読み取り専用です

RestorePolicyProperties

BLOB 復元ポリシーの BLOB サービスプロパティ

Sku

ストレージ アカウントの SKU。

SkuName

SKU 名。 アカウントの作成に必要です。更新の場合は省略可能です。 以前のバージョンでは、SKU 名は accountType と呼ばれることに注意してください。

SkuTier

SKU 階層。 これは SKU 名に基づいています。

AllowedMethods

CorsRule 要素が存在する場合は必須。 配信元によって実行できる HTTP メソッドの一覧。

説明
DELETE
GET
HEAD
MERGE
POST
OPTIONS
PUT
PATCH
CONNECT
TRACE

BlobServiceProperties

ストレージ アカウントの BLOB サービスのプロパティ。

名前 説明
id

string

リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

リソースの名前

properties.automaticSnapshotPolicyEnabled

boolean

isVersioningEnabled プロパティを優先して非推奨になりました。

properties.changeFeed

ChangeFeed

変更フィード イベントの BLOB サービスプロパティ。

properties.containerDeleteRetentionPolicy

DeleteRetentionPolicy

コンテナーの論理的な削除の BLOB サービスのプロパティ。

properties.cors

CorsRules

BLOB サービスの CORS 規則を指定します。 要求には、最大 5 つの CorsRule 要素を含めることができます。 要求本文に CorsRule 要素が含まれていない場合、すべての CORS ルールが削除され、BLOB サービスに対して CORS が無効になります。

properties.defaultServiceVersion

string

DefaultServiceVersion は、受信要求のバージョンが指定されていない場合に BLOB サービスへの要求に使用する既定のバージョンを示します。 使用可能な値には、バージョン 2008-10-27 と、より新しいバージョンがすべて含まれます。

properties.deleteRetentionPolicy

DeleteRetentionPolicy

BLOB 論理的な削除の BLOB サービスのプロパティ。

properties.isVersioningEnabled

boolean

true に設定すると、バージョン管理が有効になります。

properties.lastAccessTimeTrackingPolicy

LastAccessTimeTrackingPolicy

最終アクセス時間ベースの追跡ポリシーを構成する BLOB サービス プロパティ。

properties.restorePolicy

RestorePolicyProperties

BLOB 復元ポリシーの BLOB サービスプロパティ。

sku

Sku

SKU の名前とレベル。

type

string

リソースの型。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"

BlobServicesName

指定したストレージ アカウント内の BLOB サービスの名前。 Blob Service 名は 'default' である必要があります

説明
default

ChangeFeed

変更フィード イベントの BLOB サービスプロパティ。

名前 説明
enabled

boolean

BLOB サービスに対して変更フィード イベントログが有効になっているかどうかを示します。

retentionInDays

integer (int32)

minimum: 1
maximum: 146000

changeFeed リテンション期間を日数で示します。 最小値は 1 日で、最大値は 14,6000 日 (400 年) です。 null 値は、変更フィードの無限の保持を示します。

CorsRule

BLOB サービスの CORS 規則を指定します。

名前 説明
allowedHeaders

string[]

CorsRule 要素が存在する場合は必須。 クロスオリジン要求の一部として許可されるヘッダーの一覧。

allowedMethods

AllowedMethods[]

CorsRule 要素が存在する場合は必須。 配信元によって実行できる HTTP メソッドの一覧。

allowedOrigins

string[]

CorsRule 要素が存在する場合は必須。 CORS 経由で許可される配信元ドメインの一覧、またはすべてのドメインを許可する "*"

exposedHeaders

string[]

CorsRule 要素が存在する場合は必須。 CORS クライアントに公開する応答ヘッダーの一覧。

maxAgeInSeconds

integer

CorsRule 要素が存在する場合は必須。 クライアント/ブラウザーがプリフライト応答をキャッシュする秒数。

CorsRules

CORS 規則を設定します。 要求には、最大 5 つの CorsRule 要素を含めることができます。

名前 説明
corsRules

CorsRule[]

CORS 規則の一覧。 要求には、最大 5 つの CorsRule 要素を含めることができます。

DeleteRetentionPolicy

論理的な削除のサービス プロパティ。

名前 説明
allowPermanentDelete

boolean

このプロパティを true に設定すると、論理的に削除された BLOB のバージョンとスナップショットを削除できます。 このプロパティは、BLOB 復元ポリシーを使用できません。 このプロパティは BLOB サービスにのみ適用され、コンテナーまたはファイル共有には適用されません。

days

integer

minimum: 1
maximum: 365

削除されたアイテムを保持する日数を示します。 指定できる最小値は 1、最大値は 365 です。

enabled

boolean

DeleteRetentionPolicy が有効かどうかを示します。

LastAccessTimeTrackingPolicy

最終アクセス時間ベースの追跡ポリシーの BLOB サービスプロパティ。

名前 説明
blobType

string[]

定義済みのサポートされている BLOB の種類の配列。 サポートされている値は blockBlob だけです。 このフィールドは現在読み取り専用です

enable

boolean

true に設定すると、最終アクセス時間ベースの追跡が有効になります。

name

name

ポリシーの名前。 有効な値は AccessTimeTracking です。 このフィールドは現在読み取り専用です

trackingGranularityInDays

integer (int32)

このフィールドでは、BLOB オブジェクト追跡の粒度を日数で指定します。通常、BLOB オブジェクトを追跡する頻度を指定します。このフィールドは現在、値が 1 の読み取り専用です

name

ポリシーの名前。 有効な値は AccessTimeTracking です。 このフィールドは現在読み取り専用です

説明
AccessTimeTracking

RestorePolicyProperties

BLOB 復元ポリシーの BLOB サービスプロパティ

名前 説明
days

integer

minimum: 1
maximum: 365

この BLOB を復元できる期間。 0 より大きく、DeleteRetentionPolicy.days より小さい必要があります。

enabled

boolean

BLOB の復元は、true に設定されている場合に有効になります。

lastEnabledTime

string (date-time)

minRestoreTime プロパティを優先して非推奨になりました。

minRestoreTime

string (date-time)

復元を開始できる最小日時を返します。

Sku

ストレージ アカウントの SKU。

名前 説明
name

SkuName

SKU 名。 アカウントの作成に必要です。更新の場合は省略可能です。 以前のバージョンでは、SKU 名は accountType と呼ばれることに注意してください。

tier

SkuTier

SKU 階層。 これは SKU 名に基づいています。

SkuName

SKU 名。 アカウントの作成に必要です。更新の場合は省略可能です。 以前のバージョンでは、SKU 名は accountType と呼ばれることに注意してください。

説明
Standard_LRS
Standard_GRS
Standard_RAGRS
Standard_ZRS
Premium_LRS
Premium_ZRS
Standard_GZRS
Standard_RAGZRS
StandardV2_LRS
StandardV2_GRS
StandardV2_ZRS
StandardV2_GZRS
PremiumV2_LRS
PremiumV2_ZRS

SkuTier

SKU 階層。 これは SKU 名に基づいています。

説明
Standard
Premium