Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

Domain

Provides a SCDN Domain resource.

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

NOTE: Available in v1.131.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new AliCloud.Scdn.Domain("example", new AliCloud.Scdn.DomainArgs
        {
            DomainName = "my-Domain",
            Sources = 
            {
                new AliCloud.Scdn.Inputs.DomainSourceArgs
                {
                    Content = "xxx.aliyuncs.com",
                    Enabled = "online",
                    Port = 80,
                    Priority = "20",
                    Type = "oss",
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/scdn"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := scdn.NewDomain(ctx, "example", &scdn.DomainArgs{
			DomainName: pulumi.String("my-Domain"),
			Sources: scdn.DomainSourceArray{
				&scdn.DomainSourceArgs{
					Content:  pulumi.String("xxx.aliyuncs.com"),
					Enabled:  pulumi.String("online"),
					Port:     pulumi.Int(80),
					Priority: pulumi.String("20"),
					Type:     pulumi.String("oss"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.scdn.Domain;
import com.pulumi.alicloud.scdn.DomainArgs;
import com.pulumi.alicloud.scdn.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) {
        var example = new Domain("example", DomainArgs.builder()        
            .domainName("my-Domain")
            .sources(DomainSourceArgs.builder()
                .content("xxx.aliyuncs.com")
                .enabled("online")
                .port(80)
                .priority("20")
                .type("oss")
                .build())
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example = alicloud.scdn.Domain("example",
    domain_name="my-Domain",
    sources=[alicloud.scdn.DomainSourceArgs(
        content="xxx.aliyuncs.com",
        enabled="online",
        port=80,
        priority="20",
        type="oss",
    )])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const example = new alicloud.scdn.Domain("example", {
    domainName: "my-Domain",
    sources: [{
        content: "xxx.aliyuncs.com",
        enabled: "online",
        port: 80,
        priority: "20",
        type: "oss",
    }],
});
resources:
  example:
    type: alicloud:scdn:Domain
    properties:
      domainName: my-Domain
      sources:
        - content: xxx.aliyuncs.com
          enabled: online
          port: 80
          priority: 20
          type: oss

Create a Domain Resource

new Domain(name: string, args: DomainArgs, opts?: CustomResourceOptions);
@overload
def Domain(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           biz_name: Optional[str] = None,
           cert_infos: Optional[Sequence[DomainCertInfoArgs]] = None,
           check_url: Optional[str] = None,
           domain_name: Optional[str] = None,
           force_set: Optional[str] = None,
           resource_group_id: Optional[str] = None,
           sources: Optional[Sequence[DomainSourceArgs]] = None,
           status: Optional[str] = None)
@overload
def Domain(resource_name: str,
           args: DomainArgs,
           opts: Optional[ResourceOptions] = 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:scdn:Domain
properties: # The arguments to resource properties.
options: # 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.
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.

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 name of domain.

Sources List<Pulumi.AliCloud.Scdn.Inputs.DomainSourceArgs>

the Origin Server Information. See the following Block sources.

BizName string

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

CertInfos List<Pulumi.AliCloud.Scdn.Inputs.DomainCertInfoArgs>

Certificate Information. See the following Block cert_infos.

CheckUrl string

The health check url.

ForceSet string

Whether to set certificate forcibly.

ResourceGroupId string

The resource group id.

Status string

The status of the resource. Valid values: offline, online.

DomainName string

The name of domain.

Sources []DomainSourceArgs

the Origin Server Information. See the following Block sources.

BizName string

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

CertInfos []DomainCertInfoArgs

Certificate Information. See the following Block cert_infos.

CheckUrl string

The health check url.

ForceSet string

Whether to set certificate forcibly.

ResourceGroupId string

The resource group id.

Status string

The status of the resource. Valid values: offline, online.

domainName String

The name of domain.

sources List<DomainSourceArgs>

the Origin Server Information. See the following Block sources.

bizName String

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

certInfos List<DomainCertInfoArgs>

Certificate Information. See the following Block cert_infos.

checkUrl String

The health check url.

forceSet String

Whether to set certificate forcibly.

resourceGroupId String

The resource group id.

status String

The status of the resource. Valid values: offline, online.

domainName string

The name of domain.

sources DomainSourceArgs[]

the Origin Server Information. See the following Block sources.

bizName string

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

certInfos DomainCertInfoArgs[]

Certificate Information. See the following Block cert_infos.

checkUrl string

The health check url.

forceSet string

Whether to set certificate forcibly.

resourceGroupId string

The resource group id.

status string

The status of the resource. Valid values: offline, online.

domain_name str

The name of domain.

sources Sequence[DomainSourceArgs]

the Origin Server Information. See the following Block sources.

biz_name str

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

cert_infos Sequence[DomainCertInfoArgs]

Certificate Information. See the following Block cert_infos.

check_url str

The health check url.

force_set str

Whether to set certificate forcibly.

resource_group_id str

The resource group id.

status str

The status of the resource. Valid values: offline, online.

domainName String

The name of domain.

sources List<Property Map>

the Origin Server Information. See the following Block sources.

bizName String

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

certInfos List<Property Map>

Certificate Information. See the following Block cert_infos.

checkUrl String

The health check url.

forceSet String

Whether to set certificate forcibly.

resourceGroupId String

The resource group id.

status String

The status of the resource. Valid values: offline, online.

Outputs

All input properties are implicitly available as output properties. Additionally, the Domain 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 an 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,
        biz_name: Optional[str] = None,
        cert_infos: Optional[Sequence[DomainCertInfoArgs]] = None,
        check_url: Optional[str] = None,
        domain_name: Optional[str] = None,
        force_set: Optional[str] = None,
        resource_group_id: Optional[str] = None,
        sources: Optional[Sequence[DomainSourceArgs]] = None,
        status: 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:
BizName string

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

CertInfos List<Pulumi.AliCloud.Scdn.Inputs.DomainCertInfoArgs>

Certificate Information. See the following Block cert_infos.

CheckUrl string

The health check url.

DomainName string

The name of domain.

ForceSet string

Whether to set certificate forcibly.

ResourceGroupId string

The resource group id.

Sources List<Pulumi.AliCloud.Scdn.Inputs.DomainSourceArgs>

the Origin Server Information. See the following Block sources.

Status string

The status of the resource. Valid values: offline, online.

BizName string

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

CertInfos []DomainCertInfoArgs

Certificate Information. See the following Block cert_infos.

CheckUrl string

The health check url.

DomainName string

The name of domain.

ForceSet string

Whether to set certificate forcibly.

ResourceGroupId string

The resource group id.

Sources []DomainSourceArgs

the Origin Server Information. See the following Block sources.

Status string

The status of the resource. Valid values: offline, online.

bizName String

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

certInfos List<DomainCertInfoArgs>

Certificate Information. See the following Block cert_infos.

checkUrl String

The health check url.

domainName String

The name of domain.

forceSet String

Whether to set certificate forcibly.

resourceGroupId String

The resource group id.

sources List<DomainSourceArgs>

the Origin Server Information. See the following Block sources.

status String

The status of the resource. Valid values: offline, online.

bizName string

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

certInfos DomainCertInfoArgs[]

Certificate Information. See the following Block cert_infos.

checkUrl string

The health check url.

domainName string

The name of domain.

forceSet string

Whether to set certificate forcibly.

resourceGroupId string

The resource group id.

sources DomainSourceArgs[]

the Origin Server Information. See the following Block sources.

status string

The status of the resource. Valid values: offline, online.

biz_name str

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

cert_infos Sequence[DomainCertInfoArgs]

Certificate Information. See the following Block cert_infos.

check_url str

The health check url.

domain_name str

The name of domain.

force_set str

Whether to set certificate forcibly.

resource_group_id str

The resource group id.

sources Sequence[DomainSourceArgs]

the Origin Server Information. See the following Block sources.

status str

The status of the resource. Valid values: offline, online.

bizName String

Attribute perm has been deprecated and suggest removing it from your template.

Deprecated:

Attribute biz_name has been deprecated and suggest removing it from your template.

certInfos List<Property Map>

Certificate Information. See the following Block cert_infos.

checkUrl String

The health check url.

domainName String

The name of domain.

forceSet String

Whether to set certificate forcibly.

resourceGroupId String

The resource group id.

sources List<Property Map>

the Origin Server Information. See the following Block sources.

status String

The status of the resource. Valid values: offline, online.

Supporting Types

DomainCertInfo

CertName string

If You Enable HTTPS Here Certificate Name.

CertType string

Certificate Type. Value Range:

  • upload: Certificate
  • cas: Certificate Authority Certificate.
  • free: Free Certificate.
SslPri string

Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.

SslProtocol string

Whether to Enable SSL Certificate. Valid Values: on, off. Valid values: on, off.

SslPub string

If You Enable HTTPS Here Key.

CertName string

If You Enable HTTPS Here Certificate Name.

CertType string

Certificate Type. Value Range:

  • upload: Certificate
  • cas: Certificate Authority Certificate.
  • free: Free Certificate.
SslPri string

Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.

SslProtocol string

Whether to Enable SSL Certificate. Valid Values: on, off. Valid values: on, off.

SslPub string

If You Enable HTTPS Here Key.

certName String

If You Enable HTTPS Here Certificate Name.

certType String

Certificate Type. Value Range:

  • upload: Certificate
  • cas: Certificate Authority Certificate.
  • free: Free Certificate.
sslPri String

Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.

sslProtocol String

Whether to Enable SSL Certificate. Valid Values: on, off. Valid values: on, off.

sslPub String

If You Enable HTTPS Here Key.

certName string

If You Enable HTTPS Here Certificate Name.

certType string

Certificate Type. Value Range:

  • upload: Certificate
  • cas: Certificate Authority Certificate.
  • free: Free Certificate.
sslPri string

Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.

sslProtocol string

Whether to Enable SSL Certificate. Valid Values: on, off. Valid values: on, off.

sslPub string

If You Enable HTTPS Here Key.

cert_name str

If You Enable HTTPS Here Certificate Name.

cert_type str

Certificate Type. Value Range:

  • upload: Certificate
  • cas: Certificate Authority Certificate.
  • free: Free Certificate.
ssl_pri str

Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.

ssl_protocol str

Whether to Enable SSL Certificate. Valid Values: on, off. Valid values: on, off.

ssl_pub str

If You Enable HTTPS Here Key.

certName String

If You Enable HTTPS Here Certificate Name.

certType String

Certificate Type. Value Range:

  • upload: Certificate
  • cas: Certificate Authority Certificate.
  • free: Free Certificate.
sslPri String

Private Key. Do Not Enable Certificate without Entering a User Name and Configure Certificates Enter Private Key.

sslProtocol String

Whether to Enable SSL Certificate. Valid Values: on, off. Valid values: on, off.

sslPub String

If You Enable HTTPS Here Key.

DomainSource

Content string

The Back-to-Source Address.

Port int

Port.

Priority string

Priority.

Type string

The Origin Server Type. Valid Values:

  • ipaddr: IP Source Station
  • domain: the Domain Name
  • oss: OSS Bucket as a Source Station.
Enabled string

The source status. Valid values: online, offline.

Content string

The Back-to-Source Address.

Port int

Port.

Priority string

Priority.

Type string

The Origin Server Type. Valid Values:

  • ipaddr: IP Source Station
  • domain: the Domain Name
  • oss: OSS Bucket as a Source Station.
Enabled string

The source status. Valid values: online, offline.

content String

The Back-to-Source Address.

port Integer

Port.

priority String

Priority.

type String

The Origin Server Type. Valid Values:

  • ipaddr: IP Source Station
  • domain: the Domain Name
  • oss: OSS Bucket as a Source Station.
enabled String

The source status. Valid values: online, offline.

content string

The Back-to-Source Address.

port number

Port.

priority string

Priority.

type string

The Origin Server Type. Valid Values:

  • ipaddr: IP Source Station
  • domain: the Domain Name
  • oss: OSS Bucket as a Source Station.
enabled string

The source status. Valid values: online, offline.

content str

The Back-to-Source Address.

port int

Port.

priority str

Priority.

type str

The Origin Server Type. Valid Values:

  • ipaddr: IP Source Station
  • domain: the Domain Name
  • oss: OSS Bucket as a Source Station.
enabled str

The source status. Valid values: online, offline.

content String

The Back-to-Source Address.

port Number

Port.

priority String

Priority.

type String

The Origin Server Type. Valid Values:

  • ipaddr: IP Source Station
  • domain: the Domain Name
  • oss: OSS Bucket as a Source Station.
enabled String

The source status. Valid values: online, offline.

Import

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

 $ pulumi import alicloud:scdn/domain:Domain example <domain_name>

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.