Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.dns.getResolutionLines
Explore with Pulumi AI
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:
- Domain
Name string - Domain Name.
- Lang string
- language.
- Line
Codes List<string> - A list of lines codes.
- Line
Display List<string>Names - A list of line display names.
- Line
Names List<string> - Output
File string - File name where to save data source results (after running
pulumi preview
). - User
Client stringIp - The ip of user client.
- Domain
Name string - Domain Name.
- Lang string
- language.
- Line
Codes []string - A list of lines codes.
- Line
Display []stringNames - A list of line display names.
- Line
Names []string - Output
File string - File name where to save data source results (after running
pulumi preview
). - User
Client stringIp - The ip of user client.
- domain
Name String - Domain Name.
- lang String
- language.
- line
Codes List<String> - A list of lines codes.
- line
Display List<String>Names - A list of line display names.
- line
Names List<String> - output
File String - File name where to save data source results (after running
pulumi preview
). - user
Client StringIp - The ip of user client.
- domain
Name string - Domain Name.
- lang string
- language.
- line
Codes string[] - A list of lines codes.
- line
Display string[]Names - A list of line display names.
- line
Names string[] - output
File string - File name where to save data source results (after running
pulumi preview
). - user
Client stringIp - The ip of user client.
- domain_
name str - Domain Name.
- lang str
- language.
- line_
codes Sequence[str] - A list of lines codes.
- line_
display_ Sequence[str]names - 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_ strip - The ip of user client.
- domain
Name String - Domain Name.
- lang String
- language.
- line
Codes List<String> - A list of lines codes.
- line
Display List<String>Names - A list of line display names.
- line
Names List<String> - output
File String - File name where to save data source results (after running
pulumi preview
). - user
Client StringIp - The ip of user client.
getResolutionLines Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Line
Codes List<string> - Line code.
- Line
Display List<string>Names - A list of line display names.
- Lines
List<Pulumi.
Ali Cloud. Dns. Outputs. Get Resolution Lines Line> - A list of cloud resolution line. Each element contains the following attributes:
- Domain
Name string - Lang string
- Line
Names List<string> - Output
File string - User
Client stringIp
- Id string
- The provider-assigned unique ID for this managed resource.
- Line
Codes []string - Line code.
- Line
Display []stringNames - A list of line display names.
- Lines
[]Get
Resolution Lines Line - A list of cloud resolution line. Each element contains the following attributes:
- Domain
Name string - Lang string
- Line
Names []string - Output
File string - User
Client stringIp
- id String
- The provider-assigned unique ID for this managed resource.
- line
Codes List<String> - Line code.
- line
Display List<String>Names - A list of line display names.
- lines
List<Get
Resolution Lines Line> - A list of cloud resolution line. Each element contains the following attributes:
- domain
Name String - lang String
- line
Names List<String> - output
File String - user
Client StringIp
- id string
- The provider-assigned unique ID for this managed resource.
- line
Codes string[] - Line code.
- line
Display string[]Names - A list of line display names.
- lines
Get
Resolution Lines Line[] - A list of cloud resolution line. Each element contains the following attributes:
- domain
Name string - lang string
- line
Names string[] - output
File string - user
Client stringIp
- id str
- The provider-assigned unique ID for this managed resource.
- line_
codes Sequence[str] - Line code.
- line_
display_ Sequence[str]names - A list of line display names.
- lines
Sequence[Get
Resolution Lines Line] - 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_ strip
- id String
- The provider-assigned unique ID for this managed resource.
- line
Codes List<String> - Line code.
- line
Display List<String>Names - A list of line display names.
- lines List<Property Map>
- A list of cloud resolution line. Each element contains the following attributes:
- domain
Name String - lang String
- line
Names List<String> - output
File String - user
Client StringIp
Supporting Types
GetResolutionLinesLine
- Line
Code string - Line
Display stringName - Line display name.
- Line
Name string - Line name.
- Line
Code string - Line
Display stringName - Line display name.
- Line
Name string - Line name.
- line
Code String - line
Display StringName - Line display name.
- line
Name String - Line name.
- line
Code string - line
Display stringName - Line display name.
- line
Name string - Line name.
- line_
code str - line_
display_ strname - Line display name.
- line_
name str - Line name.
- line
Code String - line
Display StringName - Line display name.
- line
Name 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.