DomainConfig

Provides a CDN Accelerated Domain resource.

For information about domain config and how to use it, see Batch set config

NOTE: Available in v1.34.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new Domain config.
        var domain = new AliCloud.Cdn.DomainNew("domain", new AliCloud.Cdn.DomainNewArgs
        {
            CdnType = "web",
            DomainName = "tf-testacc%d.xiaozhu.com",
            Scope = "overseas",
            Sources = new AliCloud.Cdn.Inputs.DomainNewSourcesArgs
            {
                Content = "1.1.1.1",
                Port = 80,
                Priority = 20,
                Type = "ipaddr",
                Weight = 15,
            },
        });
        var config = new AliCloud.Cdn.DomainConfig("config", new AliCloud.Cdn.DomainConfigArgs
        {
            DomainName = domain.DomainName,
            FunctionArgs = 
            {
                new AliCloud.Cdn.Inputs.DomainConfigFunctionArgArgs
                {
                    ArgName = "ip_list",
                    ArgValue = "110.110.110.110",
                },
            },
            FunctionName = "ip_allow_list_set",
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

# Create a new Domain config.
domain = alicloud.cdn.DomainNew("domain",
    cdn_type="web",
    domain_name="tf-testacc%d.xiaozhu.com",
    scope="overseas",
    sources={
        "content": "1.1.1.1",
        "port": 80,
        "priority": "20",
        "type": "ipaddr",
        "weight": "15",
    })
config = alicloud.cdn.DomainConfig("config",
    domain_name=domain.domain_name,
    function_args=[{
        "argName": "ip_list",
        "argValue": "110.110.110.110",
    }],
    function_name="ip_allow_list_set")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

// Create a new Domain config.
const domain = new alicloud.cdn.DomainNew("domain", {
    cdnType: "web",
    domainName: "tf-testacc%d.xiaozhu.com",
    scope: "overseas",
    sources: {
        content: "1.1.1.1",
        port: 80,
        priority: 20,
        type: "ipaddr",
        weight: 15,
    },
});
const config = new alicloud.cdn.DomainConfig("config", {
    domainName: domain.domainName,
    functionArgs: [{
        argName: "ip_list",
        argValue: "110.110.110.110",
    }],
    functionName: "ip_allow_list_set",
});

Create a DomainConfig Resource

def DomainConfig(resource_name, opts=None, domain_name=None, function_args=None, function_name=None, __props__=None);
func NewDomainConfig(ctx *Context, name string, args DomainConfigArgs, opts ...ResourceOption) (*DomainConfig, error)
name string
The unique name of the resource.
args DomainConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DomainConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DomainConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

DomainConfig Resource Properties

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

Inputs

The DomainConfig resource accepts the following input properties:

DomainName string

Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.

FunctionArgs List<Pulumi.AliCloud.Cdn.Inputs.DomainConfigFunctionArgArgs>

The args of the domain config.

FunctionName string

The name of the domain config.

DomainName string

Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.

FunctionArgs []DomainConfigFunctionArg

The args of the domain config.

FunctionName string

The name of the domain config.

domainName string

Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.

functionArgs DomainConfigFunctionArg[]

The args of the domain config.

functionName string

The name of the domain config.

domain_name str

Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.

function_args List[DomainConfigFunctionArg]

The args of the domain config.

function_name str

The name of the domain config.

Outputs

All input properties are implicitly available as output properties. Additionally, the DomainConfig 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing DomainConfig Resource

Get an existing DomainConfig 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?: DomainConfigState, opts?: CustomResourceOptions): DomainConfig
static get(resource_name, id, opts=None, domain_name=None, function_args=None, function_name=None, __props__=None);
func GetDomainConfig(ctx *Context, name string, id IDInput, state *DomainConfigState, opts ...ResourceOption) (*DomainConfig, error)
public static DomainConfig Get(string name, Input<string> id, DomainConfigState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

DomainName string

Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.

FunctionArgs List<Pulumi.AliCloud.Cdn.Inputs.DomainConfigFunctionArgArgs>

The args of the domain config.

FunctionName string

The name of the domain config.

DomainName string

Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.

FunctionArgs []DomainConfigFunctionArg

The args of the domain config.

FunctionName string

The name of the domain config.

domainName string

Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.

functionArgs DomainConfigFunctionArg[]

The args of the domain config.

functionName string

The name of the domain config.

domain_name str

Name of the accelerated domain. This name without suffix can have a string of 1 to 63 characters, must contain only alphanumeric characters or “-”, and must not begin or end with “-”, and “-” must not in the 3th and 4th character positions at the same time. Suffix .sh and .tel are not supported.

function_args List[DomainConfigFunctionArg]

The args of the domain config.

function_name str

The name of the domain config.

Supporting Types

DomainConfigFunctionArg

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ArgName string

The name of arg.

ArgValue string

The value of arg.

ArgName string

The name of arg.

ArgValue string

The value of arg.

argName string

The name of arg.

argValue string

The value of arg.

argName str

The name of arg.

argValue str

The value of arg.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.