1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dns
  5. getCustomLines
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.dns.getCustomLines

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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

NOTE: Available in v1.151.0+.

Example Usage

Basic Usage

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);
Copy
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)
Copy
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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
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),
    };
});
Copy
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()));
    }
}
Copy
variables:
  ids:
    fn::invoke:
      function: alicloud:dns:getCustomLines
      arguments:
        enableDetails: true
        domainName: your_domain_name
outputs:
  alidnsCustomLineId1: ${ids.lines[0].id}
Copy

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>
Copy
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]
Copy
func GetCustomLines(ctx *Context, args *GetCustomLinesArgs, opts ...InvokeOption) (*GetCustomLinesResult, error)
func GetCustomLinesOutput(ctx *Context, args *GetCustomLinesOutputArgs, opts ...InvokeOption) GetCustomLinesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetCustomLinesResult> getCustomLines(GetCustomLinesArgs args, InvokeOptions options)
public static Output<GetCustomLinesResult> getCustomLines(GetCustomLinesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:dns/getCustomLines:getCustomLines
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DomainName
This property is required.
Changes to this property will trigger replacement.
string
The Domain name.
EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids Changes to this property will trigger replacement. List<string>
A list of Custom Line IDs.
Lang Changes to this property will trigger replacement. string
The lang.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Custom Line name.
OutputFile string
File name where to save data source results (after running pulumi preview).
DomainName
This property is required.
Changes to this property will trigger replacement.
string
The Domain name.
EnableDetails bool
Default to false. Set it to true can output more details about resource attributes.
Ids Changes to this property will trigger replacement. []string
A list of Custom Line IDs.
Lang Changes to this property will trigger replacement. string
The lang.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Custom Line name.
OutputFile string
File name where to save data source results (after running pulumi preview).
domainName
This property is required.
Changes to this property will trigger replacement.
String
The Domain name.
enableDetails Boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. List<String>
A list of Custom Line IDs.
lang Changes to this property will trigger replacement. String
The lang.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Custom Line name.
outputFile String
File name where to save data source results (after running pulumi preview).
domainName
This property is required.
Changes to this property will trigger replacement.
string
The Domain name.
enableDetails boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. string[]
A list of Custom Line IDs.
lang Changes to this property will trigger replacement. string
The lang.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Custom Line name.
outputFile string
File name where to save data source results (after running pulumi preview).
domain_name
This property is required.
Changes to this property will trigger replacement.
str
The Domain name.
enable_details bool
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Custom Line IDs.
lang Changes to this property will trigger replacement. str
The lang.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Custom Line name.
output_file str
File name where to save data source results (after running pulumi preview).
domainName
This property is required.
Changes to this property will trigger replacement.
String
The Domain name.
enableDetails Boolean
Default to false. Set it to true can output more details about resource attributes.
ids Changes to this property will trigger replacement. List<String>
A list of Custom Line IDs.
lang Changes to this property will trigger replacement. String
The lang.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Custom Line name.
outputFile String
File name where to save data source results (after running pulumi preview).

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 This property is required. string
The Custom line Code.
CustomLineId This property is required. string
The first ID of the resource.
CustomLineName This property is required. string
Line name.
DomainName This property is required. string
The Domain name.
Id This property is required. string
The ID of the Custom Line.
IpSegmentLists This property is required. List<Pulumi.AliCloud.Dns.Inputs.GetCustomLinesLineIpSegmentList>
The IP segment list.
Code This property is required. string
The Custom line Code.
CustomLineId This property is required. string
The first ID of the resource.
CustomLineName This property is required. string
Line name.
DomainName This property is required. string
The Domain name.
Id This property is required. string
The ID of the Custom Line.
IpSegmentLists This property is required. []GetCustomLinesLineIpSegmentList
The IP segment list.
code This property is required. String
The Custom line Code.
customLineId This property is required. String
The first ID of the resource.
customLineName This property is required. String
Line name.
domainName This property is required. String
The Domain name.
id This property is required. String
The ID of the Custom Line.
ipSegmentLists This property is required. List<GetCustomLinesLineIpSegmentList>
The IP segment list.
code This property is required. string
The Custom line Code.
customLineId This property is required. string
The first ID of the resource.
customLineName This property is required. string
Line name.
domainName This property is required. string
The Domain name.
id This property is required. string
The ID of the Custom Line.
ipSegmentLists This property is required. GetCustomLinesLineIpSegmentList[]
The IP segment list.
code This property is required. str
The Custom line Code.
custom_line_id This property is required. str
The first ID of the resource.
custom_line_name This property is required. str
Line name.
domain_name This property is required. str
The Domain name.
id This property is required. str
The ID of the Custom Line.
ip_segment_lists This property is required. Sequence[GetCustomLinesLineIpSegmentList]
The IP segment list.
code This property is required. String
The Custom line Code.
customLineId This property is required. String
The first ID of the resource.
customLineName This property is required. String
Line name.
domainName This property is required. String
The Domain name.
id This property is required. String
The ID of the Custom Line.
ipSegmentLists This property is required. List<Property Map>
The IP segment list.

GetCustomLinesLineIpSegmentList

EndIp This property is required. string
The end IP address of the CIDR block.
StartIp This property is required. string
The start IP address of the CIDR block.
EndIp This property is required. string
The end IP address of the CIDR block.
StartIp This property is required. string
The start IP address of the CIDR block.
endIp This property is required. String
The end IP address of the CIDR block.
startIp This property is required. String
The start IP address of the CIDR block.
endIp This property is required. string
The end IP address of the CIDR block.
startIp This property is required. string
The start IP address of the CIDR block.
end_ip This property is required. str
The end IP address of the CIDR block.
start_ip This property is required. str
The start IP address of the CIDR block.
endIp This property is required. String
The end IP address of the CIDR block.
startIp This property is required. 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi