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

alicloud.vpc.IpamIpam

Explore with Pulumi AI

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

    Provides a Vpc Ipam Ipam resource.

    IP Address Management.

    For information about Vpc Ipam Ipam and how to use it, see What is Ipam.

    NOTE: Available since v1.234.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const default = alicloud.resourcemanager.getResourceGroups({});
    const defaultIpamIpam = new alicloud.vpc.IpamIpam("default", {
        ipamDescription: "This is my first Ipam.",
        ipamName: name,
        operatingRegionLists: ["cn-hangzhou"],
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.resourcemanager.get_resource_groups()
    default_ipam_ipam = alicloud.vpc.IpamIpam("default",
        ipam_description="This is my first Ipam.",
        ipam_name=name,
        operating_region_lists=["cn-hangzhou"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := resourcemanager.GetResourceGroups(ctx, &resourcemanager.GetResourceGroupsArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = vpc.NewIpamIpam(ctx, "default", &vpc.IpamIpamArgs{
    			IpamDescription: pulumi.String("This is my first Ipam."),
    			IpamName:        pulumi.String(name),
    			OperatingRegionLists: pulumi.StringArray{
    				pulumi.String("cn-hangzhou"),
    			},
    		})
    		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 config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    
        var defaultIpamIpam = new AliCloud.Vpc.IpamIpam("default", new()
        {
            IpamDescription = "This is my first Ipam.",
            IpamName = name,
            OperatingRegionLists = new[]
            {
                "cn-hangzhou",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
    import com.pulumi.alicloud.resourcemanager.inputs.GetResourceGroupsArgs;
    import com.pulumi.alicloud.vpc.IpamIpam;
    import com.pulumi.alicloud.vpc.IpamIpamArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            final var default = ResourcemanagerFunctions.getResourceGroups();
    
            var defaultIpamIpam = new IpamIpam("defaultIpamIpam", IpamIpamArgs.builder()
                .ipamDescription("This is my first Ipam.")
                .ipamName(name)
                .operatingRegionLists("cn-hangzhou")
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      defaultIpamIpam:
        type: alicloud:vpc:IpamIpam
        name: default
        properties:
          ipamDescription: This is my first Ipam.
          ipamName: ${name}
          operatingRegionLists:
            - cn-hangzhou
    variables:
      default:
        fn::invoke:
          Function: alicloud:resourcemanager:getResourceGroups
          Arguments: {}
    

    Create IpamIpam Resource

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

    Constructor syntax

    new IpamIpam(name: string, args: IpamIpamArgs, opts?: CustomResourceOptions);
    @overload
    def IpamIpam(resource_name: str,
                 args: IpamIpamArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def IpamIpam(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 operating_region_lists: Optional[Sequence[str]] = None,
                 ipam_description: Optional[str] = None,
                 ipam_name: Optional[str] = None,
                 resource_group_id: Optional[str] = None,
                 tags: Optional[Mapping[str, str]] = None)
    func NewIpamIpam(ctx *Context, name string, args IpamIpamArgs, opts ...ResourceOption) (*IpamIpam, error)
    public IpamIpam(string name, IpamIpamArgs args, CustomResourceOptions? opts = null)
    public IpamIpam(String name, IpamIpamArgs args)
    public IpamIpam(String name, IpamIpamArgs args, CustomResourceOptions options)
    
    type: alicloud:vpc:IpamIpam
    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 IpamIpamArgs
    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 IpamIpamArgs
    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 IpamIpamArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpamIpamArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpamIpamArgs
    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 ipamIpamResource = new AliCloud.Vpc.IpamIpam("ipamIpamResource", new()
    {
        OperatingRegionLists = new[]
        {
            "string",
        },
        IpamDescription = "string",
        IpamName = "string",
        ResourceGroupId = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := vpc.NewIpamIpam(ctx, "ipamIpamResource", &vpc.IpamIpamArgs{
    	OperatingRegionLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IpamDescription: pulumi.String("string"),
    	IpamName:        pulumi.String("string"),
    	ResourceGroupId: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var ipamIpamResource = new IpamIpam("ipamIpamResource", IpamIpamArgs.builder()
        .operatingRegionLists("string")
        .ipamDescription("string")
        .ipamName("string")
        .resourceGroupId("string")
        .tags(Map.of("string", "string"))
        .build());
    
    ipam_ipam_resource = alicloud.vpc.IpamIpam("ipamIpamResource",
        operating_region_lists=["string"],
        ipam_description="string",
        ipam_name="string",
        resource_group_id="string",
        tags={
            "string": "string",
        })
    
    const ipamIpamResource = new alicloud.vpc.IpamIpam("ipamIpamResource", {
        operatingRegionLists: ["string"],
        ipamDescription: "string",
        ipamName: "string",
        resourceGroupId: "string",
        tags: {
            string: "string",
        },
    });
    
    type: alicloud:vpc:IpamIpam
    properties:
        ipamDescription: string
        ipamName: string
        operatingRegionLists:
            - string
        resourceGroupId: string
        tags:
            string: string
    

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

    OperatingRegionLists List<string>
    List of IPAM effective regions.
    IpamDescription string

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    IpamName string
    The name of the resource.
    ResourceGroupId string
    The ID of the resource group.
    Tags Dictionary<string, string>
    The tag of the resource.
    OperatingRegionLists []string
    List of IPAM effective regions.
    IpamDescription string

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    IpamName string
    The name of the resource.
    ResourceGroupId string
    The ID of the resource group.
    Tags map[string]string
    The tag of the resource.
    operatingRegionLists List<String>
    List of IPAM effective regions.
    ipamDescription String

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    ipamName String
    The name of the resource.
    resourceGroupId String
    The ID of the resource group.
    tags Map<String,String>
    The tag of the resource.
    operatingRegionLists string[]
    List of IPAM effective regions.
    ipamDescription string

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    ipamName string
    The name of the resource.
    resourceGroupId string
    The ID of the resource group.
    tags {[key: string]: string}
    The tag of the resource.
    operating_region_lists Sequence[str]
    List of IPAM effective regions.
    ipam_description str

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    ipam_name str
    The name of the resource.
    resource_group_id str
    The ID of the resource group.
    tags Mapping[str, str]
    The tag of the resource.
    operatingRegionLists List<String>
    List of IPAM effective regions.
    ipamDescription String

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    ipamName String
    The name of the resource.
    resourceGroupId String
    The ID of the resource group.
    tags Map<String>
    The tag of the resource.

    Outputs

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

    CreateTime string
    The creation time of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    PrivateDefaultScopeId string
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    RegionId string
    The region ID of the resource.
    Status string
    The status of the resource.
    CreateTime string
    The creation time of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    PrivateDefaultScopeId string
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    RegionId string
    The region ID of the resource.
    Status string
    The status of the resource.
    createTime String
    The creation time of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    privateDefaultScopeId String
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    regionId String
    The region ID of the resource.
    status String
    The status of the resource.
    createTime string
    The creation time of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    privateDefaultScopeId string
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    regionId string
    The region ID of the resource.
    status string
    The status of the resource.
    create_time str
    The creation time of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    private_default_scope_id str
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    region_id str
    The region ID of the resource.
    status str
    The status of the resource.
    createTime String
    The creation time of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    privateDefaultScopeId String
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    regionId String
    The region ID of the resource.
    status String
    The status of the resource.

    Look up Existing IpamIpam Resource

    Get an existing IpamIpam 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?: IpamIpamState, opts?: CustomResourceOptions): IpamIpam
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            ipam_description: Optional[str] = None,
            ipam_name: Optional[str] = None,
            operating_region_lists: Optional[Sequence[str]] = None,
            private_default_scope_id: Optional[str] = None,
            region_id: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None) -> IpamIpam
    func GetIpamIpam(ctx *Context, name string, id IDInput, state *IpamIpamState, opts ...ResourceOption) (*IpamIpam, error)
    public static IpamIpam Get(string name, Input<string> id, IpamIpamState? state, CustomResourceOptions? opts = null)
    public static IpamIpam get(String name, Output<String> id, IpamIpamState 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:
    CreateTime string
    The creation time of the resource.
    IpamDescription string

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    IpamName string
    The name of the resource.
    OperatingRegionLists List<string>
    List of IPAM effective regions.
    PrivateDefaultScopeId string
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    RegionId string
    The region ID of the resource.
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the resource.
    Tags Dictionary<string, string>
    The tag of the resource.
    CreateTime string
    The creation time of the resource.
    IpamDescription string

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    IpamName string
    The name of the resource.
    OperatingRegionLists []string
    List of IPAM effective regions.
    PrivateDefaultScopeId string
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    RegionId string
    The region ID of the resource.
    ResourceGroupId string
    The ID of the resource group.
    Status string
    The status of the resource.
    Tags map[string]string
    The tag of the resource.
    createTime String
    The creation time of the resource.
    ipamDescription String

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    ipamName String
    The name of the resource.
    operatingRegionLists List<String>
    List of IPAM effective regions.
    privateDefaultScopeId String
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    regionId String
    The region ID of the resource.
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the resource.
    tags Map<String,String>
    The tag of the resource.
    createTime string
    The creation time of the resource.
    ipamDescription string

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    ipamName string
    The name of the resource.
    operatingRegionLists string[]
    List of IPAM effective regions.
    privateDefaultScopeId string
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    regionId string
    The region ID of the resource.
    resourceGroupId string
    The ID of the resource group.
    status string
    The status of the resource.
    tags {[key: string]: string}
    The tag of the resource.
    create_time str
    The creation time of the resource.
    ipam_description str

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    ipam_name str
    The name of the resource.
    operating_region_lists Sequence[str]
    List of IPAM effective regions.
    private_default_scope_id str
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    region_id str
    The region ID of the resource.
    resource_group_id str
    The ID of the resource group.
    status str
    The status of the resource.
    tags Mapping[str, str]
    The tag of the resource.
    createTime String
    The creation time of the resource.
    ipamDescription String

    The description of IPAM.

    It must be 2 to 256 characters in length and must start with an uppercase letter or a Chinese character, but cannot start with 'http: // 'or 'https. If the description is not filled in, it is blank. The default value is blank.

    ipamName String
    The name of the resource.
    operatingRegionLists List<String>
    List of IPAM effective regions.
    privateDefaultScopeId String
    After an IPAM is created, the scope of the private network IPAM created by the system by default.
    regionId String
    The region ID of the resource.
    resourceGroupId String
    The ID of the resource group.
    status String
    The status of the resource.
    tags Map<String>
    The tag of the resource.

    Import

    Vpc Ipam Ipam can be imported using the id, e.g.

    $ pulumi import alicloud:vpc/ipamIpam:IpamIpam 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