1. Registry
  2. Packages
  3. Ibm Provider
  4. API Docs
  5. getIsBareMetalServerCapacities
Viewing docs for ibm 2.6.2
published on Wednesday, Sep 16, 2026 by ibm-cloud
Viewing docs for ibm 2.6.2
published on Wednesday, Sep 16, 2026 by ibm-cloud

    Import the details of existing IBM Cloud Bare Metal Server capacity information as a read-only data source. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax. For more information, about bare metal server capacities, see Bare Metal Servers for VPC.

    This data source provides information about which bare metal server profiles have available capacity in which zones within the region.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    
    Example coming soon!
    

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    // Get all bare metal server capacities in the region
    const dsBmscapacities = ibm.getIsBareMetalServerCapacities({});
    // Filter by profile name
    const dsBmscapacitiesByProfile = ibm.getIsBareMetalServerCapacities({
        profile: "bx2-metal-192x768",
    });
    // Filter by zone name
    const dsBmscapacitiesByZone = ibm.getIsBareMetalServerCapacities({
        zone: "us-south-1",
    });
    // Filter by both profile and zone
    const dsBmscapacitiesSpecific = ibm.getIsBareMetalServerCapacities({
        profile: "bx2-metal-192x768",
        zone: "us-south-1",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    # Get all bare metal server capacities in the region
    ds_bmscapacities = ibm.get_is_bare_metal_server_capacities()
    # Filter by profile name
    ds_bmscapacities_by_profile = ibm.get_is_bare_metal_server_capacities(profile="bx2-metal-192x768")
    # Filter by zone name
    ds_bmscapacities_by_zone = ibm.get_is_bare_metal_server_capacities(zone="us-south-1")
    # Filter by both profile and zone
    ds_bmscapacities_specific = ibm.get_is_bare_metal_server_capacities(profile="bx2-metal-192x768",
        zone="us-south-1")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/v2/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Get all bare metal server capacities in the region
    		_, err := ibm.GetIsBareMetalServerCapacities(ctx, &ibm.GetIsBareMetalServerCapacitiesArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		// Filter by profile name
    		_, err = ibm.GetIsBareMetalServerCapacities(ctx, &ibm.GetIsBareMetalServerCapacitiesArgs{
    			Profile: pulumi.StringRef("bx2-metal-192x768"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Filter by zone name
    		_, err = ibm.GetIsBareMetalServerCapacities(ctx, &ibm.GetIsBareMetalServerCapacitiesArgs{
    			Zone: pulumi.StringRef("us-south-1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Filter by both profile and zone
    		_, err = ibm.GetIsBareMetalServerCapacities(ctx, &ibm.GetIsBareMetalServerCapacitiesArgs{
    			Profile: pulumi.StringRef("bx2-metal-192x768"),
    			Zone:    pulumi.StringRef("us-south-1"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        // Get all bare metal server capacities in the region
        var dsBmscapacities = Ibm.GetIsBareMetalServerCapacities.Invoke();
    
        // Filter by profile name
        var dsBmscapacitiesByProfile = Ibm.GetIsBareMetalServerCapacities.Invoke(new()
        {
            Profile = "bx2-metal-192x768",
        });
    
        // Filter by zone name
        var dsBmscapacitiesByZone = Ibm.GetIsBareMetalServerCapacities.Invoke(new()
        {
            Zone = "us-south-1",
        });
    
        // Filter by both profile and zone
        var dsBmscapacitiesSpecific = Ibm.GetIsBareMetalServerCapacities.Invoke(new()
        {
            Profile = "bx2-metal-192x768",
            Zone = "us-south-1",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIsBareMetalServerCapacitiesArgs;
    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) {
            // Get all bare metal server capacities in the region
            final var dsBmscapacities = IbmFunctions.getIsBareMetalServerCapacities(GetIsBareMetalServerCapacitiesArgs.builder()
                .build());
    
            // Filter by profile name
            final var dsBmscapacitiesByProfile = IbmFunctions.getIsBareMetalServerCapacities(GetIsBareMetalServerCapacitiesArgs.builder()
                .profile("bx2-metal-192x768")
                .build());
    
            // Filter by zone name
            final var dsBmscapacitiesByZone = IbmFunctions.getIsBareMetalServerCapacities(GetIsBareMetalServerCapacitiesArgs.builder()
                .zone("us-south-1")
                .build());
    
            // Filter by both profile and zone
            final var dsBmscapacitiesSpecific = IbmFunctions.getIsBareMetalServerCapacities(GetIsBareMetalServerCapacitiesArgs.builder()
                .profile("bx2-metal-192x768")
                .zone("us-south-1")
                .build());
    
        }
    }
    
    variables:
      # Get all bare metal server capacities in the region
      dsBmscapacities:
        fn::invoke:
          function: ibm:getIsBareMetalServerCapacities
          arguments: {}
      # Filter by profile name
      dsBmscapacitiesByProfile:
        fn::invoke:
          function: ibm:getIsBareMetalServerCapacities
          arguments:
            profile: bx2-metal-192x768
      # Filter by zone name
      dsBmscapacitiesByZone:
        fn::invoke:
          function: ibm:getIsBareMetalServerCapacities
          arguments:
            zone: us-south-1
      # Filter by both profile and zone
      dsBmscapacitiesSpecific:
        fn::invoke:
          function: ibm:getIsBareMetalServerCapacities
          arguments:
            profile: bx2-metal-192x768
            zone: us-south-1
    
    Example coming soon!
    

    Using getIsBareMetalServerCapacities

    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 getIsBareMetalServerCapacities(args: GetIsBareMetalServerCapacitiesArgs, opts?: InvokeOptions): Promise<GetIsBareMetalServerCapacitiesResult>
    function getIsBareMetalServerCapacitiesOutput(args: GetIsBareMetalServerCapacitiesOutputArgs, opts?: InvokeOutputOptions): Output<GetIsBareMetalServerCapacitiesResult>
    def get_is_bare_metal_server_capacities(id: Optional[str] = None,
                                            profile: Optional[str] = None,
                                            zone: Optional[str] = None,
                                            opts: Optional[InvokeOptions] = None) -> GetIsBareMetalServerCapacitiesResult
    def get_is_bare_metal_server_capacities_output(id: pulumi.Input[Optional[str]] = None,
                                            profile: pulumi.Input[Optional[str]] = None,
                                            zone: pulumi.Input[Optional[str]] = None,
                                            opts: Optional[InvokeOutputOptions] = None) -> Output[GetIsBareMetalServerCapacitiesResult]
    func GetIsBareMetalServerCapacities(ctx *Context, args *GetIsBareMetalServerCapacitiesArgs, opts ...InvokeOption) (*GetIsBareMetalServerCapacitiesResult, error)
    func GetIsBareMetalServerCapacitiesOutput(ctx *Context, args *GetIsBareMetalServerCapacitiesOutputArgs, opts ...InvokeOption) GetIsBareMetalServerCapacitiesResultOutput

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

    public static class GetIsBareMetalServerCapacities 
    {
        public static Task<GetIsBareMetalServerCapacitiesResult> InvokeAsync(GetIsBareMetalServerCapacitiesArgs args, InvokeOptions? opts = null)
        public static Output<GetIsBareMetalServerCapacitiesResult> Invoke(GetIsBareMetalServerCapacitiesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetIsBareMetalServerCapacitiesResult> Invoke(GetIsBareMetalServerCapacitiesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetIsBareMetalServerCapacitiesResult> getIsBareMetalServerCapacities(GetIsBareMetalServerCapacitiesArgs args, InvokeOptions options)
    public static Output<GetIsBareMetalServerCapacitiesResult> getIsBareMetalServerCapacities(GetIsBareMetalServerCapacitiesArgs args, InvokeOptions options)
    public static Output<GetIsBareMetalServerCapacitiesResult> getIsBareMetalServerCapacities(GetIsBareMetalServerCapacitiesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: ibm:index/getIsBareMetalServerCapacities:getIsBareMetalServerCapacities
      arguments:
        # arguments dictionary
    data "ibm_get_is_bare_metal_server_capacities" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    (String) The unique identifier of the bare metal server capacities data source.
    Profile string
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    Zone string
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    Id string
    (String) The unique identifier of the bare metal server capacities data source.
    Profile string
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    Zone string
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    id string
    (String) The unique identifier of the bare metal server capacities data source.
    profile string
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zone string
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    id String
    (String) The unique identifier of the bare metal server capacities data source.
    profile String
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zone String
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    id string
    (String) The unique identifier of the bare metal server capacities data source.
    profile string
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zone string
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    id str
    (String) The unique identifier of the bare metal server capacities data source.
    profile str
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zone str
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    id String
    (String) The unique identifier of the bare metal server capacities data source.
    profile String
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zone String
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.

    getIsBareMetalServerCapacities Result

    The following output properties are available:

    Capacities List<GetIsBareMetalServerCapacitiesCapacity>
    (List) A page of available bare metal server capacities. Each element represents a zone that has available bare metal servers with a profile.
    Id string
    (String) The unique identifier of the bare metal server capacities data source.
    Profile string
    (List) The profile available in the zone.
    Zone string
    (List) The zone where one or more bare metal servers of the profile are available.
    Capacities []GetIsBareMetalServerCapacitiesCapacity
    (List) A page of available bare metal server capacities. Each element represents a zone that has available bare metal servers with a profile.
    Id string
    (String) The unique identifier of the bare metal server capacities data source.
    Profile string
    (List) The profile available in the zone.
    Zone string
    (List) The zone where one or more bare metal servers of the profile are available.
    capacities list(object)
    (List) A page of available bare metal server capacities. Each element represents a zone that has available bare metal servers with a profile.
    id string
    (String) The unique identifier of the bare metal server capacities data source.
    profile string
    (List) The profile available in the zone.
    zone string
    (List) The zone where one or more bare metal servers of the profile are available.
    capacities List<GetIsBareMetalServerCapacitiesCapacity>
    (List) A page of available bare metal server capacities. Each element represents a zone that has available bare metal servers with a profile.
    id String
    (String) The unique identifier of the bare metal server capacities data source.
    profile String
    (List) The profile available in the zone.
    zone String
    (List) The zone where one or more bare metal servers of the profile are available.
    capacities GetIsBareMetalServerCapacitiesCapacity[]
    (List) A page of available bare metal server capacities. Each element represents a zone that has available bare metal servers with a profile.
    id string
    (String) The unique identifier of the bare metal server capacities data source.
    profile string
    (List) The profile available in the zone.
    zone string
    (List) The zone where one or more bare metal servers of the profile are available.
    capacities Sequence[GetIsBareMetalServerCapacitiesCapacity]
    (List) A page of available bare metal server capacities. Each element represents a zone that has available bare metal servers with a profile.
    id str
    (String) The unique identifier of the bare metal server capacities data source.
    profile str
    (List) The profile available in the zone.
    zone str
    (List) The zone where one or more bare metal servers of the profile are available.
    capacities List<Property Map>
    (List) A page of available bare metal server capacities. Each element represents a zone that has available bare metal servers with a profile.
    id String
    (String) The unique identifier of the bare metal server capacities data source.
    profile String
    (List) The profile available in the zone.
    zone String
    (List) The zone where one or more bare metal servers of the profile are available.

    Supporting Types

    GetIsBareMetalServerCapacitiesCapacity

    Profiles List<GetIsBareMetalServerCapacitiesCapacityProfile>
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    Zones List<GetIsBareMetalServerCapacitiesCapacityZone>
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    Profiles []GetIsBareMetalServerCapacitiesCapacityProfile
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    Zones []GetIsBareMetalServerCapacitiesCapacityZone
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    profiles list(object)
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zones list(object)
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    profiles List<GetIsBareMetalServerCapacitiesCapacityProfile>
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zones List<GetIsBareMetalServerCapacitiesCapacityZone>
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    profiles GetIsBareMetalServerCapacitiesCapacityProfile[]
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zones GetIsBareMetalServerCapacitiesCapacityZone[]
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    profiles Sequence[GetIsBareMetalServerCapacitiesCapacityProfile]
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zones Sequence[GetIsBareMetalServerCapacitiesCapacityZone]
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.
    profiles List<Property Map>
    The name of a bare metal server profile. Filters the collection to resources with a profile.name property matching the specified name.
    zones List<Property Map>
    The name of a zone. Filters the collection to resources with a zone.name property matching the specified name.

    GetIsBareMetalServerCapacitiesCapacityProfile

    Href string
    (String) The URL for this zone.
    Name string
    (String) The globally unique name for this zone.
    ResourceType string
    (String) The resource type. Value: bare_metal_server_profile.
    Href string
    (String) The URL for this zone.
    Name string
    (String) The globally unique name for this zone.
    ResourceType string
    (String) The resource type. Value: bare_metal_server_profile.
    href string
    (String) The URL for this zone.
    name string
    (String) The globally unique name for this zone.
    resource_type string
    (String) The resource type. Value: bare_metal_server_profile.
    href String
    (String) The URL for this zone.
    name String
    (String) The globally unique name for this zone.
    resourceType String
    (String) The resource type. Value: bare_metal_server_profile.
    href string
    (String) The URL for this zone.
    name string
    (String) The globally unique name for this zone.
    resourceType string
    (String) The resource type. Value: bare_metal_server_profile.
    href str
    (String) The URL for this zone.
    name str
    (String) The globally unique name for this zone.
    resource_type str
    (String) The resource type. Value: bare_metal_server_profile.
    href String
    (String) The URL for this zone.
    name String
    (String) The globally unique name for this zone.
    resourceType String
    (String) The resource type. Value: bare_metal_server_profile.

    GetIsBareMetalServerCapacitiesCapacityZone

    Href string
    (String) The URL for this zone.
    Name string
    (String) The globally unique name for this zone.
    Href string
    (String) The URL for this zone.
    Name string
    (String) The globally unique name for this zone.
    href string
    (String) The URL for this zone.
    name string
    (String) The globally unique name for this zone.
    href String
    (String) The URL for this zone.
    name String
    (String) The globally unique name for this zone.
    href string
    (String) The URL for this zone.
    name string
    (String) The globally unique name for this zone.
    href str
    (String) The URL for this zone.
    name str
    (String) The globally unique name for this zone.
    href String
    (String) The URL for this zone.
    name String
    (String) The globally unique name for this zone.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    Viewing docs for ibm 2.6.2
    published on Wednesday, Sep 16, 2026 by ibm-cloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial