1. Packages
  2. Alicloud Provider
  3. API Docs
  4. dcdn
  5. Domain
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.dcdn.Domain

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    Provides a DCDN Domain resource.

    Full station accelerated domain name.

    For information about DCDN Domain and how to use it, see What is Domain.

    NOTE: Available since v1.94.0.

    NOTE: Field force_set, security_token has been removed from provider version 1.227.1.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const domainName = config.get("domainName") || "tf-example.com";
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const example = new alicloud.dcdn.Domain("example", {
        domainName: `${domainName}-${_default.result}`,
        scope: "overseas",
        sources: [{
            content: "1.1.1.1",
            port: 80,
            priority: "20",
            type: "ipaddr",
            weight: "10",
        }],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    domain_name = config.get("domainName")
    if domain_name is None:
        domain_name = "tf-example.com"
    default = random.index.Integer("default",
        min=10000,
        max=99999)
    example = alicloud.dcdn.Domain("example",
        domain_name=f"{domain_name}-{default['result']}",
        scope="overseas",
        sources=[{
            "content": "1.1.1.1",
            "port": 80,
            "priority": "20",
            "type": "ipaddr",
            "weight": "10",
        }])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dcdn"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		domainName := "tf-example.com"
    		if param := cfg.Get("domainName"); param != "" {
    			domainName = param
    		}
    		_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dcdn.NewDomain(ctx, "example", &dcdn.DomainArgs{
    			DomainName: pulumi.Sprintf("%v-%v", domainName, _default.Result),
    			Scope:      pulumi.String("overseas"),
    			Sources: dcdn.DomainSourceArray{
    				&dcdn.DomainSourceArgs{
    					Content:  pulumi.String("1.1.1.1"),
    					Port:     pulumi.Int(80),
    					Priority: pulumi.String("20"),
    					Type:     pulumi.String("ipaddr"),
    					Weight:   pulumi.String("10"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var domainName = config.Get("domainName") ?? "tf-example.com";
        var @default = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var example = new AliCloud.Dcdn.Domain("example", new()
        {
            DomainName = $"{domainName}-{@default.Result}",
            Scope = "overseas",
            Sources = new[]
            {
                new AliCloud.Dcdn.Inputs.DomainSourceArgs
                {
                    Content = "1.1.1.1",
                    Port = 80,
                    Priority = "20",
                    Type = "ipaddr",
                    Weight = "10",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.dcdn.Domain;
    import com.pulumi.alicloud.dcdn.DomainArgs;
    import com.pulumi.alicloud.dcdn.inputs.DomainSourceArgs;
    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 config = ctx.config();
            final var domainName = config.get("domainName").orElse("tf-example.com");
            var default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var example = new Domain("example", DomainArgs.builder()
                .domainName(String.format("%s-%s", domainName,default_.result()))
                .scope("overseas")
                .sources(DomainSourceArgs.builder()
                    .content("1.1.1.1")
                    .port("80")
                    .priority("20")
                    .type("ipaddr")
                    .weight("10")
                    .build())
                .build());
    
        }
    }
    
    configuration:
      domainName:
        type: string
        default: tf-example.com
    resources:
      default:
        type: random:integer
        properties:
          min: 10000
          max: 99999
      example:
        type: alicloud:dcdn:Domain
        properties:
          domainName: ${domainName}-${default.result}
          scope: overseas
          sources:
            - content: 1.1.1.1
              port: '80'
              priority: '20'
              type: ipaddr
              weight: '10'
    

    Create Domain Resource

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

    Constructor syntax

    new Domain(name: string, args: DomainArgs, opts?: CustomResourceOptions);
    @overload
    def Domain(resource_name: str,
               args: DomainArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Domain(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               domain_name: Optional[str] = None,
               resource_group_id: Optional[str] = None,
               cert_name: Optional[str] = None,
               scene: Optional[str] = None,
               check_url: Optional[str] = None,
               scope: Optional[str] = None,
               env: Optional[str] = None,
               function_type: Optional[str] = None,
               sources: Optional[Sequence[DomainSourceArgs]] = None,
               cert_type: Optional[str] = None,
               cert_region: Optional[str] = None,
               cert_id: Optional[str] = None,
               ssl_pri: Optional[str] = None,
               ssl_protocol: Optional[str] = None,
               ssl_pub: Optional[str] = None,
               status: Optional[str] = None,
               tags: Optional[Mapping[str, str]] = None,
               top_level_domain: Optional[str] = None)
    func NewDomain(ctx *Context, name string, args DomainArgs, opts ...ResourceOption) (*Domain, error)
    public Domain(string name, DomainArgs args, CustomResourceOptions? opts = null)
    public Domain(String name, DomainArgs args)
    public Domain(String name, DomainArgs args, CustomResourceOptions options)
    
    type: alicloud:dcdn:Domain
    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 DomainArgs
    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 DomainArgs
    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 DomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var alicloudDomainResource = new AliCloud.Dcdn.Domain("alicloudDomainResource", new()
    {
        DomainName = "string",
        ResourceGroupId = "string",
        CertName = "string",
        Scene = "string",
        CheckUrl = "string",
        Scope = "string",
        Env = "string",
        FunctionType = "string",
        Sources = new[]
        {
            new AliCloud.Dcdn.Inputs.DomainSourceArgs
            {
                Content = "string",
                Port = 0,
                Priority = "string",
                Type = "string",
                Weight = "string",
            },
        },
        CertType = "string",
        CertRegion = "string",
        CertId = "string",
        SslPri = "string",
        SslProtocol = "string",
        SslPub = "string",
        Status = "string",
        Tags = 
        {
            { "string", "string" },
        },
        TopLevelDomain = "string",
    });
    
    example, err := dcdn.NewDomain(ctx, "alicloudDomainResource", &dcdn.DomainArgs{
    	DomainName:      pulumi.String("string"),
    	ResourceGroupId: pulumi.String("string"),
    	CertName:        pulumi.String("string"),
    	Scene:           pulumi.String("string"),
    	CheckUrl:        pulumi.String("string"),
    	Scope:           pulumi.String("string"),
    	Env:             pulumi.String("string"),
    	FunctionType:    pulumi.String("string"),
    	Sources: dcdn.DomainSourceArray{
    		&dcdn.DomainSourceArgs{
    			Content:  pulumi.String("string"),
    			Port:     pulumi.Int(0),
    			Priority: pulumi.String("string"),
    			Type:     pulumi.String("string"),
    			Weight:   pulumi.String("string"),
    		},
    	},
    	CertType:    pulumi.String("string"),
    	CertRegion:  pulumi.String("string"),
    	CertId:      pulumi.String("string"),
    	SslPri:      pulumi.String("string"),
    	SslProtocol: pulumi.String("string"),
    	SslPub:      pulumi.String("string"),
    	Status:      pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TopLevelDomain: pulumi.String("string"),
    })
    
    var alicloudDomainResource = new Domain("alicloudDomainResource", DomainArgs.builder()
        .domainName("string")
        .resourceGroupId("string")
        .certName("string")
        .scene("string")
        .checkUrl("string")
        .scope("string")
        .env("string")
        .functionType("string")
        .sources(DomainSourceArgs.builder()
            .content("string")
            .port(0)
            .priority("string")
            .type("string")
            .weight("string")
            .build())
        .certType("string")
        .certRegion("string")
        .certId("string")
        .sslPri("string")
        .sslProtocol("string")
        .sslPub("string")
        .status("string")
        .tags(Map.of("string", "string"))
        .topLevelDomain("string")
        .build());
    
    alicloud_domain_resource = alicloud.dcdn.Domain("alicloudDomainResource",
        domain_name="string",
        resource_group_id="string",
        cert_name="string",
        scene="string",
        check_url="string",
        scope="string",
        env="string",
        function_type="string",
        sources=[alicloud.dcdn.DomainSourceArgs(
            content="string",
            port=0,
            priority="string",
            type="string",
            weight="string",
        )],
        cert_type="string",
        cert_region="string",
        cert_id="string",
        ssl_pri="string",
        ssl_protocol="string",
        ssl_pub="string",
        status="string",
        tags={
            "string": "string",
        },
        top_level_domain="string")
    
    const alicloudDomainResource = new alicloud.dcdn.Domain("alicloudDomainResource", {
        domainName: "string",
        resourceGroupId: "string",
        certName: "string",
        scene: "string",
        checkUrl: "string",
        scope: "string",
        env: "string",
        functionType: "string",
        sources: [{
            content: "string",
            port: 0,
            priority: "string",
            type: "string",
            weight: "string",
        }],
        certType: "string",
        certRegion: "string",
        certId: "string",
        sslPri: "string",
        sslProtocol: "string",
        sslPub: "string",
        status: "string",
        tags: {
            string: "string",
        },
        topLevelDomain: "string",
    });
    
    type: alicloud:dcdn:Domain
    properties:
        certId: string
        certName: string
        certRegion: string
        certType: string
        checkUrl: string
        domainName: string
        env: string
        functionType: string
        resourceGroupId: string
        scene: string
        scope: string
        sources:
            - content: string
              port: 0
              priority: string
              type: string
              weight: string
        sslPri: string
        sslProtocol: string
        sslPub: string
        status: string
        tags:
            string: string
        topLevelDomain: string
    

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

    DomainName string
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    CertId string
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    CertName string
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    CertRegion string
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    CertType string
    The certificate type.
    CheckUrl string
    The URL that is used for health checks.
    Env string
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    FunctionType string
    Computing service type. Valid values:
    ResourceGroupId string
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    Scene string
    The Acceleration scen. Supported:
    Scope string
    The region where the acceleration service is deployed. Valid values:
    Sources List<Pulumi.AliCloud.Dcdn.Inputs.DomainSource>
    Source See sources below.
    SslPri string
    The private key. Specify the private key only if you want to enable the SSL certificate.
    SslProtocol string
    Specifies whether to enable the SSL certificate. Valid values:
    SslPub string
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    Status string
    The status of the domain name. Valid values:
    Tags Dictionary<string, string>
    The tag of the resource
    TopLevelDomain string
    The top-level domain.
    DomainName string
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    CertId string
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    CertName string
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    CertRegion string
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    CertType string
    The certificate type.
    CheckUrl string
    The URL that is used for health checks.
    Env string
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    FunctionType string
    Computing service type. Valid values:
    ResourceGroupId string
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    Scene string
    The Acceleration scen. Supported:
    Scope string
    The region where the acceleration service is deployed. Valid values:
    Sources []DomainSourceArgs
    Source See sources below.
    SslPri string
    The private key. Specify the private key only if you want to enable the SSL certificate.
    SslProtocol string
    Specifies whether to enable the SSL certificate. Valid values:
    SslPub string
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    Status string
    The status of the domain name. Valid values:
    Tags map[string]string
    The tag of the resource
    TopLevelDomain string
    The top-level domain.
    domainName String
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    certId String
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    certName String
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    certRegion String
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    certType String
    The certificate type.
    checkUrl String
    The URL that is used for health checks.
    env String
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    functionType String
    Computing service type. Valid values:
    resourceGroupId String
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    scene String
    The Acceleration scen. Supported:
    scope String
    The region where the acceleration service is deployed. Valid values:
    sources List<DomainSource>
    Source See sources below.
    sslPri String
    The private key. Specify the private key only if you want to enable the SSL certificate.
    sslProtocol String
    Specifies whether to enable the SSL certificate. Valid values:
    sslPub String
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    status String
    The status of the domain name. Valid values:
    tags Map<String,String>
    The tag of the resource
    topLevelDomain String
    The top-level domain.
    domainName string
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    certId string
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    certName string
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    certRegion string
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    certType string
    The certificate type.
    checkUrl string
    The URL that is used for health checks.
    env string
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    functionType string
    Computing service type. Valid values:
    resourceGroupId string
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    scene string
    The Acceleration scen. Supported:
    scope string
    The region where the acceleration service is deployed. Valid values:
    sources DomainSource[]
    Source See sources below.
    sslPri string
    The private key. Specify the private key only if you want to enable the SSL certificate.
    sslProtocol string
    Specifies whether to enable the SSL certificate. Valid values:
    sslPub string
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    status string
    The status of the domain name. Valid values:
    tags {[key: string]: string}
    The tag of the resource
    topLevelDomain string
    The top-level domain.
    domain_name str
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    cert_id str
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    cert_name str
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    cert_region str
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    cert_type str
    The certificate type.
    check_url str
    The URL that is used for health checks.
    env str
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    function_type str
    Computing service type. Valid values:
    resource_group_id str
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    scene str
    The Acceleration scen. Supported:
    scope str
    The region where the acceleration service is deployed. Valid values:
    sources Sequence[DomainSourceArgs]
    Source See sources below.
    ssl_pri str
    The private key. Specify the private key only if you want to enable the SSL certificate.
    ssl_protocol str
    Specifies whether to enable the SSL certificate. Valid values:
    ssl_pub str
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    status str
    The status of the domain name. Valid values:
    tags Mapping[str, str]
    The tag of the resource
    top_level_domain str
    The top-level domain.
    domainName String
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    certId String
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    certName String
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    certRegion String
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    certType String
    The certificate type.
    checkUrl String
    The URL that is used for health checks.
    env String
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    functionType String
    Computing service type. Valid values:
    resourceGroupId String
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    scene String
    The Acceleration scen. Supported:
    scope String
    The region where the acceleration service is deployed. Valid values:
    sources List<Property Map>
    Source See sources below.
    sslPri String
    The private key. Specify the private key only if you want to enable the SSL certificate.
    sslProtocol String
    Specifies whether to enable the SSL certificate. Valid values:
    sslPub String
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    status String
    The status of the domain name. Valid values:
    tags Map<String>
    The tag of the resource
    topLevelDomain String
    The top-level domain.

    Outputs

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

    Cname string
    The CNAME domain name corresponding to the accelerated domain name.
    CreateTime string
    The time when the accelerated domain name was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    Cname string
    The CNAME domain name corresponding to the accelerated domain name.
    CreateTime string
    The time when the accelerated domain name was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    cname String
    The CNAME domain name corresponding to the accelerated domain name.
    createTime String
    The time when the accelerated domain name was created.
    id String
    The provider-assigned unique ID for this managed resource.
    cname string
    The CNAME domain name corresponding to the accelerated domain name.
    createTime string
    The time when the accelerated domain name was created.
    id string
    The provider-assigned unique ID for this managed resource.
    cname str
    The CNAME domain name corresponding to the accelerated domain name.
    create_time str
    The time when the accelerated domain name was created.
    id str
    The provider-assigned unique ID for this managed resource.
    cname String
    The CNAME domain name corresponding to the accelerated domain name.
    createTime String
    The time when the accelerated domain name was created.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Domain Resource

    Get an existing Domain 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?: DomainState, opts?: CustomResourceOptions): Domain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cert_id: Optional[str] = None,
            cert_name: Optional[str] = None,
            cert_region: Optional[str] = None,
            cert_type: Optional[str] = None,
            check_url: Optional[str] = None,
            cname: Optional[str] = None,
            create_time: Optional[str] = None,
            domain_name: Optional[str] = None,
            env: Optional[str] = None,
            function_type: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            scene: Optional[str] = None,
            scope: Optional[str] = None,
            sources: Optional[Sequence[DomainSourceArgs]] = None,
            ssl_pri: Optional[str] = None,
            ssl_protocol: Optional[str] = None,
            ssl_pub: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            top_level_domain: Optional[str] = None) -> Domain
    func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
    public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
    public static Domain get(String name, Output<String> id, DomainState 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:
    CertId string
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    CertName string
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    CertRegion string
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    CertType string
    The certificate type.
    CheckUrl string
    The URL that is used for health checks.
    Cname string
    The CNAME domain name corresponding to the accelerated domain name.
    CreateTime string
    The time when the accelerated domain name was created.
    DomainName string
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    Env string
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    FunctionType string
    Computing service type. Valid values:
    ResourceGroupId string
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    Scene string
    The Acceleration scen. Supported:
    Scope string
    The region where the acceleration service is deployed. Valid values:
    Sources List<Pulumi.AliCloud.Dcdn.Inputs.DomainSource>
    Source See sources below.
    SslPri string
    The private key. Specify the private key only if you want to enable the SSL certificate.
    SslProtocol string
    Specifies whether to enable the SSL certificate. Valid values:
    SslPub string
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    Status string
    The status of the domain name. Valid values:
    Tags Dictionary<string, string>
    The tag of the resource
    TopLevelDomain string
    The top-level domain.
    CertId string
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    CertName string
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    CertRegion string
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    CertType string
    The certificate type.
    CheckUrl string
    The URL that is used for health checks.
    Cname string
    The CNAME domain name corresponding to the accelerated domain name.
    CreateTime string
    The time when the accelerated domain name was created.
    DomainName string
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    Env string
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    FunctionType string
    Computing service type. Valid values:
    ResourceGroupId string
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    Scene string
    The Acceleration scen. Supported:
    Scope string
    The region where the acceleration service is deployed. Valid values:
    Sources []DomainSourceArgs
    Source See sources below.
    SslPri string
    The private key. Specify the private key only if you want to enable the SSL certificate.
    SslProtocol string
    Specifies whether to enable the SSL certificate. Valid values:
    SslPub string
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    Status string
    The status of the domain name. Valid values:
    Tags map[string]string
    The tag of the resource
    TopLevelDomain string
    The top-level domain.
    certId String
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    certName String
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    certRegion String
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    certType String
    The certificate type.
    checkUrl String
    The URL that is used for health checks.
    cname String
    The CNAME domain name corresponding to the accelerated domain name.
    createTime String
    The time when the accelerated domain name was created.
    domainName String
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    env String
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    functionType String
    Computing service type. Valid values:
    resourceGroupId String
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    scene String
    The Acceleration scen. Supported:
    scope String
    The region where the acceleration service is deployed. Valid values:
    sources List<DomainSource>
    Source See sources below.
    sslPri String
    The private key. Specify the private key only if you want to enable the SSL certificate.
    sslProtocol String
    Specifies whether to enable the SSL certificate. Valid values:
    sslPub String
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    status String
    The status of the domain name. Valid values:
    tags Map<String,String>
    The tag of the resource
    topLevelDomain String
    The top-level domain.
    certId string
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    certName string
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    certRegion string
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    certType string
    The certificate type.
    checkUrl string
    The URL that is used for health checks.
    cname string
    The CNAME domain name corresponding to the accelerated domain name.
    createTime string
    The time when the accelerated domain name was created.
    domainName string
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    env string
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    functionType string
    Computing service type. Valid values:
    resourceGroupId string
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    scene string
    The Acceleration scen. Supported:
    scope string
    The region where the acceleration service is deployed. Valid values:
    sources DomainSource[]
    Source See sources below.
    sslPri string
    The private key. Specify the private key only if you want to enable the SSL certificate.
    sslProtocol string
    Specifies whether to enable the SSL certificate. Valid values:
    sslPub string
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    status string
    The status of the domain name. Valid values:
    tags {[key: string]: string}
    The tag of the resource
    topLevelDomain string
    The top-level domain.
    cert_id str
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    cert_name str
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    cert_region str
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    cert_type str
    The certificate type.
    check_url str
    The URL that is used for health checks.
    cname str
    The CNAME domain name corresponding to the accelerated domain name.
    create_time str
    The time when the accelerated domain name was created.
    domain_name str
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    env str
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    function_type str
    Computing service type. Valid values:
    resource_group_id str
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    scene str
    The Acceleration scen. Supported:
    scope str
    The region where the acceleration service is deployed. Valid values:
    sources Sequence[DomainSourceArgs]
    Source See sources below.
    ssl_pri str
    The private key. Specify the private key only if you want to enable the SSL certificate.
    ssl_protocol str
    Specifies whether to enable the SSL certificate. Valid values:
    ssl_pub str
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    status str
    The status of the domain name. Valid values:
    tags Mapping[str, str]
    The tag of the resource
    top_level_domain str
    The top-level domain.
    certId String
    The certificate ID. This parameter is required and valid only when CertType is set to cas. If you specify this parameter, an existing certificate is used.
    certName String
    The name of the new certificate. You can specify only one certificate name. This parameter is optional and valid only when CertType is set to upload.
    certRegion String
    The region of the SSL certificate. This parameter takes effect only when CertType is set to cas. Default value: cn-hangzhou. Valid values: cn-hangzhou and ap-southeast-1.
    certType String
    The certificate type.
    checkUrl String
    The URL that is used for health checks.
    cname String
    The CNAME domain name corresponding to the accelerated domain name.
    createTime String
    The time when the accelerated domain name was created.
    domainName String
    The accelerated domain name. You can specify multiple domain names and separate them with commas (,). You can specify up to 500 domain names in each request. The query results of multiple domain names are aggregated. If you do not specify this parameter, data of all accelerated domain names under your account is queried.
    env String
    Specifies whether the certificate is issued in canary releases. If you set this parameter to staging, the certificate is issued in canary releases. If you do not specify this parameter or set this parameter to other values, the certificate is officially issued.
    functionType String
    Computing service type. Valid values:
    resourceGroupId String
    The ID of the resource group. If you do not specify a value for this parameter, the system automatically assigns the ID of the default resource group.
    scene String
    The Acceleration scen. Supported:
    scope String
    The region where the acceleration service is deployed. Valid values:
    sources List<Property Map>
    Source See sources below.
    sslPri String
    The private key. Specify the private key only if you want to enable the SSL certificate.
    sslProtocol String
    Specifies whether to enable the SSL certificate. Valid values:
    sslPub String
    The content of the SSL certificate. Specify the content of the SSL certificate only if you want to enable the SSL certificate.
    status String
    The status of the domain name. Valid values:
    tags Map<String>
    The tag of the resource
    topLevelDomain String
    The top-level domain.

    Supporting Types

    DomainSource, DomainSourceArgs

    Content string
    The address of the source station.
    Port int
    The port number. Valid values: 443 and 80. Default to 80.
    Priority string
    The priority of the origin if multiple origins are specified. Default to 20.
    Type string
    The type of the origin. Valid values:
    Weight string
    The weight of the origin if multiple origins are specified. Default to 10.
    Content string
    The address of the source station.
    Port int
    The port number. Valid values: 443 and 80. Default to 80.
    Priority string
    The priority of the origin if multiple origins are specified. Default to 20.
    Type string
    The type of the origin. Valid values:
    Weight string
    The weight of the origin if multiple origins are specified. Default to 10.
    content String
    The address of the source station.
    port Integer
    The port number. Valid values: 443 and 80. Default to 80.
    priority String
    The priority of the origin if multiple origins are specified. Default to 20.
    type String
    The type of the origin. Valid values:
    weight String
    The weight of the origin if multiple origins are specified. Default to 10.
    content string
    The address of the source station.
    port number
    The port number. Valid values: 443 and 80. Default to 80.
    priority string
    The priority of the origin if multiple origins are specified. Default to 20.
    type string
    The type of the origin. Valid values:
    weight string
    The weight of the origin if multiple origins are specified. Default to 10.
    content str
    The address of the source station.
    port int
    The port number. Valid values: 443 and 80. Default to 80.
    priority str
    The priority of the origin if multiple origins are specified. Default to 20.
    type str
    The type of the origin. Valid values:
    weight str
    The weight of the origin if multiple origins are specified. Default to 10.
    content String
    The address of the source station.
    port Number
    The port number. Valid values: 443 and 80. Default to 80.
    priority String
    The priority of the origin if multiple origins are specified. Default to 20.
    type String
    The type of the origin. Valid values:
    weight String
    The weight of the origin if multiple origins are specified. Default to 10.

    Import

    DCDN Domain can be imported using the id, e.g.

    $ pulumi import alicloud:dcdn/domain:Domain example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi