1. Packages
  2. Vmc Provider
  3. API Docs
  4. getCustomerSubnets
vmc 1.15.4 published on Monday, Apr 21, 2025 by vmware

vmc.getCustomerSubnets

Explore with Pulumi AI

vmc logo
vmc 1.15.4 published on Monday, Apr 21, 2025 by vmware

    The customer subnets data source retrieves information about customer’s compatible subnets for account linking.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vmc from "@pulumi/vmc";
    
    const mySubnets = vmc.getCustomerSubnets({
        connectedAccountId: data.vmc_connected_accounts.my_accounts.id,
        region: _var.sddc_region,
    });
    
    import pulumi
    import pulumi_vmc as vmc
    
    my_subnets = vmc.get_customer_subnets(connected_account_id=data["vmc_connected_accounts"]["my_accounts"]["id"],
        region=var["sddc_region"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vmc/vmc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vmc.GetCustomerSubnets(ctx, &vmc.GetCustomerSubnetsArgs{
    			ConnectedAccountId: pulumi.StringRef(data.Vmc_connected_accounts.My_accounts.Id),
    			Region:             _var.Sddc_region,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vmc = Pulumi.Vmc;
    
    return await Deployment.RunAsync(() => 
    {
        var mySubnets = Vmc.GetCustomerSubnets.Invoke(new()
        {
            ConnectedAccountId = data.Vmc_connected_accounts.My_accounts.Id,
            Region = @var.Sddc_region,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vmc.VmcFunctions;
    import com.pulumi.vmc.inputs.GetCustomerSubnetsArgs;
    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 mySubnets = VmcFunctions.getCustomerSubnets(GetCustomerSubnetsArgs.builder()
                .connectedAccountId(data.vmc_connected_accounts().my_accounts().id())
                .region(var_.sddc_region())
                .build());
    
        }
    }
    
    variables:
      mySubnets:
        fn::invoke:
          function: vmc:getCustomerSubnets
          arguments:
            connectedAccountId: ${data.vmc_connected_accounts.my_accounts.id}
            region: ${var.sddc_region}
    

    Using getCustomerSubnets

    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 getCustomerSubnets(args: GetCustomerSubnetsArgs, opts?: InvokeOptions): Promise<GetCustomerSubnetsResult>
    function getCustomerSubnetsOutput(args: GetCustomerSubnetsOutputArgs, opts?: InvokeOptions): Output<GetCustomerSubnetsResult>
    def get_customer_subnets(connected_account_id: Optional[str] = None,
                             force_refresh: Optional[bool] = None,
                             id: Optional[str] = None,
                             instance_type: Optional[str] = None,
                             num_hosts: Optional[float] = None,
                             region: Optional[str] = None,
                             sddc_id: Optional[str] = None,
                             sddc_type: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetCustomerSubnetsResult
    def get_customer_subnets_output(connected_account_id: Optional[pulumi.Input[str]] = None,
                             force_refresh: Optional[pulumi.Input[bool]] = None,
                             id: Optional[pulumi.Input[str]] = None,
                             instance_type: Optional[pulumi.Input[str]] = None,
                             num_hosts: Optional[pulumi.Input[float]] = None,
                             region: Optional[pulumi.Input[str]] = None,
                             sddc_id: Optional[pulumi.Input[str]] = None,
                             sddc_type: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetCustomerSubnetsResult]
    func GetCustomerSubnets(ctx *Context, args *GetCustomerSubnetsArgs, opts ...InvokeOption) (*GetCustomerSubnetsResult, error)
    func GetCustomerSubnetsOutput(ctx *Context, args *GetCustomerSubnetsOutputArgs, opts ...InvokeOption) GetCustomerSubnetsResultOutput

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

    public static class GetCustomerSubnets 
    {
        public static Task<GetCustomerSubnetsResult> InvokeAsync(GetCustomerSubnetsArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomerSubnetsResult> Invoke(GetCustomerSubnetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCustomerSubnetsResult> getCustomerSubnets(GetCustomerSubnetsArgs args, InvokeOptions options)
    public static Output<GetCustomerSubnetsResult> getCustomerSubnets(GetCustomerSubnetsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vmc:index/getCustomerSubnets:getCustomerSubnets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Region string
    The AWS specific (e.g., us-west-2) or VMC specific region (e.g., US_WEST_2) of the cloud resources to work in.
    ConnectedAccountId string
    The linked connected account identifier.
    ForceRefresh bool
    Specifies to force the mappings for datacenters to be refreshed for the connected account.
    Id string
    InstanceType string
    The server instance type to be used.
    NumHosts double
    The number of ESX hosts.
    SddcId string
    The SDDC identifier.
    SddcType string
    The SDDC type to be used. One of: 1NODE, SingleAZ, or MultiAZ.
    Region string
    The AWS specific (e.g., us-west-2) or VMC specific region (e.g., US_WEST_2) of the cloud resources to work in.
    ConnectedAccountId string
    The linked connected account identifier.
    ForceRefresh bool
    Specifies to force the mappings for datacenters to be refreshed for the connected account.
    Id string
    InstanceType string
    The server instance type to be used.
    NumHosts float64
    The number of ESX hosts.
    SddcId string
    The SDDC identifier.
    SddcType string
    The SDDC type to be used. One of: 1NODE, SingleAZ, or MultiAZ.
    region String
    The AWS specific (e.g., us-west-2) or VMC specific region (e.g., US_WEST_2) of the cloud resources to work in.
    connectedAccountId String
    The linked connected account identifier.
    forceRefresh Boolean
    Specifies to force the mappings for datacenters to be refreshed for the connected account.
    id String
    instanceType String
    The server instance type to be used.
    numHosts Double
    The number of ESX hosts.
    sddcId String
    The SDDC identifier.
    sddcType String
    The SDDC type to be used. One of: 1NODE, SingleAZ, or MultiAZ.
    region string
    The AWS specific (e.g., us-west-2) or VMC specific region (e.g., US_WEST_2) of the cloud resources to work in.
    connectedAccountId string
    The linked connected account identifier.
    forceRefresh boolean
    Specifies to force the mappings for datacenters to be refreshed for the connected account.
    id string
    instanceType string
    The server instance type to be used.
    numHosts number
    The number of ESX hosts.
    sddcId string
    The SDDC identifier.
    sddcType string
    The SDDC type to be used. One of: 1NODE, SingleAZ, or MultiAZ.
    region str
    The AWS specific (e.g., us-west-2) or VMC specific region (e.g., US_WEST_2) of the cloud resources to work in.
    connected_account_id str
    The linked connected account identifier.
    force_refresh bool
    Specifies to force the mappings for datacenters to be refreshed for the connected account.
    id str
    instance_type str
    The server instance type to be used.
    num_hosts float
    The number of ESX hosts.
    sddc_id str
    The SDDC identifier.
    sddc_type str
    The SDDC type to be used. One of: 1NODE, SingleAZ, or MultiAZ.
    region String
    The AWS specific (e.g., us-west-2) or VMC specific region (e.g., US_WEST_2) of the cloud resources to work in.
    connectedAccountId String
    The linked connected account identifier.
    forceRefresh Boolean
    Specifies to force the mappings for datacenters to be refreshed for the connected account.
    id String
    instanceType String
    The server instance type to be used.
    numHosts Number
    The number of ESX hosts.
    sddcId String
    The SDDC identifier.
    sddcType String
    The SDDC type to be used. One of: 1NODE, SingleAZ, or MultiAZ.

    getCustomerSubnets Result

    The following output properties are available:

    CustomerAvailableZones List<string>
    A list of AWS availability zones.
    Id string
    Ids List<string>
    A list of AWS subnet IDs to create links to in the customer's account.
    Region string
    VpcMap Dictionary<string, string>
    ConnectedAccountId string
    ForceRefresh bool
    InstanceType string
    NumHosts double
    SddcId string
    SddcType string
    CustomerAvailableZones []string
    A list of AWS availability zones.
    Id string
    Ids []string
    A list of AWS subnet IDs to create links to in the customer's account.
    Region string
    VpcMap map[string]string
    ConnectedAccountId string
    ForceRefresh bool
    InstanceType string
    NumHosts float64
    SddcId string
    SddcType string
    customerAvailableZones List<String>
    A list of AWS availability zones.
    id String
    ids List<String>
    A list of AWS subnet IDs to create links to in the customer's account.
    region String
    vpcMap Map<String,String>
    connectedAccountId String
    forceRefresh Boolean
    instanceType String
    numHosts Double
    sddcId String
    sddcType String
    customerAvailableZones string[]
    A list of AWS availability zones.
    id string
    ids string[]
    A list of AWS subnet IDs to create links to in the customer's account.
    region string
    vpcMap {[key: string]: string}
    connectedAccountId string
    forceRefresh boolean
    instanceType string
    numHosts number
    sddcId string
    sddcType string
    customer_available_zones Sequence[str]
    A list of AWS availability zones.
    id str
    ids Sequence[str]
    A list of AWS subnet IDs to create links to in the customer's account.
    region str
    vpc_map Mapping[str, str]
    connected_account_id str
    force_refresh bool
    instance_type str
    num_hosts float
    sddc_id str
    sddc_type str
    customerAvailableZones List<String>
    A list of AWS availability zones.
    id String
    ids List<String>
    A list of AWS subnet IDs to create links to in the customer's account.
    region String
    vpcMap Map<String>
    connectedAccountId String
    forceRefresh Boolean
    instanceType String
    numHosts Number
    sddcId String
    sddcType String

    Package Details

    Repository
    vmc vmware/terraform-provider-vmc
    License
    Notes
    This Pulumi package is based on the vmc Terraform Provider.
    vmc logo
    vmc 1.15.4 published on Monday, Apr 21, 2025 by vmware