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

Communication Services - Update

更新现有 CommunicationService 的操作。

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

URI 参数

名称 必需 类型 说明
communicationServiceName
path True

string

CommunicationService 资源的名称。

正则表达式模式: ^[-\w]+$

resourceGroupName
path True

string

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

subscriptionId
path True

string

uuid

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

api-version
query True

string

用于此操作的 API 版本。

请求正文

名称 类型 说明
identity

ManagedServiceIdentity

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

properties.linkedDomains

string[]

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

tags

object

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

响应

名称 类型 说明
200 OK

CommunicationServiceResource

更新请求成功

Other Status Codes

ErrorResponse

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

示例

Update resource
Update resource to add a System Assigned managed identity
Update resource to add a User Assigned managed identity
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=2023-04-01

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

示例响应

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

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=2023-04-01

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

示例响应

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

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=2023-04-01

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

示例响应

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

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=2023-04-01

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

示例响应

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

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=2023-04-01

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

示例响应

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

定义

名称 说明
CommunicationServiceResource

一个表示 CommunicationService 资源的类。

CommunicationServiceResourceUpdate

表示 CommunicationService 资源的更新参数的类。

CommunicationServices_ProvisioningState

资源的预配状态。

createdByType

创建资源的标识的类型。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

ManagedServiceIdentity

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

ManagedServiceIdentityType

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

systemData

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

UserAssignedIdentity

用户分配的标识属性

CommunicationServiceResource

一个表示 CommunicationService 资源的类。

名称 类型 说明
id

string

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

identity

ManagedServiceIdentity

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

location

string

资源所在的地理位置

name

string

资源的名称

properties.dataLocation

string

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

properties.hostName

string

CommunicationService 实例的 FQDN。

properties.immutableResourceId

string

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

properties.linkedDomains

string[]

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

properties.notificationHubId

string

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

properties.provisioningState

CommunicationServices_ProvisioningState

资源的预配状态。

properties.version

string

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

systemData

systemData

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

tags

object

资源标记。

type

string

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

CommunicationServiceResourceUpdate

表示 CommunicationService 资源的更新参数的类。

名称 类型 说明
identity

ManagedServiceIdentity

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

properties.linkedDomains

string[]

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

tags

object

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

CommunicationServices_ProvisioningState

资源的预配状态。

名称 类型 说明
Canceled

string

Creating

string

Deleting

string

Failed

string

Moving

string

Running

string

Succeeded

string

Unknown

string

Updating

string

createdByType

创建资源的标识的类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

ManagedServiceIdentity

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

名称 类型 说明
principalId

string

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

tenantId

string

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

type

ManagedServiceIdentityType

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

userAssignedIdentities

<string,  UserAssignedIdentity>

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

ManagedServiceIdentityType

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

名称 类型 说明
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

systemData

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

名称 类型 说明
createdAt

string

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string

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

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

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

UserAssignedIdentity

用户分配的标识属性

名称 类型 说明
clientId

string

分配的标识的客户端 ID。

principalId

string

已分配标识的主体 ID。