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",
}],
});
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",
}])
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
})
}
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",
},
},
});
});
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());
}
}
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
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 string
- The unique name of the resource.
- args CustomLineArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args CustomLineArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CustomLineArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var customLineResource = new CustomLine("customLineResource", CustomLineArgs.builder()
.customLineName("string")
.domainName("string")
.ipSegmentLists(CustomLineIpSegmentListArgs.builder()
.endIp("string")
.startIp("string")
.build())
.lang("string")
.build());
custom_line_resource = alicloud.dns.CustomLine("customLineResource",
custom_line_name="string",
domain_name="string",
ip_segment_lists=[alicloud.dns.CustomLineIpSegmentListArgs(
end_ip="string",
start_ip="string",
)],
lang="string")
const customLineResource = new alicloud.dns.CustomLine("customLineResource", {
customLineName: "string",
domainName: "string",
ipSegmentLists: [{
endIp: "string",
startIp: "string",
}],
lang: "string",
});
type: alicloud:dns:CustomLine
properties:
customLineName: string
domainName: string
ipSegmentLists:
- endIp: string
startIp: string
lang: string
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
The CustomLine resource accepts the following input properties:
- Custom
Line stringName - The name of the Custom Line.
- Domain
Name string - The Domain name.
- Ip
Segment List<Pulumi.Lists Ali Cloud. Dns. Inputs. Custom Line Ip Segment List> - The IP segment list. See
ip_segment_list
below for details. - Lang string
- The lang.
- Custom
Line stringName - The name of the Custom Line.
- Domain
Name string - The Domain name.
- Ip
Segment []CustomLists Line Ip Segment List Args - The IP segment list. See
ip_segment_list
below for details. - Lang string
- The lang.
- custom
Line StringName - The name of the Custom Line.
- domain
Name String - The Domain name.
- ip
Segment List<CustomLists Line Ip Segment List> - The IP segment list. See
ip_segment_list
below for details. - lang String
- The lang.
- custom
Line stringName - The name of the Custom Line.
- domain
Name string - The Domain name.
- ip
Segment CustomLists Line Ip Segment List[] - The IP segment list. See
ip_segment_list
below for details. - lang string
- The lang.
- custom_
line_ strname - The name of the Custom Line.
- domain_
name str - The Domain name.
- ip_
segment_ Sequence[Customlists Line Ip Segment List Args] - The IP segment list. See
ip_segment_list
below for details. - lang str
- The lang.
- custom
Line StringName - The name of the Custom Line.
- domain
Name String - The Domain name.
- ip
Segment List<Property Map>Lists - 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)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Custom
Line stringName - The name of the Custom Line.
- Domain
Name string - The Domain name.
- Ip
Segment List<Pulumi.Lists Ali Cloud. Dns. Inputs. Custom Line Ip Segment List> - The IP segment list. See
ip_segment_list
below for details. - Lang string
- The lang.
- Custom
Line stringName - The name of the Custom Line.
- Domain
Name string - The Domain name.
- Ip
Segment []CustomLists Line Ip Segment List Args - The IP segment list. See
ip_segment_list
below for details. - Lang string
- The lang.
- custom
Line StringName - The name of the Custom Line.
- domain
Name String - The Domain name.
- ip
Segment List<CustomLists Line Ip Segment List> - The IP segment list. See
ip_segment_list
below for details. - lang String
- The lang.
- custom
Line stringName - The name of the Custom Line.
- domain
Name string - The Domain name.
- ip
Segment CustomLists Line Ip Segment List[] - The IP segment list. See
ip_segment_list
below for details. - lang string
- The lang.
- custom_
line_ strname - The name of the Custom Line.
- domain_
name str - The Domain name.
- ip_
segment_ Sequence[Customlists Line Ip Segment List Args] - The IP segment list. See
ip_segment_list
below for details. - lang str
- The lang.
- custom
Line StringName - The name of the Custom Line.
- domain
Name String - The Domain name.
- ip
Segment List<Property Map>Lists - The IP segment list. See
ip_segment_list
below for details. - lang String
- The lang.
Supporting Types
CustomLineIpSegmentList, CustomLineIpSegmentListArgs
Import
Alidns Custom Line can be imported using the id, e.g.
$ pulumi import alicloud:dns/customLine:CustomLine example <id>
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.