Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Private Endpoint Connections - Create Or Update

Service:
Cosmos DB Resource Provider
API Version:
2026-03-15

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=2026-03-15

URI Parameters

Name In Required Type Description
accountName
path True

string

minLength: 3
maxLength: 50
pattern: ^[a-z0-9]+(-[a-z0-9]+)*

Cosmos DB database account name.

privateEndpointConnectionName
path True

string

The name of the private endpoint connection.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

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

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

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

Resource 'PrivateEndpointConnection' update operation succeeded

202 Accepted

Resource operation accepted.

Headers

  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

An unexpected error response.

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=2026-03-15

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

Sample response

Status code:
200
{
 "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"
 }
}
Status code:
202
Azure-AsyncOperation: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/operationsStatus/{operationId}?api-version=2026-03-15
Location: https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/operationResults/{operationId}?api-version=2026-03-15

Definitions

Name Description
createdByType

The type of identity that created the resource.

ErrorResponse

Error Response.

PrivateEndpointConnection

A private endpoint connection

PrivateEndpointProperty

Private endpoint which the connection belongs to.

PrivateLinkServiceConnectionStateProperty

Connection State of the Private Endpoint Connection.

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

Enumeration

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorResponse

Object

Error Response.

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

PrivateEndpointConnection

Object

A private endpoint connection

Name Type Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/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.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

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

PrivateEndpointProperty

Object

Private endpoint which the connection belongs to.

Name Type Description
id

string

Resource id of the private endpoint.

PrivateLinkServiceConnectionStateProperty

Object

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.

systemData

Object

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.