1. Packages
  2. NS1
  3. API Docs
  4. Subnet
NS1 v3.3.0 published on Monday, Jun 24, 2024 by Pulumi

ns1.Subnet

Explore with Pulumi AI

ns1 logo
NS1 v3.3.0 published on Monday, Jun 24, 2024 by Pulumi

    Create Subnet Resource

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

    Constructor syntax

    new Subnet(name: string, args?: SubnetArgs, opts?: CustomResourceOptions);
    @overload
    def Subnet(resource_name: str,
               args: Optional[SubnetArgs] = None,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Subnet(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               children: Optional[int] = None,
               desc: Optional[str] = None,
               dhcp_scoped: Optional[bool] = None,
               free_addresses: Optional[str] = None,
               name: Optional[str] = None,
               network_id: Optional[int] = None,
               parent_id: Optional[int] = None,
               prefix: Optional[str] = None,
               status: Optional[str] = None,
               tags: Optional[Mapping[str, Any]] = None,
               total_addresses: Optional[str] = None,
               used_addresses: Optional[str] = None)
    func NewSubnet(ctx *Context, name string, args *SubnetArgs, opts ...ResourceOption) (*Subnet, error)
    public Subnet(string name, SubnetArgs? args = null, CustomResourceOptions? opts = null)
    public Subnet(String name, SubnetArgs args)
    public Subnet(String name, SubnetArgs args, CustomResourceOptions options)
    
    type: ns1:Subnet
    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 SubnetArgs
    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 SubnetArgs
    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 SubnetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SubnetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SubnetArgs
    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 subnetResource = new Ns1.Subnet("subnetResource", new()
    {
        Children = 0,
        Desc = "string",
        DhcpScoped = false,
        FreeAddresses = "string",
        Name = "string",
        NetworkId = 0,
        ParentId = 0,
        Prefix = "string",
        Status = "string",
        Tags = 
        {
            { "string", "any" },
        },
        TotalAddresses = "string",
        UsedAddresses = "string",
    });
    
    example, err := ns1.NewSubnet(ctx, "subnetResource", &ns1.SubnetArgs{
    	Children:      pulumi.Int(0),
    	Desc:          pulumi.String("string"),
    	DhcpScoped:    pulumi.Bool(false),
    	FreeAddresses: pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	NetworkId:     pulumi.Int(0),
    	ParentId:      pulumi.Int(0),
    	Prefix:        pulumi.String("string"),
    	Status:        pulumi.String("string"),
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	TotalAddresses: pulumi.String("string"),
    	UsedAddresses:  pulumi.String("string"),
    })
    
    var subnetResource = new Subnet("subnetResource", SubnetArgs.builder()
        .children(0)
        .desc("string")
        .dhcpScoped(false)
        .freeAddresses("string")
        .name("string")
        .networkId(0)
        .parentId(0)
        .prefix("string")
        .status("string")
        .tags(Map.of("string", "any"))
        .totalAddresses("string")
        .usedAddresses("string")
        .build());
    
    subnet_resource = ns1.Subnet("subnetResource",
        children=0,
        desc="string",
        dhcp_scoped=False,
        free_addresses="string",
        name="string",
        network_id=0,
        parent_id=0,
        prefix="string",
        status="string",
        tags={
            "string": "any",
        },
        total_addresses="string",
        used_addresses="string")
    
    const subnetResource = new ns1.Subnet("subnetResource", {
        children: 0,
        desc: "string",
        dhcpScoped: false,
        freeAddresses: "string",
        name: "string",
        networkId: 0,
        parentId: 0,
        prefix: "string",
        status: "string",
        tags: {
            string: "any",
        },
        totalAddresses: "string",
        usedAddresses: "string",
    });
    
    type: ns1:Subnet
    properties:
        children: 0
        desc: string
        dhcpScoped: false
        freeAddresses: string
        name: string
        networkId: 0
        parentId: 0
        prefix: string
        status: string
        tags:
            string: any
        totalAddresses: string
        usedAddresses: string
    

    Subnet 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 Subnet resource accepts the following input properties:

    Children int
    Desc string
    DhcpScoped bool
    FreeAddresses string
    Name string
    NetworkId int
    ParentId int
    Prefix string
    Status string
    Tags Dictionary<string, object>
    TotalAddresses string
    UsedAddresses string
    Children int
    Desc string
    DhcpScoped bool
    FreeAddresses string
    Name string
    NetworkId int
    ParentId int
    Prefix string
    Status string
    Tags map[string]interface{}
    TotalAddresses string
    UsedAddresses string
    children Integer
    desc String
    dhcpScoped Boolean
    freeAddresses String
    name String
    networkId Integer
    parentId Integer
    prefix String
    status String
    tags Map<String,Object>
    totalAddresses String
    usedAddresses String
    children number
    desc string
    dhcpScoped boolean
    freeAddresses string
    name string
    networkId number
    parentId number
    prefix string
    status string
    tags {[key: string]: any}
    totalAddresses string
    usedAddresses string
    children Number
    desc String
    dhcpScoped Boolean
    freeAddresses String
    name String
    networkId Number
    parentId Number
    prefix String
    status String
    tags Map<Any>
    totalAddresses String
    usedAddresses String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Subnet 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 Subnet Resource

    Get an existing Subnet 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?: SubnetState, opts?: CustomResourceOptions): Subnet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            children: Optional[int] = None,
            desc: Optional[str] = None,
            dhcp_scoped: Optional[bool] = None,
            free_addresses: Optional[str] = None,
            name: Optional[str] = None,
            network_id: Optional[int] = None,
            parent_id: Optional[int] = None,
            prefix: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None,
            total_addresses: Optional[str] = None,
            used_addresses: Optional[str] = None) -> Subnet
    func GetSubnet(ctx *Context, name string, id IDInput, state *SubnetState, opts ...ResourceOption) (*Subnet, error)
    public static Subnet Get(string name, Input<string> id, SubnetState? state, CustomResourceOptions? opts = null)
    public static Subnet get(String name, Output<String> id, SubnetState 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:
    Children int
    Desc string
    DhcpScoped bool
    FreeAddresses string
    Name string
    NetworkId int
    ParentId int
    Prefix string
    Status string
    Tags Dictionary<string, object>
    TotalAddresses string
    UsedAddresses string
    Children int
    Desc string
    DhcpScoped bool
    FreeAddresses string
    Name string
    NetworkId int
    ParentId int
    Prefix string
    Status string
    Tags map[string]interface{}
    TotalAddresses string
    UsedAddresses string
    children Integer
    desc String
    dhcpScoped Boolean
    freeAddresses String
    name String
    networkId Integer
    parentId Integer
    prefix String
    status String
    tags Map<String,Object>
    totalAddresses String
    usedAddresses String
    children number
    desc string
    dhcpScoped boolean
    freeAddresses string
    name string
    networkId number
    parentId number
    prefix string
    status string
    tags {[key: string]: any}
    totalAddresses string
    usedAddresses string
    children Number
    desc String
    dhcpScoped Boolean
    freeAddresses String
    name String
    networkId Number
    parentId Number
    prefix String
    status String
    tags Map<Any>
    totalAddresses String
    usedAddresses String

    Package Details

    Repository
    NS1 pulumi/pulumi-ns1
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the ns1 Terraform Provider.
    ns1 logo
    NS1 v3.3.0 published on Monday, Jun 24, 2024 by Pulumi