次の方法で共有


File Shares - Create

要求本文で説明されているように、指定したアカウントの下に新しい共有を作成します。 共有リソースには、その共有のメタデータとプロパティが含まれます。 共有に含まれるファイルの一覧は含まれません。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}?api-version=2024-01-01
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/fileServices/default/shares/{shareName}?$expand={$expand}&api-version=2024-01-01

URI パラメーター

名前 / 必須 説明
accountName
path True

string

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

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

resourceGroupName
path True

string

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

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

shareName
path True

string

minLength: 3
maxLength: 63

指定したストレージ アカウント内のファイル共有の名前。 ファイル共有名の長さは 3 ~ 63 文字にする必要があり、数字、小文字、ダッシュ (-) のみを使用してください。 すべてのダッシュ (-) 文字の直前に文字または数字を付ける必要があります。

subscriptionId
path True

string

minLength: 1

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

api-version
query True

string

minLength: 1

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

$expand
query

string

オプション。共有のプロパティ内のプロパティを展開するために使用します。 有効な値はスナップショットです。 区切り記号 ',' を含む文字列として渡す必要があります

要求本文

名前 説明
properties.accessTier

ShareAccessTier

特定の共有のアクセス層。 GpV2 アカウントでは、TransactionOptimized (既定)、ホット、クールを選択できます。 FileStorage アカウントでは、Premium を選択できます。

properties.enabledProtocols

EnabledProtocols

ファイル共有に使用される認証プロトコル。 共有の作成時にのみ指定できます。

properties.fileSharePaidBursting

FileSharePaidBursting

ファイル共有の有料バーストプロパティ。

properties.metadata

object

共有にメタデータとして関連付ける名前と値のペア。

properties.provisionedBandwidthMibps

integer (int32)

共有のプロビジョニングされた帯域幅 (1 秒あたりメビバイト単位)。 このプロパティは、Files Provisioned v2 アカウントの種類で作成されたファイル共有に対してのみ使用されます。 プロビジョニングされた帯域幅の最小値と最大値については、GetFileServiceUsage API 応答を参照してください。

properties.provisionedIops

integer (int32)

共有のプロビジョニングされた IOPS。 このプロパティは、Files Provisioned v2 アカウントの種類で作成されたファイル共有に対してのみ使用されます。 プロビジョニングされた IOPS の最小値と最大値については、GetFileServiceUsage API 応答を参照してください。

properties.rootSquash

RootSquashType

このプロパティは NFS 共有専用です。 既定値は NoRootSquash です。

properties.shareQuota

integer (int32)

共有のプロビジョニング済みサイズ (ジビバイト単位)。 0 より大きく、5 TB (5120) 以下である必要があります。 大きなファイル共有の場合、最大サイズは 102400 です。 Files Provisioned v2 アカウントの種類で作成されたファイル共有については、プロビジョニングされたストレージ の最小サイズと最大許容サイズについては、GetFileServiceUsage API 応答を参照してください。

properties.signedIdentifiers

SignedIdentifier[]

共有で指定された、保存されているアクセス ポリシーの一覧。

応答

名前 説明
200 OK

FileShare

[OK] -- 共有は既に作成されています。

201 Created

FileShare

[作成済み] -- [共有の作成] 操作が正常に完了しました。

Other Status Codes

CloudError

操作が失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー

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

スコープ

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

Create NFS Shares
PutShares
PutShares with Access Tier
PutShares with Paid Bursting
PutSharesProvisionedV2

Create NFS Shares

要求のサンプル

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235?api-version=2024-01-01

{
  "properties": {
    "enabledProtocols": "NFS"
  }
}

応答のサンプル

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
  "name": "share1235",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
  "properties": {
    "enabledProtocols": "NFS"
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
  "name": "share1235",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
  "properties": {
    "enabledProtocols": "NFS"
  }
}

PutShares

要求のサンプル

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185?api-version=2024-01-01

{}

応答のサンプル

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
  "name": "share6185",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares"
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/fileServices/default/shares/share6185",
  "name": "share6185",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares"
}

PutShares with Access Tier

要求のサンプル

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235?api-version=2024-01-01

{
  "properties": {
    "accessTier": "Hot"
  }
}

応答のサンプル

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
  "name": "share1235",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
  "properties": {
    "accessTier": "Hot"
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
  "name": "share1235",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
  "properties": {
    "accessTier": "Hot"
  }
}

PutShares with Paid Bursting

要求のサンプル

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235?api-version=2024-01-01

{
  "properties": {
    "fileSharePaidBursting": {
      "paidBurstingEnabled": true,
      "paidBurstingMaxIops": 102400,
      "paidBurstingMaxBandwidthMibps": 10340
    }
  }
}

応答のサンプル

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
  "name": "share1235",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
  "properties": {
    "fileSharePaidBursting": {
      "paidBurstingEnabled": true,
      "paidBurstingMaxIops": 102400,
      "paidBurstingMaxBandwidthMibps": 10340
    }
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
  "name": "share1235",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
  "properties": {
    "fileSharePaidBursting": {
      "paidBurstingEnabled": true,
      "paidBurstingMaxIops": 102400,
      "paidBurstingMaxBandwidthMibps": 10340
    }
  }
}

PutSharesProvisionedV2

要求のサンプル

PUT https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235?api-version=2024-01-01

{
  "properties": {
    "shareQuota": 100,
    "provisionedIops": 5000,
    "provisionedBandwidthMibps": 200
  }
}

応答のサンプル

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
  "name": "share1235",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
  "properties": {
    "shareQuota": 100,
    "provisionedIops": 5000,
    "provisionedBandwidthMibps": 200,
    "includedBurstIops": 15000,
    "maxBurstCreditsForIops": 36000000
  }
}
{
  "id": "/subscriptions/{subscription-id}/resourceGroups/res346/providers/Microsoft.Storage/storageAccounts/sto666/fileServices/default/shares/share1235",
  "name": "share1235",
  "type": "Microsoft.Storage/storageAccounts/fileServices/shares",
  "properties": {
    "shareQuota": 100,
    "provisionedIops": 5000,
    "provisionedBandwidthMibps": 200,
    "includedBurstIops": 15000,
    "maxBurstCreditsForIops": 36000000
  }
}

定義

名前 説明
AccessPolicy
CloudError

Storage サービスからのエラー応答。

CloudErrorBody

Storage サービスからのエラー応答。

EnabledProtocols

ファイル共有に使用される認証プロトコル。 共有の作成時にのみ指定できます。

FileShare

ID、リソース名、リソースの種類、Etag など、ファイル共有のプロパティ。

FileSharePaidBursting

ファイル共有の有料バーストプロパティ。

LeaseDuration

共有のリースが無期限か固定期間かを指定します。これは、共有がリースされている場合のみです。

LeaseState

共有のリース状態。

LeaseStatus

共有のリース状態。

RootSquashType

このプロパティは NFS 共有専用です。 既定値は NoRootSquash です。

ShareAccessTier

特定の共有のアクセス層。 GpV2 アカウントでは、TransactionOptimized (既定)、ホット、クールを選択できます。 FileStorage アカウントでは、Premium を選択できます。

SignedIdentifier

AccessPolicy

名前 説明
expiryTime

string (date-time)

アクセス ポリシーの有効期限

permission

string

省略されたアクセス許可の一覧。

startTime

string (date-time)

アクセス ポリシーの開始時刻

CloudError

Storage サービスからのエラー応答。

名前 説明
error

CloudErrorBody

Storage サービスからのエラー応答。

CloudErrorBody

Storage サービスからのエラー応答。

名前 説明
code

string

エラーの識別子。 コードは不変であり、プログラムで使用することを目的としています。

details

CloudErrorBody[]

エラーに関する追加の詳細の一覧。

message

string

ユーザー インターフェイスでの表示に適したエラーを説明するメッセージ。

target

string

特定のエラーのターゲット。 たとえば、エラーが発生したプロパティの名前です。

EnabledProtocols

ファイル共有に使用される認証プロトコル。 共有の作成時にのみ指定できます。

説明
SMB
NFS

FileShare

ID、リソース名、リソースの種類、Etag など、ファイル共有のプロパティ。

名前 説明
etag

string

リソース Etag。

id

string

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

name

string

リソースの名前

properties.accessTier

ShareAccessTier

特定の共有のアクセス層。 GpV2 アカウントでは、TransactionOptimized (既定)、ホット、クールを選択できます。 FileStorage アカウントでは、Premium を選択できます。

properties.accessTierChangeTime

string (date-time)

共有アクセス層の最終変更時刻を示します。

properties.accessTierStatus

string

アクセス層の移行が保留中かどうかを示します。

properties.deleted

boolean

共有が削除されたかどうかを示します。

properties.deletedTime

string (date-time)

共有が削除された場合の削除時刻。

properties.enabledProtocols

EnabledProtocols

ファイル共有に使用される認証プロトコル。 共有の作成時にのみ指定できます。

properties.fileSharePaidBursting

FileSharePaidBursting

ファイル共有の有料バーストプロパティ。

properties.includedBurstIops

integer (int32)

共有の計算されたバースト IOPS。 このプロパティは、Files Provisioned v2 アカウントの種類で作成されたファイル共有に対してのみ使用されます。

properties.lastModifiedTime

string (date-time)

共有が最後に変更された日時を返します。

properties.leaseDuration

LeaseDuration

共有のリースが無期限か固定期間かを指定します。これは、共有がリースされている場合のみです。

properties.leaseState

LeaseState

共有のリース状態。

properties.leaseStatus

LeaseStatus

共有のリース状態。

properties.maxBurstCreditsForIops

integer (int64)

共有の計算された最大バースト クレジット。 このプロパティは、Files Provisioned v2 アカウントの種類で作成されたファイル共有に対してのみ使用されます。

properties.metadata

object

共有にメタデータとして関連付ける名前と値のペア。

properties.nextAllowedProvisionedBandwidthDowngradeTime

string (date-time-rfc1123)

共有に対して次に許可されているプロビジョニングされた帯域幅のダウングレード時間を返します。 このプロパティは、Files Provisioned v2 アカウントの種類で作成されたファイル共有に対してのみ使用されます。

properties.nextAllowedProvisionedIopsDowngradeTime

string (date-time-rfc1123)

共有に対して次に許可されているプロビジョニング済み IOPS ダウングレード時間を返します。 このプロパティは、Files Provisioned v2 アカウントの種類で作成されたファイル共有に対してのみ使用されます。

properties.nextAllowedQuotaDowngradeTime

string (date-time-rfc1123)

共有に対して次に許可されているプロビジョニング済みストレージ サイズのダウングレード時間を返します。 このプロパティは、Files Provisioned v1 SSD および Files Provisioned v2 アカウントの種類で作成されたファイル共有に対してのみ使用されます。

properties.provisionedBandwidthMibps

integer (int32)

共有のプロビジョニングされた帯域幅 (1 秒あたりメビバイト単位)。 このプロパティは、Files Provisioned v2 アカウントの種類で作成されたファイル共有に対してのみ使用されます。 プロビジョニングされた帯域幅の最小値と最大値については、GetFileServiceUsage API 応答を参照してください。

properties.provisionedIops

integer (int32)

共有のプロビジョニングされた IOPS。 このプロパティは、Files Provisioned v2 アカウントの種類で作成されたファイル共有に対してのみ使用されます。 プロビジョニングされた IOPS の最小値と最大値については、GetFileServiceUsage API 応答を参照してください。

properties.remainingRetentionDays

integer

論理的に削除された共有の残りの保持日数。

properties.rootSquash

RootSquashType

このプロパティは NFS 共有専用です。 既定値は NoRootSquash です。

properties.shareQuota

integer (int32)

共有のプロビジョニング済みサイズ (ジビバイト単位)。 0 より大きく、5 TB (5120) 以下である必要があります。 大きなファイル共有の場合、最大サイズは 102400 です。 Files Provisioned v2 アカウントの種類で作成されたファイル共有については、プロビジョニングされたストレージ の最小サイズと最大許容サイズについては、GetFileServiceUsage API 応答を参照してください。

properties.shareUsageBytes

integer (int64)

共有に格納されているデータのおおよそのサイズ。 この値には、最近作成または最近サイズ変更されたすべてのファイルが含まれていない場合があることに注意してください。

properties.signedIdentifiers

SignedIdentifier[]

共有で指定された、保存されているアクセス ポリシーの一覧。

properties.snapshotTime

string (date-time)

展開パラメーター "snapshots" を使用してリスト共有の応答で返される共有スナップショットの作成時間。

properties.version

string

共有のバージョン。

type

string

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

FileSharePaidBursting

ファイル共有の有料バーストプロパティ。

名前 説明
paidBurstingEnabled

boolean

共有に対して有料バーストが有効かどうかを示します。 このプロパティは、Files Provisioned v1 SSD アカウントの種類で作成されたファイル共有に対してのみ使用されます。

paidBurstingMaxBandwidthMibps

integer (int32)

共有の最大有料バースト帯域幅 (1 秒あたりのメビバイト単位)。 このプロパティは、Files Provisioned v1 SSD アカウントの種類で作成されたファイル共有に対してのみ使用されます。 許容される最大値は 10340 です。これは、共有で許可される最大帯域幅です。

paidBurstingMaxIops

integer (int32)

共有の最大有料バースト IOPS。 このプロパティは、Files Provisioned v1 SSD アカウントの種類で作成されたファイル共有に対してのみ使用されます。 許可される最大値は 102400 です。これは、共有で許可される最大 IOPS です。

LeaseDuration

共有のリースが無期限か固定期間かを指定します。これは、共有がリースされている場合のみです。

説明
Infinite
Fixed

LeaseState

共有のリース状態。

説明
Available
Leased
Expired
Breaking
Broken

LeaseStatus

共有のリース状態。

説明
Locked
Unlocked

RootSquashType

このプロパティは NFS 共有専用です。 既定値は NoRootSquash です。

説明
NoRootSquash
RootSquash
AllSquash

ShareAccessTier

特定の共有のアクセス層。 GpV2 アカウントでは、TransactionOptimized (既定)、ホット、クールを選択できます。 FileStorage アカウントでは、Premium を選択できます。

説明
TransactionOptimized
Hot
Cool
Premium

SignedIdentifier

名前 説明
accessPolicy

AccessPolicy

アクセス ポリシー

id

string

保存されているアクセス ポリシーの一意識別子。