1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. scdn
  5. DomainConfig
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.scdn.DomainConfig

Explore with Pulumi AI

Provides a SCDN Accelerated Domain resource.

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

NOTE: Available in v1.131.0+.

NOTE: Alibaba Cloud SCDN has stopped new customer purchases from January 26, 2023, and you can choose to buy Alibaba Cloud DCDN products with more comprehensive acceleration and protection capabilities. If you are already a SCDN customer, you can submit a work order at any time to apply for a smooth migration to Alibaba Cloud DCDN products. In the future, we will provide better acceleration and security protection services in Alibaba Cloud DCDN, thank you for your understanding and cooperation.

DEPRECATED: This resource has been deprecated from version 1.219.0.

Example Usage

Basic Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
  # Create a new Domain config.
  domain:
    type: alicloud:scdn:Domain
    properties:
      domainName: mydomain.alicloud-provider.cn
      cdnType: web
      scope: overseas
      sources:
        - content: 1.1.1.1
          type: ipaddr
          priority: '20'
          port: 80
  config:
    type: alicloud:scdn:DomainConfig
    properties:
      domainName: ${domain.domainName}
      functionName: ip_allow_list_set
      functionArgs:
        - argName: ip_list
          argValue: 110.110.110.110
Copy

Create DomainConfig Resource

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

Constructor syntax

new DomainConfig(name: string, args: DomainConfigArgs, opts?: CustomResourceOptions);
@overload
def DomainConfig(resource_name: str,
                 args: DomainConfigArgs,
                 opts: Optional[ResourceOptions] = None)

@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)
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:scdn:DomainConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DomainConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. DomainConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DomainConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DomainConfigArgs
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 exampledomainConfigResourceResourceFromScdndomainConfig = new AliCloud.Scdn.DomainConfig("exampledomainConfigResourceResourceFromScdndomainConfig", new()
{
    DomainName = "string",
    FunctionArgs = new[]
    {
        new AliCloud.Scdn.Inputs.DomainConfigFunctionArgArgs
        {
            ArgName = "string",
            ArgValue = "string",
        },
    },
    FunctionName = "string",
});
Copy
example, err := scdn.NewDomainConfig(ctx, "exampledomainConfigResourceResourceFromScdndomainConfig", &scdn.DomainConfigArgs{
	DomainName: pulumi.String("string"),
	FunctionArgs: scdn.DomainConfigFunctionArgArray{
		&scdn.DomainConfigFunctionArgArgs{
			ArgName:  pulumi.String("string"),
			ArgValue: pulumi.String("string"),
		},
	},
	FunctionName: pulumi.String("string"),
})
Copy
var exampledomainConfigResourceResourceFromScdndomainConfig = new DomainConfig("exampledomainConfigResourceResourceFromScdndomainConfig", DomainConfigArgs.builder()
    .domainName("string")
    .functionArgs(DomainConfigFunctionArgArgs.builder()
        .argName("string")
        .argValue("string")
        .build())
    .functionName("string")
    .build());
Copy
exampledomain_config_resource_resource_from_scdndomain_config = alicloud.scdn.DomainConfig("exampledomainConfigResourceResourceFromScdndomainConfig",
    domain_name="string",
    function_args=[{
        "arg_name": "string",
        "arg_value": "string",
    }],
    function_name="string")
Copy
const exampledomainConfigResourceResourceFromScdndomainConfig = new alicloud.scdn.DomainConfig("exampledomainConfigResourceResourceFromScdndomainConfig", {
    domainName: "string",
    functionArgs: [{
        argName: "string",
        argValue: "string",
    }],
    functionName: "string",
});
Copy
type: alicloud:scdn:DomainConfig
properties:
    domainName: string
    functionArgs:
        - argName: string
          argValue: string
    functionName: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DomainConfig resource accepts the following input properties:

DomainName
This property is required.
Changes to this property will trigger replacement.
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 This property is required. List<Pulumi.AliCloud.Scdn.Inputs.DomainConfigFunctionArg>
The args of the domain config.
FunctionName
This property is required.
Changes to this property will trigger replacement.
string
The name of the domain config.
DomainName
This property is required.
Changes to this property will trigger replacement.
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 This property is required. []DomainConfigFunctionArgArgs
The args of the domain config.
FunctionName
This property is required.
Changes to this property will trigger replacement.
string
The name of the domain config.
domainName
This property is required.
Changes to this property will trigger replacement.
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 This property is required. List<DomainConfigFunctionArg>
The args of the domain config.
functionName
This property is required.
Changes to this property will trigger replacement.
String
The name of the domain config.
domainName
This property is required.
Changes to this property will trigger replacement.
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 This property is required. DomainConfigFunctionArg[]
The args of the domain config.
functionName
This property is required.
Changes to this property will trigger replacement.
string
The name of the domain config.
domain_name
This property is required.
Changes to this property will trigger replacement.
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 This property is required. Sequence[DomainConfigFunctionArgArgs]
The args of the domain config.
function_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the domain config.
domainName
This property is required.
Changes to this property will trigger replacement.
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 This property is required. List<Property Map>
The args of the domain config.
functionName
This property is required.
Changes to this property will trigger replacement.
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 SCDN domain config id.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of this resource.
ConfigId string
The SCDN domain config id.
Id string
The provider-assigned unique ID for this managed resource.
Status string
The status of this resource.
configId String
The SCDN domain config id.
id String
The provider-assigned unique ID for this managed resource.
status String
The status of this resource.
configId string
The SCDN 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 SCDN domain config id.
id str
The provider-assigned unique ID for this managed resource.
status str
The status of this resource.
configId String
The SCDN 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)
resources:  _:    type: alicloud:scdn:DomainConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 SCDN domain config id.
DomainName Changes to this property will trigger replacement. 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.Scdn.Inputs.DomainConfigFunctionArg>
The args of the domain config.
FunctionName Changes to this property will trigger replacement. string
The name of the domain config.
Status string
The status of this resource.
ConfigId string
The SCDN domain config id.
DomainName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The name of the domain config.
Status string
The status of this resource.
configId String
The SCDN domain config id.
domainName Changes to this property will trigger replacement. 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<DomainConfigFunctionArg>
The args of the domain config.
functionName Changes to this property will trigger replacement. String
The name of the domain config.
status String
The status of this resource.
configId string
The SCDN domain config id.
domainName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The name of the domain config.
status string
The status of this resource.
config_id str
The SCDN domain config id.
domain_name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The name of the domain config.
status str
The status of this resource.
configId String
The SCDN domain config id.
domainName Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The name of the domain config.
status String
The status of this resource.

Supporting Types

DomainConfigFunctionArg
, DomainConfigFunctionArgArgs

ArgName This property is required. string
The name of arg.
ArgValue This property is required. string
The value of arg.
ArgName This property is required. string
The name of arg.
ArgValue This property is required. string
The value of arg.
argName This property is required. String
The name of arg.
argValue This property is required. String
The value of arg.
argName This property is required. string
The name of arg.
argValue This property is required. string
The value of arg.
arg_name This property is required. str
The name of arg.
arg_value This property is required. str
The value of arg.
argName This property is required. String
The name of arg.
argValue This property is required. String
The value of arg.

Import

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

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

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.