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=2023-01-01
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
account
|
path | True |
string |
指定したリソース グループ内のストレージ アカウントの名前。 ストレージ アカウント名の長さは 3 ~ 24 文字で、数字と小文字のみを使用する必要があります。 Regex pattern: |
Blob
|
path | True |
指定したストレージ アカウント内の BLOB サービスの名前。 BLOB サービス名は 'default' である必要があります |
|
resource
|
path | True |
string |
ユーザーのサブスクリプション内のリソース グループの名前。 名前の大文字と小文字は区別されます。 Regex pattern: |
subscription
|
path | True |
string |
ターゲット サブスクリプションの ID。 |
api-version
|
query | True |
string |
この操作に使用する API バージョン。 |
要求本文
名前 | 型 | 説明 |
---|---|---|
properties.automaticSnapshotPolicyEnabled |
boolean |
isVersioningEnabled プロパティを優先して非推奨になりました。 |
properties.changeFeed |
変更フィード イベントの BLOB サービス プロパティ。 |
|
properties.containerDeleteRetentionPolicy |
コンテナーの論理的な削除の BLOB サービスのプロパティ。 |
|
properties.cors |
BLOB サービスの CORS 規則を指定します。 要求には、最大 5 つの CorsRule 要素を含めることができます。 要求本文に CorsRule 要素が含まれていない場合、すべての CORS ルールが削除され、BLOB サービスに対して CORS が無効になります。 |
|
properties.defaultServiceVersion |
string |
DefaultServiceVersion は、受信要求のバージョンが指定されていない場合に BLOB サービスへの要求に使用する既定のバージョンを示します。 有効値は、バージョン 2008-10-27 およびそれ以降のすべての最新バージョンです。 |
properties.deleteRetentionPolicy |
BLOB 論理的な削除の BLOB サービスのプロパティ。 |
|
properties.isVersioningEnabled |
boolean |
true に設定すると、バージョン管理が有効になります。 |
properties.lastAccessTimeTrackingPolicy |
最終アクセス時間ベースの追跡ポリシーを構成する BLOB サービス プロパティ。 |
|
properties.restorePolicy |
BLOB 復元ポリシーの BLOB サービスのプロパティ。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
OK -- ストレージ アカウントの BLOB サービスのプロパティを正常に設定します。 |
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名前 | 説明 |
---|---|
user_impersonation | ユーザー アカウントの借用 |
例
Blob |
Blob |
Put |
BlobServicesPutAllowPermanentDelete
Sample Request
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default?api-version=2023-01-01
{
"properties": {
"deleteRetentionPolicy": {
"enabled": true,
"days": 300,
"allowPermanentDelete": true
},
"isVersioningEnabled": true
}
}
Sample Response
{
"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
Sample Request
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default?api-version=2023-01-01
{
"properties": {
"lastAccessTimeTrackingPolicy": {
"enable": true,
"name": "AccessTimeTracking",
"trackingGranularityInDays": 1,
"blobType": [
"blockBlob"
]
}
}
}
Sample Response
{
"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
Sample Request
PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res4410/providers/Microsoft.Storage/storageAccounts/sto8607/blobServices/default?api-version=2023-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
}
}
}
Sample Response
{
"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"
}
}
定義
名前 | 説明 |
---|---|
Allowed |
CorsRule 要素が存在する場合は必須です。 配信元によって実行できる HTTP メソッドの一覧。 |
Blob |
ストレージ アカウントの BLOB サービスのプロパティ。 |
Blob |
指定したストレージ アカウント内の BLOB サービスの名前。 BLOB サービス名は 'default' である必要があります |
Change |
変更フィード イベントの BLOB サービス プロパティ。 |
Cors |
BLOB サービスの CORS ルールを指定します。 |
Cors |
CORS ルールを設定します。 要求には、最大 5 つの CorsRule 要素を含めることができます。 |
Delete |
論理的な削除のサービス プロパティ。 |
Last |
最終アクセス時間ベースの追跡ポリシーの BLOB サービスのプロパティ。 |
name |
ポリシーの名前。 有効な値は AccessTimeTracking です。 このフィールドは現在読み取り専用です |
Restore |
BLOB 復元ポリシーの BLOB サービスプロパティ |
Sku |
ストレージ アカウントの SKU。 |
Sku |
SKU 名。 アカウントの作成に必要です。更新の場合は省略可能です。 古いバージョンでは、SKU 名は accountType と呼ばれることに注意してください。 |
Sku |
SKU レベル。 これは SKU 名に基づいています。 |
AllowedMethods
CorsRule 要素が存在する場合は必須です。 配信元によって実行できる HTTP メソッドの一覧。
名前 | 型 | 説明 |
---|---|---|
CONNECT |
string |
|
DELETE |
string |
|
GET |
string |
|
HEAD |
string |
|
MERGE |
string |
|
OPTIONS |
string |
|
PATCH |
string |
|
POST |
string |
|
PUT |
string |
|
TRACE |
string |
BlobServiceProperties
ストレージ アカウントの BLOB サービスのプロパティ。
名前 | 型 | 説明 |
---|---|---|
id |
string |
リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
リソースの名前 |
properties.automaticSnapshotPolicyEnabled |
boolean |
isVersioningEnabled プロパティを優先して非推奨になりました。 |
properties.changeFeed |
変更フィード イベントの BLOB サービス プロパティ。 |
|
properties.containerDeleteRetentionPolicy |
コンテナーの論理的な削除の BLOB サービスのプロパティ。 |
|
properties.cors |
BLOB サービスの CORS 規則を指定します。 要求には、最大 5 つの CorsRule 要素を含めることができます。 要求本文に CorsRule 要素が含まれていない場合、すべての CORS ルールが削除され、BLOB サービスに対して CORS が無効になります。 |
|
properties.defaultServiceVersion |
string |
DefaultServiceVersion は、受信要求のバージョンが指定されていない場合に BLOB サービスへの要求に使用する既定のバージョンを示します。 有効値は、バージョン 2008-10-27 およびそれ以降のすべての最新バージョンです。 |
properties.deleteRetentionPolicy |
BLOB 論理的な削除の BLOB サービスのプロパティ。 |
|
properties.isVersioningEnabled |
boolean |
true に設定すると、バージョン管理が有効になります。 |
properties.lastAccessTimeTrackingPolicy |
最終アクセス時間ベースの追跡ポリシーを構成する BLOB サービス プロパティ。 |
|
properties.restorePolicy |
BLOB 復元ポリシーの BLOB サービスのプロパティ。 |
|
sku |
SKU の名前とレベル。 |
|
type |
string |
リソースの型。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts" |
BlobServicesName
指定したストレージ アカウント内の BLOB サービスの名前。 BLOB サービス名は 'default' である必要があります
名前 | 型 | 説明 |
---|---|---|
default |
string |
ChangeFeed
変更フィード イベントの BLOB サービス プロパティ。
名前 | 型 | 説明 |
---|---|---|
enabled |
boolean |
BLOB サービスに対して変更フィード イベント ログが有効になっているかどうかを示します。 |
retentionInDays |
integer |
changeFeed リテンション期間を日数で示します。 最小値は 1 日で、最大値は 146000 日 (400 年) です。 null 値は、変更フィードの無限保持を示します。 |
CorsRule
BLOB サービスの CORS ルールを指定します。
名前 | 型 | 説明 |
---|---|---|
allowedHeaders |
string[] |
CorsRule 要素が存在する場合は必須です。 クロスオリジン要求の一部として許可されるヘッダーの一覧。 |
allowedMethods |
CorsRule 要素が存在する場合は必須です。 配信元によって実行できる HTTP メソッドの一覧。 |
|
allowedOrigins |
string[] |
CorsRule 要素が存在する場合は必須です。 CORS 経由で許可される配信元ドメインの一覧、またはすべてのドメインを許可する "*" |
exposedHeaders |
string[] |
CorsRule 要素が存在する場合は必須です。 CORS クライアントに公開する応答ヘッダーの一覧。 |
maxAgeInSeconds |
integer |
CorsRule 要素が存在する場合は必須です。 クライアント/ブラウザーがプレフライト応答をキャッシュする秒数。 |
CorsRules
CORS ルールを設定します。 要求には、最大 5 つの CorsRule 要素を含めることができます。
名前 | 型 | 説明 |
---|---|---|
corsRules |
Cors |
CORS 規則の一覧。 要求には、最大 5 つの CorsRule 要素を含めることができます。 |
DeleteRetentionPolicy
論理的な削除のサービス プロパティ。
名前 | 型 | 説明 |
---|---|---|
allowPermanentDelete |
boolean |
このプロパティを true に設定すると、論理的に削除された BLOB バージョンとスナップショットを削除できます。 このプロパティは、BLOB 復元ポリシーを使用できません。 このプロパティは BLOB サービスにのみ適用され、コンテナーやファイル共有には適用されません。 |
days |
integer |
削除されたアイテムを保持する日数を示します。 最小値は 1、最大値は 365 です。 |
enabled |
boolean |
DeleteRetentionPolicy が有効かどうかを示します。 |
LastAccessTimeTrackingPolicy
最終アクセス時間ベースの追跡ポリシーの BLOB サービスのプロパティ。
名前 | 型 | 説明 |
---|---|---|
blobType |
string[] |
定義済みのサポートされている BLOB 型の配列。 サポートされている値は blockBlob のみです。 このフィールドは現在読み取り専用です |
enable |
boolean |
true に設定すると、最終アクセス時間ベースの追跡が有効になります。 |
name |
ポリシーの名前。 有効な値は AccessTimeTracking です。 このフィールドは現在読み取り専用です |
|
trackingGranularityInDays |
integer |
フィールドは、BLOB オブジェクト追跡の粒度を日数で指定します。通常、BLOB オブジェクトを追跡する頻度を指定します。このフィールドは現在、値が 1 の読み取り専用です |
name
ポリシーの名前。 有効な値は AccessTimeTracking です。 このフィールドは現在読み取り専用です
名前 | 型 | 説明 |
---|---|---|
AccessTimeTracking |
string |
RestorePolicyProperties
BLOB 復元ポリシーの BLOB サービスプロパティ
名前 | 型 | 説明 |
---|---|---|
days |
integer |
この BLOB を復元できる期間。 これは、0 より大きく、DeleteRetentionPolicy.days 未満である必要があります。 |
enabled |
boolean |
TRUE に設定すると、BLOB の復元が有効になります。 |
lastEnabledTime |
string |
minRestoreTime プロパティを優先して非推奨になりました。 |
minRestoreTime |
string |
復元を開始できる最小日時を返します。 |
Sku
ストレージ アカウントの SKU。
名前 | 型 | 説明 |
---|---|---|
name |
SKU 名。 アカウントの作成に必要です。更新の場合は省略可能です。 古いバージョンでは、SKU 名は accountType と呼ばれることに注意してください。 |
|
tier |
SKU レベル。 これは SKU 名に基づいています。 |
SkuName
SKU 名。 アカウントの作成に必要です。更新の場合は省略可能です。 古いバージョンでは、SKU 名は accountType と呼ばれることに注意してください。
名前 | 型 | 説明 |
---|---|---|
Premium_LRS |
string |
|
Premium_ZRS |
string |
|
Standard_GRS |
string |
|
Standard_GZRS |
string |
|
Standard_LRS |
string |
|
Standard_RAGRS |
string |
|
Standard_RAGZRS |
string |
|
Standard_ZRS |
string |
SkuTier
SKU レベル。 これは SKU 名に基づいています。
名前 | 型 | 説明 |
---|---|---|
Premium |
string |
|
Standard |
string |