Viewing docs for Alibaba Cloud v3.104.0
published on Thursday, Jun 25, 2026 by Pulumi
published on Thursday, Jun 25, 2026 by Pulumi
Viewing docs for Alibaba Cloud v3.104.0
published on Thursday, Jun 25, 2026 by Pulumi
published on Thursday, Jun 25, 2026 by Pulumi
This data source provides the Cdn Domain Configs of the current Alibaba Cloud user.
NOTE: Available since v1.279.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const _default = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultDomainNew = new alicloud.cdn.DomainNew("default", {
domainName: `mycdndomain-${_default.result}.alicloud-provider.cn`,
cdnType: "web",
scope: "overseas",
sources: [{
content: "1.1.1.1",
type: "ipaddr",
priority: 20,
port: 80,
weight: 15,
}],
});
const defaultDomainConfig = new alicloud.cdn.DomainConfig("default", {
domainName: defaultDomainNew.domainName,
functionName: "ip_allow_list_set",
functionArgs: [{
argName: "ip_list",
argValue: "110.110.110.110",
}],
});
const ids = alicloud.cdn.getDomainConfigsOutput({
domainName: defaultDomainConfig.domainName,
ids: [defaultDomainConfig.id],
});
export const cdnDomainConfigsId0 = ids.apply(ids => ids.configs?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
default = random.Integer("default",
min=10000,
max=99999)
default_domain_new = alicloud.cdn.DomainNew("default",
domain_name=f"mycdndomain-{default['result']}.alicloud-provider.cn",
cdn_type="web",
scope="overseas",
sources=[{
"content": "1.1.1.1",
"type": "ipaddr",
"priority": 20,
"port": 80,
"weight": 15,
}])
default_domain_config = alicloud.cdn.DomainConfig("default",
domain_name=default_domain_new.domain_name,
function_name="ip_allow_list_set",
function_args=[{
"arg_name": "ip_list",
"arg_value": "110.110.110.110",
}])
ids = alicloud.cdn.get_domain_configs_output(domain_name=default_domain_config.domain_name,
ids=[default_domain_config.id])
pulumi.export("cdnDomainConfigsId0", ids.configs[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cdn"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
defaultDomainNew, err := cdn.NewDomainNew(ctx, "default", &cdn.DomainNewArgs{
DomainName: pulumi.Sprintf("mycdndomain-%v.alicloud-provider.cn", _default.Result),
CdnType: pulumi.String("web"),
Scope: pulumi.String("overseas"),
Sources: cdn.DomainNewSourceArray{
&cdn.DomainNewSourceArgs{
Content: pulumi.String("1.1.1.1"),
Type: pulumi.String("ipaddr"),
Priority: pulumi.Int(20),
Port: pulumi.Int(80),
Weight: pulumi.Int(15),
},
},
})
if err != nil {
return err
}
defaultDomainConfig, err := cdn.NewDomainConfig(ctx, "default", &cdn.DomainConfigArgs{
DomainName: defaultDomainNew.DomainName,
FunctionName: pulumi.String("ip_allow_list_set"),
FunctionArgs: cdn.DomainConfigFunctionArgArray{
&cdn.DomainConfigFunctionArgArgs{
ArgName: pulumi.String("ip_list"),
ArgValue: pulumi.String("110.110.110.110"),
},
},
})
if err != nil {
return err
}
ids := cdn.GetDomainConfigsOutput(ctx, cdn.GetDomainConfigsOutputArgs{
DomainName: defaultDomainConfig.DomainName,
Ids: pulumi.StringArray{
defaultDomainConfig.ID(),
},
}, nil)
ctx.Export("cdnDomainConfigsId0", ids.ApplyT(func(ids cdn.GetDomainConfigsResult) (*string, error) {
return ids.Configs[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var @default = new Random.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultDomainNew = new AliCloud.Cdn.DomainNew("default", new()
{
DomainName = $"mycdndomain-{@default.Result}.alicloud-provider.cn",
CdnType = "web",
Scope = "overseas",
Sources = new[]
{
new AliCloud.Cdn.Inputs.DomainNewSourceArgs
{
Content = "1.1.1.1",
Type = "ipaddr",
Priority = 20,
Port = 80,
Weight = 15,
},
},
});
var defaultDomainConfig = new AliCloud.Cdn.DomainConfig("default", new()
{
DomainName = defaultDomainNew.DomainName,
FunctionName = "ip_allow_list_set",
FunctionArgs = new[]
{
new AliCloud.Cdn.Inputs.DomainConfigFunctionArgArgs
{
ArgName = "ip_list",
ArgValue = "110.110.110.110",
},
},
});
var ids = AliCloud.Cdn.GetDomainConfigs.Invoke(new()
{
DomainName = defaultDomainConfig.DomainName,
Ids = new[]
{
defaultDomainConfig.Id,
},
});
return new Dictionary<string, object?>
{
["cdnDomainConfigsId0"] = ids.Apply(getDomainConfigsResult => getDomainConfigsResult.Configs[0]?.Id),
};
});
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.cdn.DomainNew;
import com.pulumi.alicloud.cdn.DomainNewArgs;
import com.pulumi.alicloud.cdn.inputs.DomainNewSourceArgs;
import com.pulumi.alicloud.cdn.DomainConfig;
import com.pulumi.alicloud.cdn.DomainConfigArgs;
import com.pulumi.alicloud.cdn.inputs.DomainConfigFunctionArgArgs;
import com.pulumi.alicloud.cdn.CdnFunctions;
import com.pulumi.alicloud.cdn.inputs.GetDomainConfigsArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 default_ = new Integer("default", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultDomainNew = new DomainNew("defaultDomainNew", DomainNewArgs.builder()
.domainName(String.format("mycdndomain-%s.alicloud-provider.cn", default_.result()))
.cdnType("web")
.scope("overseas")
.sources(DomainNewSourceArgs.builder()
.content("1.1.1.1")
.type("ipaddr")
.priority(20)
.port(80)
.weight(15)
.build())
.build());
var defaultDomainConfig = new DomainConfig("defaultDomainConfig", DomainConfigArgs.builder()
.domainName(defaultDomainNew.domainName())
.functionName("ip_allow_list_set")
.functionArgs(DomainConfigFunctionArgArgs.builder()
.argName("ip_list")
.argValue("110.110.110.110")
.build())
.build());
final var ids = CdnFunctions.getDomainConfigs(GetDomainConfigsArgs.builder()
.domainName(defaultDomainConfig.domainName())
.ids(defaultDomainConfig.id())
.build());
ctx.export("cdnDomainConfigsId0", ids.applyValue(_ids -> _ids.configs()[0].id()));
}
}
resources:
default:
type: random:Integer
properties:
min: 10000
max: 99999
defaultDomainNew:
type: alicloud:cdn:DomainNew
name: default
properties:
domainName: mycdndomain-${default.result}.alicloud-provider.cn
cdnType: web
scope: overseas
sources:
- content: 1.1.1.1
type: ipaddr
priority: '20'
port: 80
weight: '15'
defaultDomainConfig:
type: alicloud:cdn:DomainConfig
name: default
properties:
domainName: ${defaultDomainNew.domainName}
functionName: ip_allow_list_set
functionArgs:
- argName: ip_list
argValue: 110.110.110.110
variables:
ids:
fn::invoke:
function: alicloud:cdn:getDomainConfigs
arguments:
domainName: ${defaultDomainConfig.domainName}
ids:
- ${defaultDomainConfig.id}
outputs:
cdnDomainConfigsId0: ${ids.configs[0].id}
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
random = {
source = "pulumi/random"
}
}
}
data "alicloud_cdn_getdomainconfigs" "ids" {
domain_name = alicloud_cdn_domainconfig.default.domain_name
ids = [alicloud_cdn_domainconfig.default.id]
}
resource "random_integer" "default" {
min = 10000
max = 99999
}
resource "alicloud_cdn_domainnew" "default" {
domain_name ="mycdndomain-${random_integer.default.result}.alicloud-provider.cn"
cdn_type = "web"
scope = "overseas"
sources {
content = "1.1.1.1"
type = "ipaddr"
priority = "20"
port = 80
weight = "15"
}
}
resource "alicloud_cdn_domainconfig" "default" {
domain_name = alicloud_cdn_domainnew.default.domain_name
function_name = "ip_allow_list_set"
function_args {
arg_name = "ip_list"
arg_value = "110.110.110.110"
}
}
output "cdnDomainConfigsId0" {
value = data.alicloud_cdn_getdomainconfigs.ids.configs[0].id
}
Using getDomainConfigs
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDomainConfigs(args: GetDomainConfigsArgs, opts?: InvokeOptions): Promise<GetDomainConfigsResult>
function getDomainConfigsOutput(args: GetDomainConfigsOutputArgs, opts?: InvokeOptions): Output<GetDomainConfigsResult>def get_domain_configs(config_id: Optional[str] = None,
domain_name: Optional[str] = None,
function_name: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
status: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDomainConfigsResult
def get_domain_configs_output(config_id: pulumi.Input[Optional[str]] = None,
domain_name: pulumi.Input[Optional[str]] = None,
function_name: pulumi.Input[Optional[str]] = None,
ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
name_regex: pulumi.Input[Optional[str]] = None,
output_file: pulumi.Input[Optional[str]] = None,
status: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDomainConfigsResult]func GetDomainConfigs(ctx *Context, args *GetDomainConfigsArgs, opts ...InvokeOption) (*GetDomainConfigsResult, error)
func GetDomainConfigsOutput(ctx *Context, args *GetDomainConfigsOutputArgs, opts ...InvokeOption) GetDomainConfigsResultOutput> Note: This function is named GetDomainConfigs in the Go SDK.
public static class GetDomainConfigs
{
public static Task<GetDomainConfigsResult> InvokeAsync(GetDomainConfigsArgs args, InvokeOptions? opts = null)
public static Output<GetDomainConfigsResult> Invoke(GetDomainConfigsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDomainConfigsResult> getDomainConfigs(GetDomainConfigsArgs args, InvokeOptions options)
public static Output<GetDomainConfigsResult> getDomainConfigs(GetDomainConfigsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cdn/getDomainConfigs:getDomainConfigs
arguments:
# arguments dictionarydata "alicloud_cdn_getdomainconfigs" "name" {
# arguments
}The following arguments are supported:
- Domain
Name string - The accelerated domain name.
- Config
Id string - The ID of the feature configuration.
- Function
Name string - The names of the features. Separate multiple feature names with commas (,).
- Ids List<string>
- A list of Domain Config IDs.
- Name
Regex string - A regex string to filter results by Domain Config name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- Domain
Name string - The accelerated domain name.
- Config
Id string - The ID of the feature configuration.
- Function
Name string - The names of the features. Separate multiple feature names with commas (,).
- Ids []string
- A list of Domain Config IDs.
- Name
Regex string - A regex string to filter results by Domain Config name.
- Output
File string - File name where to save data source results (after running
pulumi preview). - Status string
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- domain_
name string - The accelerated domain name.
- config_
id string - The ID of the feature configuration.
- function_
name string - The names of the features. Separate multiple feature names with commas (,).
- ids list(string)
- A list of Domain Config IDs.
- name_
regex string - A regex string to filter results by Domain Config name.
- output_
file string - File name where to save data source results (after running
pulumi preview). - status string
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- domain
Name String - The accelerated domain name.
- config
Id String - The ID of the feature configuration.
- function
Name String - The names of the features. Separate multiple feature names with commas (,).
- ids List<String>
- A list of Domain Config IDs.
- name
Regex String - A regex string to filter results by Domain Config name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- domain
Name string - The accelerated domain name.
- config
Id string - The ID of the feature configuration.
- function
Name string - The names of the features. Separate multiple feature names with commas (,).
- ids string[]
- A list of Domain Config IDs.
- name
Regex string - A regex string to filter results by Domain Config name.
- output
File string - File name where to save data source results (after running
pulumi preview). - status string
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- domain_
name str - The accelerated domain name.
- config_
id str - The ID of the feature configuration.
- function_
name str - The names of the features. Separate multiple feature names with commas (,).
- ids Sequence[str]
- A list of Domain Config IDs.
- name_
regex str - A regex string to filter results by Domain Config name.
- output_
file str - File name where to save data source results (after running
pulumi preview). - status str
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- domain
Name String - The accelerated domain name.
- config
Id String - The ID of the feature configuration.
- function
Name String - The names of the features. Separate multiple feature names with commas (,).
- ids List<String>
- A list of Domain Config IDs.
- name
Regex String - A regex string to filter results by Domain Config name.
- output
File String - File name where to save data source results (after running
pulumi preview). - status String
- The status of the configuration. Valid values:
success,testing,failed,configuring.
getDomainConfigs Result
The following output properties are available:
- Configs
List<Pulumi.
Ali Cloud. Cdn. Outputs. Get Domain Configs Config> - A list of Domain Configs. Each element contains the following attributes:
- Domain
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- A list of Domain Config names.
- Config
Id string - The ID of the feature configuration.
- Function
Name string - The name of the feature.
- Name
Regex string - Output
File string - Status string
- The status of the configuration.
- Configs
[]Get
Domain Configs Config - A list of Domain Configs. Each element contains the following attributes:
- Domain
Name string - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- A list of Domain Config names.
- Config
Id string - The ID of the feature configuration.
- Function
Name string - The name of the feature.
- Name
Regex string - Output
File string - Status string
- The status of the configuration.
- configs list(object)
- A list of Domain Configs. Each element contains the following attributes:
- domain_
name string - id string
- The provider-assigned unique ID for this managed resource.
- ids list(string)
- names list(string)
- A list of Domain Config names.
- config_
id string - The ID of the feature configuration.
- function_
name string - The name of the feature.
- name_
regex string - output_
file string - status string
- The status of the configuration.
- configs
List<Get
Domain Configs Config> - A list of Domain Configs. Each element contains the following attributes:
- domain
Name String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Domain Config names.
- config
Id String - The ID of the feature configuration.
- function
Name String - The name of the feature.
- name
Regex String - output
File String - status String
- The status of the configuration.
- configs
Get
Domain Configs Config[] - A list of Domain Configs. Each element contains the following attributes:
- domain
Name string - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- A list of Domain Config names.
- config
Id string - The ID of the feature configuration.
- function
Name string - The name of the feature.
- name
Regex string - output
File string - status string
- The status of the configuration.
- configs
Sequence[Get
Domain Configs Config] - A list of Domain Configs. Each element contains the following attributes:
- domain_
name str - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- A list of Domain Config names.
- config_
id str - The ID of the feature configuration.
- function_
name str - The name of the feature.
- name_
regex str - output_
file str - status str
- The status of the configuration.
- configs List<Property Map>
- A list of Domain Configs. Each element contains the following attributes:
- domain
Name String - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- A list of Domain Config names.
- config
Id String - The ID of the feature configuration.
- function
Name String - The name of the feature.
- name
Regex String - output
File String - status String
- The status of the configuration.
Supporting Types
GetDomainConfigsConfig
- Config
Id string - The ID of the feature configuration.
- Function
Args List<Pulumi.Ali Cloud. Cdn. Inputs. Get Domain Configs Config Function Arg> - The args of the domain config.
- Function
Name string - The names of the features. Separate multiple feature names with commas (,).
- Id string
- The ID of the Domain Config.
- Parent
Id string - The ID of the rule condition.
- Status string
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- Config
Id string - The ID of the feature configuration.
- Function
Args []GetDomain Configs Config Function Arg - The args of the domain config.
- Function
Name string - The names of the features. Separate multiple feature names with commas (,).
- Id string
- The ID of the Domain Config.
- Parent
Id string - The ID of the rule condition.
- Status string
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- config_
id string - The ID of the feature configuration.
- function_
args list(object) - The args of the domain config.
- function_
name string - The names of the features. Separate multiple feature names with commas (,).
- id string
- The ID of the Domain Config.
- parent_
id string - The ID of the rule condition.
- status string
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- config
Id String - The ID of the feature configuration.
- function
Args List<GetDomain Configs Config Function Arg> - The args of the domain config.
- function
Name String - The names of the features. Separate multiple feature names with commas (,).
- id String
- The ID of the Domain Config.
- parent
Id String - The ID of the rule condition.
- status String
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- config
Id string - The ID of the feature configuration.
- function
Args GetDomain Configs Config Function Arg[] - The args of the domain config.
- function
Name string - The names of the features. Separate multiple feature names with commas (,).
- id string
- The ID of the Domain Config.
- parent
Id string - The ID of the rule condition.
- status string
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- config_
id str - The ID of the feature configuration.
- function_
args Sequence[GetDomain Configs Config Function Arg] - The args of the domain config.
- function_
name str - The names of the features. Separate multiple feature names with commas (,).
- id str
- The ID of the Domain Config.
- parent_
id str - The ID of the rule condition.
- status str
- The status of the configuration. Valid values:
success,testing,failed,configuring.
- config
Id String - The ID of the feature configuration.
- function
Args List<Property Map> - The args of the domain config.
- function
Name String - The names of the features. Separate multiple feature names with commas (,).
- id String
- The ID of the Domain Config.
- parent
Id String - The ID of the rule condition.
- status String
- The status of the configuration. Valid values:
success,testing,failed,configuring.
GetDomainConfigsConfigFunctionArg
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Viewing docs for Alibaba Cloud v3.104.0
published on Thursday, Jun 25, 2026 by Pulumi
published on Thursday, Jun 25, 2026 by Pulumi