1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. ComputeCapacityReport
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

oci.Core.ComputeCapacityReport

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

    This resource provides the Compute Capacity Report resource in Oracle Cloud Infrastructure Core service.

    Generates a report of the host capacity within an availability domain that is available for you to create compute instances. Host capacity is the physical infrastructure that resources such as compute instances run on.

    Use the capacity report to determine whether sufficient capacity is available for a shape before you create an instance or change the shape of an instance.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testComputeCapacityReport = new Oci.Core.ComputeCapacityReport("testComputeCapacityReport", new()
        {
            AvailabilityDomain = @var.Compute_capacity_report_availability_domain,
            CompartmentId = @var.Compartment_id,
            ShapeAvailabilities = new[]
            {
                new Oci.Core.Inputs.ComputeCapacityReportShapeAvailabilityArgs
                {
                    InstanceShape = @var.Compute_capacity_report_shape_availabilities_instance_shape,
                    FaultDomain = @var.Compute_capacity_report_shape_availabilities_fault_domain,
                    InstanceShapeConfig = new Oci.Core.Inputs.ComputeCapacityReportShapeAvailabilityInstanceShapeConfigArgs
                    {
                        MemoryInGbs = @var.Compute_capacity_report_shape_availabilities_instance_shape_config_memory_in_gbs,
                        Nvmes = @var.Compute_capacity_report_shape_availabilities_instance_shape_config_nvmes,
                        Ocpus = @var.Compute_capacity_report_shape_availabilities_instance_shape_config_ocpus,
                    },
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.NewComputeCapacityReport(ctx, "testComputeCapacityReport", &Core.ComputeCapacityReportArgs{
    			AvailabilityDomain: pulumi.Any(_var.Compute_capacity_report_availability_domain),
    			CompartmentId:      pulumi.Any(_var.Compartment_id),
    			ShapeAvailabilities: core.ComputeCapacityReportShapeAvailabilityArray{
    				&core.ComputeCapacityReportShapeAvailabilityArgs{
    					InstanceShape: pulumi.Any(_var.Compute_capacity_report_shape_availabilities_instance_shape),
    					FaultDomain:   pulumi.Any(_var.Compute_capacity_report_shape_availabilities_fault_domain),
    					InstanceShapeConfig: &core.ComputeCapacityReportShapeAvailabilityInstanceShapeConfigArgs{
    						MemoryInGbs: pulumi.Any(_var.Compute_capacity_report_shape_availabilities_instance_shape_config_memory_in_gbs),
    						Nvmes:       pulumi.Any(_var.Compute_capacity_report_shape_availabilities_instance_shape_config_nvmes),
    						Ocpus:       pulumi.Any(_var.Compute_capacity_report_shape_availabilities_instance_shape_config_ocpus),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Core.ComputeCapacityReport;
    import com.pulumi.oci.Core.ComputeCapacityReportArgs;
    import com.pulumi.oci.Core.inputs.ComputeCapacityReportShapeAvailabilityArgs;
    import com.pulumi.oci.Core.inputs.ComputeCapacityReportShapeAvailabilityInstanceShapeConfigArgs;
    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) {
            var testComputeCapacityReport = new ComputeCapacityReport("testComputeCapacityReport", ComputeCapacityReportArgs.builder()        
                .availabilityDomain(var_.compute_capacity_report_availability_domain())
                .compartmentId(var_.compartment_id())
                .shapeAvailabilities(ComputeCapacityReportShapeAvailabilityArgs.builder()
                    .instanceShape(var_.compute_capacity_report_shape_availabilities_instance_shape())
                    .faultDomain(var_.compute_capacity_report_shape_availabilities_fault_domain())
                    .instanceShapeConfig(ComputeCapacityReportShapeAvailabilityInstanceShapeConfigArgs.builder()
                        .memoryInGbs(var_.compute_capacity_report_shape_availabilities_instance_shape_config_memory_in_gbs())
                        .nvmes(var_.compute_capacity_report_shape_availabilities_instance_shape_config_nvmes())
                        .ocpus(var_.compute_capacity_report_shape_availabilities_instance_shape_config_ocpus())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_compute_capacity_report = oci.core.ComputeCapacityReport("testComputeCapacityReport",
        availability_domain=var["compute_capacity_report_availability_domain"],
        compartment_id=var["compartment_id"],
        shape_availabilities=[oci.core.ComputeCapacityReportShapeAvailabilityArgs(
            instance_shape=var["compute_capacity_report_shape_availabilities_instance_shape"],
            fault_domain=var["compute_capacity_report_shape_availabilities_fault_domain"],
            instance_shape_config=oci.core.ComputeCapacityReportShapeAvailabilityInstanceShapeConfigArgs(
                memory_in_gbs=var["compute_capacity_report_shape_availabilities_instance_shape_config_memory_in_gbs"],
                nvmes=var["compute_capacity_report_shape_availabilities_instance_shape_config_nvmes"],
                ocpus=var["compute_capacity_report_shape_availabilities_instance_shape_config_ocpus"],
            ),
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testComputeCapacityReport = new oci.core.ComputeCapacityReport("testComputeCapacityReport", {
        availabilityDomain: _var.compute_capacity_report_availability_domain,
        compartmentId: _var.compartment_id,
        shapeAvailabilities: [{
            instanceShape: _var.compute_capacity_report_shape_availabilities_instance_shape,
            faultDomain: _var.compute_capacity_report_shape_availabilities_fault_domain,
            instanceShapeConfig: {
                memoryInGbs: _var.compute_capacity_report_shape_availabilities_instance_shape_config_memory_in_gbs,
                nvmes: _var.compute_capacity_report_shape_availabilities_instance_shape_config_nvmes,
                ocpus: _var.compute_capacity_report_shape_availabilities_instance_shape_config_ocpus,
            },
        }],
    });
    
    resources:
      testComputeCapacityReport:
        type: oci:Core:ComputeCapacityReport
        properties:
          #Required
          availabilityDomain: ${var.compute_capacity_report_availability_domain}
          compartmentId: ${var.compartment_id}
          shapeAvailabilities:
            - instanceShape: ${var.compute_capacity_report_shape_availabilities_instance_shape}
              faultDomain: ${var.compute_capacity_report_shape_availabilities_fault_domain}
              instanceShapeConfig:
                memoryInGbs: ${var.compute_capacity_report_shape_availabilities_instance_shape_config_memory_in_gbs}
                nvmes: ${var.compute_capacity_report_shape_availabilities_instance_shape_config_nvmes}
                ocpus: ${var.compute_capacity_report_shape_availabilities_instance_shape_config_ocpus}
    

    Create ComputeCapacityReport Resource

    new ComputeCapacityReport(name: string, args: ComputeCapacityReportArgs, opts?: CustomResourceOptions);
    @overload
    def ComputeCapacityReport(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              availability_domain: Optional[str] = None,
                              compartment_id: Optional[str] = None,
                              shape_availabilities: Optional[Sequence[_core.ComputeCapacityReportShapeAvailabilityArgs]] = None)
    @overload
    def ComputeCapacityReport(resource_name: str,
                              args: ComputeCapacityReportArgs,
                              opts: Optional[ResourceOptions] = None)
    func NewComputeCapacityReport(ctx *Context, name string, args ComputeCapacityReportArgs, opts ...ResourceOption) (*ComputeCapacityReport, error)
    public ComputeCapacityReport(string name, ComputeCapacityReportArgs args, CustomResourceOptions? opts = null)
    public ComputeCapacityReport(String name, ComputeCapacityReportArgs args)
    public ComputeCapacityReport(String name, ComputeCapacityReportArgs args, CustomResourceOptions options)
    
    type: oci:Core:ComputeCapacityReport
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ComputeCapacityReportArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ComputeCapacityReportArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ComputeCapacityReportArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComputeCapacityReportArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComputeCapacityReportArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ComputeCapacityReport Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ComputeCapacityReport resource accepts the following input properties:

    AvailabilityDomain string

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    CompartmentId string

    The OCID for the compartment. This should always be the root compartment.

    ShapeAvailabilities List<ComputeCapacityReportShapeAvailability>

    Information about the shapes in the capacity report.

    AvailabilityDomain string

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    CompartmentId string

    The OCID for the compartment. This should always be the root compartment.

    ShapeAvailabilities []ComputeCapacityReportShapeAvailabilityArgs

    Information about the shapes in the capacity report.

    availabilityDomain String

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    compartmentId String

    The OCID for the compartment. This should always be the root compartment.

    shapeAvailabilities List<ComputeCapacityReportShapeAvailability>

    Information about the shapes in the capacity report.

    availabilityDomain string

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    compartmentId string

    The OCID for the compartment. This should always be the root compartment.

    shapeAvailabilities ComputeCapacityReportShapeAvailability[]

    Information about the shapes in the capacity report.

    availability_domain str

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    compartment_id str

    The OCID for the compartment. This should always be the root compartment.

    shape_availabilities ComputeCapacityReportShapeAvailabilityArgs]

    Information about the shapes in the capacity report.

    availabilityDomain String

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    compartmentId String

    The OCID for the compartment. This should always be the root compartment.

    shapeAvailabilities List<Property Map>

    Information about the shapes in the capacity report.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ComputeCapacityReport resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    TimeCreated string

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    Id string

    The provider-assigned unique ID for this managed resource.

    TimeCreated string

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    id String

    The provider-assigned unique ID for this managed resource.

    timeCreated String

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    id string

    The provider-assigned unique ID for this managed resource.

    timeCreated string

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    id str

    The provider-assigned unique ID for this managed resource.

    time_created str

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    id String

    The provider-assigned unique ID for this managed resource.

    timeCreated String

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    Look up Existing ComputeCapacityReport Resource

    Get an existing ComputeCapacityReport resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ComputeCapacityReportState, opts?: CustomResourceOptions): ComputeCapacityReport
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            availability_domain: Optional[str] = None,
            compartment_id: Optional[str] = None,
            shape_availabilities: Optional[Sequence[_core.ComputeCapacityReportShapeAvailabilityArgs]] = None,
            time_created: Optional[str] = None) -> ComputeCapacityReport
    func GetComputeCapacityReport(ctx *Context, name string, id IDInput, state *ComputeCapacityReportState, opts ...ResourceOption) (*ComputeCapacityReport, error)
    public static ComputeCapacityReport Get(string name, Input<string> id, ComputeCapacityReportState? state, CustomResourceOptions? opts = null)
    public static ComputeCapacityReport get(String name, Output<String> id, ComputeCapacityReportState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AvailabilityDomain string

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    CompartmentId string

    The OCID for the compartment. This should always be the root compartment.

    ShapeAvailabilities List<ComputeCapacityReportShapeAvailability>

    Information about the shapes in the capacity report.

    TimeCreated string

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    AvailabilityDomain string

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    CompartmentId string

    The OCID for the compartment. This should always be the root compartment.

    ShapeAvailabilities []ComputeCapacityReportShapeAvailabilityArgs

    Information about the shapes in the capacity report.

    TimeCreated string

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    availabilityDomain String

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    compartmentId String

    The OCID for the compartment. This should always be the root compartment.

    shapeAvailabilities List<ComputeCapacityReportShapeAvailability>

    Information about the shapes in the capacity report.

    timeCreated String

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    availabilityDomain string

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    compartmentId string

    The OCID for the compartment. This should always be the root compartment.

    shapeAvailabilities ComputeCapacityReportShapeAvailability[]

    Information about the shapes in the capacity report.

    timeCreated string

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    availability_domain str

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    compartment_id str

    The OCID for the compartment. This should always be the root compartment.

    shape_availabilities ComputeCapacityReportShapeAvailabilityArgs]

    Information about the shapes in the capacity report.

    time_created str

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    availabilityDomain String

    The availability domain for the capacity report. Example: Uocm:PHX-AD-1

    compartmentId String

    The OCID for the compartment. This should always be the root compartment.

    shapeAvailabilities List<Property Map>

    Information about the shapes in the capacity report.

    timeCreated String

    The date and time the capacity report was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    Supporting Types

    ComputeCapacityReportShapeAvailability, ComputeCapacityReportShapeAvailabilityArgs

    InstanceShape string

    The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.

    AvailabilityStatus string

    A flag denoting whether capacity is available.

    AvailableCount string

    The total number of new instances that can be created with the specified shape configuration.

    FaultDomain string

    The fault domain for the capacity report.

    If you do not specify a fault domain, the capacity report includes information about all fault domains.

    InstanceShapeConfig ComputeCapacityReportShapeAvailabilityInstanceShapeConfig

    The shape configuration for a shape in a capacity report.

    InstanceShape string

    The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.

    AvailabilityStatus string

    A flag denoting whether capacity is available.

    AvailableCount string

    The total number of new instances that can be created with the specified shape configuration.

    FaultDomain string

    The fault domain for the capacity report.

    If you do not specify a fault domain, the capacity report includes information about all fault domains.

    InstanceShapeConfig ComputeCapacityReportShapeAvailabilityInstanceShapeConfig

    The shape configuration for a shape in a capacity report.

    instanceShape String

    The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.

    availabilityStatus String

    A flag denoting whether capacity is available.

    availableCount String

    The total number of new instances that can be created with the specified shape configuration.

    faultDomain String

    The fault domain for the capacity report.

    If you do not specify a fault domain, the capacity report includes information about all fault domains.

    instanceShapeConfig ComputeCapacityReportShapeAvailabilityInstanceShapeConfig

    The shape configuration for a shape in a capacity report.

    instanceShape string

    The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.

    availabilityStatus string

    A flag denoting whether capacity is available.

    availableCount string

    The total number of new instances that can be created with the specified shape configuration.

    faultDomain string

    The fault domain for the capacity report.

    If you do not specify a fault domain, the capacity report includes information about all fault domains.

    instanceShapeConfig ComputeCapacityReportShapeAvailabilityInstanceShapeConfig

    The shape configuration for a shape in a capacity report.

    instance_shape str

    The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.

    availability_status str

    A flag denoting whether capacity is available.

    available_count str

    The total number of new instances that can be created with the specified shape configuration.

    fault_domain str

    The fault domain for the capacity report.

    If you do not specify a fault domain, the capacity report includes information about all fault domains.

    instance_shape_config ComputeCapacityReportShapeAvailabilityInstanceShapeConfig

    The shape configuration for a shape in a capacity report.

    instanceShape String

    The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.

    availabilityStatus String

    A flag denoting whether capacity is available.

    availableCount String

    The total number of new instances that can be created with the specified shape configuration.

    faultDomain String

    The fault domain for the capacity report.

    If you do not specify a fault domain, the capacity report includes information about all fault domains.

    instanceShapeConfig Property Map

    The shape configuration for a shape in a capacity report.

    ComputeCapacityReportShapeAvailabilityInstanceShapeConfig, ComputeCapacityReportShapeAvailabilityInstanceShapeConfigArgs

    MemoryInGbs double

    The total amount of memory available to the instance, in gigabytes.

    Nvmes int

    The number of NVMe drives to be used for storage.

    Ocpus double

    The total number of OCPUs available to the instance.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    MemoryInGbs float64

    The total amount of memory available to the instance, in gigabytes.

    Nvmes int

    The number of NVMe drives to be used for storage.

    Ocpus float64

    The total number of OCPUs available to the instance.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    memoryInGbs Double

    The total amount of memory available to the instance, in gigabytes.

    nvmes Integer

    The number of NVMe drives to be used for storage.

    ocpus Double

    The total number of OCPUs available to the instance.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    memoryInGbs number

    The total amount of memory available to the instance, in gigabytes.

    nvmes number

    The number of NVMe drives to be used for storage.

    ocpus number

    The total number of OCPUs available to the instance.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    memory_in_gbs float

    The total amount of memory available to the instance, in gigabytes.

    nvmes int

    The number of NVMe drives to be used for storage.

    ocpus float

    The total number of OCPUs available to the instance.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    memoryInGbs Number

    The total amount of memory available to the instance, in gigabytes.

    nvmes Number

    The number of NVMe drives to be used for storage.

    ocpus Number

    The total number of OCPUs available to the instance.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Import

    ComputeCapacityReports can be imported using the id, e.g.

     $ pulumi import oci:Core/computeCapacityReport:ComputeCapacityReport test_compute_capacity_report "id"
    

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the oci Terraform Provider.

    oci logo
    Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi