We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.privatelink.getEndpointConnection
Explore with Pulumi AI
Use this data source to access the connection status information about an existing Private Endpoint Connection.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.privatelink.getEndpointConnection({
    name: "example-private-endpoint",
    resourceGroupName: "example-rg",
});
export const privateEndpointStatus = example.then(example => example.privateServiceConnections?.[0]?.status);
import pulumi
import pulumi_azure as azure
example = azure.privatelink.get_endpoint_connection(name="example-private-endpoint",
    resource_group_name="example-rg")
pulumi.export("privateEndpointStatus", example.private_service_connections[0].status)
package main
import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/privatelink"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := privatelink.GetEndpointConnection(ctx, &privatelink.GetEndpointConnectionArgs{
			Name:              "example-private-endpoint",
			ResourceGroupName: "example-rg",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("privateEndpointStatus", example.PrivateServiceConnections[0].Status)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.PrivateLink.GetEndpointConnection.Invoke(new()
    {
        Name = "example-private-endpoint",
        ResourceGroupName = "example-rg",
    });
    return new Dictionary<string, object?>
    {
        ["privateEndpointStatus"] = example.Apply(getEndpointConnectionResult => getEndpointConnectionResult.PrivateServiceConnections[0]?.Status),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.privatelink.PrivatelinkFunctions;
import com.pulumi.azure.privatelink.inputs.GetEndpointConnectionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var example = PrivatelinkFunctions.getEndpointConnection(GetEndpointConnectionArgs.builder()
            .name("example-private-endpoint")
            .resourceGroupName("example-rg")
            .build());
        ctx.export("privateEndpointStatus", example.applyValue(getEndpointConnectionResult -> getEndpointConnectionResult.privateServiceConnections()[0].status()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:privatelink:getEndpointConnection
      arguments:
        name: example-private-endpoint
        resourceGroupName: example-rg
outputs:
  privateEndpointStatus: ${example.privateServiceConnections[0].status}
Using getEndpointConnection
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getEndpointConnection(args: GetEndpointConnectionArgs, opts?: InvokeOptions): Promise<GetEndpointConnectionResult>
function getEndpointConnectionOutput(args: GetEndpointConnectionOutputArgs, opts?: InvokeOptions): Output<GetEndpointConnectionResult>def get_endpoint_connection(name: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetEndpointConnectionResult
def get_endpoint_connection_output(name: Optional[pulumi.Input[str]] = None,
                            resource_group_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetEndpointConnectionResult]func GetEndpointConnection(ctx *Context, args *GetEndpointConnectionArgs, opts ...InvokeOption) (*GetEndpointConnectionResult, error)
func GetEndpointConnectionOutput(ctx *Context, args *GetEndpointConnectionOutputArgs, opts ...InvokeOption) GetEndpointConnectionResultOutput> Note: This function is named GetEndpointConnection in the Go SDK.
public static class GetEndpointConnection 
{
    public static Task<GetEndpointConnectionResult> InvokeAsync(GetEndpointConnectionArgs args, InvokeOptions? opts = null)
    public static Output<GetEndpointConnectionResult> Invoke(GetEndpointConnectionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetEndpointConnectionResult> getEndpointConnection(GetEndpointConnectionArgs args, InvokeOptions options)
public static Output<GetEndpointConnectionResult> getEndpointConnection(GetEndpointConnectionArgs args, InvokeOptions options)
fn::invoke:
  function: azure:privatelink/getEndpointConnection:getEndpointConnection
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- Specifies the Name of the private endpoint.
- ResourceGroup stringName 
- Specifies the Name of the Resource Group within which the private endpoint exists.
- Name string
- Specifies the Name of the private endpoint.
- ResourceGroup stringName 
- Specifies the Name of the Resource Group within which the private endpoint exists.
- name String
- Specifies the Name of the private endpoint.
- resourceGroup StringName 
- Specifies the Name of the Resource Group within which the private endpoint exists.
- name string
- Specifies the Name of the private endpoint.
- resourceGroup stringName 
- Specifies the Name of the Resource Group within which the private endpoint exists.
- name str
- Specifies the Name of the private endpoint.
- resource_group_ strname 
- Specifies the Name of the Resource Group within which the private endpoint exists.
- name String
- Specifies the Name of the private endpoint.
- resourceGroup StringName 
- Specifies the Name of the Resource Group within which the private endpoint exists.
getEndpointConnection Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The supported Azure location where the resource exists.
- Name string
- The name of the private endpoint.
- NetworkInterfaces List<GetEndpoint Connection Network Interface> 
- PrivateService List<GetConnections Endpoint Connection Private Service Connection> 
- ResourceGroup stringName 
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The supported Azure location where the resource exists.
- Name string
- The name of the private endpoint.
- NetworkInterfaces []GetEndpoint Connection Network Interface 
- PrivateService []GetConnections Endpoint Connection Private Service Connection 
- ResourceGroup stringName 
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The supported Azure location where the resource exists.
- name String
- The name of the private endpoint.
- networkInterfaces List<GetEndpoint Connection Network Interface> 
- privateService List<GetConnections Endpoint Connection Private Service Connection> 
- resourceGroup StringName 
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- The supported Azure location where the resource exists.
- name string
- The name of the private endpoint.
- networkInterfaces GetEndpoint Connection Network Interface[] 
- privateService GetConnections Endpoint Connection Private Service Connection[] 
- resourceGroup stringName 
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- The supported Azure location where the resource exists.
- name str
- The name of the private endpoint.
- network_interfaces Sequence[GetEndpoint Connection Network Interface] 
- private_service_ Sequence[Getconnections Endpoint Connection Private Service Connection] 
- resource_group_ strname 
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The supported Azure location where the resource exists.
- name String
- The name of the private endpoint.
- networkInterfaces List<Property Map>
- privateService List<Property Map>Connections 
- resourceGroup StringName 
Supporting Types
GetEndpointConnectionNetworkInterface    
GetEndpointConnectionPrivateServiceConnection     
- Name string
- Specifies the Name of the private endpoint.
- PrivateIp stringAddress 
- The private IP address associated with the private endpoint, note that you will have a private IP address assigned to the private endpoint even if the connection request was Rejected.
- RequestResponse string
- Possible values are as follows:
Value | Meaning
-- | --
Auto-Approved| The remote resource owner has added you to theAuto-ApprovedRBAC permission list for the remote resource, all private endpoint connection requests will be automaticallyApproved.Deleted state| The resource owner hasRejectedthe private endpoint connection request and has removed your private endpoint request from the remote resource.request/response message| If you submitted a manual private endpoint connection request, while in thePendingstatus therequest_responsewill display the same text from yourrequest_messagein theprivate_service_connectionblock above. If the private endpoint connection request wasRejectedby the owner of the remote resource, the text for the rejection will be displayed as therequest_responsetext, if the private endpoint connection request wasApprovedby the owner of the remote resource, the text for the approval will be displayed as therequest_responsetext
- Status string
- The current status of the private endpoint request, possible values will be Pending,Approved,Rejected, orDisconnected.
- Name string
- Specifies the Name of the private endpoint.
- PrivateIp stringAddress 
- The private IP address associated with the private endpoint, note that you will have a private IP address assigned to the private endpoint even if the connection request was Rejected.
- RequestResponse string
- Possible values are as follows:
Value | Meaning
-- | --
Auto-Approved| The remote resource owner has added you to theAuto-ApprovedRBAC permission list for the remote resource, all private endpoint connection requests will be automaticallyApproved.Deleted state| The resource owner hasRejectedthe private endpoint connection request and has removed your private endpoint request from the remote resource.request/response message| If you submitted a manual private endpoint connection request, while in thePendingstatus therequest_responsewill display the same text from yourrequest_messagein theprivate_service_connectionblock above. If the private endpoint connection request wasRejectedby the owner of the remote resource, the text for the rejection will be displayed as therequest_responsetext, if the private endpoint connection request wasApprovedby the owner of the remote resource, the text for the approval will be displayed as therequest_responsetext
- Status string
- The current status of the private endpoint request, possible values will be Pending,Approved,Rejected, orDisconnected.
- name String
- Specifies the Name of the private endpoint.
- privateIp StringAddress 
- The private IP address associated with the private endpoint, note that you will have a private IP address assigned to the private endpoint even if the connection request was Rejected.
- requestResponse String
- Possible values are as follows:
Value | Meaning
-- | --
Auto-Approved| The remote resource owner has added you to theAuto-ApprovedRBAC permission list for the remote resource, all private endpoint connection requests will be automaticallyApproved.Deleted state| The resource owner hasRejectedthe private endpoint connection request and has removed your private endpoint request from the remote resource.request/response message| If you submitted a manual private endpoint connection request, while in thePendingstatus therequest_responsewill display the same text from yourrequest_messagein theprivate_service_connectionblock above. If the private endpoint connection request wasRejectedby the owner of the remote resource, the text for the rejection will be displayed as therequest_responsetext, if the private endpoint connection request wasApprovedby the owner of the remote resource, the text for the approval will be displayed as therequest_responsetext
- status String
- The current status of the private endpoint request, possible values will be Pending,Approved,Rejected, orDisconnected.
- name string
- Specifies the Name of the private endpoint.
- privateIp stringAddress 
- The private IP address associated with the private endpoint, note that you will have a private IP address assigned to the private endpoint even if the connection request was Rejected.
- requestResponse string
- Possible values are as follows:
Value | Meaning
-- | --
Auto-Approved| The remote resource owner has added you to theAuto-ApprovedRBAC permission list for the remote resource, all private endpoint connection requests will be automaticallyApproved.Deleted state| The resource owner hasRejectedthe private endpoint connection request and has removed your private endpoint request from the remote resource.request/response message| If you submitted a manual private endpoint connection request, while in thePendingstatus therequest_responsewill display the same text from yourrequest_messagein theprivate_service_connectionblock above. If the private endpoint connection request wasRejectedby the owner of the remote resource, the text for the rejection will be displayed as therequest_responsetext, if the private endpoint connection request wasApprovedby the owner of the remote resource, the text for the approval will be displayed as therequest_responsetext
- status string
- The current status of the private endpoint request, possible values will be Pending,Approved,Rejected, orDisconnected.
- name str
- Specifies the Name of the private endpoint.
- private_ip_ straddress 
- The private IP address associated with the private endpoint, note that you will have a private IP address assigned to the private endpoint even if the connection request was Rejected.
- request_response str
- Possible values are as follows:
Value | Meaning
-- | --
Auto-Approved| The remote resource owner has added you to theAuto-ApprovedRBAC permission list for the remote resource, all private endpoint connection requests will be automaticallyApproved.Deleted state| The resource owner hasRejectedthe private endpoint connection request and has removed your private endpoint request from the remote resource.request/response message| If you submitted a manual private endpoint connection request, while in thePendingstatus therequest_responsewill display the same text from yourrequest_messagein theprivate_service_connectionblock above. If the private endpoint connection request wasRejectedby the owner of the remote resource, the text for the rejection will be displayed as therequest_responsetext, if the private endpoint connection request wasApprovedby the owner of the remote resource, the text for the approval will be displayed as therequest_responsetext
- status str
- The current status of the private endpoint request, possible values will be Pending,Approved,Rejected, orDisconnected.
- name String
- Specifies the Name of the private endpoint.
- privateIp StringAddress 
- The private IP address associated with the private endpoint, note that you will have a private IP address assigned to the private endpoint even if the connection request was Rejected.
- requestResponse String
- Possible values are as follows:
Value | Meaning
-- | --
Auto-Approved| The remote resource owner has added you to theAuto-ApprovedRBAC permission list for the remote resource, all private endpoint connection requests will be automaticallyApproved.Deleted state| The resource owner hasRejectedthe private endpoint connection request and has removed your private endpoint request from the remote resource.request/response message| If you submitted a manual private endpoint connection request, while in thePendingstatus therequest_responsewill display the same text from yourrequest_messagein theprivate_service_connectionblock above. If the private endpoint connection request wasRejectedby the owner of the remote resource, the text for the rejection will be displayed as therequest_responsetext, if the private endpoint connection request wasApprovedby the owner of the remote resource, the text for the approval will be displayed as therequest_responsetext
- status String
- The current status of the private endpoint request, possible values will be Pending,Approved,Rejected, orDisconnected.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.