1. Packages
  2. Azure Classic
  3. API Docs
  4. management
  5. PrivateLink

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.management.PrivateLink

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a Resource Management Private Link to restrict access for managing resources in the tenant.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const examplePrivateLink = new azure.management.PrivateLink("example", {
        name: "example",
        resourceGroupName: example.name,
        location: example.location,
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_private_link = azure.management.PrivateLink("example",
        name="example",
        resource_group_name=example.name,
        location=example.location)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/management"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = management.NewPrivateLink(ctx, "example", &management.PrivateLinkArgs{
    			Name:              pulumi.String("example"),
    			ResourceGroupName: example.Name,
    			Location:          example.Location,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var examplePrivateLink = new Azure.Management.PrivateLink("example", new()
        {
            Name = "example",
            ResourceGroupName = example.Name,
            Location = example.Location,
        });
    
    });
    
    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.management.PrivateLink;
    import com.pulumi.azure.management.PrivateLinkArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var examplePrivateLink = new PrivateLink("examplePrivateLink", PrivateLinkArgs.builder()
                .name("example")
                .resourceGroupName(example.name())
                .location(example.location())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      examplePrivateLink:
        type: azure:management:PrivateLink
        name: example
        properties:
          name: example
          resourceGroupName: ${example.name}
          location: ${example.location}
    

    Create PrivateLink Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PrivateLink(name: string, args: PrivateLinkArgs, opts?: CustomResourceOptions);
    @overload
    def PrivateLink(resource_name: str,
                    args: PrivateLinkArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def PrivateLink(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    resource_group_name: Optional[str] = None,
                    location: Optional[str] = None,
                    name: Optional[str] = None)
    func NewPrivateLink(ctx *Context, name string, args PrivateLinkArgs, opts ...ResourceOption) (*PrivateLink, error)
    public PrivateLink(string name, PrivateLinkArgs args, CustomResourceOptions? opts = null)
    public PrivateLink(String name, PrivateLinkArgs args)
    public PrivateLink(String name, PrivateLinkArgs args, CustomResourceOptions options)
    
    type: azure:management:PrivateLink
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PrivateLinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PrivateLinkArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PrivateLinkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PrivateLinkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PrivateLinkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var privateLinkResource = new Azure.Management.PrivateLink("privateLinkResource", new()
    {
        ResourceGroupName = "string",
        Location = "string",
        Name = "string",
    });
    
    example, err := management.NewPrivateLink(ctx, "privateLinkResource", &management.PrivateLinkArgs{
    	ResourceGroupName: pulumi.String("string"),
    	Location:          pulumi.String("string"),
    	Name:              pulumi.String("string"),
    })
    
    var privateLinkResource = new PrivateLink("privateLinkResource", PrivateLinkArgs.builder()
        .resourceGroupName("string")
        .location("string")
        .name("string")
        .build());
    
    private_link_resource = azure.management.PrivateLink("privateLinkResource",
        resource_group_name="string",
        location="string",
        name="string")
    
    const privateLinkResource = new azure.management.PrivateLink("privateLinkResource", {
        resourceGroupName: "string",
        location: "string",
        name: "string",
    });
    
    type: azure:management:PrivateLink
    properties:
        location: string
        name: string
        resourceGroupName: string
    

    PrivateLink Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The PrivateLink resource accepts the following input properties:

    ResourceGroupName string
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    Location string
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    Name string
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    ResourceGroupName string
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    Location string
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    Name string
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    resourceGroupName String
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    location String
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    name String
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    resourceGroupName string
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    location string
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    name string
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    resource_group_name str
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    location str
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    name str
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    resourceGroupName String
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    location String
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    name String
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PrivateLink resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing PrivateLink Resource

    Get an existing PrivateLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: PrivateLinkState, opts?: CustomResourceOptions): PrivateLink
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None) -> PrivateLink
    func GetPrivateLink(ctx *Context, name string, id IDInput, state *PrivateLinkState, opts ...ResourceOption) (*PrivateLink, error)
    public static PrivateLink Get(string name, Input<string> id, PrivateLinkState? state, CustomResourceOptions? opts = null)
    public static PrivateLink get(String name, Output<String> id, PrivateLinkState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Location string
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    Name string
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    ResourceGroupName string
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    Location string
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    Name string
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    ResourceGroupName string
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    location String
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    name String
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    resourceGroupName String
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    location string
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    name string
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    resourceGroupName string
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    location str
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    name str
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    resource_group_name str
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    location String
    The Azure Region where the Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.
    name String
    Specifies the name of this Resource Management Private Link. Changing this forces a new Resource Management Private Link to be created.
    resourceGroupName String
    Specifies the name of the Resource Group within which this Resource Management Private Link should exist. Changing this forces a new Resource Management Private Link to be created.

    Import

    An existing Resource Management Private Link can be imported into Terraform using the resource id, e.g.

    $ pulumi import azure:management/privateLink:PrivateLink example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Authorization/resourceManagementPrivateLinks/link1
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi