1. Packages
  2. Azure Classic
  3. API Docs
  4. webpubsub
  5. getPrivateLinkResource

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.webpubsub.getPrivateLinkResource

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const testResourceGroup = new azure.core.ResourceGroup("test", {
        name: "terraform-webpubsub",
        location: "east us",
    });
    const testService = new azure.webpubsub.Service("test", {
        name: "tfex-webpubsub",
        location: testResourceGroup.location,
        resourceGroupName: testResourceGroup.name,
        sku: "Standard_S1",
        capacity: 1,
    });
    const test = azure.webpubsub.getPrivateLinkResourceOutput({
        webPubsubId: testService.id,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    test_resource_group = azure.core.ResourceGroup("test",
        name="terraform-webpubsub",
        location="east us")
    test_service = azure.webpubsub.Service("test",
        name="tfex-webpubsub",
        location=test_resource_group.location,
        resource_group_name=test_resource_group.name,
        sku="Standard_S1",
        capacity=1)
    test = azure.webpubsub.get_private_link_resource_output(web_pubsub_id=test_service.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/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, "test", &core.ResourceGroupArgs{
    			Name:     pulumi.String("terraform-webpubsub"),
    			Location: pulumi.String("east us"),
    		})
    		if err != nil {
    			return err
    		}
    		testService, err := webpubsub.NewService(ctx, "test", &webpubsub.ServiceArgs{
    			Name:              pulumi.String("tfex-webpubsub"),
    			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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var testResourceGroup = new Azure.Core.ResourceGroup("test", new()
        {
            Name = "terraform-webpubsub",
            Location = "east us",
        });
    
        var testService = new Azure.WebPubSub.Service("test", new()
        {
            Name = "tfex-webpubsub",
            Location = testResourceGroup.Location,
            ResourceGroupName = testResourceGroup.Name,
            Sku = "Standard_S1",
            Capacity = 1,
        });
    
        var test = Azure.WebPubSub.GetPrivateLinkResource.Invoke(new()
        {
            WebPubsubId = testService.Id,
        });
    
    });
    
    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()
                .name("terraform-webpubsub")
                .location("east us")
                .build());
    
            var testService = new Service("testService", ServiceArgs.builder()
                .name("tfex-webpubsub")
                .location(testResourceGroup.location())
                .resourceGroupName(testResourceGroup.name())
                .sku("Standard_S1")
                .capacity(1)
                .build());
    
            final var test = WebpubsubFunctions.getPrivateLinkResource(GetPrivateLinkResourceArgs.builder()
                .webPubsubId(testService.id())
                .build());
    
        }
    }
    
    resources:
      testResourceGroup:
        type: azure:core:ResourceGroup
        name: test
        properties:
          name: terraform-webpubsub
          location: east us
      testService:
        type: azure:webpubsub:Service
        name: test
        properties:
          name: tfex-webpubsub
          location: ${testResourceGroup.location}
          resourceGroupName: ${testResourceGroup.name}
          sku: Standard_S1
          capacity: 1
    variables:
      test:
        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
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi