你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Containers - Create Or Update

创建新容器或更新设备上的现有容器。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/storageAccounts/{storageAccountName}/containers/{containerName}?api-version=2021-02-01

URI 参数

名称 必需 类型 说明
containerName
path True

string

容器名称。

deviceName
path True

string

设备名称。

resourceGroupName
path True

string

资源组名称。

storageAccountName
path True

string

存储帐户名称

subscriptionId
path True

string

订阅的 ID。

api-version
query True

string

API 版本。

请求正文

名称 必需 类型 说明
properties.dataFormat True

AzureContainerDataFormat

容器的 DataFormat

响应

名称 类型 说明
200 OK

Container

已成功创建或更新容器。

202 Accepted

已接受创建或更新容器的请求。

Other Status Codes

CloudError

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

ContainerPut

Sample Request

PUT https://management.azure.com/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/storageAccounts/storageaccount1/containers/blobcontainer1?api-version=2021-02-01

{
  "properties": {
    "dataFormat": "BlockBlob"
  }
}

Sample Response

{
  "properties": {
    "containerStatus": "OK",
    "dataFormat": "BlockBlob",
    "refreshDetails": {},
    "createdDateTime": "2019-10-20T23:13:27.8545799Z"
  },
  "id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForDataBoxEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/storageAccounts/storageaccount1/containers/blobcontainer1",
  "name": "blobcontainer-5e155efe",
  "type": "Microsoft.DataBoxEdge/dataBoxEdgeDevices/storageAccounts/containers"
}

定义

名称 说明
AzureContainerDataFormat

用于共享表示的文件的存储格式。

CloudError

来自服务的错误响应。

CloudErrorBody

来自服务的错误响应。

Container

表示 Data Box Edge/网关设备上的容器。

ContainerStatus

容器的当前状态。

createdByType

创建资源的标识类型。

RefreshDetails

用于跟踪共享或容器上的刷新作业的字段。

SystemData

与资源的创建和上次修改相关的元数据。

AzureContainerDataFormat

用于共享表示的文件的存储格式。

名称 类型 说明
AzureFile

string

BlockBlob

string

PageBlob

string

CloudError

来自服务的错误响应。

名称 类型 说明
error

CloudErrorBody

错误详细信息。

CloudErrorBody

来自服务的错误响应。

名称 类型 说明
code

string

错误的标识符。 代码是固定的,旨在以编程方式使用。

details

CloudErrorBody[]

有关错误的其他详细信息的列表。

message

string

描述错误的消息,该消息适用于在用户界面中显示。

Container

表示 Data Box Edge/网关设备上的容器。

名称 类型 说明
id

string

唯一标识对象的路径 ID。

name

string

对象名称。

properties.containerStatus

ContainerStatus

容器的当前状态。

properties.createdDateTime

string

创建容器时的 UTC 时间。

properties.dataFormat

AzureContainerDataFormat

容器的 DataFormat

properties.refreshDetails

RefreshDetails

此容器上的刷新作业的详细信息。

systemData

SystemData

DataBoxEdge 资源中的容器

type

string

对象的分层类型。

ContainerStatus

容器的当前状态。

名称 类型 说明
NeedsAttention

string

OK

string

Offline

string

Unknown

string

Updating

string

createdByType

创建资源的标识类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

RefreshDetails

用于跟踪共享或容器上的刷新作业的字段。

名称 类型 说明
errorManifestFile

string

指示此特定共享或容器上最后一次刷新作业的错误 xml 的相对路径(如果有)。 这可能是失败的作业或成功的作业。

inProgressRefreshJobId

string

如果刷新作业当前正在此共享或容器上进行,则此字段指示该作业的 ARM 资源 ID。 如果没有正在进行的作业,则字段为空。

lastCompletedRefreshJobTimeInUTC

string

指示此特定共享或容器上上次刷新作业的完成时间(如果有)。这可能是失败的作业或成功的作业。

lastJob

string

指示此特定共享或容器上最后一次刷新作业的 ID(如果有)。 这可能是失败的作业或成功的作业。

SystemData

与资源的创建和上次修改相关的元数据。

名称 类型 说明
createdAt

string

资源创建时间戳 (UTC) 。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识类型。

lastModifiedAt

string

上次修改资源的标识类型。

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识类型。