通过


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

Communication Services - Update

作用于更新现有的通信服务。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Communication/communicationServices/{communicationServiceName}?api-version=2026-03-18

URI 参数

名称 必需 类型 说明
communicationServiceName
path True

string

minLength: 1
maxLength: 63
pattern: ^[-\w]+$

CommunicationService 资源的名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

subscriptionId
path True

string (uuid)

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

api-version
query True

string

minLength: 1

用于此作的 API 版本。

请求正文

名称 类型 说明
identity

ManagedServiceIdentity

托管服务标识(系统分配和/或用户分配的标识)

properties.disableLocalAuth

boolean

禁用 CommunicationService 的本地身份验证。

properties.linkedDomains

string[]

电子邮件域资源 ID 的列表。

properties.publicNetworkAccess

PublicNetworkAccess

允许、禁止或让 Network Security 外围配置控制对受保护资源的公用网络访问。 值是可选的,但如果传入,则必须为 'Enabled'、'Disabled' 或 'SecuredByPerimeter'。

tags

object

服务的标记,它是描述资源的键值对的列表。

响应

名称 类型 说明
200 OK

CommunicationServiceResource

Azure 运营顺利完成。

Other Status Codes

ErrorResponse

意外的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 Flow.

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

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Update resource
Update resource to add a System Assigned managed identity
Update resource to add a User Assigned managed identity
Update resource to add DisableLocalAuth
Update resource to add PublicNetworkAccess
Update resource to add System and User managed identities
Update resource to remove identity

Update resource

示例请求

PATCH https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/communicationServices/MyCommunicationResource?api-version=2026-03-18

{
  "tags": {
    "newTag": "newVal"
  }
}

示例响应

{
  "name": "MyCommunicationResource",
  "type": "Microsoft.Communication/CommunicationServices",
  "id": "/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
  "identity": {
    "type": "None"
  },
  "location": "Global",
  "properties": {
    "dataLocation": "United States",
    "hostName": "mycommunicationresource.communications.azure.com",
    "provisioningState": "Succeeded",
    "version": "0.2.0"
  },
  "tags": {
    "newTag": "newVal"
  }
}

Update resource to add a System Assigned managed identity

示例请求

PATCH https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/communicationServices/MyCommunicationResource?api-version=2026-03-18

{
  "identity": {
    "type": "SystemAssigned"
  },
  "tags": {
    "newTag": "newVal"
  }
}

示例响应

{
  "name": "MyCommunicationResource",
  "type": "Microsoft.Communication/CommunicationServices",
  "id": "/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
  "identity": {
    "type": "SystemAssigned",
    "principalId": "11111111-1111-1111-1111-111111111111",
    "tenantId": "22222222-2222-2222-2222-222222222222"
  },
  "location": "Global",
  "properties": {
    "dataLocation": "United States",
    "hostName": "mycommunicationresource.communications.azure.com",
    "provisioningState": "Succeeded",
    "version": "0.2.0"
  },
  "tags": {
    "newTag": "newVal"
  }
}

Update resource to add a User Assigned managed identity

示例请求

PATCH https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/communicationServices/MyCommunicationResource?api-version=2026-03-18

{
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/user/assigned/resource/id": {}
    }
  },
  "tags": {
    "newTag": "newVal"
  }
}

示例响应

{
  "name": "MyCommunicationResource",
  "type": "Microsoft.Communication/CommunicationServices",
  "id": "/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
  "identity": {
    "type": "UserAssigned",
    "userAssignedIdentities": {
      "/user/assigned/resource/id": {
        "clientId": "11112222-3333-4444-5555-666677778888",
        "principalId": "11112222-3333-4444-5555-666677778888"
      }
    }
  },
  "location": "Global",
  "properties": {
    "dataLocation": "United States",
    "hostName": "mycommunicationresource.communications.azure.com",
    "provisioningState": "Succeeded",
    "version": "0.2.0"
  },
  "tags": {
    "newTag": "newVal"
  }
}

Update resource to add DisableLocalAuth

示例请求

PATCH https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/communicationServices/MyCommunicationResource?api-version=2026-03-18

{
  "properties": {
    "disableLocalAuth": true
  },
  "tags": {
    "newTag": "newVal"
  }
}

示例响应

{
  "name": "MyCommunicationResource",
  "type": "Microsoft.Communication/CommunicationServices",
  "id": "/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
  "location": "Global",
  "properties": {
    "dataLocation": "United States",
    "disableLocalAuth": true,
    "hostName": "mycommunicationresource.communications.azure.com",
    "provisioningState": "Succeeded",
    "version": "0.2.0"
  },
  "tags": {
    "newTag": "newVal"
  }
}

Update resource to add PublicNetworkAccess

示例请求

PATCH https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/communicationServices/MyCommunicationResource?api-version=2026-03-18

{
  "properties": {
    "publicNetworkAccess": "Enabled"
  },
  "tags": {
    "newTag": "newVal"
  }
}

示例响应

{
  "name": "MyCommunicationResource",
  "type": "Microsoft.Communication/CommunicationServices",
  "id": "/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
  "location": "Global",
  "properties": {
    "dataLocation": "United States",
    "hostName": "mycommunicationresource.communications.azure.com",
    "provisioningState": "Succeeded",
    "publicNetworkAccess": "Enabled",
    "version": "0.2.0"
  },
  "tags": {
    "newTag": "newVal"
  }
}

Update resource to add System and User managed identities

示例请求

PATCH https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/communicationServices/MyCommunicationResource?api-version=2026-03-18

{
  "identity": {
    "type": "SystemAssigned,UserAssigned",
    "userAssignedIdentities": {
      "/user/assigned/resource/id": {}
    }
  },
  "tags": {
    "newTag": "newVal"
  }
}

示例响应

{
  "name": "MyCommunicationResource",
  "type": "Microsoft.Communication/CommunicationServices",
  "id": "/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
  "identity": {
    "type": "SystemAssigned,UserAssigned",
    "principalId": "11111111-1111-1111-1111-111111111111",
    "tenantId": "22222222-2222-2222-2222-222222222222",
    "userAssignedIdentities": {
      "/user/assigned/resource/id": {
        "clientId": "11112222-3333-4444-5555-666677778888",
        "principalId": "11112222-3333-4444-5555-666677778888"
      }
    }
  },
  "location": "Global",
  "properties": {
    "dataLocation": "United States",
    "hostName": "mycommunicationresource.communications.azure.com",
    "provisioningState": "Succeeded",
    "version": "0.2.0"
  },
  "tags": {
    "newTag": "newVal"
  }
}

Update resource to remove identity

示例请求

PATCH https://management.azure.com/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/communicationServices/MyCommunicationResource?api-version=2026-03-18

{
  "identity": {
    "type": "None"
  },
  "tags": {
    "newTag": "newVal"
  }
}

示例响应

{
  "name": "MyCommunicationResource",
  "type": "Microsoft.Communication/CommunicationServices",
  "id": "/subscriptions/11112222-3333-4444-5555-666677778888/resourceGroups/MyResourceGroup/providers/Microsoft.Communication/CommunicationServices/MyCommunicationResource",
  "location": "Global",
  "properties": {
    "dataLocation": "United States",
    "hostName": "mycommunicationresource.communication.azure.com",
    "provisioningState": "Succeeded"
  },
  "tags": {
    "newTag": "newVal"
  }
}

定义

名称 说明
CommunicationServiceResource

一个代表CommunicationService资源的类。

CommunicationServiceResourceUpdate

一个代表CommunicationService资源更新参数的类。

CommunicationServices_ProvisioningState

资源的预配状态。

createdByType

创建资源的标识的类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

ManagedServiceIdentity

托管服务标识(系统分配和/或用户分配的标识)

ManagedServiceIdentityType

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

PublicNetworkAccess

允许、禁止或让 Network Security 外围配置控制对受保护资源的公用网络访问。 值是可选的,但如果传入,则必须为 'Enabled'、'Disabled' 或 'SecuredByPerimeter'。

systemData

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

UserAssignedIdentity

用户分配的标识属性

CommunicationServiceResource

一个代表CommunicationService资源的类。

名称 类型 说明
id

string (arm-id)

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

identity

ManagedServiceIdentity

分配给此资源的托管服务标识。

location

string

资源所在的地理位置

name

string

资源的名称

properties.dataLocation

string

通信服务存储静态数据的位置。

properties.disableLocalAuth

boolean

禁用 CommunicationService 的本地身份验证。

properties.hostName

string

CommunicationService实例的FQDN。

properties.immutableResourceId

string

通信服务的不可变资源ID。

properties.linkedDomains

string[]

电子邮件域资源 ID 的列表。

properties.notificationHubId

string

链接到该资源的 Azure 通知中心的资源 ID。

properties.provisioningState

CommunicationServices_ProvisioningState

资源的预配状态。

properties.publicNetworkAccess

PublicNetworkAccess

允许、禁止或让 Network Security 外围配置控制对受保护资源的公用网络访问。 值是可选的,但如果传入,则必须为 'Enabled'、'Disabled' 或 'SecuredByPerimeter'。

properties.version

string

CommunicationService资源的版本。 可能需要相同或更高版本的客户端 SDK。

systemData

systemData

Azure Resource Manager 包含 createdBy 和 modifiedBy 信息的元数据。

tags

object

资源标记。

type

string

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

CommunicationServiceResourceUpdate

一个代表CommunicationService资源更新参数的类。

名称 类型 说明
identity

ManagedServiceIdentity

托管服务标识(系统分配和/或用户分配的标识)

properties.disableLocalAuth

boolean

禁用 CommunicationService 的本地身份验证。

properties.linkedDomains

string[]

电子邮件域资源 ID 的列表。

properties.publicNetworkAccess

PublicNetworkAccess

允许、禁止或让 Network Security 外围配置控制对受保护资源的公用网络访问。 值是可选的,但如果传入,则必须为 'Enabled'、'Disabled' 或 'SecuredByPerimeter'。

tags

object

服务的标记,它是描述资源的键值对的列表。

CommunicationServices_ProvisioningState

资源的预配状态。

说明
Unknown

未知

Succeeded

成功

Failed

Failed

Canceled

已取消

Running

Running

Creating

创建

Updating

正在更新

Deleting

正在删除

Moving

移动

createdByType

创建资源的标识的类型。

说明
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ManagedServiceIdentity

托管服务标识(系统分配和/或用户分配的标识)

名称 类型 说明
principalId

string (uuid)

系统分配标识的服务主体 ID。 此属性仅针对系统分配的标识提供。

tenantId

string (uuid)

系统分配标识的租户 ID。 此属性仅针对系统分配的标识提供。

type

ManagedServiceIdentityType

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

userAssignedIdentities

<string,  UserAssignedIdentity>

与资源关联的用户分配标识集。 userAssignedIdentities 字典密钥将为 ARM 资源 ID,格式为“/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}”。 字典值可以是请求中的空对象({})。

ManagedServiceIdentityType

托管服务标识的类型(其中允许 SystemAssigned 和 UserAssigned 类型)。

说明
None
SystemAssigned
UserAssigned
SystemAssigned,UserAssigned

PublicNetworkAccess

允许、禁止或让 Network Security 外围配置控制对受保护资源的公用网络访问。 值是可选的,但如果传入,则必须为 'Enabled'、'Disabled' 或 'SecuredByPerimeter'。

说明
Enabled

允许公共网络access资源

Disabled

禁止公共网络access资源

SecuredByPerimeter

网络安全边界配置规则允许或禁止对资源的公共网络access。 需要关联的网络安全边界。

systemData

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

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

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

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

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

UserAssignedIdentity

用户分配的标识属性

名称 类型 说明
clientId

string (uuid)

分配的标识的客户端 ID。

principalId

string (uuid)

已分配标识的主体 ID。