oci.Core.ComputeCapacityReport
Explore with Pulumi AI
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:
- Availability
Domain string The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID for the compartment. This should always be the root compartment.
- Shape
Availabilities List<ComputeCapacity Report Shape Availability> Information about the shapes in the capacity report.
- Availability
Domain string The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID for the compartment. This should always be the root compartment.
- Shape
Availabilities []ComputeCapacity Report Shape Availability Args Information about the shapes in the capacity report.
- availability
Domain String The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID for the compartment. This should always be the root compartment.
- shape
Availabilities List<ComputeCapacity Report Shape Availability> Information about the shapes in the capacity report.
- availability
Domain string The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- compartment
Id string The OCID for the compartment. This should always be the root compartment.
- shape
Availabilities ComputeCapacity Report Shape Availability[] 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 ComputeCapacity Report Shape Availability Args] Information about the shapes in the capacity report.
- availability
Domain String The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID for the compartment. This should always be the root compartment.
- shape
Availabilities 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.
- Time
Created 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.
- Time
Created 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.
- time
Created 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.
- time
Created 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.
- time
Created 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.
- Availability
Domain string The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID for the compartment. This should always be the root compartment.
- Shape
Availabilities List<ComputeCapacity Report Shape Availability> Information about the shapes in the capacity report.
- Time
Created 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 string The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- Compartment
Id string The OCID for the compartment. This should always be the root compartment.
- Shape
Availabilities []ComputeCapacity Report Shape Availability Args Information about the shapes in the capacity report.
- Time
Created 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 String The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID for the compartment. This should always be the root compartment.
- shape
Availabilities List<ComputeCapacity Report Shape Availability> Information about the shapes in the capacity report.
- time
Created 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 string The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- compartment
Id string The OCID for the compartment. This should always be the root compartment.
- shape
Availabilities ComputeCapacity Report Shape Availability[] Information about the shapes in the capacity report.
- time
Created 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 ComputeCapacity Report Shape Availability Args] 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
- availability
Domain String The availability domain for the capacity report. Example:
Uocm:PHX-AD-1
- compartment
Id String The OCID for the compartment. This should always be the root compartment.
- shape
Availabilities List<Property Map> Information about the shapes in the capacity report.
- time
Created 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
- Instance
Shape string The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.
- Availability
Status string A flag denoting whether capacity is available.
- Available
Count string The total number of new instances that can be created with the specified shape configuration.
- Fault
Domain 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.
- Instance
Shape ComputeConfig Capacity Report Shape Availability Instance Shape Config The shape configuration for a shape in a capacity report.
- Instance
Shape string The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.
- Availability
Status string A flag denoting whether capacity is available.
- Available
Count string The total number of new instances that can be created with the specified shape configuration.
- Fault
Domain 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.
- Instance
Shape ComputeConfig Capacity Report Shape Availability Instance Shape Config The shape configuration for a shape in a capacity report.
- instance
Shape String The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.
- availability
Status String A flag denoting whether capacity is available.
- available
Count String The total number of new instances that can be created with the specified shape configuration.
- fault
Domain 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.
- instance
Shape ComputeConfig Capacity Report Shape Availability Instance Shape Config The shape configuration for a shape in a capacity report.
- instance
Shape string The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.
- availability
Status string A flag denoting whether capacity is available.
- available
Count string The total number of new instances that can be created with the specified shape configuration.
- fault
Domain 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.
- instance
Shape ComputeConfig Capacity Report Shape Availability Instance Shape Config 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_ Computeconfig Capacity Report Shape Availability Instance Shape Config The shape configuration for a shape in a capacity report.
- instance
Shape String The shape that you want to request a capacity report for. You can enumerate all available shapes by calling ListShapes.
- availability
Status String A flag denoting whether capacity is available.
- available
Count String The total number of new instances that can be created with the specified shape configuration.
- fault
Domain 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.
- instance
Shape Property MapConfig The shape configuration for a shape in a capacity report.
ComputeCapacityReportShapeAvailabilityInstanceShapeConfig, ComputeCapacityReportShapeAvailabilityInstanceShapeConfigArgs
- Memory
In doubleGbs 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
- Memory
In float64Gbs 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
- memory
In DoubleGbs 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
- memory
In numberGbs 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_ floatgbs 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
- memory
In NumberGbs 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.