Alibaba Cloud

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

DomainConfig

Provides a DCDN Accelerated Domain resource.

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

NOTE: Available in v1.131.0+.

Example Usage

Basic Usage

Coming soon!

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dcdn.Domain;
import com.pulumi.alicloud.dcdn.DomainArgs;
import com.pulumi.alicloud.dcdn.inputs.DomainSourceArgs;
import com.pulumi.alicloud.dcdn.DomainConfig;
import com.pulumi.alicloud.dcdn.DomainConfigArgs;
import com.pulumi.alicloud.dcdn.inputs.DomainConfigFunctionArgArgs;
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 domain = new Domain("domain", DomainArgs.builder()        
            .domainName("mydomain.xiaozhu.com")
            .cdnType("web")
            .scope("overseas")
            .sources(DomainSourceArgs.builder()
                .content("1.1.1.1")
                .type("ipaddr")
                .priority("20")
                .port(80)
                .weight("15")
                .build())
            .build());

        var config = new DomainConfig("config", DomainConfigArgs.builder()        
            .domainName(domain.domainName())
            .functionName("ip_allow_list_set")
            .functionArgs(DomainConfigFunctionArgArgs.builder()
                .argName("ip_list")
                .argValue("110.110.110.110")
                .build())
            .build());

    }
}

Coming soon!

Coming soon!

resources:
  # Create a new Domain config.
  domain:
    type: alicloud:dcdn:Domain
    properties:
      domainName: mydomain.xiaozhu.com
      cdnType: web
      scope: overseas
      sources:
        - content: 1.1.1.1
          type: ipaddr
          priority: 20
          port: 80
          weight: 15
  config:
    type: alicloud:dcdn:DomainConfig
    properties:
      domainName: ${domain.domainName}
      functionName: ip_allow_list_set
      functionArgs:
        - argName: ip_list
          argValue: 110.110.110.110

Create DomainConfig Resource

new DomainConfig(name: string, args: DomainConfigArgs, opts?: CustomResourceOptions);
@overload
def DomainConfig(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 domain_name: Optional[str] = None,
                 function_args: Optional[Sequence[DomainConfigFunctionArgArgs]] = None,
                 function_name: Optional[str] = None)
@overload
def DomainConfig(resource_name: str,
                 args: DomainConfigArgs,
                 opts: Optional[ResourceOptions] = None)
func NewDomainConfig(ctx *Context, name string, args DomainConfigArgs, opts ...ResourceOption) (*DomainConfig, error)
public DomainConfig(string name, DomainConfigArgs args, CustomResourceOptions? opts = null)
public DomainConfig(String name, DomainConfigArgs args)
public DomainConfig(String name, DomainConfigArgs args, CustomResourceOptions options)
type: alicloud:dcdn:DomainConfig
properties: # The arguments to resource properties.
options: # 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.
resource_name str
The unique name of the resource.
args DomainConfigArgs
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 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.
name String
The unique name of the resource.
args DomainConfigArgs
The arguments to resource properties.
options 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 Architecture and Concepts 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.Dcdn.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 []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 List<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 DomainConfigFunctionArgArgs[]

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 Sequence[DomainConfigFunctionArgArgs]

The args of the domain config.

function_name str

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 List<Property Map>

The args of the domain config.

functionName String

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:

ConfigId string

The DCDN domain config id.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of this resource.

ConfigId string

The DCDN domain config id.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of this resource.

configId String

The DCDN domain config id.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of this resource.

configId string

The DCDN domain config id.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of this resource.

config_id str

The DCDN domain config id.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of this resource.

configId String

The DCDN domain config id.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of this resource.

Look up 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
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config_id: Optional[str] = None,
        domain_name: Optional[str] = None,
        function_args: Optional[Sequence[DomainConfigFunctionArgArgs]] = None,
        function_name: Optional[str] = None,
        status: Optional[str] = None) -> DomainConfig
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)
public static DomainConfig get(String name, Output<String> id, DomainConfigState 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:
ConfigId string

The DCDN domain config id.

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.Dcdn.Inputs.DomainConfigFunctionArgArgs>

The args of the domain config.

FunctionName string

The name of the domain config.

Status string

The status of this resource.

ConfigId string

The DCDN domain config id.

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 []DomainConfigFunctionArgArgs

The args of the domain config.

FunctionName string

The name of the domain config.

Status string

The status of this resource.

configId String

The DCDN domain config id.

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<DomainConfigFunctionArgArgs>

The args of the domain config.

functionName String

The name of the domain config.

status String

The status of this resource.

configId string

The DCDN domain config id.

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 DomainConfigFunctionArgArgs[]

The args of the domain config.

functionName string

The name of the domain config.

status string

The status of this resource.

config_id str

The DCDN domain config id.

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 Sequence[DomainConfigFunctionArgArgs]

The args of the domain config.

function_name str

The name of the domain config.

status str

The status of this resource.

configId String

The DCDN domain config id.

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<Property Map>

The args of the domain config.

functionName String

The name of the domain config.

status String

The status of this resource.

Supporting Types

DomainConfigFunctionArg

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 string

The name of arg.

argValue string

The value of arg.

arg_name str

The name of arg.

arg_value str

The value of arg.

argName String

The name of arg.

argValue String

The value of arg.

Import

DCDN domain config can be imported using the id, e.g.

 $ pulumi import alicloud:dcdn/domainConfig:DomainConfig example <domain_name>:<function_name>:<config_id>

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.