AWS Native is in preview. AWS Classic is fully supported.
aws-native.ec2.getVpc
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
Specifies a virtual private cloud (VPC). You can optionally request an IPv6 CIDR block for the VPC. You can request an Amazon-provided IPv6 CIDR block from Amazon’s pool of IPv6 addresses, or an IPv6 CIDR block from an IPv6 address pool that you provisioned through bring your own IP addresses (BYOIP). 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:
- Vpc
Id string - The ID of the VPC.
- Vpc
Id string - The ID of the VPC.
- vpc
Id String - The ID of the VPC.
- vpc
Id string - The ID of the VPC.
- vpc_
id str - The ID of the VPC.
- vpc
Id String - The ID of the VPC.
getVpc Result
The following output properties are available:
- Cidr
Block List<string>Associations - The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
- Default
Network stringAcl - The ID of the default network ACL for the VPC. For example, acl-814dafe3.
- Default
Security stringGroup - The ID of the default security group for the VPC. For example, sg-b178e0d3.
- Enable
Dns boolHostnames - 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 boolSupport - 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 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 ofhost
during instance launch. You cannot specify a tenancy ofdefault
during instance launch.
Updating
InstanceTenancy
requires no replacement only if you are updating its value fromdedicated
todefault
. UpdatingInstanceTenancy
fromdefault
todedicated
requires replacement.- Ipv6Cidr
Blocks List<string> - The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
- List<Pulumi.
Aws Native. Outputs. Tag> - The tags for the VPC.
- Vpc
Id string - The ID of the VPC.
- Cidr
Block []stringAssociations - The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
- Default
Network stringAcl - The ID of the default network ACL for the VPC. For example, acl-814dafe3.
- Default
Security stringGroup - The ID of the default security group for the VPC. For example, sg-b178e0d3.
- Enable
Dns boolHostnames - 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 boolSupport - 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 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 ofhost
during instance launch. You cannot specify a tenancy ofdefault
during instance launch.
Updating
InstanceTenancy
requires no replacement only if you are updating its value fromdedicated
todefault
. UpdatingInstanceTenancy
fromdefault
todedicated
requires replacement.- Ipv6Cidr
Blocks []string - The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
- Tag
- The tags for the VPC.
- Vpc
Id string - The ID of the VPC.
- cidr
Block List<String>Associations - The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
- default
Network StringAcl - The ID of the default network ACL for the VPC. For example, acl-814dafe3.
- default
Security StringGroup - The ID of the default security group for the VPC. For example, sg-b178e0d3.
- enable
Dns BooleanHostnames - 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 BooleanSupport - 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 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 ofhost
during instance launch. You cannot specify a tenancy ofdefault
during instance launch.
Updating
InstanceTenancy
requires no replacement only if you are updating its value fromdedicated
todefault
. UpdatingInstanceTenancy
fromdefault
todedicated
requires replacement.- ipv6Cidr
Blocks List<String> - The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
- List<Tag>
- The tags for the VPC.
- vpc
Id String - The ID of the VPC.
- cidr
Block string[]Associations - The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
- default
Network stringAcl - The ID of the default network ACL for the VPC. For example, acl-814dafe3.
- default
Security stringGroup - The ID of the default security group for the VPC. For example, sg-b178e0d3.
- enable
Dns booleanHostnames - 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 booleanSupport - 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 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 ofhost
during instance launch. You cannot specify a tenancy ofdefault
during instance launch.
Updating
InstanceTenancy
requires no replacement only if you are updating its value fromdedicated
todefault
. UpdatingInstanceTenancy
fromdefault
todedicated
requires replacement.- ipv6Cidr
Blocks string[] - The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
- Tag[]
- The tags for the VPC.
- vpc
Id string - The ID of the VPC.
- cidr_
block_ Sequence[str]associations - The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
- default_
network_ stracl - The ID of the default network ACL for the VPC. For example, acl-814dafe3.
- default_
security_ strgroup - The ID of the default security group for the VPC. For example, sg-b178e0d3.
- enable_
dns_ boolhostnames - 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_ boolsupport - 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 ofhost
during instance launch. You cannot specify a tenancy ofdefault
during instance launch.
Updating
InstanceTenancy
requires no replacement only if you are updating its value fromdedicated
todefault
. UpdatingInstanceTenancy
fromdefault
todedicated
requires replacement.- ipv6_
cidr_ Sequence[str]blocks - The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
- Sequence[root_Tag]
- The tags for the VPC.
- vpc_
id str - The ID of the VPC.
- cidr
Block List<String>Associations - The association IDs of the IPv4 CIDR blocks for the VPC. For example, [ vpc-cidr-assoc-0280ab6b ].
- default
Network StringAcl - The ID of the default network ACL for the VPC. For example, acl-814dafe3.
- default
Security StringGroup - The ID of the default security group for the VPC. For example, sg-b178e0d3.
- enable
Dns BooleanHostnames - 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 BooleanSupport - 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 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 ofhost
during instance launch. You cannot specify a tenancy ofdefault
during instance launch.
Updating
InstanceTenancy
requires no replacement only if you are updating its value fromdedicated
todefault
. UpdatingInstanceTenancy
fromdefault
todedicated
requires replacement.- ipv6Cidr
Blocks List<String> - The IPv6 CIDR blocks for the VPC. For example, [ 2001:db8:1234:1a00::/56 ].
- List<Property Map>
- The tags for the VPC.
- vpc
Id String - The ID of the VPC.
Supporting Types
Tag
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.