1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dns
  5. CustomLine
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.dns.CustomLine

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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=[{
            "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

    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 string
    The name of the Custom Line.
    DomainName 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 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 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 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 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 String
    The Domain name.
    ipSegmentLists 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)
    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.
    The following state arguments are supported:
    CustomLineName string
    The name of the Custom Line.
    DomainName 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 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 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 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 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 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 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.

    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi