nutanix.getVpcsV2
Explore with Pulumi AI
Provides a datasource to retrieve the list of existing VPCs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pulumi/nutanix";
const list_vpcs = nutanix.getVpcsV2({});
const list_vpcs_with_filter = nutanix.getVpcsV2({
filter: "vpcType eq 'VLAN'",
});
const list_vpcs_with_order_by_limit_filter = nutanix.getVpcsV2({
filter: "vpcType eq 'VLAN'",
limit: 10,
orderBy: "name desc",
});
import pulumi
import pulumi_nutanix as nutanix
list_vpcs = nutanix.get_vpcs_v2()
list_vpcs_with_filter = nutanix.get_vpcs_v2(filter="vpcType eq 'VLAN'")
list_vpcs_with_order_by_limit_filter = nutanix.get_vpcs_v2(filter="vpcType eq 'VLAN'",
limit=10,
order_by="name desc")
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.GetVpcsV2(ctx, &nutanix.GetVpcsV2Args{}, nil)
if err != nil {
return err
}
_, err = nutanix.GetVpcsV2(ctx, &nutanix.GetVpcsV2Args{
Filter: pulumi.StringRef("vpcType eq 'VLAN'"),
}, nil)
if err != nil {
return err
}
_, err = nutanix.GetVpcsV2(ctx, &nutanix.GetVpcsV2Args{
Filter: pulumi.StringRef("vpcType eq 'VLAN'"),
Limit: pulumi.IntRef(10),
OrderBy: pulumi.StringRef("name desc"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = Pulumi.Nutanix;
return await Deployment.RunAsync(() =>
{
var list_vpcs = Nutanix.GetVpcsV2.Invoke();
var list_vpcs_with_filter = Nutanix.GetVpcsV2.Invoke(new()
{
Filter = "vpcType eq 'VLAN'",
});
var list_vpcs_with_order_by_limit_filter = Nutanix.GetVpcsV2.Invoke(new()
{
Filter = "vpcType eq 'VLAN'",
Limit = 10,
OrderBy = "name desc",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.NutanixFunctions;
import com.pulumi.nutanix.inputs.GetVpcsV2Args;
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 list-vpcs = NutanixFunctions.getVpcsV2(GetVpcsV2Args.builder()
.build());
final var list-vpcs-with-filter = NutanixFunctions.getVpcsV2(GetVpcsV2Args.builder()
.filter("vpcType eq 'VLAN'")
.build());
final var list-vpcs-with-order-by-limit-filter = NutanixFunctions.getVpcsV2(GetVpcsV2Args.builder()
.filter("vpcType eq 'VLAN'")
.limit(10)
.orderBy("name desc")
.build());
}
}
variables:
list-vpcs:
fn::invoke:
function: nutanix:getVpcsV2
arguments: {}
list-vpcs-with-filter:
fn::invoke:
function: nutanix:getVpcsV2
arguments:
filter: vpcType eq 'VLAN'
list-vpcs-with-order-by-limit-filter:
fn::invoke:
function: nutanix:getVpcsV2
arguments:
filter: vpcType eq 'VLAN'
limit: 10
orderBy: name desc
vpcs
The vpcs
object contains the following attributes:
ext_id
: ext_id of VPC.name
: Name of the VPC.description
: Description of the VPC.common_dhcp_options
: List of DHCP options to be configured.vpc_type
: Type of VPC.snat_ips
: List of IP Addresses used for SNAT.external_subnets
: List of external subnets that the VPC is attached to.external_routing_domain_reference
: External routing domain associated with this route tableexternally_routable_prefixes
: CIDR blocks from the VPC which can talk externally without performing NAT. This is applicable when connecting to external subnets which have disabled NAT.tenant_id
: A globally unique identifier that represents the tenant that owns this entity.links
: A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.metadata
: Metadata associated with this resource.
common_dhcp_options
domain_name_servers
: List of Domain Name Server addressesdomain_name_servers.ipv4
: Reference to address configurationdomain_name_servers.ipv6
: Reference to address configuration
external_subnets
subnet_reference
: External subnet reference.external_ips
: List of IP Addresses used for SNAT, if NAT is enabled on the external subnet. If NAT is not enabled, this specifies the IP address of the VPC port connected to the external gateway.gateway_nodes
: List of gateway nodes that can be used for external connectivity.active_gateway_node
: Reference of gateway nodesactive_gateway_count
: Maximum number of active gateway nodes for the VPC external subnet association.
snat_ips, external_ips
ipv4
: Reference to address configurationipv6
: Reference to address configuration
externally_routable_prefixes
ipv4
: IP V4 Configurationipv4.ip
: Reference to address configurationipv4.prefix_length
: The prefix length of the networkipv6
: IP V6 Configurationipv6.ip
: Reference to address configurationipv6.prefix_length
: The prefix length of the network
ipv4, ipv6 (Reference to address configuration)
value
: value of addressprefix_length
: The prefix length of the network to which this host IPv4/IPv6 address belongs.
See detailed information in Nutanix List VPC v4.
Using getVpcsV2
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 getVpcsV2(args: GetVpcsV2Args, opts?: InvokeOptions): Promise<GetVpcsV2Result>
function getVpcsV2Output(args: GetVpcsV2OutputArgs, opts?: InvokeOptions): Output<GetVpcsV2Result>
def get_vpcs_v2(filter: Optional[str] = None,
limit: Optional[int] = None,
order_by: Optional[str] = None,
page: Optional[int] = None,
select: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVpcsV2Result
def get_vpcs_v2_output(filter: Optional[pulumi.Input[str]] = None,
limit: Optional[pulumi.Input[int]] = None,
order_by: Optional[pulumi.Input[str]] = None,
page: Optional[pulumi.Input[int]] = None,
select: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpcsV2Result]
func GetVpcsV2(ctx *Context, args *GetVpcsV2Args, opts ...InvokeOption) (*GetVpcsV2Result, error)
func GetVpcsV2Output(ctx *Context, args *GetVpcsV2OutputArgs, opts ...InvokeOption) GetVpcsV2ResultOutput
> Note: This function is named GetVpcsV2
in the Go SDK.
public static class GetVpcsV2
{
public static Task<GetVpcsV2Result> InvokeAsync(GetVpcsV2Args args, InvokeOptions? opts = null)
public static Output<GetVpcsV2Result> Invoke(GetVpcsV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpcsV2Result> getVpcsV2(GetVpcsV2Args args, InvokeOptions options)
public static Output<GetVpcsV2Result> getVpcsV2(GetVpcsV2Args args, InvokeOptions options)
fn::invoke:
function: nutanix:index/getVpcsV2:getVpcsV2
arguments:
# arguments dictionary
The following arguments are supported:
- Filter string
- A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:
extId
- Limit int
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- Order
By string - A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. The orderby can be applied to the following fields:
- Page int
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- Select string
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. The select can be applied to the following fields:
- Filter string
- A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:
extId
- Limit int
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- Order
By string - A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. The orderby can be applied to the following fields:
- Page int
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- Select string
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. The select can be applied to the following fields:
- filter String
- A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:
extId
- limit Integer
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- order
By String - A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. The orderby can be applied to the following fields:
- page Integer
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- select String
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. The select can be applied to the following fields:
- filter string
- A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:
extId
- limit number
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- order
By string - A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. The orderby can be applied to the following fields:
- page number
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- select string
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. The select can be applied to the following fields:
- filter str
- A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:
extId
- limit int
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- order_
by str - A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. The orderby can be applied to the following fields:
- page int
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- select str
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. The select can be applied to the following fields:
- filter String
- A URL query parameter that allows clients to filter a collection of resources. The filter can be applied to the following fields:
extId
- limit Number
- A URL query parameter that specifies the total number of records returned in the result set. Must be a positive integer between 1 and 100. Any number out of this range will lead to a validation error. If the limit is not provided, a default value of 50 records will be returned in the result set.
- order
By String - A URL query parameter that allows clients to specify the sort criteria for the returned list of objects. Resources can be sorted in ascending order using asc or descending order using desc. If asc or desc are not specified, the resources will be sorted in ascending order by default. The orderby can be applied to the following fields:
- page Number
- A URL query parameter that specifies the page number of the result set. It must be a positive integer between 0 and the maximum number of pages that are available for that resource. Any number out of this range might lead to no results.
- select String
- A URL query parameter that allows clients to request a specific set of properties for each entity or complex type. Expression specified with the $select must conform to the OData V4.01 URL conventions. The select can be applied to the following fields:
getVpcsV2 Result
The following output properties are available:
Supporting Types
GetVpcsV2Vpc
- Common
Dhcp List<PiersOptions Karsenbarg. Nutanix. Inputs. Get Vpcs V2Vpc Common Dhcp Option> - Description string
extId
externalRoutingDomainReference
- Ext
Id string - External
Routing stringDomain Reference - External
Subnets List<PiersKarsenbarg. Nutanix. Inputs. Get Vpcs V2Vpc External Subnet> - Externally
Routable List<PiersPrefixes Karsenbarg. Nutanix. Inputs. Get Vpcs V2Vpc Externally Routable Prefix> - Links
List<Piers
Karsenbarg. Nutanix. Inputs. Get Vpcs V2Vpc Link> - Metadatas
List<Piers
Karsenbarg. Nutanix. Inputs. Get Vpcs V2Vpc Metadata> - Name string
- Snat
Ips List<PiersKarsenbarg. Nutanix. Inputs. Get Vpcs V2Vpc Snat Ip> - Tenant
Id string - Vpc
Type string
- Common
Dhcp []GetOptions Vpcs V2Vpc Common Dhcp Option - Description string
extId
externalRoutingDomainReference
- Ext
Id string - External
Routing stringDomain Reference - External
Subnets []GetVpcs V2Vpc External Subnet - Externally
Routable []GetPrefixes Vpcs V2Vpc Externally Routable Prefix - Links
[]Get
Vpcs V2Vpc Link - Metadatas
[]Get
Vpcs V2Vpc Metadata - Name string
- Snat
Ips []GetVpcs V2Vpc Snat Ip - Tenant
Id string - Vpc
Type string
- common
Dhcp List<GetOptions Vpcs V2Vpc Common Dhcp Option> - description String
extId
externalRoutingDomainReference
- ext
Id String - external
Routing StringDomain Reference - external
Subnets List<GetVpcs V2Vpc External Subnet> - externally
Routable List<GetPrefixes Vpcs V2Vpc Externally Routable Prefix> - links
List<Get
Vpcs V2Vpc Link> - metadatas
List<Get
Vpcs V2Vpc Metadata> - name String
- snat
Ips List<GetVpcs V2Vpc Snat Ip> - tenant
Id String - vpc
Type String
- common
Dhcp GetOptions Vpcs V2Vpc Common Dhcp Option[] - description string
extId
externalRoutingDomainReference
- ext
Id string - external
Routing stringDomain Reference - external
Subnets GetVpcs V2Vpc External Subnet[] - externally
Routable GetPrefixes Vpcs V2Vpc Externally Routable Prefix[] - links
Get
Vpcs V2Vpc Link[] - metadatas
Get
Vpcs V2Vpc Metadata[] - name string
- snat
Ips GetVpcs V2Vpc Snat Ip[] - tenant
Id string - vpc
Type string
- common_
dhcp_ Sequence[Getoptions Vpcs V2Vpc Common Dhcp Option] - description str
extId
externalRoutingDomainReference
- ext_
id str - external_
routing_ strdomain_ reference - external_
subnets Sequence[GetVpcs V2Vpc External Subnet] - externally_
routable_ Sequence[Getprefixes Vpcs V2Vpc Externally Routable Prefix] - links
Sequence[Get
Vpcs V2Vpc Link] - metadatas
Sequence[Get
Vpcs V2Vpc Metadata] - name str
- snat_
ips Sequence[GetVpcs V2Vpc Snat Ip] - tenant_
id str - vpc_
type str
- common
Dhcp List<Property Map>Options - description String
extId
externalRoutingDomainReference
- ext
Id String - external
Routing StringDomain Reference - external
Subnets List<Property Map> - externally
Routable List<Property Map>Prefixes - links List<Property Map>
- metadatas List<Property Map>
- name String
- snat
Ips List<Property Map> - tenant
Id String - vpc
Type String
GetVpcsV2VpcCommonDhcpOption
GetVpcsV2VpcCommonDhcpOptionDomainNameServer
GetVpcsV2VpcCommonDhcpOptionDomainNameServerIpv4
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
GetVpcsV2VpcCommonDhcpOptionDomainNameServerIpv6
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
GetVpcsV2VpcExternalSubnet
- active
Gateway NumberCount - active
Gateway List<Property Map>Nodes - external
Ips List<Property Map> - gateway
Nodes List<String> - subnet
Reference String
GetVpcsV2VpcExternalSubnetActiveGatewayNode
GetVpcsV2VpcExternalSubnetActiveGatewayNodeNodeIpAddress
GetVpcsV2VpcExternalSubnetActiveGatewayNodeNodeIpAddressIpv4
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
GetVpcsV2VpcExternalSubnetActiveGatewayNodeNodeIpAddressIpv6
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
GetVpcsV2VpcExternalSubnetExternalIp
GetVpcsV2VpcExternalSubnetExternalIpIpv4
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
GetVpcsV2VpcExternalSubnetExternalIpIpv6
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
GetVpcsV2VpcExternallyRoutablePrefix
GetVpcsV2VpcExternallyRoutablePrefixIpv4
GetVpcsV2VpcExternallyRoutablePrefixIpv4Ip
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
GetVpcsV2VpcExternallyRoutablePrefixIpv6
GetVpcsV2VpcExternallyRoutablePrefixIpv6Ip
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
GetVpcsV2VpcLink
GetVpcsV2VpcMetadata
- Category
Ids List<ImmutableArray<object>> - Owner
Reference stringId - Owner
User stringName - Project
Name string - Project
Reference stringId
- Category
Ids [][]interface{} - Owner
Reference stringId - Owner
User stringName - Project
Name string - Project
Reference stringId
- category
Ids List<List<Object>> - owner
Reference StringId - owner
User StringName - project
Name String - project
Reference StringId
- category
Ids any[][] - owner
Reference stringId - owner
User stringName - project
Name string - project
Reference stringId
- category_
ids Sequence[Sequence[Any]] - owner_
reference_ strid - owner_
user_ strname - project_
name str - project_
reference_ strid
- category
Ids List<List<Any>> - owner
Reference StringId - owner
User StringName - project
Name String - project
Reference StringId
GetVpcsV2VpcSnatIp
GetVpcsV2VpcSnatIpIpv4
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
GetVpcsV2VpcSnatIpIpv6
- Prefix
Length int - Value string
- Prefix
Length int - Value string
- prefix
Length Integer - value String
- prefix
Length number - value string
- prefix_
length int - value str
- prefix
Length Number - value String
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanix
Terraform Provider.