Skip to main content

private_links

Creates, updates, deletes, gets or lists a private_links resource.

Overview

Nameprivate_links
TypeResource
Idazure.security.private_links

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
locationstringThe geo-location where the resource lives. Required.
privateEndpointConnectionsarrayList of private endpoint connections associated with this private link. Each connection represents a private endpoint from a customer's virtual network.
privateLinkResourcesarrayList of private link resources available for connection. For Defender services, this typically includes the 'containers' group with 'api' and regional data endpoints.
provisioningStatestringThe current provisioning state of the private link resource. Indicates whether the resource is being created, updated, deleted, or has completed successfully. Known values are: "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Canceled", and "InProgress". (Succeeded, Creating, Updating, Deleting, Failed, Canceled, InProgress)
publicNetworkAccessstringThis determines if traffic is allowed over public network. By default it is disabled. Known values are: "Enabled" and "Disabled". (Enabled, Disabled)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, private_link_name, subscription_idGet a private link resource. Returns the configuration and status of private endpoint connectivity for Microsoft Defender for Cloud services in the specified region.
listselectresource_group_name, subscription_idLists all the private links in the specified resource group. private links enable secure, private connectivity to Microsoft Defender for Cloud services without exposing traffic to the public internet. Use the 'nextLink' property in the response to get the next page of private links for the specified resource group.
list_by_subscriptionselectsubscription_idLists all the private links in the specified subscription. private links enable secure, private connectivity to Microsoft Defender for Cloud services without exposing traffic to the public internet. Use the 'nextLink' property in the response to get the next page of private links for the specified subscription.
createinsertresource_group_name, private_link_name, subscription_id, location, propertiesCreate a private link resource. This operation creates the necessary infrastructure to enable private endpoint connections to Microsoft Defender for Cloud services. For updates to existing resources, use the PATCH operation. The operation is asynchronous and may take several minutes to complete.
updateupdateresource_group_name, private_link_name, subscription_idUpdate specific properties of a private link resource. Use this operation to update mutable properties like tags without affecting the entire resource configuration.
deletedeleteresource_group_name, private_link_name, subscription_idDelete a private link resource. This operation will remove the private link infrastructure and disconnect all associated private endpoints. This operation is asynchronous and may take several minutes to complete.
headexecresource_group_name, private_link_name, subscription_idChecks whether private link exists.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring

SELECT examples

Get a private link resource. Returns the configuration and status of private endpoint connectivity for Microsoft Defender for Cloud services in the specified region.

SELECT
id,
name,
location,
privateEndpointConnections,
privateLinkResources,
provisioningState,
publicNetworkAccess,
systemData,
tags,
type
FROM azure.security.private_links
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND private_link_name = '{{ private_link_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a private link resource. This operation creates the necessary infrastructure to enable private endpoint connections to Microsoft Defender for Cloud services. For updates to existing resources, use the PATCH operation. The operation is asynchronous and may take several minutes to complete.

INSERT INTO azure.security.private_links (
tags,
location,
properties,
resource_group_name,
private_link_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}' /* required */,
'{{ resource_group_name }}',
'{{ private_link_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type
;

UPDATE examples

Update specific properties of a private link resource. Use this operation to update mutable properties like tags without affecting the entire resource configuration.

UPDATE azure.security.private_links
SET
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND private_link_name = '{{ private_link_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
location,
properties,
systemData,
tags,
type;

DELETE examples

Delete a private link resource. This operation will remove the private link infrastructure and disconnect all associated private endpoints. This operation is asynchronous and may take several minutes to complete.

DELETE FROM azure.security.private_links
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND private_link_name = '{{ private_link_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;

Lifecycle Methods

Checks whether private link exists.

EXEC azure.security.private_links.head 
@resource_group_name='{{ resource_group_name }}' --required,
@private_link_name='{{ private_link_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;