Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.14.0 published on Thursday, Jul 28, 2022 by Pulumi

getPrivateLinkResource

Use this data source to access information about the Private Link Resource supported by the Web Pubsub Resource.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var testResourceGroup = new Azure.Core.ResourceGroup("testResourceGroup", new Azure.Core.ResourceGroupArgs
        {
            Location = "east us",
        });
        var testService = new Azure.WebPubSub.Service("testService", new Azure.WebPubSub.ServiceArgs
        {
            Location = testResourceGroup.Location,
            ResourceGroupName = testResourceGroup.Name,
            Sku = "Standard_S1",
            Capacity = 1,
        });
        var testPrivateLinkResource = Azure.WebPubSub.GetPrivateLinkResource.Invoke(new Azure.WebPubSub.GetPrivateLinkResourceInvokeArgs
        {
            WebPubsubId = testService.Id,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/webpubsub"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testResourceGroup, err := core.NewResourceGroup(ctx, "testResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("east us"),
		})
		if err != nil {
			return err
		}
		testService, err := webpubsub.NewService(ctx, "testService", &webpubsub.ServiceArgs{
			Location:          testResourceGroup.Location,
			ResourceGroupName: testResourceGroup.Name,
			Sku:               pulumi.String("Standard_S1"),
			Capacity:          pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		_ = webpubsub.GetPrivateLinkResourceOutput(ctx, webpubsub.GetPrivateLinkResourceOutputArgs{
			WebPubsubId: testService.ID(),
		}, nil)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.webpubsub.Service;
import com.pulumi.azure.webpubsub.ServiceArgs;
import com.pulumi.azure.webpubsub.WebpubsubFunctions;
import com.pulumi.azure.webpubsub.inputs.GetPrivateLinkResourceArgs;
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) {
        var testResourceGroup = new ResourceGroup("testResourceGroup", ResourceGroupArgs.builder()        
            .location("east us")
            .build());

        var testService = new Service("testService", ServiceArgs.builder()        
            .location(testResourceGroup.location())
            .resourceGroupName(testResourceGroup.name())
            .sku("Standard_S1")
            .capacity(1)
            .build());

        final var testPrivateLinkResource = WebpubsubFunctions.getPrivateLinkResource(GetPrivateLinkResourceArgs.builder()
            .webPubsubId(testService.id())
            .build());

    }
}
import pulumi
import pulumi_azure as azure

test_resource_group = azure.core.ResourceGroup("testResourceGroup", location="east us")
test_service = azure.webpubsub.Service("testService",
    location=test_resource_group.location,
    resource_group_name=test_resource_group.name,
    sku="Standard_S1",
    capacity=1)
test_private_link_resource = azure.webpubsub.get_private_link_resource_output(web_pubsub_id=test_service.id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const testResourceGroup = new azure.core.ResourceGroup("testResourceGroup", {location: "east us"});
const testService = new azure.webpubsub.Service("testService", {
    location: testResourceGroup.location,
    resourceGroupName: testResourceGroup.name,
    sku: "Standard_S1",
    capacity: 1,
});
const testPrivateLinkResource = azure.webpubsub.getPrivateLinkResourceOutput({
    webPubsubId: testService.id,
});
resources:
  testResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: east us
  testService:
    type: azure:webpubsub:Service
    properties:
      location: ${testResourceGroup.location}
      resourceGroupName: ${testResourceGroup.name}
      sku: Standard_S1
      capacity: 1
variables:
  testPrivateLinkResource:
    Fn::Invoke:
      Function: azure:webpubsub:getPrivateLinkResource
      Arguments:
        webPubsubId: ${testService.id}

Using getPrivateLinkResource

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 getPrivateLinkResource(args: GetPrivateLinkResourceArgs, opts?: InvokeOptions): Promise<GetPrivateLinkResourceResult>
function getPrivateLinkResourceOutput(args: GetPrivateLinkResourceOutputArgs, opts?: InvokeOptions): Output<GetPrivateLinkResourceResult>
def get_private_link_resource(web_pubsub_id: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetPrivateLinkResourceResult
def get_private_link_resource_output(web_pubsub_id: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetPrivateLinkResourceResult]
func GetPrivateLinkResource(ctx *Context, args *GetPrivateLinkResourceArgs, opts ...InvokeOption) (*GetPrivateLinkResourceResult, error)
func GetPrivateLinkResourceOutput(ctx *Context, args *GetPrivateLinkResourceOutputArgs, opts ...InvokeOption) GetPrivateLinkResourceResultOutput

> Note: This function is named GetPrivateLinkResource in the Go SDK.

public static class GetPrivateLinkResource 
{
    public static Task<GetPrivateLinkResourceResult> InvokeAsync(GetPrivateLinkResourceArgs args, InvokeOptions? opts = null)
    public static Output<GetPrivateLinkResourceResult> Invoke(GetPrivateLinkResourceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPrivateLinkResourceResult> getPrivateLinkResource(GetPrivateLinkResourceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: azure:webpubsub/getPrivateLinkResource:getPrivateLinkResource
  Arguments:
    # Arguments dictionary

The following arguments are supported:

WebPubsubId string

The ID of an existing Web Pubsub Resource which Private Link Resource should be retrieved for.

WebPubsubId string

The ID of an existing Web Pubsub Resource which Private Link Resource should be retrieved for.

webPubsubId String

The ID of an existing Web Pubsub Resource which Private Link Resource should be retrieved for.

webPubsubId string

The ID of an existing Web Pubsub Resource which Private Link Resource should be retrieved for.

web_pubsub_id str

The ID of an existing Web Pubsub Resource which Private Link Resource should be retrieved for.

webPubsubId String

The ID of an existing Web Pubsub Resource which Private Link Resource should be retrieved for.

getPrivateLinkResource Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

SharedPrivateLinkResourceTypes List<GetPrivateLinkResourceSharedPrivateLinkResourceType>

A shared_private_link_resource_types block as defined below.

WebPubsubId string
Id string

The provider-assigned unique ID for this managed resource.

SharedPrivateLinkResourceTypes []GetPrivateLinkResourceSharedPrivateLinkResourceType

A shared_private_link_resource_types block as defined below.

WebPubsubId string
id String

The provider-assigned unique ID for this managed resource.

sharedPrivateLinkResourceTypes List<GetPrivateLinkResourceSharedPrivateLinkResourceType>

A shared_private_link_resource_types block as defined below.

webPubsubId String
id string

The provider-assigned unique ID for this managed resource.

sharedPrivateLinkResourceTypes GetPrivateLinkResourceSharedPrivateLinkResourceType[]

A shared_private_link_resource_types block as defined below.

webPubsubId string
id str

The provider-assigned unique ID for this managed resource.

shared_private_link_resource_types Sequence[GetPrivateLinkResourceSharedPrivateLinkResourceType]

A shared_private_link_resource_types block as defined below.

web_pubsub_id str
id String

The provider-assigned unique ID for this managed resource.

sharedPrivateLinkResourceTypes List<Property Map>

A shared_private_link_resource_types block as defined below.

webPubsubId String

Supporting Types

GetPrivateLinkResourceSharedPrivateLinkResourceType

Description string

The description of the resource type that has been onboarded to private link service.

SubresourceName string

The name for the resource that has been onboarded to private link service.

Description string

The description of the resource type that has been onboarded to private link service.

SubresourceName string

The name for the resource that has been onboarded to private link service.

description String

The description of the resource type that has been onboarded to private link service.

subresourceName String

The name for the resource that has been onboarded to private link service.

description string

The description of the resource type that has been onboarded to private link service.

subresourceName string

The name for the resource that has been onboarded to private link service.

description str

The description of the resource type that has been onboarded to private link service.

subresource_name str

The name for the resource that has been onboarded to private link service.

description String

The description of the resource type that has been onboarded to private link service.

subresourceName String

The name for the resource that has been onboarded to private link service.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.