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

Namespaces - Create Or Update

创建或更新服务命名空间。 创建后,此命名空间的资源清单是不可变的。 此操作是幂等的。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceBus/namespaces/{namespaceName}?api-version=2021-11-01

URI 参数

名称 必需 类型 说明
namespaceName
path True

string

命名空间名称。

resourceGroupName
path True

string

Azure 订阅中资源组的名称。

subscriptionId
path True

string

唯一标识 Microsoft Azure 订阅的订阅凭据。 此订阅 ID 是每个服务调用的 URI 的一部分。

api-version
query True

string

客户端 API 版本。

请求正文

名称 必需 类型 说明
location True

string

资源所在的地理位置

identity.type

ManagedServiceIdentityType

托管服务标识的类型。

identity.userAssignedIdentities

<string,  UserAssignedIdentity>

用户分配标识的属性

properties.alternateName

string

命名空间的备用名称

properties.disableLocalAuth

boolean

此属性禁用服务总线命名空间的 SAS 身份验证。

properties.encryption.keySource

keySource

枚举 KeySource for Encryption 的可能值

properties.encryption.keyVaultProperties

KeyVaultProperties[]

KeyVault 的属性

properties.encryption.requireInfrastructureEncryption

boolean

启用基础结构加密 (双重加密)

properties.privateEndpointConnections

PrivateEndpointConnection[]

专用终结点连接列表。

properties.zoneRedundant

boolean

启用此属性会在区域支持的可用性区域中创建高级服务总线命名空间。

sku

SBSku

SKU 的属性

tags

object

资源标记

响应

名称 类型 说明
200 OK

SBNamespace

已成功创建命名空间。

201 Created

SBNamespace

命名空间创建请求已接受。

202 Accepted

命名空间创建或更新请求已接受。

Other Status Codes

ErrorResponse

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

安全性

azure_auth

Azure Active Directory OAuth2 流

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

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

NameSpaceCreate

Sample Request

PUT https://management.azure.com/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace2924?api-version=2021-11-01

{
  "sku": {
    "name": "Standard",
    "tier": "Standard"
  },
  "location": "South Central US",
  "tags": {
    "tag1": "value1",
    "tag2": "value2"
  }
}

Sample Response

{
  "sku": {
    "name": "Standard",
    "tier": "Standard"
  },
  "id": "/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924",
  "name": "sdk-Namespace-2924",
  "type": "Microsoft.ServiceBus/Namespaces",
  "location": "South Central US",
  "tags": {
    "tag1": "value1",
    "tag2": "value2"
  },
  "properties": {
    "provisioningState": "Created",
    "metricId": "5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924",
    "createdAt": "2017-05-25T22:26:36.76Z",
    "updatedAt": "2017-05-25T22:26:36.76Z",
    "serviceBusEndpoint": "https://sdk-Namespace-2924.servicebus.windows-int.net:443/"
  }
}
{
  "sku": {
    "name": "Standard",
    "tier": "Standard"
  },
  "id": "/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/resourceGroups/ArunMonocle/providers/Microsoft.ServiceBus/namespaces/sdk-Namespace-2924",
  "name": "sdk-Namespace-2924",
  "type": "Microsoft.ServiceBus/Namespaces",
  "location": "South Central US",
  "tags": {
    "tag1": "value1",
    "tag2": "value2"
  },
  "properties": {
    "provisioningState": "Created",
    "metricId": "5f750a97-50d9-4e36-8081-c9ee4c0210d4:sdk-namespace-2924",
    "createdAt": "2017-05-25T22:26:36.76Z",
    "updatedAt": "2017-05-25T22:26:36.76Z",
    "serviceBusEndpoint": "https://sdk-Namespace-2924.servicebus.windows-int.net:443/",
    "disableLocalAuth": false
  }
}

定义

名称 说明
ConnectionState

ConnectionState 信息。

createdByType

创建资源的标识类型。

EndPointProvisioningState

专用终结点连接的预配状态。

Error

错误对象。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorResponse

资源管理错误响应。

keySource

枚举 KeySource for Encryption 的可能值

KeyVaultProperties

用于配置 keyVault 属性的属性

ManagedServiceIdentityType

托管服务标识的类型。

PrivateEndpoint

PrivateEndpoint 信息。

PrivateEndpointConnection

PrivateEndpointConnection 的属性。

PrivateLinkConnectionStatus

连接的状态。

SBNamespace

命名空间资源的说明。

SBSku

命名空间的 SKU。

SkuName

此 SKU 的名称。

SkuTier

此特定 SKU 的计费层。

systemData

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

UserAssignedIdentity

已识别的字典值。

ConnectionState

ConnectionState 信息。

名称 类型 说明
description

string

连接状态的说明。

status

PrivateLinkConnectionStatus

连接的状态。

createdByType

创建资源的标识类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

EndPointProvisioningState

专用终结点连接的预配状态。

名称 类型 说明
Canceled

string

Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

string

Error

错误对象。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorResponse[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorResponse

资源管理错误响应。

名称 类型 说明
error

Error

错误对象。

keySource

枚举 KeySource for Encryption 的可能值

名称 类型 说明
Microsoft.KeyVault

string

KeyVaultProperties

用于配置 keyVault 属性的属性

名称 类型 说明
identity.userAssignedIdentity

string

选择用于加密的用户标识的 ARM ID

keyName

string

KeyVault 中的密钥的名称

keyVaultUri

string

KeyVault 的 URI

keyVersion

string

KeyVault 的版本

ManagedServiceIdentityType

托管服务标识的类型。

名称 类型 说明
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

PrivateEndpoint

PrivateEndpoint 信息。

名称 类型 说明
id

string

专用终结点的 ARM 标识符。

PrivateEndpointConnection

PrivateEndpointConnection 的属性。

名称 类型 说明
id

string

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

location

string

资源所在的地理位置

name

string

资源的名称

properties.privateEndpoint

PrivateEndpoint

此连接的专用终结点资源。

properties.privateLinkServiceConnectionState

ConnectionState

有关连接状态的详细信息。

properties.provisioningState

EndPointProvisioningState

专用终结点连接的预配状态。

systemData

systemData

与此资源相关的系统元数据。

type

string

资源类型。 例如“Microsoft.EventHub/Namespaces”或“Microsoft.EventHub/Namespaces/EventHubs”

PrivateLinkConnectionStatus

连接的状态。

名称 类型 说明
Approved

string

Disconnected

string

Pending

string

Rejected

string

SBNamespace

命名空间资源的说明。

名称 类型 默认值 说明
id

string

资源 ID

identity.principalId

string

KeyVault 中的 ObjectId

identity.tenantId

string

KeyVault 中的 TenantId

identity.type

ManagedServiceIdentityType

托管服务标识的类型。

identity.userAssignedIdentities

<string,  UserAssignedIdentity>

用户分配标识的属性

location

string

资源所在的地理位置

name

string

资源名称

properties.alternateName

string

命名空间的备用名称

properties.createdAt

string

创建命名空间的时间

properties.disableLocalAuth

boolean

此属性禁用服务总线命名空间的 SAS 身份验证。

properties.encryption.keySource

keySource

Microsoft.KeyVault

枚举 KeySource for Encryption 的可能值

properties.encryption.keyVaultProperties

KeyVaultProperties[]

KeyVault 的属性

properties.encryption.requireInfrastructureEncryption

boolean

启用基础结构加密 (双重加密)

properties.metricId

string

Azure Insights 指标的标识符

properties.privateEndpointConnections

PrivateEndpointConnection[]

专用终结点连接列表。

properties.provisioningState

string

命名空间的预配状态。

properties.serviceBusEndpoint

string

可用于执行服务总线操作的终结点。

properties.status

string

命名空间的状态。

properties.updatedAt

string

命名空间的更新时间。

properties.zoneRedundant

boolean

启用此属性会在区域支持的可用性区域中创建高级服务总线命名空间。

sku

SBSku

SKU 的属性

systemData

systemData

与此资源相关的系统元数据。

tags

object

资源标记

type

string

资源类型

SBSku

命名空间的 SKU。

名称 类型 说明
capacity

integer

层的指定消息传送单位。 对于高级层,容量为 1、2 和 4。

name

SkuName

此 SKU 的名称。

tier

SkuTier

此特定 SKU 的计费层。

SkuName

此 SKU 的名称。

名称 类型 说明
Basic

string

Premium

string

Standard

string

SkuTier

此特定 SKU 的计费层。

名称 类型 说明
Basic

string

Premium

string

Standard

string

systemData

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

名称 类型 说明
createdAt

string

资源的创建时间戳 (UTC) 。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识类型。

lastModifiedAt

string

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

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

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

UserAssignedIdentity

已识别的字典值。

名称 类型 说明
clientId

string

用户分配标识的客户端 ID

principalId

string

用户分配标识的主体 ID