1. Registry
  2. Packages
  3. Megaport Provider
  4. API Docs
  5. getProductAvailability
Viewing docs for megaport 1.26.3
published on Thursday, Oct 29, 2026 by megaport
megaport
Viewing docs for megaport 1.26.3
published on Thursday, Oct 29, 2026 by megaport

    Lists the products your company can order and the markets each one is available in. The company is the one the provider credentials act in, which is the managed account when managed_account_uid is set. Filter the list with a for expression.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as megaport from "@pulumi/megaport";
    
    // List the products the company behind the provider credentials can order.
    const available = megaport.getProductAvailability({});
    export const orderableProducts = available.then(available => .filter(product => product.category == "PRODUCT").map(product => ({
        variant: product.variant,
        markets: .map(market => (market.market)),
    })));
    export const addons = available.then(available => .filter(product => product.category == "ADDON").map(product => (product.displayName)));
    
    import pulumi
    import pulumi_megaport as megaport
    
    # List the products the company behind the provider credentials can order.
    available = megaport.get_product_availability()
    pulumi.export("orderableProducts", [{
        "variant": product.variant,
        "markets": [market.market for market in product.markets],
    } for product in available.products if product.category == "PRODUCT"])
    pulumi.export("addons", [product.display_name for product in available.products if product.category == "ADDON"])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Megaport = Pulumi.Megaport;
    
    return await Deployment.RunAsync(() => 
    {
        // List the products the company behind the provider credentials can order.
        var available = Megaport.GetProductAvailability.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["orderableProducts"] = .Where(product => product.Category == "PRODUCT").Select(product => 
            {
                return 
                {
                    { "variant", product.Variant },
                    { "markets", .Select(market => 
                    {
                        return market.Market;
                    }).ToList() },
                };
            }).ToList(),
            ["addons"] = .Where(product => product.Category == "ADDON").Select(product => 
            {
                return product.DisplayName;
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    

    Using getProductAvailability

    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 getProductAvailability(opts?: InvokeOptions): Promise<GetProductAvailabilityResult>
    function getProductAvailabilityOutput(opts?: InvokeOutputOptions): Output<GetProductAvailabilityResult>
    def get_product_availability(opts: Optional[InvokeOptions] = None) -> GetProductAvailabilityResult
    def get_product_availability_output(opts: Optional[InvokeOutputOptions] = None) -> Output[GetProductAvailabilityResult]
    func GetProductAvailability(ctx *Context, opts ...InvokeOption) (*GetProductAvailabilityResult, error)
    func GetProductAvailabilityOutput(ctx *Context, opts ...InvokeOption) GetProductAvailabilityResultOutput

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

    public static class GetProductAvailability 
    {
        public static Task<GetProductAvailabilityResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetProductAvailabilityResult> Invoke(InvokeOptions? opts = null)
        public static Output<GetProductAvailabilityResult> Invoke(InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetProductAvailabilityResult> getProductAvailability(InvokeOptions options)
    public static Output<GetProductAvailabilityResult> getProductAvailability(InvokeOptions options)
    public static Output<GetProductAvailabilityResult> getProductAvailability(InvokeOutputOptions options)
    
    fn::invoke:
      function: megaport:index/getProductAvailability:getProductAvailability
      arguments:
        # arguments dictionary
    data "megaport_get_product_availability" "name" {
        # arguments
    }

    getProductAvailability Result

    The following output properties are available:

    CompanyUid string
    The UID of the company the availability applies to.
    Id string
    The provider-assigned unique ID for this managed resource.
    Products List<GetProductAvailabilityProduct>
    The products the company can order. The API sorts them by category, then variant.
    CompanyUid string
    The UID of the company the availability applies to.
    Id string
    The provider-assigned unique ID for this managed resource.
    Products []GetProductAvailabilityProduct
    The products the company can order. The API sorts them by category, then variant.
    company_uid string
    The UID of the company the availability applies to.
    id string
    The provider-assigned unique ID for this managed resource.
    products list(object)
    The products the company can order. The API sorts them by category, then variant.
    companyUid String
    The UID of the company the availability applies to.
    id String
    The provider-assigned unique ID for this managed resource.
    products List<GetProductAvailabilityProduct>
    The products the company can order. The API sorts them by category, then variant.
    companyUid string
    The UID of the company the availability applies to.
    id string
    The provider-assigned unique ID for this managed resource.
    products GetProductAvailabilityProduct[]
    The products the company can order. The API sorts them by category, then variant.
    company_uid str
    The UID of the company the availability applies to.
    id str
    The provider-assigned unique ID for this managed resource.
    products Sequence[GetProductAvailabilityProduct]
    The products the company can order. The API sorts them by category, then variant.
    companyUid String
    The UID of the company the availability applies to.
    id String
    The provider-assigned unique ID for this managed resource.
    products List<Property Map>
    The products the company can order. The API sorts them by category, then variant.

    Supporting Types

    GetProductAvailabilityProduct

    Category string
    The product category: PRODUCT, ADDON, or BUNDLE.
    DisplayName string
    The human-readable name of the product.
    Markets List<GetProductAvailabilityProductMarket>
    The markets the company can order the product in.
    Variant string
    The specific variant of the product, such as VXC_TRANSIT or PORT.
    Category string
    The product category: PRODUCT, ADDON, or BUNDLE.
    DisplayName string
    The human-readable name of the product.
    Markets []GetProductAvailabilityProductMarket
    The markets the company can order the product in.
    Variant string
    The specific variant of the product, such as VXC_TRANSIT or PORT.
    category string
    The product category: PRODUCT, ADDON, or BUNDLE.
    display_name string
    The human-readable name of the product.
    markets list(object)
    The markets the company can order the product in.
    variant string
    The specific variant of the product, such as VXC_TRANSIT or PORT.
    category String
    The product category: PRODUCT, ADDON, or BUNDLE.
    displayName String
    The human-readable name of the product.
    markets List<GetProductAvailabilityProductMarket>
    The markets the company can order the product in.
    variant String
    The specific variant of the product, such as VXC_TRANSIT or PORT.
    category string
    The product category: PRODUCT, ADDON, or BUNDLE.
    displayName string
    The human-readable name of the product.
    markets GetProductAvailabilityProductMarket[]
    The markets the company can order the product in.
    variant string
    The specific variant of the product, such as VXC_TRANSIT or PORT.
    category str
    The product category: PRODUCT, ADDON, or BUNDLE.
    display_name str
    The human-readable name of the product.
    markets Sequence[GetProductAvailabilityProductMarket]
    The markets the company can order the product in.
    variant str
    The specific variant of the product, such as VXC_TRANSIT or PORT.
    category String
    The product category: PRODUCT, ADDON, or BUNDLE.
    displayName String
    The human-readable name of the product.
    markets List<Property Map>
    The markets the company can order the product in.
    variant String
    The specific variant of the product, such as VXC_TRANSIT or PORT.

    GetProductAvailabilityProductMarket

    CountryCode string
    The short code of the market's country.
    Market string
    The market code, such as MEGAPORT_AUSTRALIA.
    MarketName string
    The human-readable name of the market.
    MarketOwner string
    The name of the Megaport entity that owns the market.
    Source string
    Where the availability comes from: MARKET (the market default) or OVERRIDE (a rule for your company).
    CountryCode string
    The short code of the market's country.
    Market string
    The market code, such as MEGAPORT_AUSTRALIA.
    MarketName string
    The human-readable name of the market.
    MarketOwner string
    The name of the Megaport entity that owns the market.
    Source string
    Where the availability comes from: MARKET (the market default) or OVERRIDE (a rule for your company).
    country_code string
    The short code of the market's country.
    market string
    The market code, such as MEGAPORT_AUSTRALIA.
    market_name string
    The human-readable name of the market.
    market_owner string
    The name of the Megaport entity that owns the market.
    source string
    Where the availability comes from: MARKET (the market default) or OVERRIDE (a rule for your company).
    countryCode String
    The short code of the market's country.
    market String
    The market code, such as MEGAPORT_AUSTRALIA.
    marketName String
    The human-readable name of the market.
    marketOwner String
    The name of the Megaport entity that owns the market.
    source String
    Where the availability comes from: MARKET (the market default) or OVERRIDE (a rule for your company).
    countryCode string
    The short code of the market's country.
    market string
    The market code, such as MEGAPORT_AUSTRALIA.
    marketName string
    The human-readable name of the market.
    marketOwner string
    The name of the Megaport entity that owns the market.
    source string
    Where the availability comes from: MARKET (the market default) or OVERRIDE (a rule for your company).
    country_code str
    The short code of the market's country.
    market str
    The market code, such as MEGAPORT_AUSTRALIA.
    market_name str
    The human-readable name of the market.
    market_owner str
    The name of the Megaport entity that owns the market.
    source str
    Where the availability comes from: MARKET (the market default) or OVERRIDE (a rule for your company).
    countryCode String
    The short code of the market's country.
    market String
    The market code, such as MEGAPORT_AUSTRALIA.
    marketName String
    The human-readable name of the market.
    marketOwner String
    The name of the Megaport entity that owns the market.
    source String
    Where the availability comes from: MARKET (the market default) or OVERRIDE (a rule for your company).

    Package Details

    Repository
    megaport megaport/terraform-provider-megaport
    License
    Notes
    This Pulumi package is based on the megaport Terraform Provider.
    megaport
    Viewing docs for megaport 1.26.3
    published on Thursday, Oct 29, 2026 by megaport

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial