1. Packages
  2. Azure Classic
  3. API Docs
  4. cdn
  5. EndpointCustomDomain

We recommend using Azure Native.

Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi

azure.cdn.EndpointCustomDomain

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.80.0 published on Monday, Jun 10, 2024 by Pulumi

    Manages a Custom Domain for a CDN Endpoint.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("example", {
        name: "example-rg",
        location: "west europe",
    });
    const exampleAccount = new azure.storage.Account("example", {
        name: "example",
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        accountTier: "Standard",
        accountReplicationType: "GRS",
    });
    const exampleProfile = new azure.cdn.Profile("example", {
        name: "example-profile",
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        sku: "Standard_Verizon",
    });
    const exampleEndpoint = new azure.cdn.Endpoint("example", {
        name: "example-endpoint",
        profileName: exampleProfile.name,
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        origins: [{
            name: "example",
            hostName: exampleAccount.primaryBlobHost,
        }],
    });
    const example = azure.dns.getZone({
        name: "example-domain.com",
        resourceGroupName: "domain-rg",
    });
    const exampleCNameRecord = new azure.dns.CNameRecord("example", {
        name: "example",
        zoneName: example.then(example => example.name),
        resourceGroupName: example.then(example => example.resourceGroupName),
        ttl: 3600,
        targetResourceId: exampleEndpoint.id,
    });
    const exampleEndpointCustomDomain = new azure.cdn.EndpointCustomDomain("example", {
        name: "example-domain",
        cdnEndpointId: exampleEndpoint.id,
        hostName: pulumi.all([exampleCNameRecord.name, example]).apply(([name, example]) => `${name}.${example.name}`),
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("example",
        name="example-rg",
        location="west europe")
    example_account = azure.storage.Account("example",
        name="example",
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        account_tier="Standard",
        account_replication_type="GRS")
    example_profile = azure.cdn.Profile("example",
        name="example-profile",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        sku="Standard_Verizon")
    example_endpoint = azure.cdn.Endpoint("example",
        name="example-endpoint",
        profile_name=example_profile.name,
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        origins=[azure.cdn.EndpointOriginArgs(
            name="example",
            host_name=example_account.primary_blob_host,
        )])
    example = azure.dns.get_zone(name="example-domain.com",
        resource_group_name="domain-rg")
    example_c_name_record = azure.dns.CNameRecord("example",
        name="example",
        zone_name=example.name,
        resource_group_name=example.resource_group_name,
        ttl=3600,
        target_resource_id=example_endpoint.id)
    example_endpoint_custom_domain = azure.cdn.EndpointCustomDomain("example",
        name="example-domain",
        cdn_endpoint_id=example_endpoint.id,
        host_name=example_c_name_record.name.apply(lambda name: f"{name}.{example.name}"))
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/cdn"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dns"
    	"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 {
    		exampleResourceGroup, 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("example"),
    			ResourceGroupName:      exampleResourceGroup.Name,
    			Location:               exampleResourceGroup.Location,
    			AccountTier:            pulumi.String("Standard"),
    			AccountReplicationType: pulumi.String("GRS"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleProfile, err := cdn.NewProfile(ctx, "example", &cdn.ProfileArgs{
    			Name:              pulumi.String("example-profile"),
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Sku:               pulumi.String("Standard_Verizon"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleEndpoint, err := cdn.NewEndpoint(ctx, "example", &cdn.EndpointArgs{
    			Name:              pulumi.String("example-endpoint"),
    			ProfileName:       exampleProfile.Name,
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Origins: cdn.EndpointOriginArray{
    				&cdn.EndpointOriginArgs{
    					Name:     pulumi.String("example"),
    					HostName: exampleAccount.PrimaryBlobHost,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		example, err := dns.LookupZone(ctx, &dns.LookupZoneArgs{
    			Name:              "example-domain.com",
    			ResourceGroupName: pulumi.StringRef("domain-rg"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleCNameRecord, err := dns.NewCNameRecord(ctx, "example", &dns.CNameRecordArgs{
    			Name:              pulumi.String("example"),
    			ZoneName:          pulumi.String(example.Name),
    			ResourceGroupName: pulumi.String(example.ResourceGroupName),
    			Ttl:               pulumi.Int(3600),
    			TargetResourceId:  exampleEndpoint.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cdn.NewEndpointCustomDomain(ctx, "example", &cdn.EndpointCustomDomainArgs{
    			Name:          pulumi.String("example-domain"),
    			CdnEndpointId: exampleEndpoint.ID(),
    			HostName: exampleCNameRecord.Name.ApplyT(func(name string) (string, error) {
    				return fmt.Sprintf("%v.%v", name, example.Name), nil
    			}).(pulumi.StringOutput),
    		})
    		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 exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-rg",
            Location = "west europe",
        });
    
        var exampleAccount = new Azure.Storage.Account("example", new()
        {
            Name = "example",
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            AccountTier = "Standard",
            AccountReplicationType = "GRS",
        });
    
        var exampleProfile = new Azure.Cdn.Profile("example", new()
        {
            Name = "example-profile",
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Sku = "Standard_Verizon",
        });
    
        var exampleEndpoint = new Azure.Cdn.Endpoint("example", new()
        {
            Name = "example-endpoint",
            ProfileName = exampleProfile.Name,
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Origins = new[]
            {
                new Azure.Cdn.Inputs.EndpointOriginArgs
                {
                    Name = "example",
                    HostName = exampleAccount.PrimaryBlobHost,
                },
            },
        });
    
        var example = Azure.Dns.GetZone.Invoke(new()
        {
            Name = "example-domain.com",
            ResourceGroupName = "domain-rg",
        });
    
        var exampleCNameRecord = new Azure.Dns.CNameRecord("example", new()
        {
            Name = "example",
            ZoneName = example.Apply(getZoneResult => getZoneResult.Name),
            ResourceGroupName = example.Apply(getZoneResult => getZoneResult.ResourceGroupName),
            Ttl = 3600,
            TargetResourceId = exampleEndpoint.Id,
        });
    
        var exampleEndpointCustomDomain = new Azure.Cdn.EndpointCustomDomain("example", new()
        {
            Name = "example-domain",
            CdnEndpointId = exampleEndpoint.Id,
            HostName = Output.Tuple(exampleCNameRecord.Name, example).Apply(values =>
            {
                var name = values.Item1;
                var example = values.Item2;
                return $"{name}.{example.Apply(getZoneResult => getZoneResult.Name)}";
            }),
        });
    
    });
    
    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.cdn.Profile;
    import com.pulumi.azure.cdn.ProfileArgs;
    import com.pulumi.azure.cdn.Endpoint;
    import com.pulumi.azure.cdn.EndpointArgs;
    import com.pulumi.azure.cdn.inputs.EndpointOriginArgs;
    import com.pulumi.azure.dns.DnsFunctions;
    import com.pulumi.azure.dns.inputs.GetZoneArgs;
    import com.pulumi.azure.dns.CNameRecord;
    import com.pulumi.azure.dns.CNameRecordArgs;
    import com.pulumi.azure.cdn.EndpointCustomDomain;
    import com.pulumi.azure.cdn.EndpointCustomDomainArgs;
    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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
                .name("example-rg")
                .location("west europe")
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
                .name("example")
                .resourceGroupName(exampleResourceGroup.name())
                .location(exampleResourceGroup.location())
                .accountTier("Standard")
                .accountReplicationType("GRS")
                .build());
    
            var exampleProfile = new Profile("exampleProfile", ProfileArgs.builder()
                .name("example-profile")
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .sku("Standard_Verizon")
                .build());
    
            var exampleEndpoint = new Endpoint("exampleEndpoint", EndpointArgs.builder()
                .name("example-endpoint")
                .profileName(exampleProfile.name())
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .origins(EndpointOriginArgs.builder()
                    .name("example")
                    .hostName(exampleAccount.primaryBlobHost())
                    .build())
                .build());
    
            final var example = DnsFunctions.getZone(GetZoneArgs.builder()
                .name("example-domain.com")
                .resourceGroupName("domain-rg")
                .build());
    
            var exampleCNameRecord = new CNameRecord("exampleCNameRecord", CNameRecordArgs.builder()
                .name("example")
                .zoneName(example.applyValue(getZoneResult -> getZoneResult.name()))
                .resourceGroupName(example.applyValue(getZoneResult -> getZoneResult.resourceGroupName()))
                .ttl(3600)
                .targetResourceId(exampleEndpoint.id())
                .build());
    
            var exampleEndpointCustomDomain = new EndpointCustomDomain("exampleEndpointCustomDomain", EndpointCustomDomainArgs.builder()
                .name("example-domain")
                .cdnEndpointId(exampleEndpoint.id())
                .hostName(exampleCNameRecord.name().applyValue(name -> String.format("%s.%s", name,example.applyValue(getZoneResult -> getZoneResult.name()))))
                .build());
    
        }
    }
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        name: example
        properties:
          name: example-rg
          location: west europe
      exampleAccount:
        type: azure:storage:Account
        name: example
        properties:
          name: example
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          accountTier: Standard
          accountReplicationType: GRS
      exampleProfile:
        type: azure:cdn:Profile
        name: example
        properties:
          name: example-profile
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          sku: Standard_Verizon
      exampleEndpoint:
        type: azure:cdn:Endpoint
        name: example
        properties:
          name: example-endpoint
          profileName: ${exampleProfile.name}
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          origins:
            - name: example
              hostName: ${exampleAccount.primaryBlobHost}
      exampleCNameRecord:
        type: azure:dns:CNameRecord
        name: example
        properties:
          name: example
          zoneName: ${example.name}
          resourceGroupName: ${example.resourceGroupName}
          ttl: 3600
          targetResourceId: ${exampleEndpoint.id}
      exampleEndpointCustomDomain:
        type: azure:cdn:EndpointCustomDomain
        name: example
        properties:
          name: example-domain
          cdnEndpointId: ${exampleEndpoint.id}
          hostName: ${exampleCNameRecord.name}.${example.name}
    variables:
      example:
        fn::invoke:
          Function: azure:dns:getZone
          Arguments:
            name: example-domain.com
            resourceGroupName: domain-rg
    

    Create EndpointCustomDomain Resource

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

    Constructor syntax

    new EndpointCustomDomain(name: string, args: EndpointCustomDomainArgs, opts?: CustomResourceOptions);
    @overload
    def EndpointCustomDomain(resource_name: str,
                             args: EndpointCustomDomainArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def EndpointCustomDomain(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             cdn_endpoint_id: Optional[str] = None,
                             host_name: Optional[str] = None,
                             cdn_managed_https: Optional[EndpointCustomDomainCdnManagedHttpsArgs] = None,
                             name: Optional[str] = None,
                             user_managed_https: Optional[EndpointCustomDomainUserManagedHttpsArgs] = None)
    func NewEndpointCustomDomain(ctx *Context, name string, args EndpointCustomDomainArgs, opts ...ResourceOption) (*EndpointCustomDomain, error)
    public EndpointCustomDomain(string name, EndpointCustomDomainArgs args, CustomResourceOptions? opts = null)
    public EndpointCustomDomain(String name, EndpointCustomDomainArgs args)
    public EndpointCustomDomain(String name, EndpointCustomDomainArgs args, CustomResourceOptions options)
    
    type: azure:cdn:EndpointCustomDomain
    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 EndpointCustomDomainArgs
    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 EndpointCustomDomainArgs
    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 EndpointCustomDomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EndpointCustomDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EndpointCustomDomainArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var endpointCustomDomainResource = new Azure.Cdn.EndpointCustomDomain("endpointCustomDomainResource", new()
    {
        CdnEndpointId = "string",
        HostName = "string",
        CdnManagedHttps = new Azure.Cdn.Inputs.EndpointCustomDomainCdnManagedHttpsArgs
        {
            CertificateType = "string",
            ProtocolType = "string",
            TlsVersion = "string",
        },
        Name = "string",
        UserManagedHttps = new Azure.Cdn.Inputs.EndpointCustomDomainUserManagedHttpsArgs
        {
            KeyVaultSecretId = "string",
            TlsVersion = "string",
        },
    });
    
    example, err := cdn.NewEndpointCustomDomain(ctx, "endpointCustomDomainResource", &cdn.EndpointCustomDomainArgs{
    	CdnEndpointId: pulumi.String("string"),
    	HostName:      pulumi.String("string"),
    	CdnManagedHttps: &cdn.EndpointCustomDomainCdnManagedHttpsArgs{
    		CertificateType: pulumi.String("string"),
    		ProtocolType:    pulumi.String("string"),
    		TlsVersion:      pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	UserManagedHttps: &cdn.EndpointCustomDomainUserManagedHttpsArgs{
    		KeyVaultSecretId: pulumi.String("string"),
    		TlsVersion:       pulumi.String("string"),
    	},
    })
    
    var endpointCustomDomainResource = new EndpointCustomDomain("endpointCustomDomainResource", EndpointCustomDomainArgs.builder()
        .cdnEndpointId("string")
        .hostName("string")
        .cdnManagedHttps(EndpointCustomDomainCdnManagedHttpsArgs.builder()
            .certificateType("string")
            .protocolType("string")
            .tlsVersion("string")
            .build())
        .name("string")
        .userManagedHttps(EndpointCustomDomainUserManagedHttpsArgs.builder()
            .keyVaultSecretId("string")
            .tlsVersion("string")
            .build())
        .build());
    
    endpoint_custom_domain_resource = azure.cdn.EndpointCustomDomain("endpointCustomDomainResource",
        cdn_endpoint_id="string",
        host_name="string",
        cdn_managed_https=azure.cdn.EndpointCustomDomainCdnManagedHttpsArgs(
            certificate_type="string",
            protocol_type="string",
            tls_version="string",
        ),
        name="string",
        user_managed_https=azure.cdn.EndpointCustomDomainUserManagedHttpsArgs(
            key_vault_secret_id="string",
            tls_version="string",
        ))
    
    const endpointCustomDomainResource = new azure.cdn.EndpointCustomDomain("endpointCustomDomainResource", {
        cdnEndpointId: "string",
        hostName: "string",
        cdnManagedHttps: {
            certificateType: "string",
            protocolType: "string",
            tlsVersion: "string",
        },
        name: "string",
        userManagedHttps: {
            keyVaultSecretId: "string",
            tlsVersion: "string",
        },
    });
    
    type: azure:cdn:EndpointCustomDomain
    properties:
        cdnEndpointId: string
        cdnManagedHttps:
            certificateType: string
            protocolType: string
            tlsVersion: string
        hostName: string
        name: string
        userManagedHttps:
            keyVaultSecretId: string
            tlsVersion: string
    

    EndpointCustomDomain 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 EndpointCustomDomain resource accepts the following input properties:

    CdnEndpointId string
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    HostName string
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    CdnManagedHttps EndpointCustomDomainCdnManagedHttps
    A cdn_managed_https block as defined below.
    Name string
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    UserManagedHttps EndpointCustomDomainUserManagedHttps

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    CdnEndpointId string
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    HostName string
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    CdnManagedHttps EndpointCustomDomainCdnManagedHttpsArgs
    A cdn_managed_https block as defined below.
    Name string
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    UserManagedHttps EndpointCustomDomainUserManagedHttpsArgs

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    cdnEndpointId String
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    hostName String
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    cdnManagedHttps EndpointCustomDomainCdnManagedHttps
    A cdn_managed_https block as defined below.
    name String
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    userManagedHttps EndpointCustomDomainUserManagedHttps

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    cdnEndpointId string
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    hostName string
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    cdnManagedHttps EndpointCustomDomainCdnManagedHttps
    A cdn_managed_https block as defined below.
    name string
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    userManagedHttps EndpointCustomDomainUserManagedHttps

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    cdn_endpoint_id str
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    host_name str
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    cdn_managed_https EndpointCustomDomainCdnManagedHttpsArgs
    A cdn_managed_https block as defined below.
    name str
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    user_managed_https EndpointCustomDomainUserManagedHttpsArgs

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    cdnEndpointId String
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    hostName String
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    cdnManagedHttps Property Map
    A cdn_managed_https block as defined below.
    name String
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    userManagedHttps Property Map

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EndpointCustomDomain 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 EndpointCustomDomain Resource

    Get an existing EndpointCustomDomain 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?: EndpointCustomDomainState, opts?: CustomResourceOptions): EndpointCustomDomain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cdn_endpoint_id: Optional[str] = None,
            cdn_managed_https: Optional[EndpointCustomDomainCdnManagedHttpsArgs] = None,
            host_name: Optional[str] = None,
            name: Optional[str] = None,
            user_managed_https: Optional[EndpointCustomDomainUserManagedHttpsArgs] = None) -> EndpointCustomDomain
    func GetEndpointCustomDomain(ctx *Context, name string, id IDInput, state *EndpointCustomDomainState, opts ...ResourceOption) (*EndpointCustomDomain, error)
    public static EndpointCustomDomain Get(string name, Input<string> id, EndpointCustomDomainState? state, CustomResourceOptions? opts = null)
    public static EndpointCustomDomain get(String name, Output<String> id, EndpointCustomDomainState 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:
    CdnEndpointId string
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    CdnManagedHttps EndpointCustomDomainCdnManagedHttps
    A cdn_managed_https block as defined below.
    HostName string
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    Name string
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    UserManagedHttps EndpointCustomDomainUserManagedHttps

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    CdnEndpointId string
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    CdnManagedHttps EndpointCustomDomainCdnManagedHttpsArgs
    A cdn_managed_https block as defined below.
    HostName string
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    Name string
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    UserManagedHttps EndpointCustomDomainUserManagedHttpsArgs

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    cdnEndpointId String
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    cdnManagedHttps EndpointCustomDomainCdnManagedHttps
    A cdn_managed_https block as defined below.
    hostName String
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    name String
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    userManagedHttps EndpointCustomDomainUserManagedHttps

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    cdnEndpointId string
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    cdnManagedHttps EndpointCustomDomainCdnManagedHttps
    A cdn_managed_https block as defined below.
    hostName string
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    name string
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    userManagedHttps EndpointCustomDomainUserManagedHttps

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    cdn_endpoint_id str
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    cdn_managed_https EndpointCustomDomainCdnManagedHttpsArgs
    A cdn_managed_https block as defined below.
    host_name str
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    name str
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    user_managed_https EndpointCustomDomainUserManagedHttpsArgs

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    cdnEndpointId String
    The ID of the CDN Endpoint. Changing this forces a new CDN Endpoint Custom Domain to be created.
    cdnManagedHttps Property Map
    A cdn_managed_https block as defined below.
    hostName String
    The host name of the custom domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    name String
    The name which should be used for this CDN Endpoint Custom Domain. Changing this forces a new CDN Endpoint Custom Domain to be created.
    userManagedHttps Property Map

    A user_managed_https block as defined below.

    NOTE Only one of cdn_managed_https and user_managed_https can be specified.

    Supporting Types

    EndpointCustomDomainCdnManagedHttps, EndpointCustomDomainCdnManagedHttpsArgs

    CertificateType string
    The type of HTTPS certificate. Possible values are Shared and Dedicated.
    ProtocolType string
    The type of protocol. Possible values are ServerNameIndication and IPBased.
    TlsVersion string
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    CertificateType string
    The type of HTTPS certificate. Possible values are Shared and Dedicated.
    ProtocolType string
    The type of protocol. Possible values are ServerNameIndication and IPBased.
    TlsVersion string
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    certificateType String
    The type of HTTPS certificate. Possible values are Shared and Dedicated.
    protocolType String
    The type of protocol. Possible values are ServerNameIndication and IPBased.
    tlsVersion String
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    certificateType string
    The type of HTTPS certificate. Possible values are Shared and Dedicated.
    protocolType string
    The type of protocol. Possible values are ServerNameIndication and IPBased.
    tlsVersion string
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    certificate_type str
    The type of HTTPS certificate. Possible values are Shared and Dedicated.
    protocol_type str
    The type of protocol. Possible values are ServerNameIndication and IPBased.
    tls_version str
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    certificateType String
    The type of HTTPS certificate. Possible values are Shared and Dedicated.
    protocolType String
    The type of protocol. Possible values are ServerNameIndication and IPBased.
    tlsVersion String
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.

    EndpointCustomDomainUserManagedHttps, EndpointCustomDomainUserManagedHttpsArgs

    KeyVaultCertificateId string
    The ID of the Key Vault Certificate that contains the HTTPS certificate. This is deprecated in favor of key_vault_secret_id.

    Deprecated: This is deprecated in favor of key_vault_secret_id as the service is actually looking for a secret, not a certificate

    KeyVaultSecretId string

    The ID of the Key Vault Secret that contains the HTTPS certificate.

    NOTE Either key_vault_certificate_id or key_vault_secret_id has to be specified.

    TlsVersion string
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    KeyVaultCertificateId string
    The ID of the Key Vault Certificate that contains the HTTPS certificate. This is deprecated in favor of key_vault_secret_id.

    Deprecated: This is deprecated in favor of key_vault_secret_id as the service is actually looking for a secret, not a certificate

    KeyVaultSecretId string

    The ID of the Key Vault Secret that contains the HTTPS certificate.

    NOTE Either key_vault_certificate_id or key_vault_secret_id has to be specified.

    TlsVersion string
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    keyVaultCertificateId String
    The ID of the Key Vault Certificate that contains the HTTPS certificate. This is deprecated in favor of key_vault_secret_id.

    Deprecated: This is deprecated in favor of key_vault_secret_id as the service is actually looking for a secret, not a certificate

    keyVaultSecretId String

    The ID of the Key Vault Secret that contains the HTTPS certificate.

    NOTE Either key_vault_certificate_id or key_vault_secret_id has to be specified.

    tlsVersion String
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    keyVaultCertificateId string
    The ID of the Key Vault Certificate that contains the HTTPS certificate. This is deprecated in favor of key_vault_secret_id.

    Deprecated: This is deprecated in favor of key_vault_secret_id as the service is actually looking for a secret, not a certificate

    keyVaultSecretId string

    The ID of the Key Vault Secret that contains the HTTPS certificate.

    NOTE Either key_vault_certificate_id or key_vault_secret_id has to be specified.

    tlsVersion string
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    key_vault_certificate_id str
    The ID of the Key Vault Certificate that contains the HTTPS certificate. This is deprecated in favor of key_vault_secret_id.

    Deprecated: This is deprecated in favor of key_vault_secret_id as the service is actually looking for a secret, not a certificate

    key_vault_secret_id str

    The ID of the Key Vault Secret that contains the HTTPS certificate.

    NOTE Either key_vault_certificate_id or key_vault_secret_id has to be specified.

    tls_version str
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.
    keyVaultCertificateId String
    The ID of the Key Vault Certificate that contains the HTTPS certificate. This is deprecated in favor of key_vault_secret_id.

    Deprecated: This is deprecated in favor of key_vault_secret_id as the service is actually looking for a secret, not a certificate

    keyVaultSecretId String

    The ID of the Key Vault Secret that contains the HTTPS certificate.

    NOTE Either key_vault_certificate_id or key_vault_secret_id has to be specified.

    tlsVersion String
    The minimum TLS protocol version that is used for HTTPS. Possible values are TLS10 (representing TLS 1.0/1.1), TLS12 (representing TLS 1.2) and None (representing no minimums). Defaults to TLS12.

    Import

    CDN Endpoint Custom Domains can be imported using the resource id, e.g.

    $ pulumi import azure:cdn/endpointCustomDomain:EndpointCustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Cdn/profiles/profile1/endpoints/endpoint1/customDomains/domain1
    

    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.80.0 published on Monday, Jun 10, 2024 by Pulumi