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

Table - Create

在指定的帐户下创建具有指定表名称的新表。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/tableServices/default/tables/{tableName}?api-version=2026-04-01

URI 参数

名称 必需 类型 说明
accountName
path True

string

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

指定资源组中的存储帐户的名称。 存储帐户名称长度必须为 3 到 24 个字符,并且只能使用数字和小写字母。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 此名称不区分大小写。

subscriptionId
path True

string (uuid)

目标订阅的 ID。 该值必须是 UUID。

tableName
path True

string

minLength: 3
maxLength: 63
pattern: ^[A-Za-z][A-Za-z0-9]{2,62}$

表名在存储帐户中必须是唯一的,并且必须介于 3 到 63 个字符之间。名称必须仅包含字母数字字符,并且不能以数字字符开头。

api-version
query True

string

minLength: 1

用于此作的 API 版本。

请求正文

名称 类型 说明
properties.signedIdentifiers

TableSignedIdentifier[]

表上指定的存储访问策略列表。

响应

名称 类型 说明
200 OK

Table

资源“表”更新作成功

Other Status Codes

CloudError

意外的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow.

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

TableOperationPut
TableOperationPutOrPatchAcls

TableOperationPut

示例请求

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185?api-version=2026-04-01

示例响应

{
  "name": "table6185",
  "type": "Microsoft.Storage/storageAccounts/tableServices/tables",
  "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185",
  "properties": {
    "tableName": "table6185"
  }
}

TableOperationPutOrPatchAcls

示例请求

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185?api-version=2026-04-01

{
  "properties": {
    "signedIdentifiers": [
      {
        "accessPolicy": {
          "expiryTime": "2022-03-20T08:49:37.0000000Z",
          "permission": "raud",
          "startTime": "2022-03-17T08:49:37.0000000Z"
        },
        "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"
      },
      {
        "accessPolicy": {
          "expiryTime": "2022-03-20T08:49:37.0000000Z",
          "permission": "rad",
          "startTime": "2022-03-17T08:49:37.0000000Z"
        },
        "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"
      }
    ]
  }
}

示例响应

{
  "name": "table6185",
  "type": "Microsoft.Storage/storageAccounts/tableServices/tables",
  "id": "/subscriptions/{subscription-id}/resourceGroups/res3376/providers/Microsoft.Storage/storageAccounts/sto328/tableServices/default/tables/table6185",
  "properties": {
    "signedIdentifiers": [
      {
        "accessPolicy": {
          "expiryTime": "2022-03-20T08:49:37.0000000Z",
          "permission": "raud",
          "startTime": "2022-03-17T08:49:37.0000000Z"
        },
        "id": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI"
      },
      {
        "accessPolicy": {
          "expiryTime": "2022-03-20T08:49:37.0000000Z",
          "permission": "rad",
          "startTime": "2022-03-17T08:49:37.0000000Z"
        },
        "id": "PTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODklMTI"
      }
    ],
    "tableName": "table6185"
  }
}

定义

名称 说明
CloudError

存储服务的错误响应。

CloudErrorBody

存储服务的错误响应。

createdByType

创建资源的标识的类型。

systemData

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

Table

表的属性,包括 ID、资源名称、资源类型。

TableAccessPolicy

表访问策略属性对象。

TableSignedIdentifier

要设置表访问策略的对象。

CloudError

存储服务的错误响应。

名称 类型 说明
error

CloudErrorBody

存储服务的错误响应。

CloudErrorBody

存储服务的错误响应。

名称 类型 说明
code

string

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

details

CloudErrorBody[]

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

message

string

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

target

string

特定错误的目标。 例如,错误属性的名称。

createdByType

创建资源的标识的类型。

说明
User
Application
ManagedIdentity
Key

systemData

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

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

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

Table

表的属性,包括 ID、资源名称、资源类型。

名称 类型 说明
id

string (arm-id)

资源的完全限定的资源 ID。 例如,“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}”

name

string

资源的名称

properties.signedIdentifiers

TableSignedIdentifier[]

表上指定的存储访问策略列表。

properties.tableName

string

指定账户下的表名

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

TableAccessPolicy

表访问策略属性对象。

名称 类型 说明
expiryTime

string (date-time)

访问策略的到期时间

permission

string

必填。 缩写权限的列表。 支持的权限值包括“r”、“a”、“u”、“d”

startTime

string (date-time)

访问策略的开始时间

TableSignedIdentifier

要设置表访问策略的对象。

名称 类型 说明
accessPolicy

TableAccessPolicy

访问策略

id

string

存储访问策略的唯一 64 字符值。