1. Packages
  2. AWS
  3. API Docs
  4. ec2
  5. VpcIpamScope
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.ec2.VpcIpamScope

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Creates a scope for AWS IPAM.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const current = aws.getRegion({});
    const example = new aws.ec2.VpcIpam("example", {operatingRegions: [{
        regionName: current.then(current => current.name),
    }]});
    const exampleVpcIpamScope = new aws.ec2.VpcIpamScope("example", {
        ipamId: example.id,
        description: "Another Scope",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    current = aws.get_region()
    example = aws.ec2.VpcIpam("example", operating_regions=[{
        "region_name": current.name,
    }])
    example_vpc_ipam_scope = aws.ec2.VpcIpamScope("example",
        ipam_id=example.id,
        description="Another Scope")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		current, err := aws.GetRegion(ctx, &aws.GetRegionArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		example, err := ec2.NewVpcIpam(ctx, "example", &ec2.VpcIpamArgs{
    			OperatingRegions: ec2.VpcIpamOperatingRegionArray{
    				&ec2.VpcIpamOperatingRegionArgs{
    					RegionName: pulumi.String(current.Name),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = ec2.NewVpcIpamScope(ctx, "example", &ec2.VpcIpamScopeArgs{
    			IpamId:      example.ID(),
    			Description: pulumi.String("Another Scope"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var current = Aws.GetRegion.Invoke();
    
        var example = new Aws.Ec2.VpcIpam("example", new()
        {
            OperatingRegions = new[]
            {
                new Aws.Ec2.Inputs.VpcIpamOperatingRegionArgs
                {
                    RegionName = current.Apply(getRegionResult => getRegionResult.Name),
                },
            },
        });
    
        var exampleVpcIpamScope = new Aws.Ec2.VpcIpamScope("example", new()
        {
            IpamId = example.Id,
            Description = "Another Scope",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.AwsFunctions;
    import com.pulumi.aws.inputs.GetRegionArgs;
    import com.pulumi.aws.ec2.VpcIpam;
    import com.pulumi.aws.ec2.VpcIpamArgs;
    import com.pulumi.aws.ec2.inputs.VpcIpamOperatingRegionArgs;
    import com.pulumi.aws.ec2.VpcIpamScope;
    import com.pulumi.aws.ec2.VpcIpamScopeArgs;
    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 current = AwsFunctions.getRegion();
    
            var example = new VpcIpam("example", VpcIpamArgs.builder()
                .operatingRegions(VpcIpamOperatingRegionArgs.builder()
                    .regionName(current.applyValue(getRegionResult -> getRegionResult.name()))
                    .build())
                .build());
    
            var exampleVpcIpamScope = new VpcIpamScope("exampleVpcIpamScope", VpcIpamScopeArgs.builder()
                .ipamId(example.id())
                .description("Another Scope")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ec2:VpcIpam
        properties:
          operatingRegions:
            - regionName: ${current.name}
      exampleVpcIpamScope:
        type: aws:ec2:VpcIpamScope
        name: example
        properties:
          ipamId: ${example.id}
          description: Another Scope
    variables:
      current:
        fn::invoke:
          Function: aws:getRegion
          Arguments: {}
    

    Create VpcIpamScope Resource

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

    Constructor syntax

    new VpcIpamScope(name: string, args: VpcIpamScopeArgs, opts?: CustomResourceOptions);
    @overload
    def VpcIpamScope(resource_name: str,
                     args: VpcIpamScopeArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcIpamScope(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     ipam_id: Optional[str] = None,
                     description: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None)
    func NewVpcIpamScope(ctx *Context, name string, args VpcIpamScopeArgs, opts ...ResourceOption) (*VpcIpamScope, error)
    public VpcIpamScope(string name, VpcIpamScopeArgs args, CustomResourceOptions? opts = null)
    public VpcIpamScope(String name, VpcIpamScopeArgs args)
    public VpcIpamScope(String name, VpcIpamScopeArgs args, CustomResourceOptions options)
    
    type: aws:ec2:VpcIpamScope
    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 VpcIpamScopeArgs
    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 VpcIpamScopeArgs
    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 VpcIpamScopeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcIpamScopeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcIpamScopeArgs
    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 vpcIpamScopeResource = new Aws.Ec2.VpcIpamScope("vpcIpamScopeResource", new()
    {
        IpamId = "string",
        Description = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := ec2.NewVpcIpamScope(ctx, "vpcIpamScopeResource", &ec2.VpcIpamScopeArgs{
    	IpamId:      pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var vpcIpamScopeResource = new VpcIpamScope("vpcIpamScopeResource", VpcIpamScopeArgs.builder()
        .ipamId("string")
        .description("string")
        .tags(Map.of("string", "string"))
        .build());
    
    vpc_ipam_scope_resource = aws.ec2.VpcIpamScope("vpcIpamScopeResource",
        ipam_id="string",
        description="string",
        tags={
            "string": "string",
        })
    
    const vpcIpamScopeResource = new aws.ec2.VpcIpamScope("vpcIpamScopeResource", {
        ipamId: "string",
        description: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:ec2:VpcIpamScope
    properties:
        description: string
        ipamId: string
        tags:
            string: string
    

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

    IpamId string
    The ID of the IPAM for which you're creating this scope.
    Description string
    A description for the scope you're creating.
    Tags Dictionary<string, string>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    IpamId string
    The ID of the IPAM for which you're creating this scope.
    Description string
    A description for the scope you're creating.
    Tags map[string]string
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    ipamId String
    The ID of the IPAM for which you're creating this scope.
    description String
    A description for the scope you're creating.
    tags Map<String,String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    ipamId string
    The ID of the IPAM for which you're creating this scope.
    description string
    A description for the scope you're creating.
    tags {[key: string]: string}
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    ipam_id str
    The ID of the IPAM for which you're creating this scope.
    description str
    A description for the scope you're creating.
    tags Mapping[str, str]
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    ipamId String
    The ID of the IPAM for which you're creating this scope.
    description String
    A description for the scope you're creating.
    tags Map<String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    The Amazon Resource Name (ARN) of the scope.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpamArn string
    The ARN of the IPAM for which you're creating this scope.
    IpamScopeType string
    IsDefault bool
    Defines if the scope is the default scope or not.
    PoolCount int
    The number of pools in the scope.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name (ARN) of the scope.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpamArn string
    The ARN of the IPAM for which you're creating this scope.
    IpamScopeType string
    IsDefault bool
    Defines if the scope is the default scope or not.
    PoolCount int
    The number of pools in the scope.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the scope.
    id String
    The provider-assigned unique ID for this managed resource.
    ipamArn String
    The ARN of the IPAM for which you're creating this scope.
    ipamScopeType String
    isDefault Boolean
    Defines if the scope is the default scope or not.
    poolCount Integer
    The number of pools in the scope.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name (ARN) of the scope.
    id string
    The provider-assigned unique ID for this managed resource.
    ipamArn string
    The ARN of the IPAM for which you're creating this scope.
    ipamScopeType string
    isDefault boolean
    Defines if the scope is the default scope or not.
    poolCount number
    The number of pools in the scope.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    The Amazon Resource Name (ARN) of the scope.
    id str
    The provider-assigned unique ID for this managed resource.
    ipam_arn str
    The ARN of the IPAM for which you're creating this scope.
    ipam_scope_type str
    is_default bool
    Defines if the scope is the default scope or not.
    pool_count int
    The number of pools in the scope.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the scope.
    id String
    The provider-assigned unique ID for this managed resource.
    ipamArn String
    The ARN of the IPAM for which you're creating this scope.
    ipamScopeType String
    isDefault Boolean
    Defines if the scope is the default scope or not.
    poolCount Number
    The number of pools in the scope.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    Look up Existing VpcIpamScope Resource

    Get an existing VpcIpamScope 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?: VpcIpamScopeState, opts?: CustomResourceOptions): VpcIpamScope
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            description: Optional[str] = None,
            ipam_arn: Optional[str] = None,
            ipam_id: Optional[str] = None,
            ipam_scope_type: Optional[str] = None,
            is_default: Optional[bool] = None,
            pool_count: Optional[int] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None) -> VpcIpamScope
    func GetVpcIpamScope(ctx *Context, name string, id IDInput, state *VpcIpamScopeState, opts ...ResourceOption) (*VpcIpamScope, error)
    public static VpcIpamScope Get(string name, Input<string> id, VpcIpamScopeState? state, CustomResourceOptions? opts = null)
    public static VpcIpamScope get(String name, Output<String> id, VpcIpamScopeState 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:
    Arn string
    The Amazon Resource Name (ARN) of the scope.
    Description string
    A description for the scope you're creating.
    IpamArn string
    The ARN of the IPAM for which you're creating this scope.
    IpamId string
    The ID of the IPAM for which you're creating this scope.
    IpamScopeType string
    IsDefault bool
    Defines if the scope is the default scope or not.
    PoolCount int
    The number of pools in the scope.
    Tags Dictionary<string, string>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name (ARN) of the scope.
    Description string
    A description for the scope you're creating.
    IpamArn string
    The ARN of the IPAM for which you're creating this scope.
    IpamId string
    The ID of the IPAM for which you're creating this scope.
    IpamScopeType string
    IsDefault bool
    Defines if the scope is the default scope or not.
    PoolCount int
    The number of pools in the scope.
    Tags map[string]string
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the scope.
    description String
    A description for the scope you're creating.
    ipamArn String
    The ARN of the IPAM for which you're creating this scope.
    ipamId String
    The ID of the IPAM for which you're creating this scope.
    ipamScopeType String
    isDefault Boolean
    Defines if the scope is the default scope or not.
    poolCount Integer
    The number of pools in the scope.
    tags Map<String,String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name (ARN) of the scope.
    description string
    A description for the scope you're creating.
    ipamArn string
    The ARN of the IPAM for which you're creating this scope.
    ipamId string
    The ID of the IPAM for which you're creating this scope.
    ipamScopeType string
    isDefault boolean
    Defines if the scope is the default scope or not.
    poolCount number
    The number of pools in the scope.
    tags {[key: string]: string}
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}

    Deprecated: Please use tags instead.

    arn str
    The Amazon Resource Name (ARN) of the scope.
    description str
    A description for the scope you're creating.
    ipam_arn str
    The ARN of the IPAM for which you're creating this scope.
    ipam_id str
    The ID of the IPAM for which you're creating this scope.
    ipam_scope_type str
    is_default bool
    Defines if the scope is the default scope or not.
    pool_count int
    The number of pools in the scope.
    tags Mapping[str, str]
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the scope.
    description String
    A description for the scope you're creating.
    ipamArn String
    The ARN of the IPAM for which you're creating this scope.
    ipamId String
    The ID of the IPAM for which you're creating this scope.
    ipamScopeType String
    isDefault Boolean
    Defines if the scope is the default scope or not.
    poolCount Number
    The number of pools in the scope.
    tags Map<String>
    Key-value mapping of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>

    Deprecated: Please use tags instead.

    Import

    Using pulumi import, import IPAMs using the scope_id. For example:

    $ pulumi import aws:ec2/vpcIpamScope:VpcIpamScope example ipam-scope-0513c69f283d11dfb
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi