1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. scdn
  5. getDomains
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi

alicloud.scdn.getDomains

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi

    This data source provides the Scdn Domains of the current Alibaba Cloud user.

    NOTE: Available in v1.131.0+.

    Example Usage

    Basic Usage

    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 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
    	})
    }
    
    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()));
        }
    }
    
    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)
    
    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);
    
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:scdn/getDomains:getDomains
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EnableDetails bool

    Default to false. Set it to true can 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).

    ResourceGroupId string

    The Resource Group ID.

    Status string

    The status of the resource.

    EnableDetails bool

    Default to false. Set it to true can 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).

    ResourceGroupId string

    The Resource Group ID.

    Status string

    The status of the resource.

    enableDetails Boolean

    Default to false. Set it to true can 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).

    resourceGroupId String

    The Resource Group ID.

    status String

    The status of the resource.

    enableDetails boolean

    Default to false. Set it to true can 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).

    resourceGroupId string

    The Resource Group ID.

    status string

    The status of the resource.

    enable_details bool

    Default to false. Set it to true can 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_id str

    The Resource Group ID.

    status str

    The status of the resource.

    enableDetails Boolean

    Default to false. Set it to true can 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).

    resourceGroupId String

    The Resource Group ID.

    status String

    The status of the resource.

    getDomains Result

    The following output properties are available:

    Domains List<Pulumi.AliCloud.Scdn.Outputs.GetDomainsDomain>
    Id string

    The provider-assigned unique ID for this managed resource.

    Ids List<string>
    Names List<string>
    EnableDetails bool
    NameRegex string
    OutputFile string
    ResourceGroupId string
    Status string
    Domains []GetDomainsDomain
    Id string

    The provider-assigned unique ID for this managed resource.

    Ids []string
    Names []string
    EnableDetails bool
    NameRegex string
    OutputFile string
    ResourceGroupId string
    Status string
    domains List<GetDomainsDomain>
    id String

    The provider-assigned unique ID for this managed resource.

    ids List<String>
    names List<String>
    enableDetails Boolean
    nameRegex String
    outputFile String
    resourceGroupId String
    status String
    domains GetDomainsDomain[]
    id string

    The provider-assigned unique ID for this managed resource.

    ids string[]
    names string[]
    enableDetails boolean
    nameRegex string
    outputFile string
    resourceGroupId string
    status string
    domains Sequence[GetDomainsDomain]
    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_id str
    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
    resourceGroupId String
    status String

    Supporting Types

    GetDomainsDomain

    CertInfos List<Pulumi.AliCloud.Scdn.Inputs.GetDomainsDomainCertInfo>

    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.

    ResourceGroupId string

    The Resource Group ID.

    Sources List<Pulumi.AliCloud.Scdn.Inputs.GetDomainsDomainSource>

    the Origin Server Information.

    Status string

    The status of the resource.

    CertInfos []GetDomainsDomainCertInfo

    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.

    ResourceGroupId string

    The Resource Group ID.

    Sources []GetDomainsDomainSource

    the Origin Server Information.

    Status string

    The status of the resource.

    certInfos List<GetDomainsDomainCertInfo>

    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.

    resourceGroupId String

    The Resource Group ID.

    sources List<GetDomainsDomainSource>

    the Origin Server Information.

    status String

    The status of the resource.

    certInfos GetDomainsDomainCertInfo[]

    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.

    resourceGroupId string

    The Resource Group ID.

    sources GetDomainsDomainSource[]

    the Origin Server Information.

    status string

    The status of the resource.

    cert_infos Sequence[GetDomainsDomainCertInfo]

    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_id str

    The Resource Group ID.

    sources Sequence[GetDomainsDomainSource]

    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.

    resourceGroupId String

    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

    Content string

    The Back-to-Source Address.

    Enabled string

    State.

    Port int

    Port.

    Priority string

    Priority.

    Type string

    the Origin Server Type. Valid Values: Ipaddr: IP Source Station Domain: the Domain Name, See Extra Domain Quota OSS: OSS Bucket as a Source Station.

    Content string

    The Back-to-Source Address.

    Enabled string

    State.

    Port int

    Port.

    Priority string

    Priority.

    Type string

    the Origin Server Type. Valid Values: Ipaddr: IP Source Station Domain: the Domain Name, See Extra Domain Quota OSS: OSS Bucket as a Source Station.

    content String

    The Back-to-Source Address.

    enabled String

    State.

    port Integer

    Port.

    priority String

    Priority.

    type String

    the Origin Server Type. Valid Values: Ipaddr: IP Source Station Domain: the Domain Name, See Extra Domain Quota OSS: OSS Bucket as a Source Station.

    content string

    The Back-to-Source Address.

    enabled string

    State.

    port number

    Port.

    priority string

    Priority.

    type string

    the Origin Server Type. Valid Values: Ipaddr: IP Source Station Domain: the Domain Name, See Extra Domain Quota OSS: OSS Bucket as a Source Station.

    content str

    The Back-to-Source Address.

    enabled str

    State.

    port int

    Port.

    priority str

    Priority.

    type str

    the Origin Server Type. Valid Values: Ipaddr: IP Source Station Domain: the Domain Name, See Extra Domain Quota OSS: OSS Bucket as a Source Station.

    content String

    The Back-to-Source Address.

    enabled String

    State.

    port Number

    Port.

    priority String

    Priority.

    type String

    the Origin Server Type. Valid Values: Ipaddr: IP Source Station Domain: the Domain Name, See Extra Domain Quota OSS: OSS Bucket as a Source Station.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the alicloud Terraform Provider.

    alicloud logo
    Alibaba Cloud v3.45.0 published on Monday, Nov 27, 2023 by Pulumi