1. Packages
  2. AWS Native
  3. API Docs
  4. ec2
  5. getVpc

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

aws-native.ec2.getVpc

Explore with Pulumi AI

aws-native logo

We recommend new projects start with resources from the AWS provider.

AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi

    Specifies a virtual private cloud (VPC). To add an IPv6 CIDR block to the VPC, see AWS::EC2::VPCCidrBlock. For more information, see Virtual private clouds (VPC) in the Amazon VPC User Guide.

    Using getVpc

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getVpc(args: GetVpcArgs, opts?: InvokeOptions): Promise<GetVpcResult>
    function getVpcOutput(args: GetVpcOutputArgs, opts?: InvokeOptions): Output<GetVpcResult>
    def get_vpc(vpc_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetVpcResult
    def get_vpc_output(vpc_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetVpcResult]
    func LookupVpc(ctx *Context, args *LookupVpcArgs, opts ...InvokeOption) (*LookupVpcResult, error)
    func LookupVpcOutput(ctx *Context, args *LookupVpcOutputArgs, opts ...InvokeOption) LookupVpcResultOutput

    > Note: This function is named LookupVpc in the Go SDK.

    public static class GetVpc 
    {
        public static Task<GetVpcResult> InvokeAsync(GetVpcArgs args, InvokeOptions? opts = null)
        public static Output<GetVpcResult> Invoke(GetVpcInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpcResult> getVpc(GetVpcArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws-native:ec2:getVpc
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VpcId string
    The ID of the VPC.
    VpcId string
    The ID of the VPC.
    vpcId String
    The ID of the VPC.
    vpcId string
    The ID of the VPC.
    vpc_id str
    The ID of the VPC.
    vpcId String
    The ID of the VPC.

    getVpc Result

    The following output properties are available:

    CidrBlockAssociations List<string>
    The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
    DefaultNetworkAcl string
    The ID of the default network ACL for the VPC. For example, acl-814dafe3.
    DefaultSecurityGroup string
    The ID of the default security group for the VPC. For example, sg-b178e0d3.
    EnableDnsHostnames bool
    Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see DNS attributes in your VPC. You can only enable DNS hostnames if you've enabled DNS support.
    EnableDnsSupport bool
    Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see DNS attributes in your VPC.
    InstanceTenancy string

    The allowed tenancy of instances launched into the VPC.

    • default: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.
    • dedicated: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy of host during instance launch. You cannot specify a tenancy of default during instance launch.

    Updating InstanceTenancy requires no replacement only if you are updating its value from dedicated to default. Updating InstanceTenancy from default to dedicated requires replacement.

    Ipv6CidrBlocks List<string>
    The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
    Tags List<Pulumi.AwsNative.Outputs.Tag>
    The tags for the VPC.
    VpcId string
    The ID of the VPC.
    CidrBlockAssociations []string
    The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
    DefaultNetworkAcl string
    The ID of the default network ACL for the VPC. For example, acl-814dafe3.
    DefaultSecurityGroup string
    The ID of the default security group for the VPC. For example, sg-b178e0d3.
    EnableDnsHostnames bool
    Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see DNS attributes in your VPC. You can only enable DNS hostnames if you've enabled DNS support.
    EnableDnsSupport bool
    Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see DNS attributes in your VPC.
    InstanceTenancy string

    The allowed tenancy of instances launched into the VPC.

    • default: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.
    • dedicated: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy of host during instance launch. You cannot specify a tenancy of default during instance launch.

    Updating InstanceTenancy requires no replacement only if you are updating its value from dedicated to default. Updating InstanceTenancy from default to dedicated requires replacement.

    Ipv6CidrBlocks []string
    The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
    Tags Tag
    The tags for the VPC.
    VpcId string
    The ID of the VPC.
    cidrBlockAssociations List<String>
    The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
    defaultNetworkAcl String
    The ID of the default network ACL for the VPC. For example, acl-814dafe3.
    defaultSecurityGroup String
    The ID of the default security group for the VPC. For example, sg-b178e0d3.
    enableDnsHostnames Boolean
    Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see DNS attributes in your VPC. You can only enable DNS hostnames if you've enabled DNS support.
    enableDnsSupport Boolean
    Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see DNS attributes in your VPC.
    instanceTenancy String

    The allowed tenancy of instances launched into the VPC.

    • default: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.
    • dedicated: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy of host during instance launch. You cannot specify a tenancy of default during instance launch.

    Updating InstanceTenancy requires no replacement only if you are updating its value from dedicated to default. Updating InstanceTenancy from default to dedicated requires replacement.

    ipv6CidrBlocks List<String>
    The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
    tags List<Tag>
    The tags for the VPC.
    vpcId String
    The ID of the VPC.
    cidrBlockAssociations string[]
    The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
    defaultNetworkAcl string
    The ID of the default network ACL for the VPC. For example, acl-814dafe3.
    defaultSecurityGroup string
    The ID of the default security group for the VPC. For example, sg-b178e0d3.
    enableDnsHostnames boolean
    Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see DNS attributes in your VPC. You can only enable DNS hostnames if you've enabled DNS support.
    enableDnsSupport boolean
    Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see DNS attributes in your VPC.
    instanceTenancy string

    The allowed tenancy of instances launched into the VPC.

    • default: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.
    • dedicated: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy of host during instance launch. You cannot specify a tenancy of default during instance launch.

    Updating InstanceTenancy requires no replacement only if you are updating its value from dedicated to default. Updating InstanceTenancy from default to dedicated requires replacement.

    ipv6CidrBlocks string[]
    The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
    tags Tag[]
    The tags for the VPC.
    vpcId string
    The ID of the VPC.
    cidr_block_associations Sequence[str]
    The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
    default_network_acl str
    The ID of the default network ACL for the VPC. For example, acl-814dafe3.
    default_security_group str
    The ID of the default security group for the VPC. For example, sg-b178e0d3.
    enable_dns_hostnames bool
    Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see DNS attributes in your VPC. You can only enable DNS hostnames if you've enabled DNS support.
    enable_dns_support bool
    Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see DNS attributes in your VPC.
    instance_tenancy str

    The allowed tenancy of instances launched into the VPC.

    • default: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.
    • dedicated: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy of host during instance launch. You cannot specify a tenancy of default during instance launch.

    Updating InstanceTenancy requires no replacement only if you are updating its value from dedicated to default. Updating InstanceTenancy from default to dedicated requires replacement.

    ipv6_cidr_blocks Sequence[str]
    The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
    tags Sequence[root_Tag]
    The tags for the VPC.
    vpc_id str
    The ID of the VPC.
    cidrBlockAssociations List<String>
    The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
    defaultNetworkAcl String
    The ID of the default network ACL for the VPC. For example, acl-814dafe3.
    defaultSecurityGroup String
    The ID of the default security group for the VPC. For example, sg-b178e0d3.
    enableDnsHostnames Boolean
    Indicates whether the instances launched in the VPC get DNS hostnames. If enabled, instances in the VPC get DNS hostnames; otherwise, they do not. Disabled by default for nondefault VPCs. For more information, see DNS attributes in your VPC. You can only enable DNS hostnames if you've enabled DNS support.
    enableDnsSupport Boolean
    Indicates whether the DNS resolution is supported for the VPC. If enabled, queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or the reserved IP address at the base of the VPC network range "plus two" succeed. If disabled, the Amazon provided DNS service in the VPC that resolves public DNS hostnames to IP addresses is not enabled. Enabled by default. For more information, see DNS attributes in your VPC.
    instanceTenancy String

    The allowed tenancy of instances launched into the VPC.

    • default: An instance launched into the VPC runs on shared hardware by default, unless you explicitly specify a different tenancy during instance launch.
    • dedicated: An instance launched into the VPC runs on dedicated hardware by default, unless you explicitly specify a tenancy of host during instance launch. You cannot specify a tenancy of default during instance launch.

    Updating InstanceTenancy requires no replacement only if you are updating its value from dedicated to default. Updating InstanceTenancy from default to dedicated requires replacement.

    ipv6CidrBlocks List<String>
    The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
    tags List<Property Map>
    The tags for the VPC.
    vpcId String
    The ID of the VPC.

    Supporting Types

    Tag

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    We recommend new projects start with resources from the AWS provider.

    AWS Native v0.126.0 published on Monday, Sep 30, 2024 by Pulumi