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

Private Endpoint Connections - Create Or Update

Approve or reject a private endpoint connection with a given name.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}?api-version=2024-08-15

URI Parameters

Name In Required Type Description
accountName
path True

string

Cosmos DB database account name.

Regex pattern: ^[a-z0-9]+(-[a-z0-9]+)*

privateEndpointConnectionName
path True

string

The name of the private endpoint connection.

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
properties.groupId

string

Group id of the private endpoint.

properties.privateEndpoint

PrivateEndpointProperty

Private endpoint which the connection belongs to.

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

properties.provisioningState

string

Provisioning state of the private endpoint.

Responses

Name Type Description
200 OK

PrivateEndpointConnection

Successfully approved or rejected private endpoint connection.

202 Accepted

Accepted. The private endpoint connection update will complete asynchronously.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

Name Description
user_impersonation Impersonate your user account

Examples

Approve or reject a private endpoint connection with a given name.

Sample request

PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/privateEndpointConnections/privateEndpointConnectionName?api-version=2024-08-15

{
  "properties": {
    "privateLinkServiceConnectionState": {
      "status": "Approved",
      "description": "Approved by johndoe@contoso.com"
    }
  }
}

Sample response

{
  "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"
  }
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

PrivateEndpointConnection

A private endpoint connection

PrivateEndpointProperty

Private endpoint which the connection belongs to.

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

PrivateEndpointConnection

A private endpoint connection

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.groupId

string

Group id of the private endpoint.

properties.privateEndpoint

PrivateEndpointProperty

Private endpoint which the connection belongs to.

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

properties.provisioningState

string

Provisioning state of the private endpoint.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

PrivateEndpointProperty

Private endpoint which the connection belongs to.

Name Type Description
id

string

Resource id of the private endpoint.

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

Name Type Description
actionsRequired

string

Any action that is required beyond basic workflow (approve/ reject/ disconnect)

description

string

The private link service connection description.

status

string

The private link service connection status.