Private Endpoint Connections - Create Or Update
批准或拒绝具有给定名称的专用终结点连接。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}?api-version=2025-04-15
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
account
|
path | True |
string minLength: 3maxLength: 50 pattern: ^[a-z0-9]+(-[a-z0-9]+)* |
Cosmos DB 数据库帐户名称。 |
|
private
|
path | True |
string |
专用终结点连接的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
资源组的名称。 此名称不区分大小写。 |
|
subscription
|
path | True |
string minLength: 1 |
目标订阅的 ID。 |
|
api-version
|
query | True |
string minLength: 1 |
要用于此操作的 API 版本。 |
请求正文
| 名称 | 类型 | 说明 |
|---|---|---|
| properties.groupId |
string |
专用终结点的组 ID。 |
| properties.privateEndpoint |
连接所属的专用终结点。 |
|
| properties.privateLinkServiceConnectionState |
专用终结点连接的连接状态。 |
|
| properties.provisioningState |
string |
专用终结点的预配状态。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
已成功批准或拒绝专用终结点连接。 |
|
| 202 Accepted |
已接受。 专用终结点连接更新将异步完成。 |
|
| Other Status Codes |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟您的用户账户 |
示例
Approve or reject a private endpoint connection with a given name.
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName?api-version=2025-04-15
{
"properties": {
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Approved by johndoe@contoso.com"
}
}
}
示例响应
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.DocumentDb/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName",
"name": "privateEndpointConnectionName",
"type": "Microsoft.DocumentDb/databaseAccounts/privateEndpointConnections",
"properties": {
"privateEndpoint": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1Network/providers/Microsoft.Network/privateEndpoints/privateEndpointName"
},
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Auto-approved",
"actionsRequired": "None"
},
"groupId": "Sql",
"provisioningState": "Succeeded"
}
}
定义
| 名称 | 说明 |
|---|---|
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Error |
错误响应 |
|
Private |
专用终结点连接 |
|
Private |
连接所属的专用终结点。 |
|
Private |
专用终结点连接的连接状态。 |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
ErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
PrivateEndpointConnection
专用终结点连接
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
| name |
string |
资源的名称 |
| properties.groupId |
string |
专用终结点的组 ID。 |
| properties.privateEndpoint |
连接所属的专用终结点。 |
|
| properties.privateLinkServiceConnectionState |
专用终结点连接的连接状态。 |
|
| properties.provisioningState |
string |
专用终结点的预配状态。 |
| type |
string |
资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts” |
PrivateEndpointProperty
连接所属的专用终结点。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
专用终结点的资源 ID。 |
PrivateLinkServiceConnectionStateProperty
专用终结点连接的连接状态。
| 名称 | 类型 | 说明 |
|---|---|---|
| actionsRequired |
string |
除基本工作流之外所需的任何操作(批准/拒绝/断开连接) |
| description |
string |
专用链接服务连接说明。 |
| status |
string |
专用链接服务连接状态。 |