alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.dns.getCustomLines

This data source provides the Alidns Custom Lines of the current Alibaba Cloud user.

NOTE: Available in v1.151.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Dns.GetCustomLines.Invoke(new()
    {
        EnableDetails = true,
        DomainName = "your_domain_name",
    });

    return new Dictionary<string, object?>
    {
        ["alidnsCustomLineId1"] = ids.Apply(getCustomLinesResult => getCustomLinesResult.Lines[0]?.Id),
    };
});
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 {
		ids, err := dns.GetCustomLines(ctx, &dns.GetCustomLinesArgs{
			EnableDetails: pulumi.BoolRef(true),
			DomainName:    "your_domain_name",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("alidnsCustomLineId1", ids.Lines[0].Id)
		return nil
	})
}
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.GetCustomLinesArgs;
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 ids = DnsFunctions.getCustomLines(GetCustomLinesArgs.builder()
            .enableDetails(true)
            .domainName("your_domain_name")
            .build());

        ctx.export("alidnsCustomLineId1", ids.applyValue(getCustomLinesResult -> getCustomLinesResult.lines()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.dns.get_custom_lines(enable_details=True,
    domain_name="your_domain_name")
pulumi.export("alidnsCustomLineId1", ids.lines[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.dns.getCustomLines({
    enableDetails: true,
    domainName: "your_domain_name",
});
export const alidnsCustomLineId1 = ids.then(ids => ids.lines?.[0]?.id);
variables:
  ids:
    fn::invoke:
      Function: alicloud:dns:getCustomLines
      Arguments:
        enableDetails: true
        domainName: your_domain_name
outputs:
  alidnsCustomLineId1: ${ids.lines[0].id}

Using getCustomLines

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 getCustomLines(args: GetCustomLinesArgs, opts?: InvokeOptions): Promise<GetCustomLinesResult>
function getCustomLinesOutput(args: GetCustomLinesOutputArgs, opts?: InvokeOptions): Output<GetCustomLinesResult>
def get_custom_lines(domain_name: Optional[str] = None,
                     enable_details: Optional[bool] = None,
                     ids: Optional[Sequence[str]] = None,
                     lang: Optional[str] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetCustomLinesResult
def get_custom_lines_output(domain_name: Optional[pulumi.Input[str]] = None,
                     enable_details: Optional[pulumi.Input[bool]] = None,
                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     lang: Optional[pulumi.Input[str]] = None,
                     name_regex: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetCustomLinesResult]
func GetCustomLines(ctx *Context, args *GetCustomLinesArgs, opts ...InvokeOption) (*GetCustomLinesResult, error)
func GetCustomLinesOutput(ctx *Context, args *GetCustomLinesOutputArgs, opts ...InvokeOption) GetCustomLinesResultOutput

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

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

The following arguments are supported:

DomainName string

The Domain name.

EnableDetails bool

Default to false. Set it to true can output more details about resource attributes.

Ids List<string>

A list of Custom Line IDs.

Lang string

The lang.

NameRegex string

A regex string to filter results by Custom Line name.

OutputFile string
DomainName string

The Domain name.

EnableDetails bool

Default to false. Set it to true can output more details about resource attributes.

Ids []string

A list of Custom Line IDs.

Lang string

The lang.

NameRegex string

A regex string to filter results by Custom Line name.

OutputFile string
domainName String

The Domain name.

enableDetails Boolean

Default to false. Set it to true can output more details about resource attributes.

ids List<String>

A list of Custom Line IDs.

lang String

The lang.

nameRegex String

A regex string to filter results by Custom Line name.

outputFile String
domainName string

The Domain name.

enableDetails boolean

Default to false. Set it to true can output more details about resource attributes.

ids string[]

A list of Custom Line IDs.

lang string

The lang.

nameRegex string

A regex string to filter results by Custom Line name.

outputFile string
domain_name str

The Domain name.

enable_details bool

Default to false. Set it to true can output more details about resource attributes.

ids Sequence[str]

A list of Custom Line IDs.

lang str

The lang.

name_regex str

A regex string to filter results by Custom Line name.

output_file str
domainName String

The Domain name.

enableDetails Boolean

Default to false. Set it to true can output more details about resource attributes.

ids List<String>

A list of Custom Line IDs.

lang String

The lang.

nameRegex String

A regex string to filter results by Custom Line name.

outputFile String

getCustomLines Result

The following output properties are available:

DomainName string
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Lines List<Pulumi.AliCloud.Dns.Outputs.GetCustomLinesLine>
Names List<string>
EnableDetails bool
Lang string
NameRegex string
OutputFile string
DomainName string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Lines []GetCustomLinesLine
Names []string
EnableDetails bool
Lang string
NameRegex string
OutputFile string
domainName String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
lines List<GetCustomLinesLine>
names List<String>
enableDetails Boolean
lang String
nameRegex String
outputFile String
domainName string
id string

The provider-assigned unique ID for this managed resource.

ids string[]
lines GetCustomLinesLine[]
names string[]
enableDetails boolean
lang string
nameRegex string
outputFile string
domain_name str
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
lines Sequence[GetCustomLinesLine]
names Sequence[str]
enable_details bool
lang str
name_regex str
output_file str
domainName String
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
lines List<Property Map>
names List<String>
enableDetails Boolean
lang String
nameRegex String
outputFile String

Supporting Types

GetCustomLinesLine

Code string

The Custom line Code.

CustomLineId string

The first ID of the resource.

CustomLineName string

Line name.

DomainName string

The Domain name.

Id string

The ID of the Custom Line.

IpSegmentLists List<Pulumi.AliCloud.Dns.Inputs.GetCustomLinesLineIpSegmentList>

The IP segment list.

Code string

The Custom line Code.

CustomLineId string

The first ID of the resource.

CustomLineName string

Line name.

DomainName string

The Domain name.

Id string

The ID of the Custom Line.

IpSegmentLists []GetCustomLinesLineIpSegmentList

The IP segment list.

code String

The Custom line Code.

customLineId String

The first ID of the resource.

customLineName String

Line name.

domainName String

The Domain name.

id String

The ID of the Custom Line.

ipSegmentLists List<GetCustomLinesLineIpSegmentList>

The IP segment list.

code string

The Custom line Code.

customLineId string

The first ID of the resource.

customLineName string

Line name.

domainName string

The Domain name.

id string

The ID of the Custom Line.

ipSegmentLists GetCustomLinesLineIpSegmentList[]

The IP segment list.

code str

The Custom line Code.

custom_line_id str

The first ID of the resource.

custom_line_name str

Line name.

domain_name str

The Domain name.

id str

The ID of the Custom Line.

ip_segment_lists Sequence[GetCustomLinesLineIpSegmentList]

The IP segment list.

code String

The Custom line Code.

customLineId String

The first ID of the resource.

customLineName String

Line name.

domainName String

The Domain name.

id String

The ID of the Custom Line.

ipSegmentLists List<Property Map>

The IP segment list.

GetCustomLinesLineIpSegmentList

EndIp string

The end IP address of the CIDR block.

StartIp string

The start IP address of the CIDR block.

EndIp string

The end IP address of the CIDR block.

StartIp string

The start IP address of the CIDR block.

endIp String

The end IP address of the CIDR block.

startIp String

The start IP address of the CIDR block.

endIp string

The end IP address of the CIDR block.

startIp string

The start IP address of the CIDR block.

end_ip str

The end IP address of the CIDR block.

start_ip str

The start IP address of the CIDR block.

endIp String

The end IP address of the CIDR block.

startIp String

The start IP address of the CIDR block.

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.