1. Packages
  2. Alicloud Provider
  3. API Docs
  4. dns
  5. getResolutionLines
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.dns.getResolutionLines

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides a list of DNS Resolution Lines in an Alibaba Cloud account according to the specified filters.

    NOTE: Available in 1.60.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const resolutionLinesDs = alicloud.dns.getResolutionLines({
        lineCodes: ["cn_unicom_shanxi"],
        outputFile: "support_lines.txt",
    });
    export const firstLineCode = resolutionLinesDs.then(resolutionLinesDs => resolutionLinesDs.lines?.[0]?.lineCode);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    resolution_lines_ds = alicloud.dns.get_resolution_lines(line_codes=["cn_unicom_shanxi"],
        output_file="support_lines.txt")
    pulumi.export("firstLineCode", resolution_lines_ds.lines[0].line_code)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		resolutionLinesDs, err := dns.GetResolutionLines(ctx, &dns.GetResolutionLinesArgs{
    			LineCodes: []string{
    				"cn_unicom_shanxi",
    			},
    			OutputFile: pulumi.StringRef("support_lines.txt"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstLineCode", resolutionLinesDs.Lines[0].LineCode)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var resolutionLinesDs = AliCloud.Dns.GetResolutionLines.Invoke(new()
        {
            LineCodes = new[]
            {
                "cn_unicom_shanxi",
            },
            OutputFile = "support_lines.txt",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstLineCode"] = resolutionLinesDs.Apply(getResolutionLinesResult => getResolutionLinesResult.Lines[0]?.LineCode),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.dns.DnsFunctions;
    import com.pulumi.alicloud.dns.inputs.GetResolutionLinesArgs;
    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 resolutionLinesDs = DnsFunctions.getResolutionLines(GetResolutionLinesArgs.builder()
                .lineCodes("cn_unicom_shanxi")
                .outputFile("support_lines.txt")
                .build());
    
            ctx.export("firstLineCode", resolutionLinesDs.applyValue(getResolutionLinesResult -> getResolutionLinesResult.lines()[0].lineCode()));
        }
    }
    
    variables:
      resolutionLinesDs:
        fn::invoke:
          Function: alicloud:dns:getResolutionLines
          Arguments:
            lineCodes:
              - cn_unicom_shanxi
            outputFile: support_lines.txt
    outputs:
      firstLineCode: ${resolutionLinesDs.lines[0].lineCode}
    

    Using getResolutionLines

    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 getResolutionLines(args: GetResolutionLinesArgs, opts?: InvokeOptions): Promise<GetResolutionLinesResult>
    function getResolutionLinesOutput(args: GetResolutionLinesOutputArgs, opts?: InvokeOptions): Output<GetResolutionLinesResult>
    def get_resolution_lines(domain_name: Optional[str] = None,
                             lang: Optional[str] = None,
                             line_codes: Optional[Sequence[str]] = None,
                             line_display_names: Optional[Sequence[str]] = None,
                             line_names: Optional[Sequence[str]] = None,
                             output_file: Optional[str] = None,
                             user_client_ip: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetResolutionLinesResult
    def get_resolution_lines_output(domain_name: Optional[pulumi.Input[str]] = None,
                             lang: Optional[pulumi.Input[str]] = None,
                             line_codes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             line_display_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             line_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             user_client_ip: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetResolutionLinesResult]
    func GetResolutionLines(ctx *Context, args *GetResolutionLinesArgs, opts ...InvokeOption) (*GetResolutionLinesResult, error)
    func GetResolutionLinesOutput(ctx *Context, args *GetResolutionLinesOutputArgs, opts ...InvokeOption) GetResolutionLinesResultOutput

    > Note: This function is named GetResolutionLines in the Go SDK.

    public static class GetResolutionLines 
    {
        public static Task<GetResolutionLinesResult> InvokeAsync(GetResolutionLinesArgs args, InvokeOptions? opts = null)
        public static Output<GetResolutionLinesResult> Invoke(GetResolutionLinesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetResolutionLinesResult> getResolutionLines(GetResolutionLinesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:dns/getResolutionLines:getResolutionLines
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DomainName string
    Domain Name.
    Lang string
    language.
    LineCodes List<string>
    A list of lines codes.
    LineDisplayNames List<string>
    A list of line display names.
    LineNames List<string>
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    UserClientIp string
    The ip of user client.
    DomainName string
    Domain Name.
    Lang string
    language.
    LineCodes []string
    A list of lines codes.
    LineDisplayNames []string
    A list of line display names.
    LineNames []string
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    UserClientIp string
    The ip of user client.
    domainName String
    Domain Name.
    lang String
    language.
    lineCodes List<String>
    A list of lines codes.
    lineDisplayNames List<String>
    A list of line display names.
    lineNames List<String>
    outputFile String
    File name where to save data source results (after running pulumi preview).
    userClientIp String
    The ip of user client.
    domainName string
    Domain Name.
    lang string
    language.
    lineCodes string[]
    A list of lines codes.
    lineDisplayNames string[]
    A list of line display names.
    lineNames string[]
    outputFile string
    File name where to save data source results (after running pulumi preview).
    userClientIp string
    The ip of user client.
    domain_name str
    Domain Name.
    lang str
    language.
    line_codes Sequence[str]
    A list of lines codes.
    line_display_names Sequence[str]
    A list of line display names.
    line_names Sequence[str]
    output_file str
    File name where to save data source results (after running pulumi preview).
    user_client_ip str
    The ip of user client.
    domainName String
    Domain Name.
    lang String
    language.
    lineCodes List<String>
    A list of lines codes.
    lineDisplayNames List<String>
    A list of line display names.
    lineNames List<String>
    outputFile String
    File name where to save data source results (after running pulumi preview).
    userClientIp String
    The ip of user client.

    getResolutionLines Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    LineCodes List<string>
    Line code.
    LineDisplayNames List<string>
    A list of line display names.
    Lines List<Pulumi.AliCloud.Dns.Outputs.GetResolutionLinesLine>
    A list of cloud resolution line. Each element contains the following attributes:
    DomainName string
    Lang string
    LineNames List<string>
    OutputFile string
    UserClientIp string
    Id string
    The provider-assigned unique ID for this managed resource.
    LineCodes []string
    Line code.
    LineDisplayNames []string
    A list of line display names.
    Lines []GetResolutionLinesLine
    A list of cloud resolution line. Each element contains the following attributes:
    DomainName string
    Lang string
    LineNames []string
    OutputFile string
    UserClientIp string
    id String
    The provider-assigned unique ID for this managed resource.
    lineCodes List<String>
    Line code.
    lineDisplayNames List<String>
    A list of line display names.
    lines List<GetResolutionLinesLine>
    A list of cloud resolution line. Each element contains the following attributes:
    domainName String
    lang String
    lineNames List<String>
    outputFile String
    userClientIp String
    id string
    The provider-assigned unique ID for this managed resource.
    lineCodes string[]
    Line code.
    lineDisplayNames string[]
    A list of line display names.
    lines GetResolutionLinesLine[]
    A list of cloud resolution line. Each element contains the following attributes:
    domainName string
    lang string
    lineNames string[]
    outputFile string
    userClientIp string
    id str
    The provider-assigned unique ID for this managed resource.
    line_codes Sequence[str]
    Line code.
    line_display_names Sequence[str]
    A list of line display names.
    lines Sequence[GetResolutionLinesLine]
    A list of cloud resolution line. Each element contains the following attributes:
    domain_name str
    lang str
    line_names Sequence[str]
    output_file str
    user_client_ip str
    id String
    The provider-assigned unique ID for this managed resource.
    lineCodes List<String>
    Line code.
    lineDisplayNames List<String>
    A list of line display names.
    lines List<Property Map>
    A list of cloud resolution line. Each element contains the following attributes:
    domainName String
    lang String
    lineNames List<String>
    outputFile String
    userClientIp String

    Supporting Types

    GetResolutionLinesLine

    LineCode string
    LineDisplayName string
    Line display name.
    LineName string
    Line name.
    LineCode string
    LineDisplayName string
    Line display name.
    LineName string
    Line name.
    lineCode String
    lineDisplayName String
    Line display name.
    lineName String
    Line name.
    lineCode string
    lineDisplayName string
    Line display name.
    lineName string
    Line name.
    line_code str
    line_display_name str
    Line display name.
    line_name str
    Line name.
    lineCode String
    lineDisplayName String
    Line display name.
    lineName String
    Line name.

    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.62.1 published on Monday, Sep 16, 2024 by Pulumi