We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.privatelink.getService
Explore with Pulumi AI
Use this data source to access information about an existing Private Link Service.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.privatelink.getService({
    name: "myPrivateLinkService",
    resourceGroupName: "PrivateLinkServiceRG",
});
export const privateLinkServiceId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.privatelink.get_service(name="myPrivateLinkService",
    resource_group_name="PrivateLinkServiceRG")
pulumi.export("privateLinkServiceId", example.id)
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.GetService(ctx, &privatelink.GetServiceArgs{
			Name:              "myPrivateLinkService",
			ResourceGroupName: "PrivateLinkServiceRG",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("privateLinkServiceId", example.Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var example = Azure.PrivateLink.GetService.Invoke(new()
    {
        Name = "myPrivateLinkService",
        ResourceGroupName = "PrivateLinkServiceRG",
    });
    return new Dictionary<string, object?>
    {
        ["privateLinkServiceId"] = example.Apply(getServiceResult => getServiceResult.Id),
    };
});
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.GetServiceArgs;
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.getService(GetServiceArgs.builder()
            .name("myPrivateLinkService")
            .resourceGroupName("PrivateLinkServiceRG")
            .build());
        ctx.export("privateLinkServiceId", example.applyValue(getServiceResult -> getServiceResult.id()));
    }
}
variables:
  example:
    fn::invoke:
      function: azure:privatelink:getService
      arguments:
        name: myPrivateLinkService
        resourceGroupName: PrivateLinkServiceRG
outputs:
  privateLinkServiceId: ${example.id}
Using getService
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 getService(args: GetServiceArgs, opts?: InvokeOptions): Promise<GetServiceResult>
function getServiceOutput(args: GetServiceOutputArgs, opts?: InvokeOptions): Output<GetServiceResult>def get_service(name: Optional[str] = None,
                resource_group_name: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetServiceResult
def get_service_output(name: Optional[pulumi.Input[str]] = None,
                resource_group_name: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetServiceResult]func GetService(ctx *Context, args *GetServiceArgs, opts ...InvokeOption) (*GetServiceResult, error)
func GetServiceOutput(ctx *Context, args *GetServiceOutputArgs, opts ...InvokeOption) GetServiceResultOutput> Note: This function is named GetService in the Go SDK.
public static class GetService 
{
    public static Task<GetServiceResult> InvokeAsync(GetServiceArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceResult> Invoke(GetServiceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
public static Output<GetServiceResult> getService(GetServiceArgs args, InvokeOptions options)
fn::invoke:
  function: azure:privatelink/getService:getService
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the private link service.
- ResourceGroup stringName 
- The name of the resource group in which the private link service resides.
- Name string
- The name of the private link service.
- ResourceGroup stringName 
- The name of the resource group in which the private link service resides.
- name String
- The name of the private link service.
- resourceGroup StringName 
- The name of the resource group in which the private link service resides.
- name string
- The name of the private link service.
- resourceGroup stringName 
- The name of the resource group in which the private link service resides.
- name str
- The name of the private link service.
- resource_group_ strname 
- The name of the resource group in which the private link service resides.
- name String
- The name of the private link service.
- resourceGroup StringName 
- The name of the resource group in which the private link service resides.
getService Result
The following output properties are available:
- Alias string
- The alias is a globally unique name for your private link service which Azure generates for you. Your can use this alias to request a connection to your private link service.
- AutoApproval List<string>Subscription Ids 
- The list of subscription(s) globally unique identifiers that will be auto approved to use the private link service.
- EnableProxy boolProtocol 
- Does the Private Link Service support the Proxy Protocol?
- Id string
- The provider-assigned unique ID for this managed resource.
- LoadBalancer List<string>Frontend Ip Configuration Ids 
- The list of Standard Load Balancer(SLB) resource IDs. The Private Link service is tied to the frontend IP address of a SLB. All traffic destined for the private link service will reach the frontend of the SLB. You can configure SLB rules to direct this traffic to appropriate backend pools where your applications are running.
- Location string
- The supported Azure location where the resource exists.
- Name string
- The name of private link service NAT IP configuration.
- NatIp List<GetConfigurations Service Nat Ip Configuration> 
- The nat_ip_configurationblock as defined below.
- ResourceGroup stringName 
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- VisibilitySubscription List<string>Ids 
- The list of subscription(s) globally unique identifiers(GUID) that will be able to see the private link service.
- Alias string
- The alias is a globally unique name for your private link service which Azure generates for you. Your can use this alias to request a connection to your private link service.
- AutoApproval []stringSubscription Ids 
- The list of subscription(s) globally unique identifiers that will be auto approved to use the private link service.
- EnableProxy boolProtocol 
- Does the Private Link Service support the Proxy Protocol?
- Id string
- The provider-assigned unique ID for this managed resource.
- LoadBalancer []stringFrontend Ip Configuration Ids 
- The list of Standard Load Balancer(SLB) resource IDs. The Private Link service is tied to the frontend IP address of a SLB. All traffic destined for the private link service will reach the frontend of the SLB. You can configure SLB rules to direct this traffic to appropriate backend pools where your applications are running.
- Location string
- The supported Azure location where the resource exists.
- Name string
- The name of private link service NAT IP configuration.
- NatIp []GetConfigurations Service Nat Ip Configuration 
- The nat_ip_configurationblock as defined below.
- ResourceGroup stringName 
- map[string]string
- A mapping of tags to assign to the resource.
- VisibilitySubscription []stringIds 
- The list of subscription(s) globally unique identifiers(GUID) that will be able to see the private link service.
- alias String
- The alias is a globally unique name for your private link service which Azure generates for you. Your can use this alias to request a connection to your private link service.
- autoApproval List<String>Subscription Ids 
- The list of subscription(s) globally unique identifiers that will be auto approved to use the private link service.
- enableProxy BooleanProtocol 
- Does the Private Link Service support the Proxy Protocol?
- id String
- The provider-assigned unique ID for this managed resource.
- loadBalancer List<String>Frontend Ip Configuration Ids 
- The list of Standard Load Balancer(SLB) resource IDs. The Private Link service is tied to the frontend IP address of a SLB. All traffic destined for the private link service will reach the frontend of the SLB. You can configure SLB rules to direct this traffic to appropriate backend pools where your applications are running.
- location String
- The supported Azure location where the resource exists.
- name String
- The name of private link service NAT IP configuration.
- natIp List<GetConfigurations Service Nat Ip Configuration> 
- The nat_ip_configurationblock as defined below.
- resourceGroup StringName 
- Map<String,String>
- A mapping of tags to assign to the resource.
- visibilitySubscription List<String>Ids 
- The list of subscription(s) globally unique identifiers(GUID) that will be able to see the private link service.
- alias string
- The alias is a globally unique name for your private link service which Azure generates for you. Your can use this alias to request a connection to your private link service.
- autoApproval string[]Subscription Ids 
- The list of subscription(s) globally unique identifiers that will be auto approved to use the private link service.
- enableProxy booleanProtocol 
- Does the Private Link Service support the Proxy Protocol?
- id string
- The provider-assigned unique ID for this managed resource.
- loadBalancer string[]Frontend Ip Configuration Ids 
- The list of Standard Load Balancer(SLB) resource IDs. The Private Link service is tied to the frontend IP address of a SLB. All traffic destined for the private link service will reach the frontend of the SLB. You can configure SLB rules to direct this traffic to appropriate backend pools where your applications are running.
- location string
- The supported Azure location where the resource exists.
- name string
- The name of private link service NAT IP configuration.
- natIp GetConfigurations Service Nat Ip Configuration[] 
- The nat_ip_configurationblock as defined below.
- resourceGroup stringName 
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- visibilitySubscription string[]Ids 
- The list of subscription(s) globally unique identifiers(GUID) that will be able to see the private link service.
- alias str
- The alias is a globally unique name for your private link service which Azure generates for you. Your can use this alias to request a connection to your private link service.
- auto_approval_ Sequence[str]subscription_ ids 
- The list of subscription(s) globally unique identifiers that will be auto approved to use the private link service.
- enable_proxy_ boolprotocol 
- Does the Private Link Service support the Proxy Protocol?
- id str
- The provider-assigned unique ID for this managed resource.
- load_balancer_ Sequence[str]frontend_ ip_ configuration_ ids 
- The list of Standard Load Balancer(SLB) resource IDs. The Private Link service is tied to the frontend IP address of a SLB. All traffic destined for the private link service will reach the frontend of the SLB. You can configure SLB rules to direct this traffic to appropriate backend pools where your applications are running.
- location str
- The supported Azure location where the resource exists.
- name str
- The name of private link service NAT IP configuration.
- nat_ip_ Sequence[Getconfigurations Service Nat Ip Configuration] 
- The nat_ip_configurationblock as defined below.
- resource_group_ strname 
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- visibility_subscription_ Sequence[str]ids 
- The list of subscription(s) globally unique identifiers(GUID) that will be able to see the private link service.
- alias String
- The alias is a globally unique name for your private link service which Azure generates for you. Your can use this alias to request a connection to your private link service.
- autoApproval List<String>Subscription Ids 
- The list of subscription(s) globally unique identifiers that will be auto approved to use the private link service.
- enableProxy BooleanProtocol 
- Does the Private Link Service support the Proxy Protocol?
- id String
- The provider-assigned unique ID for this managed resource.
- loadBalancer List<String>Frontend Ip Configuration Ids 
- The list of Standard Load Balancer(SLB) resource IDs. The Private Link service is tied to the frontend IP address of a SLB. All traffic destined for the private link service will reach the frontend of the SLB. You can configure SLB rules to direct this traffic to appropriate backend pools where your applications are running.
- location String
- The supported Azure location where the resource exists.
- name String
- The name of private link service NAT IP configuration.
- natIp List<Property Map>Configurations 
- The nat_ip_configurationblock as defined below.
- resourceGroup StringName 
- Map<String>
- A mapping of tags to assign to the resource.
- visibilitySubscription List<String>Ids 
- The list of subscription(s) globally unique identifiers(GUID) that will be able to see the private link service.
Supporting Types
GetServiceNatIpConfiguration    
- Name string
- The name of the private link service.
- Primary bool
- Value that indicates if the IP configuration is the primary configuration or not.
- PrivateIp stringAddress 
- The private IP address of the NAT IP configuration.
- PrivateIp stringAddress Version 
- The version of the IP Protocol.
- SubnetId string
- The ID of the subnet to be used by the service.
- Name string
- The name of the private link service.
- Primary bool
- Value that indicates if the IP configuration is the primary configuration or not.
- PrivateIp stringAddress 
- The private IP address of the NAT IP configuration.
- PrivateIp stringAddress Version 
- The version of the IP Protocol.
- SubnetId string
- The ID of the subnet to be used by the service.
- name String
- The name of the private link service.
- primary Boolean
- Value that indicates if the IP configuration is the primary configuration or not.
- privateIp StringAddress 
- The private IP address of the NAT IP configuration.
- privateIp StringAddress Version 
- The version of the IP Protocol.
- subnetId String
- The ID of the subnet to be used by the service.
- name string
- The name of the private link service.
- primary boolean
- Value that indicates if the IP configuration is the primary configuration or not.
- privateIp stringAddress 
- The private IP address of the NAT IP configuration.
- privateIp stringAddress Version 
- The version of the IP Protocol.
- subnetId string
- The ID of the subnet to be used by the service.
- name str
- The name of the private link service.
- primary bool
- Value that indicates if the IP configuration is the primary configuration or not.
- private_ip_ straddress 
- The private IP address of the NAT IP configuration.
- private_ip_ straddress_ version 
- The version of the IP Protocol.
- subnet_id str
- The ID of the subnet to be used by the service.
- name String
- The name of the private link service.
- primary Boolean
- Value that indicates if the IP configuration is the primary configuration or not.
- privateIp StringAddress 
- The private IP address of the NAT IP configuration.
- privateIp StringAddress Version 
- The version of the IP Protocol.
- subnetId String
- The ID of the subnet to be used by the service.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.