Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.scdn.getDomains
Explore with Pulumi AI
This data source provides the Scdn Domains of the current Alibaba Cloud user.
NOTE: Available in v1.131.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const nameRegex = alicloud.scdn.getDomains({
    nameRegex: "^my-Domain",
});
export const scdnDomainId = nameRegex.then(nameRegex => nameRegex.domains?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
name_regex = alicloud.scdn.get_domains(name_regex="^my-Domain")
pulumi.export("scdnDomainId", name_regex.domains[0].id)
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 {
		nameRegex, err := scdn.GetDomains(ctx, &scdn.GetDomainsArgs{
			NameRegex: pulumi.StringRef("^my-Domain"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("scdnDomainId", nameRegex.Domains[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var nameRegex = AliCloud.Scdn.GetDomains.Invoke(new()
    {
        NameRegex = "^my-Domain",
    });
    return new Dictionary<string, object?>
    {
        ["scdnDomainId"] = nameRegex.Apply(getDomainsResult => getDomainsResult.Domains[0]?.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.scdn.ScdnFunctions;
import com.pulumi.alicloud.scdn.inputs.GetDomainsArgs;
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) {
        final var nameRegex = ScdnFunctions.getDomains(GetDomainsArgs.builder()
            .nameRegex("^my-Domain")
            .build());
        ctx.export("scdnDomainId", nameRegex.applyValue(getDomainsResult -> getDomainsResult.domains()[0].id()));
    }
}
variables:
  nameRegex:
    fn::invoke:
      function: alicloud:scdn:getDomains
      arguments:
        nameRegex: ^my-Domain
outputs:
  scdnDomainId: ${nameRegex.domains[0].id}
Using getDomains
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 getDomains(args: GetDomainsArgs, opts?: InvokeOptions): Promise<GetDomainsResult>
function getDomainsOutput(args: GetDomainsOutputArgs, opts?: InvokeOptions): Output<GetDomainsResult>def get_domains(enable_details: Optional[bool] = None,
                ids: Optional[Sequence[str]] = None,
                name_regex: Optional[str] = None,
                output_file: Optional[str] = None,
                resource_group_id: Optional[str] = None,
                status: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetDomainsResult
def get_domains_output(enable_details: Optional[pulumi.Input[bool]] = None,
                ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                name_regex: Optional[pulumi.Input[str]] = None,
                output_file: Optional[pulumi.Input[str]] = None,
                resource_group_id: Optional[pulumi.Input[str]] = None,
                status: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetDomainsResult]func GetDomains(ctx *Context, args *GetDomainsArgs, opts ...InvokeOption) (*GetDomainsResult, error)
func GetDomainsOutput(ctx *Context, args *GetDomainsOutputArgs, opts ...InvokeOption) GetDomainsResultOutput> Note: This function is named GetDomains in the Go SDK.
public static class GetDomains 
{
    public static Task<GetDomainsResult> InvokeAsync(GetDomainsArgs args, InvokeOptions? opts = null)
    public static Output<GetDomainsResult> Invoke(GetDomainsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDomainsResult> getDomains(GetDomainsArgs args, InvokeOptions options)
public static Output<GetDomainsResult> getDomains(GetDomainsArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:scdn/getDomains:getDomains
  arguments:
    # arguments dictionaryThe following arguments are supported:
- EnableDetails bool
- Default to false. Set it totruecan output more details about resource attributes.
- Ids List<string>
- A list of Domain IDs. Its element value is same as Domain Name.
- NameRegex string
- A regex string to filter results by Domain name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ResourceGroup stringId 
- The Resource Group ID.
- Status string
- The status of the resource. Valid values: "check_failed", "checking", "configure_failed", "configuring", "offline", "online".
- EnableDetails bool
- Default to false. Set it totruecan output more details about resource attributes.
- Ids []string
- A list of Domain IDs. Its element value is same as Domain Name.
- NameRegex string
- A regex string to filter results by Domain name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- ResourceGroup stringId 
- The Resource Group ID.
- Status string
- The status of the resource. Valid values: "check_failed", "checking", "configure_failed", "configuring", "offline", "online".
- enableDetails Boolean
- Default to false. Set it totruecan output more details about resource attributes.
- ids List<String>
- A list of Domain IDs. Its element value is same as Domain Name.
- nameRegex String
- A regex string to filter results by Domain name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- resourceGroup StringId 
- The Resource Group ID.
- status String
- The status of the resource. Valid values: "check_failed", "checking", "configure_failed", "configuring", "offline", "online".
- enableDetails boolean
- Default to false. Set it totruecan output more details about resource attributes.
- ids string[]
- A list of Domain IDs. Its element value is same as Domain Name.
- nameRegex string
- A regex string to filter results by Domain name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- resourceGroup stringId 
- The Resource Group ID.
- status string
- The status of the resource. Valid values: "check_failed", "checking", "configure_failed", "configuring", "offline", "online".
- enable_details bool
- Default to false. Set it totruecan output more details about resource attributes.
- ids Sequence[str]
- A list of Domain IDs. Its element value is same as Domain Name.
- name_regex str
- A regex string to filter results by Domain name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- resource_group_ strid 
- The Resource Group ID.
- status str
- The status of the resource. Valid values: "check_failed", "checking", "configure_failed", "configuring", "offline", "online".
- enableDetails Boolean
- Default to false. Set it totruecan output more details about resource attributes.
- ids List<String>
- A list of Domain IDs. Its element value is same as Domain Name.
- nameRegex String
- A regex string to filter results by Domain name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- resourceGroup StringId 
- The Resource Group ID.
- status String
- The status of the resource. Valid values: "check_failed", "checking", "configure_failed", "configuring", "offline", "online".
getDomains Result
The following output properties are available:
- Domains
List<Pulumi.Ali Cloud. Scdn. Outputs. Get Domains Domain> 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- EnableDetails bool
- NameRegex string
- OutputFile string
- ResourceGroup stringId 
- Status string
- Domains
[]GetDomains Domain 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- EnableDetails bool
- NameRegex string
- OutputFile string
- ResourceGroup stringId 
- Status string
- domains
List<GetDomains Domain> 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enableDetails Boolean
- nameRegex String
- outputFile String
- resourceGroup StringId 
- status String
- domains
GetDomains Domain[] 
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- enableDetails boolean
- nameRegex string
- outputFile string
- resourceGroup stringId 
- status string
- domains
Sequence[GetDomains Domain] 
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- enable_details bool
- name_regex str
- output_file str
- resource_group_ strid 
- status str
- domains List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enableDetails Boolean
- nameRegex String
- outputFile String
- resourceGroup StringId 
- status String
Supporting Types
GetDomainsDomain  
- CertInfos List<Pulumi.Ali Cloud. Scdn. Inputs. Get Domains Domain Cert Info> 
- Certificate Information.
- Cname string
- In Order to Link the CDN Domain Name to Generate a CNAME Domain Name, in the Domain Name Resolution Service Provider at the Acceleration Domain Name CNAME Resolution to the Domain.
- CreateTime string
- Creation Time.
- Description string
- Review the Reason for the Failure Is Displayed.
- DomainName string
- Your Domain Name.
- GmtModified string
- Last Modified Date.
- Id string
- The ID of the Domain. Its value is same as Queue Name.
- ResourceGroup stringId 
- The Resource Group ID.
- Sources
List<Pulumi.Ali Cloud. Scdn. Inputs. Get Domains Domain Source> 
- the Origin Server Information.
- Status string
- The status of the resource.
- CertInfos []GetDomains Domain Cert Info 
- Certificate Information.
- Cname string
- In Order to Link the CDN Domain Name to Generate a CNAME Domain Name, in the Domain Name Resolution Service Provider at the Acceleration Domain Name CNAME Resolution to the Domain.
- CreateTime string
- Creation Time.
- Description string
- Review the Reason for the Failure Is Displayed.
- DomainName string
- Your Domain Name.
- GmtModified string
- Last Modified Date.
- Id string
- The ID of the Domain. Its value is same as Queue Name.
- ResourceGroup stringId 
- The Resource Group ID.
- Sources
[]GetDomains Domain Source 
- the Origin Server Information.
- Status string
- The status of the resource.
- certInfos List<GetDomains Domain Cert Info> 
- Certificate Information.
- cname String
- In Order to Link the CDN Domain Name to Generate a CNAME Domain Name, in the Domain Name Resolution Service Provider at the Acceleration Domain Name CNAME Resolution to the Domain.
- createTime String
- Creation Time.
- description String
- Review the Reason for the Failure Is Displayed.
- domainName String
- Your Domain Name.
- gmtModified String
- Last Modified Date.
- id String
- The ID of the Domain. Its value is same as Queue Name.
- resourceGroup StringId 
- The Resource Group ID.
- sources
List<GetDomains Domain Source> 
- the Origin Server Information.
- status String
- The status of the resource.
- certInfos GetDomains Domain Cert Info[] 
- Certificate Information.
- cname string
- In Order to Link the CDN Domain Name to Generate a CNAME Domain Name, in the Domain Name Resolution Service Provider at the Acceleration Domain Name CNAME Resolution to the Domain.
- createTime string
- Creation Time.
- description string
- Review the Reason for the Failure Is Displayed.
- domainName string
- Your Domain Name.
- gmtModified string
- Last Modified Date.
- id string
- The ID of the Domain. Its value is same as Queue Name.
- resourceGroup stringId 
- The Resource Group ID.
- sources
GetDomains Domain Source[] 
- the Origin Server Information.
- status string
- The status of the resource.
- cert_infos Sequence[GetDomains Domain Cert Info] 
- Certificate Information.
- cname str
- In Order to Link the CDN Domain Name to Generate a CNAME Domain Name, in the Domain Name Resolution Service Provider at the Acceleration Domain Name CNAME Resolution to the Domain.
- create_time str
- Creation Time.
- description str
- Review the Reason for the Failure Is Displayed.
- domain_name str
- Your Domain Name.
- gmt_modified str
- Last Modified Date.
- id str
- The ID of the Domain. Its value is same as Queue Name.
- resource_group_ strid 
- The Resource Group ID.
- sources
Sequence[GetDomains Domain Source] 
- the Origin Server Information.
- status str
- The status of the resource.
- certInfos List<Property Map>
- Certificate Information.
- cname String
- In Order to Link the CDN Domain Name to Generate a CNAME Domain Name, in the Domain Name Resolution Service Provider at the Acceleration Domain Name CNAME Resolution to the Domain.
- createTime String
- Creation Time.
- description String
- Review the Reason for the Failure Is Displayed.
- domainName String
- Your Domain Name.
- gmtModified String
- Last Modified Date.
- id String
- The ID of the Domain. Its value is same as Queue Name.
- resourceGroup StringId 
- The Resource Group ID.
- sources List<Property Map>
- the Origin Server Information.
- status String
- The status of the resource.
GetDomainsDomainCertInfo    
- CertName string
- If You Enable HTTPS Here Certificate Name.
- CertType string
- Certificate Type. Value Range: Upload: Certificate. CAS: Certificate Authority Certificate. Free: Free Certificate.
- SslProtocol string
- Whether to Enable SSL Certificate. 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.
- SslProtocol string
- Whether to Enable SSL Certificate. 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.
- sslProtocol String
- Whether to Enable SSL Certificate. 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.
- sslProtocol string
- Whether to Enable SSL Certificate. 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_protocol str
- Whether to Enable SSL Certificate. 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.
- sslProtocol String
- Whether to Enable SSL Certificate. Valid Values: on, off.
- sslPub String
- If You Enable HTTPS Here Key.
GetDomainsDomainSource   
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.