All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.privatelink.kotlin.Endpoint.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.privatelink.kotlin

import com.pulumi.azure.privatelink.kotlin.outputs.EndpointCustomDnsConfig
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointIpConfiguration
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointNetworkInterface
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointPrivateDnsZoneConfig
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointPrivateDnsZoneGroup
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointPrivateServiceConnection
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointCustomDnsConfig.Companion.toKotlin as endpointCustomDnsConfigToKotlin
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointIpConfiguration.Companion.toKotlin as endpointIpConfigurationToKotlin
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointNetworkInterface.Companion.toKotlin as endpointNetworkInterfaceToKotlin
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointPrivateDnsZoneConfig.Companion.toKotlin as endpointPrivateDnsZoneConfigToKotlin
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointPrivateDnsZoneGroup.Companion.toKotlin as endpointPrivateDnsZoneGroupToKotlin
import com.pulumi.azure.privatelink.kotlin.outputs.EndpointPrivateServiceConnection.Companion.toKotlin as endpointPrivateServiceConnectionToKotlin

/**
 * Builder for [Endpoint].
 */
@PulumiTagMarker
public class EndpointResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: EndpointArgs = EndpointArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend EndpointArgsBuilder.() -> Unit) {
        val builder = EndpointArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): Endpoint {
        val builtJavaResource = com.pulumi.azure.privatelink.Endpoint(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Endpoint(builtJavaResource)
    }
}

/**
 * Manages a Private Endpoint.
 * Azure Private Endpoint is a network interface that connects you privately and securely to a service powered by Azure Private Link. Private Endpoint uses a private IP address from your VNet, effectively bringing the service into your VNet. The service could be an Azure service such as Azure Storage, SQL, etc. or your own Private Link Service.
 * ## Example Usage
 * 
 * ```typescript
 * 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 exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "example-network",
 *     addressSpaces: ["10.0.0.0/16"],
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const service = new azure.network.Subnet("service", {
 *     name: "service",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.1.0/24"],
 *     enforcePrivateLinkServiceNetworkPolicies: true,
 * });
 * const endpoint = new azure.network.Subnet("endpoint", {
 *     name: "endpoint",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.2.0/24"],
 *     enforcePrivateLinkEndpointNetworkPolicies: true,
 * });
 * const examplePublicIp = new azure.network.PublicIp("example", {
 *     name: "example-pip",
 *     sku: "Standard",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     allocationMethod: "Static",
 * });
 * const exampleLoadBalancer = new azure.lb.LoadBalancer("example", {
 *     name: "example-lb",
 *     sku: "Standard",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     frontendIpConfigurations: [{
 *         name: examplePublicIp.name,
 *         publicIpAddressId: examplePublicIp.id,
 *     }],
 * });
 * const exampleLinkService = new azure.privatedns.LinkService("example", {
 *     name: "example-privatelink",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     natIpConfigurations: [{
 *         name: examplePublicIp.name,
 *         primary: true,
 *         subnetId: service.id,
 *     }],
 *     loadBalancerFrontendIpConfigurationIds: [exampleLoadBalancer.frontendIpConfigurations.apply(frontendIpConfigurations => frontendIpConfigurations?.[0]?.id)],
 * });
 * const exampleEndpoint = new azure.privatelink.Endpoint("example", {
 *     name: "example-endpoint",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     subnetId: endpoint.id,
 *     privateServiceConnection: {
 *         name: "example-privateserviceconnection",
 *         privateConnectionResourceId: exampleLinkService.id,
 *         isManualConnection: false,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_virtual_network = azure.network.VirtualNetwork("example",
 *     name="example-network",
 *     address_spaces=["10.0.0.0/16"],
 *     location=example.location,
 *     resource_group_name=example.name)
 * service = azure.network.Subnet("service",
 *     name="service",
 *     resource_group_name=example.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.0.1.0/24"],
 *     enforce_private_link_service_network_policies=True)
 * endpoint = azure.network.Subnet("endpoint",
 *     name="endpoint",
 *     resource_group_name=example.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.0.2.0/24"],
 *     enforce_private_link_endpoint_network_policies=True)
 * example_public_ip = azure.network.PublicIp("example",
 *     name="example-pip",
 *     sku="Standard",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     allocation_method="Static")
 * example_load_balancer = azure.lb.LoadBalancer("example",
 *     name="example-lb",
 *     sku="Standard",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     frontend_ip_configurations=[{
 *         "name": example_public_ip.name,
 *         "public_ip_address_id": example_public_ip.id,
 *     }])
 * example_link_service = azure.privatedns.LinkService("example",
 *     name="example-privatelink",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     nat_ip_configurations=[{
 *         "name": example_public_ip.name,
 *         "primary": True,
 *         "subnet_id": service.id,
 *     }],
 *     load_balancer_frontend_ip_configuration_ids=[example_load_balancer.frontend_ip_configurations[0].id])
 * example_endpoint = azure.privatelink.Endpoint("example",
 *     name="example-endpoint",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     subnet_id=endpoint.id,
 *     private_service_connection={
 *         "name": "example-privateserviceconnection",
 *         "private_connection_resource_id": example_link_service.id,
 *         "is_manual_connection": False,
 *     })
 * ```
 * ```csharp
 * 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 exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
 *     {
 *         Name = "example-network",
 *         AddressSpaces = new[]
 *         {
 *             "10.0.0.0/16",
 *         },
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 *     var service = new Azure.Network.Subnet("service", new()
 *     {
 *         Name = "service",
 *         ResourceGroupName = example.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.0.1.0/24",
 *         },
 *         EnforcePrivateLinkServiceNetworkPolicies = true,
 *     });
 *     var endpoint = new Azure.Network.Subnet("endpoint", new()
 *     {
 *         Name = "endpoint",
 *         ResourceGroupName = example.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.0.2.0/24",
 *         },
 *         EnforcePrivateLinkEndpointNetworkPolicies = true,
 *     });
 *     var examplePublicIp = new Azure.Network.PublicIp("example", new()
 *     {
 *         Name = "example-pip",
 *         Sku = "Standard",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         AllocationMethod = "Static",
 *     });
 *     var exampleLoadBalancer = new Azure.Lb.LoadBalancer("example", new()
 *     {
 *         Name = "example-lb",
 *         Sku = "Standard",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         FrontendIpConfigurations = new[]
 *         {
 *             new Azure.Lb.Inputs.LoadBalancerFrontendIpConfigurationArgs
 *             {
 *                 Name = examplePublicIp.Name,
 *                 PublicIpAddressId = examplePublicIp.Id,
 *             },
 *         },
 *     });
 *     var exampleLinkService = new Azure.PrivateDns.LinkService("example", new()
 *     {
 *         Name = "example-privatelink",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         NatIpConfigurations = new[]
 *         {
 *             new Azure.PrivateDns.Inputs.LinkServiceNatIpConfigurationArgs
 *             {
 *                 Name = examplePublicIp.Name,
 *                 Primary = true,
 *                 SubnetId = service.Id,
 *             },
 *         },
 *         LoadBalancerFrontendIpConfigurationIds = new[]
 *         {
 *             exampleLoadBalancer.FrontendIpConfigurations.Apply(frontendIpConfigurations => frontendIpConfigurations[0]?.Id),
 *         },
 *     });
 *     var exampleEndpoint = new Azure.PrivateLink.Endpoint("example", new()
 *     {
 *         Name = "example-endpoint",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SubnetId = endpoint.Id,
 *         PrivateServiceConnection = new Azure.PrivateLink.Inputs.EndpointPrivateServiceConnectionArgs
 *         {
 *             Name = "example-privateserviceconnection",
 *             PrivateConnectionResourceId = exampleLinkService.Id,
 *             IsManualConnection = false,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/lb"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatedns"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatelink"
 * 	"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
 * 		}
 * 		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
 * 			Name: pulumi.String("example-network"),
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.0.0.0/16"),
 * 			},
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		service, err := network.NewSubnet(ctx, "service", &network.SubnetArgs{
 * 			Name:               pulumi.String("service"),
 * 			ResourceGroupName:  example.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.0.1.0/24"),
 * 			},
 * 			EnforcePrivateLinkServiceNetworkPolicies: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		endpoint, err := network.NewSubnet(ctx, "endpoint", &network.SubnetArgs{
 * 			Name:               pulumi.String("endpoint"),
 * 			ResourceGroupName:  example.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.0.2.0/24"),
 * 			},
 * 			EnforcePrivateLinkEndpointNetworkPolicies: pulumi.Bool(true),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		examplePublicIp, err := network.NewPublicIp(ctx, "example", &network.PublicIpArgs{
 * 			Name:              pulumi.String("example-pip"),
 * 			Sku:               pulumi.String("Standard"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			AllocationMethod:  pulumi.String("Static"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleLoadBalancer, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{
 * 			Name:              pulumi.String("example-lb"),
 * 			Sku:               pulumi.String("Standard"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			FrontendIpConfigurations: lb.LoadBalancerFrontendIpConfigurationArray{
 * 				&lb.LoadBalancerFrontendIpConfigurationArgs{
 * 					Name:              examplePublicIp.Name,
 * 					PublicIpAddressId: examplePublicIp.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleLinkService, err := privatedns.NewLinkService(ctx, "example", &privatedns.LinkServiceArgs{
 * 			Name:              pulumi.String("example-privatelink"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			NatIpConfigurations: privatedns.LinkServiceNatIpConfigurationArray{
 * 				&privatedns.LinkServiceNatIpConfigurationArgs{
 * 					Name:     examplePublicIp.Name,
 * 					Primary:  pulumi.Bool(true),
 * 					SubnetId: service.ID(),
 * 				},
 * 			},
 * 			LoadBalancerFrontendIpConfigurationIds: pulumi.StringArray{
 * 				pulumi.String(exampleLoadBalancer.FrontendIpConfigurations.ApplyT(func(frontendIpConfigurations []lb.LoadBalancerFrontendIpConfiguration) (*string, error) {
 * 					return &frontendIpConfigurations[0].Id, nil
 * 				}).(pulumi.StringPtrOutput)),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
 * 			Name:              pulumi.String("example-endpoint"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			SubnetId:          endpoint.ID(),
 * 			PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
 * 				Name:                        pulumi.String("example-privateserviceconnection"),
 * 				PrivateConnectionResourceId: exampleLinkService.ID(),
 * 				IsManualConnection:          pulumi.Bool(false),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.network.PublicIp;
 * import com.pulumi.azure.network.PublicIpArgs;
 * import com.pulumi.azure.lb.LoadBalancer;
 * import com.pulumi.azure.lb.LoadBalancerArgs;
 * import com.pulumi.azure.lb.inputs.LoadBalancerFrontendIpConfigurationArgs;
 * import com.pulumi.azure.privatedns.LinkService;
 * import com.pulumi.azure.privatedns.LinkServiceArgs;
 * import com.pulumi.azure.privatedns.inputs.LinkServiceNatIpConfigurationArgs;
 * import com.pulumi.azure.privatelink.Endpoint;
 * import com.pulumi.azure.privatelink.EndpointArgs;
 * import com.pulumi.azure.privatelink.inputs.EndpointPrivateServiceConnectionArgs;
 * 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 exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("example-network")
 *             .addressSpaces("10.0.0.0/16")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 *         var service = new Subnet("service", SubnetArgs.builder()
 *             .name("service")
 *             .resourceGroupName(example.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.0.1.0/24")
 *             .enforcePrivateLinkServiceNetworkPolicies(true)
 *             .build());
 *         var endpoint = new Subnet("endpoint", SubnetArgs.builder()
 *             .name("endpoint")
 *             .resourceGroupName(example.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.0.2.0/24")
 *             .enforcePrivateLinkEndpointNetworkPolicies(true)
 *             .build());
 *         var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
 *             .name("example-pip")
 *             .sku("Standard")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .allocationMethod("Static")
 *             .build());
 *         var exampleLoadBalancer = new LoadBalancer("exampleLoadBalancer", LoadBalancerArgs.builder()
 *             .name("example-lb")
 *             .sku("Standard")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .frontendIpConfigurations(LoadBalancerFrontendIpConfigurationArgs.builder()
 *                 .name(examplePublicIp.name())
 *                 .publicIpAddressId(examplePublicIp.id())
 *                 .build())
 *             .build());
 *         var exampleLinkService = new LinkService("exampleLinkService", LinkServiceArgs.builder()
 *             .name("example-privatelink")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .natIpConfigurations(LinkServiceNatIpConfigurationArgs.builder()
 *                 .name(examplePublicIp.name())
 *                 .primary(true)
 *                 .subnetId(service.id())
 *                 .build())
 *             .loadBalancerFrontendIpConfigurationIds(exampleLoadBalancer.frontendIpConfigurations().applyValue(frontendIpConfigurations -> frontendIpConfigurations[0].id()))
 *             .build());
 *         var exampleEndpoint = new Endpoint("exampleEndpoint", EndpointArgs.builder()
 *             .name("example-endpoint")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .subnetId(endpoint.id())
 *             .privateServiceConnection(EndpointPrivateServiceConnectionArgs.builder()
 *                 .name("example-privateserviceconnection")
 *                 .privateConnectionResourceId(exampleLinkService.id())
 *                 .isManualConnection(false)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleVirtualNetwork:
 *     type: azure:network:VirtualNetwork
 *     name: example
 *     properties:
 *       name: example-network
 *       addressSpaces:
 *         - 10.0.0.0/16
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *   service:
 *     type: azure:network:Subnet
 *     properties:
 *       name: service
 *       resourceGroupName: ${example.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.0.1.0/24
 *       enforcePrivateLinkServiceNetworkPolicies: true
 *   endpoint:
 *     type: azure:network:Subnet
 *     properties:
 *       name: endpoint
 *       resourceGroupName: ${example.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.0.2.0/24
 *       enforcePrivateLinkEndpointNetworkPolicies: true
 *   examplePublicIp:
 *     type: azure:network:PublicIp
 *     name: example
 *     properties:
 *       name: example-pip
 *       sku: Standard
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       allocationMethod: Static
 *   exampleLoadBalancer:
 *     type: azure:lb:LoadBalancer
 *     name: example
 *     properties:
 *       name: example-lb
 *       sku: Standard
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       frontendIpConfigurations:
 *         - name: ${examplePublicIp.name}
 *           publicIpAddressId: ${examplePublicIp.id}
 *   exampleLinkService:
 *     type: azure:privatedns:LinkService
 *     name: example
 *     properties:
 *       name: example-privatelink
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       natIpConfigurations:
 *         - name: ${examplePublicIp.name}
 *           primary: true
 *           subnetId: ${service.id}
 *       loadBalancerFrontendIpConfigurationIds:
 *         - ${exampleLoadBalancer.frontendIpConfigurations[0].id}
 *   exampleEndpoint:
 *     type: azure:privatelink:Endpoint
 *     name: example
 *     properties:
 *       name: example-endpoint
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       subnetId: ${endpoint.id}
 *       privateServiceConnection:
 *         name: example-privateserviceconnection
 *         privateConnectionResourceId: ${exampleLinkService.id}
 *         isManualConnection: false
 * ```
 * 
 * Using a Private Link Service Alias with existing resources:
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = azure.core.getResourceGroup({
 *     name: "example-resources",
 * });
 * const vnet = example.then(example => azure.network.getVirtualNetwork({
 *     name: "example-network",
 *     resourceGroupName: example.name,
 * }));
 * const subnet = Promise.all([vnet, example]).then(([vnet, example]) => azure.network.getSubnet({
 *     name: "default",
 *     virtualNetworkName: vnet.name,
 *     resourceGroupName: example.name,
 * }));
 * const exampleEndpoint = new azure.privatelink.Endpoint("example", {
 *     name: "example-endpoint",
 *     location: example.then(example => example.location),
 *     resourceGroupName: example.then(example => example.name),
 *     subnetId: subnet.then(subnet => subnet.id),
 *     privateServiceConnection: {
 *         name: "example-privateserviceconnection",
 *         privateConnectionResourceAlias: "example-privatelinkservice.d20286c8-4ea5-11eb-9584-8f53157226c6.centralus.azure.privatelinkservice",
 *         isManualConnection: true,
 *         requestMessage: "PL",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.get_resource_group(name="example-resources")
 * vnet = azure.network.get_virtual_network(name="example-network",
 *     resource_group_name=example.name)
 * subnet = azure.network.get_subnet(name="default",
 *     virtual_network_name=vnet.name,
 *     resource_group_name=example.name)
 * example_endpoint = azure.privatelink.Endpoint("example",
 *     name="example-endpoint",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     subnet_id=subnet.id,
 *     private_service_connection={
 *         "name": "example-privateserviceconnection",
 *         "private_connection_resource_alias": "example-privatelinkservice.d20286c8-4ea5-11eb-9584-8f53157226c6.centralus.azure.privatelinkservice",
 *         "is_manual_connection": True,
 *         "request_message": "PL",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = Azure.Core.GetResourceGroup.Invoke(new()
 *     {
 *         Name = "example-resources",
 *     });
 *     var vnet = Azure.Network.GetVirtualNetwork.Invoke(new()
 *     {
 *         Name = "example-network",
 *         ResourceGroupName = example.Apply(getResourceGroupResult => getResourceGroupResult.Name),
 *     });
 *     var subnet = Azure.Network.GetSubnet.Invoke(new()
 *     {
 *         Name = "default",
 *         VirtualNetworkName = vnet.Apply(getVirtualNetworkResult => getVirtualNetworkResult.Name),
 *         ResourceGroupName = example.Apply(getResourceGroupResult => getResourceGroupResult.Name),
 *     });
 *     var exampleEndpoint = new Azure.PrivateLink.Endpoint("example", new()
 *     {
 *         Name = "example-endpoint",
 *         Location = example.Apply(getResourceGroupResult => getResourceGroupResult.Location),
 *         ResourceGroupName = example.Apply(getResourceGroupResult => getResourceGroupResult.Name),
 *         SubnetId = subnet.Apply(getSubnetResult => getSubnetResult.Id),
 *         PrivateServiceConnection = new Azure.PrivateLink.Inputs.EndpointPrivateServiceConnectionArgs
 *         {
 *             Name = "example-privateserviceconnection",
 *             PrivateConnectionResourceAlias = "example-privatelinkservice.d20286c8-4ea5-11eb-9584-8f53157226c6.centralus.azure.privatelinkservice",
 *             IsManualConnection = true,
 *             RequestMessage = "PL",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatelink"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.LookupResourceGroup(ctx, &core.LookupResourceGroupArgs{
 * 			Name: "example-resources",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		vnet, err := network.LookupVirtualNetwork(ctx, &network.LookupVirtualNetworkArgs{
 * 			Name:              "example-network",
 * 			ResourceGroupName: example.Name,
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		subnet, err := network.LookupSubnet(ctx, &network.LookupSubnetArgs{
 * 			Name:               "default",
 * 			VirtualNetworkName: vnet.Name,
 * 			ResourceGroupName:  example.Name,
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
 * 			Name:              pulumi.String("example-endpoint"),
 * 			Location:          pulumi.String(example.Location),
 * 			ResourceGroupName: pulumi.String(example.Name),
 * 			SubnetId:          pulumi.String(subnet.Id),
 * 			PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
 * 				Name:                           pulumi.String("example-privateserviceconnection"),
 * 				PrivateConnectionResourceAlias: pulumi.String("example-privatelinkservice.d20286c8-4ea5-11eb-9584-8f53157226c6.centralus.azure.privatelinkservice"),
 * 				IsManualConnection:             pulumi.Bool(true),
 * 				RequestMessage:                 pulumi.String("PL"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.CoreFunctions;
 * import com.pulumi.azure.core.inputs.GetResourceGroupArgs;
 * import com.pulumi.azure.network.NetworkFunctions;
 * import com.pulumi.azure.network.inputs.GetVirtualNetworkArgs;
 * import com.pulumi.azure.network.inputs.GetSubnetArgs;
 * import com.pulumi.azure.privatelink.Endpoint;
 * import com.pulumi.azure.privatelink.EndpointArgs;
 * import com.pulumi.azure.privatelink.inputs.EndpointPrivateServiceConnectionArgs;
 * 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 = CoreFunctions.getResourceGroup(GetResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .build());
 *         final var vnet = NetworkFunctions.getVirtualNetwork(GetVirtualNetworkArgs.builder()
 *             .name("example-network")
 *             .resourceGroupName(example.applyValue(getResourceGroupResult -> getResourceGroupResult.name()))
 *             .build());
 *         final var subnet = NetworkFunctions.getSubnet(GetSubnetArgs.builder()
 *             .name("default")
 *             .virtualNetworkName(vnet.applyValue(getVirtualNetworkResult -> getVirtualNetworkResult.name()))
 *             .resourceGroupName(example.applyValue(getResourceGroupResult -> getResourceGroupResult.name()))
 *             .build());
 *         var exampleEndpoint = new Endpoint("exampleEndpoint", EndpointArgs.builder()
 *             .name("example-endpoint")
 *             .location(example.applyValue(getResourceGroupResult -> getResourceGroupResult.location()))
 *             .resourceGroupName(example.applyValue(getResourceGroupResult -> getResourceGroupResult.name()))
 *             .subnetId(subnet.applyValue(getSubnetResult -> getSubnetResult.id()))
 *             .privateServiceConnection(EndpointPrivateServiceConnectionArgs.builder()
 *                 .name("example-privateserviceconnection")
 *                 .privateConnectionResourceAlias("example-privatelinkservice.d20286c8-4ea5-11eb-9584-8f53157226c6.centralus.azure.privatelinkservice")
 *                 .isManualConnection(true)
 *                 .requestMessage("PL")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   exampleEndpoint:
 *     type: azure:privatelink:Endpoint
 *     name: example
 *     properties:
 *       name: example-endpoint
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       subnetId: ${subnet.id}
 *       privateServiceConnection:
 *         name: example-privateserviceconnection
 *         privateConnectionResourceAlias: example-privatelinkservice.d20286c8-4ea5-11eb-9584-8f53157226c6.centralus.azure.privatelinkservice
 *         isManualConnection: true
 *         requestMessage: PL
 * variables:
 *   example:
 *     fn::invoke:
 *       Function: azure:core:getResourceGroup
 *       Arguments:
 *         name: example-resources
 *   vnet:
 *     fn::invoke:
 *       Function: azure:network:getVirtualNetwork
 *       Arguments:
 *         name: example-network
 *         resourceGroupName: ${example.name}
 *   subnet:
 *     fn::invoke:
 *       Function: azure:network:getSubnet
 *       Arguments:
 *         name: default
 *         virtualNetworkName: ${vnet.name}
 *         resourceGroupName: ${example.name}
 * ```
 * 
 * Using a Private Endpoint pointing to an *owned* Azure service, with proper DNS configuration:
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-rg",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "exampleaccount",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
 *     name: "virtnetname",
 *     addressSpaces: ["10.0.0.0/16"],
 *     location: example.location,
 *     resourceGroupName: example.name,
 * });
 * const exampleSubnet = new azure.network.Subnet("example", {
 *     name: "subnetname",
 *     resourceGroupName: example.name,
 *     virtualNetworkName: exampleVirtualNetwork.name,
 *     addressPrefixes: ["10.0.2.0/24"],
 * });
 * const exampleZone = new azure.privatedns.Zone("example", {
 *     name: "privatelink.blob.core.windows.net",
 *     resourceGroupName: example.name,
 * });
 * const exampleEndpoint = new azure.privatelink.Endpoint("example", {
 *     name: "example-endpoint",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     subnetId: exampleSubnet.id,
 *     privateServiceConnection: {
 *         name: "example-privateserviceconnection",
 *         privateConnectionResourceId: exampleAccount.id,
 *         subresourceNames: ["blob"],
 *         isManualConnection: false,
 *     },
 *     privateDnsZoneGroup: {
 *         name: "example-dns-zone-group",
 *         privateDnsZoneIds: [exampleZone.id],
 *     },
 * });
 * const exampleZoneVirtualNetworkLink = new azure.privatedns.ZoneVirtualNetworkLink("example", {
 *     name: "example-link",
 *     resourceGroupName: example.name,
 *     privateDnsZoneName: exampleZone.name,
 *     virtualNetworkId: exampleVirtualNetwork.id,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-rg",
 *     location="West Europe")
 * example_account = azure.storage.Account("example",
 *     name="exampleaccount",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     account_tier="Standard",
 *     account_replication_type="LRS")
 * example_virtual_network = azure.network.VirtualNetwork("example",
 *     name="virtnetname",
 *     address_spaces=["10.0.0.0/16"],
 *     location=example.location,
 *     resource_group_name=example.name)
 * example_subnet = azure.network.Subnet("example",
 *     name="subnetname",
 *     resource_group_name=example.name,
 *     virtual_network_name=example_virtual_network.name,
 *     address_prefixes=["10.0.2.0/24"])
 * example_zone = azure.privatedns.Zone("example",
 *     name="privatelink.blob.core.windows.net",
 *     resource_group_name=example.name)
 * example_endpoint = azure.privatelink.Endpoint("example",
 *     name="example-endpoint",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     subnet_id=example_subnet.id,
 *     private_service_connection={
 *         "name": "example-privateserviceconnection",
 *         "private_connection_resource_id": example_account.id,
 *         "subresource_names": ["blob"],
 *         "is_manual_connection": False,
 *     },
 *     private_dns_zone_group={
 *         "name": "example-dns-zone-group",
 *         "private_dns_zone_ids": [example_zone.id],
 *     })
 * example_zone_virtual_network_link = azure.privatedns.ZoneVirtualNetworkLink("example",
 *     name="example-link",
 *     resource_group_name=example.name,
 *     private_dns_zone_name=example_zone.name,
 *     virtual_network_id=example_virtual_network.id)
 * ```
 * ```csharp
 * 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-rg",
 *         Location = "West Europe",
 *     });
 *     var exampleAccount = new Azure.Storage.Account("example", new()
 *     {
 *         Name = "exampleaccount",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AccountTier = "Standard",
 *         AccountReplicationType = "LRS",
 *     });
 *     var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
 *     {
 *         Name = "virtnetname",
 *         AddressSpaces = new[]
 *         {
 *             "10.0.0.0/16",
 *         },
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *     });
 *     var exampleSubnet = new Azure.Network.Subnet("example", new()
 *     {
 *         Name = "subnetname",
 *         ResourceGroupName = example.Name,
 *         VirtualNetworkName = exampleVirtualNetwork.Name,
 *         AddressPrefixes = new[]
 *         {
 *             "10.0.2.0/24",
 *         },
 *     });
 *     var exampleZone = new Azure.PrivateDns.Zone("example", new()
 *     {
 *         Name = "privatelink.blob.core.windows.net",
 *         ResourceGroupName = example.Name,
 *     });
 *     var exampleEndpoint = new Azure.PrivateLink.Endpoint("example", new()
 *     {
 *         Name = "example-endpoint",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SubnetId = exampleSubnet.Id,
 *         PrivateServiceConnection = new Azure.PrivateLink.Inputs.EndpointPrivateServiceConnectionArgs
 *         {
 *             Name = "example-privateserviceconnection",
 *             PrivateConnectionResourceId = exampleAccount.Id,
 *             SubresourceNames = new[]
 *             {
 *                 "blob",
 *             },
 *             IsManualConnection = false,
 *         },
 *         PrivateDnsZoneGroup = new Azure.PrivateLink.Inputs.EndpointPrivateDnsZoneGroupArgs
 *         {
 *             Name = "example-dns-zone-group",
 *             PrivateDnsZoneIds = new[]
 *             {
 *                 exampleZone.Id,
 *             },
 *         },
 *     });
 *     var exampleZoneVirtualNetworkLink = new Azure.PrivateDns.ZoneVirtualNetworkLink("example", new()
 *     {
 *         Name = "example-link",
 *         ResourceGroupName = example.Name,
 *         PrivateDnsZoneName = exampleZone.Name,
 *         VirtualNetworkId = exampleVirtualNetwork.Id,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatedns"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/privatelink"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
 * 	"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-rg"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
 * 			Name:                   pulumi.String("exampleaccount"),
 * 			ResourceGroupName:      example.Name,
 * 			Location:               example.Location,
 * 			AccountTier:            pulumi.String("Standard"),
 * 			AccountReplicationType: pulumi.String("LRS"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
 * 			Name: pulumi.String("virtnetname"),
 * 			AddressSpaces: pulumi.StringArray{
 * 				pulumi.String("10.0.0.0/16"),
 * 			},
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleSubnet, err := network.NewSubnet(ctx, "example", &network.SubnetArgs{
 * 			Name:               pulumi.String("subnetname"),
 * 			ResourceGroupName:  example.Name,
 * 			VirtualNetworkName: exampleVirtualNetwork.Name,
 * 			AddressPrefixes: pulumi.StringArray{
 * 				pulumi.String("10.0.2.0/24"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleZone, err := privatedns.NewZone(ctx, "example", &privatedns.ZoneArgs{
 * 			Name:              pulumi.String("privatelink.blob.core.windows.net"),
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = privatelink.NewEndpoint(ctx, "example", &privatelink.EndpointArgs{
 * 			Name:              pulumi.String("example-endpoint"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			SubnetId:          exampleSubnet.ID(),
 * 			PrivateServiceConnection: &privatelink.EndpointPrivateServiceConnectionArgs{
 * 				Name:                        pulumi.String("example-privateserviceconnection"),
 * 				PrivateConnectionResourceId: exampleAccount.ID(),
 * 				SubresourceNames: pulumi.StringArray{
 * 					pulumi.String("blob"),
 * 				},
 * 				IsManualConnection: pulumi.Bool(false),
 * 			},
 * 			PrivateDnsZoneGroup: &privatelink.EndpointPrivateDnsZoneGroupArgs{
 * 				Name: pulumi.String("example-dns-zone-group"),
 * 				PrivateDnsZoneIds: pulumi.StringArray{
 * 					exampleZone.ID(),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = privatedns.NewZoneVirtualNetworkLink(ctx, "example", &privatedns.ZoneVirtualNetworkLinkArgs{
 * 			Name:               pulumi.String("example-link"),
 * 			ResourceGroupName:  example.Name,
 * 			PrivateDnsZoneName: exampleZone.Name,
 * 			VirtualNetworkId:   exampleVirtualNetwork.ID(),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * 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.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.network.VirtualNetwork;
 * import com.pulumi.azure.network.VirtualNetworkArgs;
 * import com.pulumi.azure.network.Subnet;
 * import com.pulumi.azure.network.SubnetArgs;
 * import com.pulumi.azure.privatedns.Zone;
 * import com.pulumi.azure.privatedns.ZoneArgs;
 * import com.pulumi.azure.privatelink.Endpoint;
 * import com.pulumi.azure.privatelink.EndpointArgs;
 * import com.pulumi.azure.privatelink.inputs.EndpointPrivateServiceConnectionArgs;
 * import com.pulumi.azure.privatelink.inputs.EndpointPrivateDnsZoneGroupArgs;
 * import com.pulumi.azure.privatedns.ZoneVirtualNetworkLink;
 * import com.pulumi.azure.privatedns.ZoneVirtualNetworkLinkArgs;
 * 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-rg")
 *             .location("West Europe")
 *             .build());
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("exampleaccount")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 *         var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
 *             .name("virtnetname")
 *             .addressSpaces("10.0.0.0/16")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 *         var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
 *             .name("subnetname")
 *             .resourceGroupName(example.name())
 *             .virtualNetworkName(exampleVirtualNetwork.name())
 *             .addressPrefixes("10.0.2.0/24")
 *             .build());
 *         var exampleZone = new Zone("exampleZone", ZoneArgs.builder()
 *             .name("privatelink.blob.core.windows.net")
 *             .resourceGroupName(example.name())
 *             .build());
 *         var exampleEndpoint = new Endpoint("exampleEndpoint", EndpointArgs.builder()
 *             .name("example-endpoint")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .subnetId(exampleSubnet.id())
 *             .privateServiceConnection(EndpointPrivateServiceConnectionArgs.builder()
 *                 .name("example-privateserviceconnection")
 *                 .privateConnectionResourceId(exampleAccount.id())
 *                 .subresourceNames("blob")
 *                 .isManualConnection(false)
 *                 .build())
 *             .privateDnsZoneGroup(EndpointPrivateDnsZoneGroupArgs.builder()
 *                 .name("example-dns-zone-group")
 *                 .privateDnsZoneIds(exampleZone.id())
 *                 .build())
 *             .build());
 *         var exampleZoneVirtualNetworkLink = new ZoneVirtualNetworkLink("exampleZoneVirtualNetworkLink", ZoneVirtualNetworkLinkArgs.builder()
 *             .name("example-link")
 *             .resourceGroupName(example.name())
 *             .privateDnsZoneName(exampleZone.name())
 *             .virtualNetworkId(exampleVirtualNetwork.id())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-rg
 *       location: West Europe
 *   exampleAccount:
 *     type: azure:storage:Account
 *     name: example
 *     properties:
 *       name: exampleaccount
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       accountTier: Standard
 *       accountReplicationType: LRS
 *   exampleVirtualNetwork:
 *     type: azure:network:VirtualNetwork
 *     name: example
 *     properties:
 *       name: virtnetname
 *       addressSpaces:
 *         - 10.0.0.0/16
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *   exampleSubnet:
 *     type: azure:network:Subnet
 *     name: example
 *     properties:
 *       name: subnetname
 *       resourceGroupName: ${example.name}
 *       virtualNetworkName: ${exampleVirtualNetwork.name}
 *       addressPrefixes:
 *         - 10.0.2.0/24
 *   exampleEndpoint:
 *     type: azure:privatelink:Endpoint
 *     name: example
 *     properties:
 *       name: example-endpoint
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       subnetId: ${exampleSubnet.id}
 *       privateServiceConnection:
 *         name: example-privateserviceconnection
 *         privateConnectionResourceId: ${exampleAccount.id}
 *         subresourceNames:
 *           - blob
 *         isManualConnection: false
 *       privateDnsZoneGroup:
 *         name: example-dns-zone-group
 *         privateDnsZoneIds:
 *           - ${exampleZone.id}
 *   exampleZone:
 *     type: azure:privatedns:Zone
 *     name: example
 *     properties:
 *       name: privatelink.blob.core.windows.net
 *       resourceGroupName: ${example.name}
 *   exampleZoneVirtualNetworkLink:
 *     type: azure:privatedns:ZoneVirtualNetworkLink
 *     name: example
 *     properties:
 *       name: example-link
 *       resourceGroupName: ${example.name}
 *       privateDnsZoneName: ${exampleZone.name}
 *       virtualNetworkId: ${exampleVirtualNetwork.id}
 * ```
 * 
 * ## Example HCL Configurations
 * * How to conneca `Private Endpoint` to a Application Gateway
 * * How to connect a `Private Endpoint` to a Cosmos MongoDB
 * * How to connect a `Private Endpoint` to a Cosmos PostgreSQL
 * * How to connect a `Private Endpoint` to a PostgreSQL Server
 * * How to connect a `Private Endpoint` to a Private Link Service
 * * How to connect a `Private Endpoint` to a Private DNS Group
 * * How to connect a `Private Endpoint` to a Databricks Workspace
 * ## Import
 * Private Endpoints can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:privatelink/endpoint:Endpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/privateEndpoints/endpoint1
 * ```
 */
public class Endpoint internal constructor(
    override val javaResource: com.pulumi.azure.privatelink.Endpoint,
) : KotlinCustomResource(javaResource, EndpointMapper) {
    /**
     * A `custom_dns_configs` block as defined below.
     */
    public val customDnsConfigs: Output>
        get() = javaResource.customDnsConfigs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> endpointCustomDnsConfigToKotlin(args0) })
            })
        })

    /**
     * The custom name of the network interface attached to the private endpoint. Changing this forces a new resource to be created.
     */
    public val customNetworkInterfaceName: Output?
        get() = javaResource.customNetworkInterfaceName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * One or more `ip_configuration` blocks as defined below. This allows a static IP address to be set for this Private Endpoint, otherwise an address is dynamically allocated from the Subnet.
     */
    public val ipConfigurations: Output>?
        get() = javaResource.ipConfigurations().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        endpointIpConfigurationToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * The supported Azure location where the resource exists. Changing this forces a new resource to be created.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * Specifies the Name of the Private Endpoint. Changing this forces a new resource to be created.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * A `network_interface` block as defined below.
     */
    public val networkInterfaces: Output>
        get() = javaResource.networkInterfaces().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> endpointNetworkInterfaceToKotlin(args0) })
            })
        })

    /**
     * A `private_dns_zone_configs` block as defined below.
     */
    public val privateDnsZoneConfigs: Output>
        get() = javaResource.privateDnsZoneConfigs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> endpointPrivateDnsZoneConfigToKotlin(args0) })
            })
        })

    /**
     * A `private_dns_zone_group` block as defined below.
     */
    public val privateDnsZoneGroup: Output?
        get() = javaResource.privateDnsZoneGroup().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> endpointPrivateDnsZoneGroupToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * A `private_service_connection` block as defined below.
     */
    public val privateServiceConnection: Output
        get() = javaResource.privateServiceConnection().applyValue({ args0 ->
            args0.let({ args0 ->
                endpointPrivateServiceConnectionToKotlin(args0)
            })
        })

    /**
     * Specifies the Name of the Resource Group within which the Private Endpoint should exist. Changing this forces a new resource to be created.
     */
    public val resourceGroupName: Output
        get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })

    /**
     * The ID of the Subnet from which Private IP Addresses will be allocated for this Private Endpoint. Changing this forces a new resource to be created.
     */
    public val subnetId: Output
        get() = javaResource.subnetId().applyValue({ args0 -> args0 })

    /**
     * A mapping of tags to assign to the resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })
}

public object EndpointMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.privatelink.Endpoint::class == javaResource::class

    override fun map(javaResource: Resource): Endpoint = Endpoint(
        javaResource as
            com.pulumi.azure.privatelink.Endpoint,
    )
}

/**
 * @see [Endpoint].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Endpoint].
 */
public suspend fun endpoint(name: String, block: suspend EndpointResourceBuilder.() -> Unit): Endpoint {
    val builder = EndpointResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Endpoint].
 * @param name The _unique_ name of the resulting resource.
 */
public fun endpoint(name: String): Endpoint {
    val builder = EndpointResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy