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

alicloud.dns.CustomLine

Explore with Pulumi AI

Provides a Alidns Custom Line resource.

For information about Alidns Custom Line and how to use it, see What is Custom Line.

NOTE: Available since v1.151.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = new alicloud.dns.CustomLine("default", {
    customLineName: "tf-example",
    domainName: "alicloud-provider.com",
    ipSegmentLists: [{
        startIp: "192.0.2.123",
        endIp: "192.0.2.125",
    }],
});
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.dns.CustomLine("default",
    custom_line_name="tf-example",
    domain_name="alicloud-provider.com",
    ip_segment_lists=[{
        "start_ip": "192.0.2.123",
        "end_ip": "192.0.2.125",
    }])
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 {
		_, err := dns.NewCustomLine(ctx, "default", &dns.CustomLineArgs{
			CustomLineName: pulumi.String("tf-example"),
			DomainName:     pulumi.String("alicloud-provider.com"),
			IpSegmentLists: dns.CustomLineIpSegmentListArray{
				&dns.CustomLineIpSegmentListArgs{
					StartIp: pulumi.String("192.0.2.123"),
					EndIp:   pulumi.String("192.0.2.125"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = new AliCloud.Dns.CustomLine("default", new()
    {
        CustomLineName = "tf-example",
        DomainName = "alicloud-provider.com",
        IpSegmentLists = new[]
        {
            new AliCloud.Dns.Inputs.CustomLineIpSegmentListArgs
            {
                StartIp = "192.0.2.123",
                EndIp = "192.0.2.125",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dns.CustomLine;
import com.pulumi.alicloud.dns.CustomLineArgs;
import com.pulumi.alicloud.dns.inputs.CustomLineIpSegmentListArgs;
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) {
        var default_ = new CustomLine("default", CustomLineArgs.builder()
            .customLineName("tf-example")
            .domainName("alicloud-provider.com")
            .ipSegmentLists(CustomLineIpSegmentListArgs.builder()
                .startIp("192.0.2.123")
                .endIp("192.0.2.125")
                .build())
            .build());

    }
}
Copy
resources:
  default:
    type: alicloud:dns:CustomLine
    properties:
      customLineName: tf-example
      domainName: alicloud-provider.com
      ipSegmentLists:
        - startIp: 192.0.2.123
          endIp: 192.0.2.125
Copy

Create CustomLine Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new CustomLine(name: string, args: CustomLineArgs, opts?: CustomResourceOptions);
@overload
def CustomLine(resource_name: str,
               args: CustomLineArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def CustomLine(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               custom_line_name: Optional[str] = None,
               domain_name: Optional[str] = None,
               ip_segment_lists: Optional[Sequence[CustomLineIpSegmentListArgs]] = None,
               lang: Optional[str] = None)
func NewCustomLine(ctx *Context, name string, args CustomLineArgs, opts ...ResourceOption) (*CustomLine, error)
public CustomLine(string name, CustomLineArgs args, CustomResourceOptions? opts = null)
public CustomLine(String name, CustomLineArgs args)
public CustomLine(String name, CustomLineArgs args, CustomResourceOptions options)
type: alicloud:dns:CustomLine
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. CustomLineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. CustomLineArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. CustomLineArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. CustomLineArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. CustomLineArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var customLineResource = new AliCloud.Dns.CustomLine("customLineResource", new()
{
    CustomLineName = "string",
    DomainName = "string",
    IpSegmentLists = new[]
    {
        new AliCloud.Dns.Inputs.CustomLineIpSegmentListArgs
        {
            EndIp = "string",
            StartIp = "string",
        },
    },
    Lang = "string",
});
Copy
example, err := dns.NewCustomLine(ctx, "customLineResource", &dns.CustomLineArgs{
	CustomLineName: pulumi.String("string"),
	DomainName:     pulumi.String("string"),
	IpSegmentLists: dns.CustomLineIpSegmentListArray{
		&dns.CustomLineIpSegmentListArgs{
			EndIp:   pulumi.String("string"),
			StartIp: pulumi.String("string"),
		},
	},
	Lang: pulumi.String("string"),
})
Copy
var customLineResource = new CustomLine("customLineResource", CustomLineArgs.builder()
    .customLineName("string")
    .domainName("string")
    .ipSegmentLists(CustomLineIpSegmentListArgs.builder()
        .endIp("string")
        .startIp("string")
        .build())
    .lang("string")
    .build());
Copy
custom_line_resource = alicloud.dns.CustomLine("customLineResource",
    custom_line_name="string",
    domain_name="string",
    ip_segment_lists=[{
        "end_ip": "string",
        "start_ip": "string",
    }],
    lang="string")
Copy
const customLineResource = new alicloud.dns.CustomLine("customLineResource", {
    customLineName: "string",
    domainName: "string",
    ipSegmentLists: [{
        endIp: "string",
        startIp: "string",
    }],
    lang: "string",
});
Copy
type: alicloud:dns:CustomLine
properties:
    customLineName: string
    domainName: string
    ipSegmentLists:
        - endIp: string
          startIp: string
    lang: string
Copy

CustomLine Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The CustomLine resource accepts the following input properties:

CustomLineName This property is required. string
The name of the Custom Line.
DomainName
This property is required.
Changes to this property will trigger replacement.
string
The Domain name.
IpSegmentLists This property is required. List<Pulumi.AliCloud.Dns.Inputs.CustomLineIpSegmentList>
The IP segment list. See ip_segment_list below for details.
Lang string
The lang.
CustomLineName This property is required. string
The name of the Custom Line.
DomainName
This property is required.
Changes to this property will trigger replacement.
string
The Domain name.
IpSegmentLists This property is required. []CustomLineIpSegmentListArgs
The IP segment list. See ip_segment_list below for details.
Lang string
The lang.
customLineName This property is required. String
The name of the Custom Line.
domainName
This property is required.
Changes to this property will trigger replacement.
String
The Domain name.
ipSegmentLists This property is required. List<CustomLineIpSegmentList>
The IP segment list. See ip_segment_list below for details.
lang String
The lang.
customLineName This property is required. string
The name of the Custom Line.
domainName
This property is required.
Changes to this property will trigger replacement.
string
The Domain name.
ipSegmentLists This property is required. CustomLineIpSegmentList[]
The IP segment list. See ip_segment_list below for details.
lang string
The lang.
custom_line_name This property is required. str
The name of the Custom Line.
domain_name
This property is required.
Changes to this property will trigger replacement.
str
The Domain name.
ip_segment_lists This property is required. Sequence[CustomLineIpSegmentListArgs]
The IP segment list. See ip_segment_list below for details.
lang str
The lang.
customLineName This property is required. String
The name of the Custom Line.
domainName
This property is required.
Changes to this property will trigger replacement.
String
The Domain name.
ipSegmentLists This property is required. List<Property Map>
The IP segment list. See ip_segment_list below for details.
lang String
The lang.

Outputs

All input properties are implicitly available as output properties. Additionally, the CustomLine resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing CustomLine Resource

Get an existing CustomLine resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: CustomLineState, opts?: CustomResourceOptions): CustomLine
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        custom_line_name: Optional[str] = None,
        domain_name: Optional[str] = None,
        ip_segment_lists: Optional[Sequence[CustomLineIpSegmentListArgs]] = None,
        lang: Optional[str] = None) -> CustomLine
func GetCustomLine(ctx *Context, name string, id IDInput, state *CustomLineState, opts ...ResourceOption) (*CustomLine, error)
public static CustomLine Get(string name, Input<string> id, CustomLineState? state, CustomResourceOptions? opts = null)
public static CustomLine get(String name, Output<String> id, CustomLineState state, CustomResourceOptions options)
resources:  _:    type: alicloud:dns:CustomLine    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CustomLineName string
The name of the Custom Line.
DomainName Changes to this property will trigger replacement. string
The Domain name.
IpSegmentLists List<Pulumi.AliCloud.Dns.Inputs.CustomLineIpSegmentList>
The IP segment list. See ip_segment_list below for details.
Lang string
The lang.
CustomLineName string
The name of the Custom Line.
DomainName Changes to this property will trigger replacement. string
The Domain name.
IpSegmentLists []CustomLineIpSegmentListArgs
The IP segment list. See ip_segment_list below for details.
Lang string
The lang.
customLineName String
The name of the Custom Line.
domainName Changes to this property will trigger replacement. String
The Domain name.
ipSegmentLists List<CustomLineIpSegmentList>
The IP segment list. See ip_segment_list below for details.
lang String
The lang.
customLineName string
The name of the Custom Line.
domainName Changes to this property will trigger replacement. string
The Domain name.
ipSegmentLists CustomLineIpSegmentList[]
The IP segment list. See ip_segment_list below for details.
lang string
The lang.
custom_line_name str
The name of the Custom Line.
domain_name Changes to this property will trigger replacement. str
The Domain name.
ip_segment_lists Sequence[CustomLineIpSegmentListArgs]
The IP segment list. See ip_segment_list below for details.
lang str
The lang.
customLineName String
The name of the Custom Line.
domainName Changes to this property will trigger replacement. String
The Domain name.
ipSegmentLists List<Property Map>
The IP segment list. See ip_segment_list below for details.
lang String
The lang.

Supporting Types

CustomLineIpSegmentList
, CustomLineIpSegmentListArgs

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.

Import

Alidns Custom Line can be imported using the id, e.g.

$ pulumi import alicloud:dns/customLine:CustomLine example <id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.