1. Packages
  2. Nutanix
  3. API Docs
  4. AddressGroup
Nutanix v0.1.0 published on Tuesday, Sep 24, 2024 by Piers Karsenbarg

nutanix.AddressGroup

Explore with Pulumi AI

nutanix logo
Nutanix v0.1.0 published on Tuesday, Sep 24, 2024 by Piers Karsenbarg

    Provides a resource to create a address group based on the input parameters.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    const testAddress = new nutanix.AddressGroup("testAddress", {
        description: "test address groups resource",
        ipAddressBlockLists: [{
            ip: "10.0.0.0",
            prefixLength: 24,
        }],
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    test_address = nutanix.AddressGroup("testAddress",
        description="test address groups resource",
        ip_address_block_lists=[{
            "ip": "10.0.0.0",
            "prefix_length": 24,
        }])
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := nutanix.NewAddressGroup(ctx, "testAddress", &nutanix.AddressGroupArgs{
    			Description: pulumi.String("test address groups resource"),
    			IpAddressBlockLists: nutanix.AddressGroupIpAddressBlockListArray{
    				&nutanix.AddressGroupIpAddressBlockListArgs{
    					Ip:           pulumi.String("10.0.0.0"),
    					PrefixLength: pulumi.Int(24),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        var testAddress = new Nutanix.AddressGroup("testAddress", new()
        {
            Description = "test address groups resource",
            IpAddressBlockLists = new[]
            {
                new Nutanix.Inputs.AddressGroupIpAddressBlockListArgs
                {
                    Ip = "10.0.0.0",
                    PrefixLength = 24,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.AddressGroup;
    import com.pulumi.nutanix.AddressGroupArgs;
    import com.pulumi.nutanix.inputs.AddressGroupIpAddressBlockListArgs;
    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 testAddress = new AddressGroup("testAddress", AddressGroupArgs.builder()
                .description("test address groups resource")
                .ipAddressBlockLists(AddressGroupIpAddressBlockListArgs.builder()
                    .ip("10.0.0.0")
                    .prefixLength(24)
                    .build())
                .build());
    
        }
    }
    
    resources:
      testAddress:
        type: nutanix:AddressGroup
        properties:
          description: test address groups resource
          ipAddressBlockLists:
            - ip: 10.0.0.0
              prefixLength: 24
    

    Create AddressGroup Resource

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

    Constructor syntax

    new AddressGroup(name: string, args: AddressGroupArgs, opts?: CustomResourceOptions);
    @overload
    def AddressGroup(resource_name: str,
                     args: AddressGroupArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def AddressGroup(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     ip_address_block_lists: Optional[Sequence[AddressGroupIpAddressBlockListArgs]] = None,
                     description: Optional[str] = None,
                     name: Optional[str] = None)
    func NewAddressGroup(ctx *Context, name string, args AddressGroupArgs, opts ...ResourceOption) (*AddressGroup, error)
    public AddressGroup(string name, AddressGroupArgs args, CustomResourceOptions? opts = null)
    public AddressGroup(String name, AddressGroupArgs args)
    public AddressGroup(String name, AddressGroupArgs args, CustomResourceOptions options)
    
    type: nutanix:AddressGroup
    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 AddressGroupArgs
    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 AddressGroupArgs
    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 AddressGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AddressGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AddressGroupArgs
    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 addressGroupResource = new Nutanix.AddressGroup("addressGroupResource", new()
    {
        IpAddressBlockLists = new[]
        {
            new Nutanix.Inputs.AddressGroupIpAddressBlockListArgs
            {
                Ip = "string",
                PrefixLength = 0,
            },
        },
        Description = "string",
        Name = "string",
    });
    
    example, err := nutanix.NewAddressGroup(ctx, "addressGroupResource", &nutanix.AddressGroupArgs{
    	IpAddressBlockLists: nutanix.AddressGroupIpAddressBlockListArray{
    		&nutanix.AddressGroupIpAddressBlockListArgs{
    			Ip:           pulumi.String("string"),
    			PrefixLength: pulumi.Int(0),
    		},
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var addressGroupResource = new AddressGroup("addressGroupResource", AddressGroupArgs.builder()
        .ipAddressBlockLists(AddressGroupIpAddressBlockListArgs.builder()
            .ip("string")
            .prefixLength(0)
            .build())
        .description("string")
        .name("string")
        .build());
    
    address_group_resource = nutanix.AddressGroup("addressGroupResource",
        ip_address_block_lists=[nutanix.AddressGroupIpAddressBlockListArgs(
            ip="string",
            prefix_length=0,
        )],
        description="string",
        name="string")
    
    const addressGroupResource = new nutanix.AddressGroup("addressGroupResource", {
        ipAddressBlockLists: [{
            ip: "string",
            prefixLength: 0,
        }],
        description: "string",
        name: "string",
    });
    
    type: nutanix:AddressGroup
    properties:
        description: string
        ipAddressBlockLists:
            - ip: string
              prefixLength: 0
        name: string
    

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

    IpAddressBlockLists List<PiersKarsenbarg.Nutanix.Inputs.AddressGroupIpAddressBlockList>
    • (Required) list of IP address blocks with their prefix length
    Description string
    • (Optional) Description of the service group
    Name string
    • (Required) Name of the service group
    IpAddressBlockLists []AddressGroupIpAddressBlockListArgs
    • (Required) list of IP address blocks with their prefix length
    Description string
    • (Optional) Description of the service group
    Name string
    • (Required) Name of the service group
    ipAddressBlockLists List<AddressGroupIpAddressBlockList>
    • (Required) list of IP address blocks with their prefix length
    description String
    • (Optional) Description of the service group
    name String
    • (Required) Name of the service group
    ipAddressBlockLists AddressGroupIpAddressBlockList[]
    • (Required) list of IP address blocks with their prefix length
    description string
    • (Optional) Description of the service group
    name string
    • (Required) Name of the service group
    ip_address_block_lists Sequence[AddressGroupIpAddressBlockListArgs]
    • (Required) list of IP address blocks with their prefix length
    description str
    • (Optional) Description of the service group
    name str
    • (Required) Name of the service group
    ipAddressBlockLists List<Property Map>
    • (Required) list of IP address blocks with their prefix length
    description String
    • (Optional) Description of the service group
    name String
    • (Required) Name of the service group

    Outputs

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

    AddressGroupString string
    • (ReadOnly) Address Group string
    Id string
    The provider-assigned unique ID for this managed resource.
    AddressGroupString string
    • (ReadOnly) Address Group string
    Id string
    The provider-assigned unique ID for this managed resource.
    addressGroupString String
    • (ReadOnly) Address Group string
    id String
    The provider-assigned unique ID for this managed resource.
    addressGroupString string
    • (ReadOnly) Address Group string
    id string
    The provider-assigned unique ID for this managed resource.
    address_group_string str
    • (ReadOnly) Address Group string
    id str
    The provider-assigned unique ID for this managed resource.
    addressGroupString String
    • (ReadOnly) Address Group string
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AddressGroup Resource

    Get an existing AddressGroup 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?: AddressGroupState, opts?: CustomResourceOptions): AddressGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address_group_string: Optional[str] = None,
            description: Optional[str] = None,
            ip_address_block_lists: Optional[Sequence[AddressGroupIpAddressBlockListArgs]] = None,
            name: Optional[str] = None) -> AddressGroup
    func GetAddressGroup(ctx *Context, name string, id IDInput, state *AddressGroupState, opts ...ResourceOption) (*AddressGroup, error)
    public static AddressGroup Get(string name, Input<string> id, AddressGroupState? state, CustomResourceOptions? opts = null)
    public static AddressGroup get(String name, Output<String> id, AddressGroupState 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:
    AddressGroupString string
    • (ReadOnly) Address Group string
    Description string
    • (Optional) Description of the service group
    IpAddressBlockLists List<PiersKarsenbarg.Nutanix.Inputs.AddressGroupIpAddressBlockList>
    • (Required) list of IP address blocks with their prefix length
    Name string
    • (Required) Name of the service group
    AddressGroupString string
    • (ReadOnly) Address Group string
    Description string
    • (Optional) Description of the service group
    IpAddressBlockLists []AddressGroupIpAddressBlockListArgs
    • (Required) list of IP address blocks with their prefix length
    Name string
    • (Required) Name of the service group
    addressGroupString String
    • (ReadOnly) Address Group string
    description String
    • (Optional) Description of the service group
    ipAddressBlockLists List<AddressGroupIpAddressBlockList>
    • (Required) list of IP address blocks with their prefix length
    name String
    • (Required) Name of the service group
    addressGroupString string
    • (ReadOnly) Address Group string
    description string
    • (Optional) Description of the service group
    ipAddressBlockLists AddressGroupIpAddressBlockList[]
    • (Required) list of IP address blocks with their prefix length
    name string
    • (Required) Name of the service group
    address_group_string str
    • (ReadOnly) Address Group string
    description str
    • (Optional) Description of the service group
    ip_address_block_lists Sequence[AddressGroupIpAddressBlockListArgs]
    • (Required) list of IP address blocks with their prefix length
    name str
    • (Required) Name of the service group
    addressGroupString String
    • (ReadOnly) Address Group string
    description String
    • (Optional) Description of the service group
    ipAddressBlockLists List<Property Map>
    • (Required) list of IP address blocks with their prefix length
    name String
    • (Required) Name of the service group

    Supporting Types

    AddressGroupIpAddressBlockList, AddressGroupIpAddressBlockListArgs

    Ip string
    • (Required) IP of the address block
    PrefixLength int
    • (Required) Prefix length of address block in int

    See detailed information in Nutanix Address Groups.

    Ip string
    • (Required) IP of the address block
    PrefixLength int
    • (Required) Prefix length of address block in int

    See detailed information in Nutanix Address Groups.

    ip String
    • (Required) IP of the address block
    prefixLength Integer
    • (Required) Prefix length of address block in int

    See detailed information in Nutanix Address Groups.

    ip string
    • (Required) IP of the address block
    prefixLength number
    • (Required) Prefix length of address block in int

    See detailed information in Nutanix Address Groups.

    ip str
    • (Required) IP of the address block
    prefix_length int
    • (Required) Prefix length of address block in int

    See detailed information in Nutanix Address Groups.

    ip String
    • (Required) IP of the address block
    prefixLength Number
    • (Required) Prefix length of address block in int

    See detailed information in Nutanix Address Groups.

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Nutanix v0.1.0 published on Tuesday, Sep 24, 2024 by Piers Karsenbarg