1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getImageShape
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.Core.getImageShape

Explore with Pulumi AI

Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

This data source provides details about a specific Image Shape resource in Oracle Cloud Infrastructure Core service.

Retrieves an image shape compatibility entry.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testImageShape = oci.Core.getImageShape({
    imageId: testImage.id,
    shapeName: testShape.name,
});
Copy
import pulumi
import pulumi_oci as oci

test_image_shape = oci.Core.get_image_shape(image_id=test_image["id"],
    shape_name=test_shape["name"])
Copy
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.GetImageShape(ctx, &core.GetImageShapeArgs{
			ImageId:   testImage.Id,
			ShapeName: testShape.Name,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testImageShape = Oci.Core.GetImageShape.Invoke(new()
    {
        ImageId = testImage.Id,
        ShapeName = testShape.Name,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetImageShapeArgs;
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 testImageShape = CoreFunctions.getImageShape(GetImageShapeArgs.builder()
            .imageId(testImage.id())
            .shapeName(testShape.name())
            .build());

    }
}
Copy
variables:
  testImageShape:
    fn::invoke:
      function: oci:Core:getImageShape
      arguments:
        imageId: ${testImage.id}
        shapeName: ${testShape.name}
Copy

Using getImageShape

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 getImageShape(args: GetImageShapeArgs, opts?: InvokeOptions): Promise<GetImageShapeResult>
function getImageShapeOutput(args: GetImageShapeOutputArgs, opts?: InvokeOptions): Output<GetImageShapeResult>
Copy
def get_image_shape(image_id: Optional[str] = None,
                    shape_name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetImageShapeResult
def get_image_shape_output(image_id: Optional[pulumi.Input[str]] = None,
                    shape_name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetImageShapeResult]
Copy
func GetImageShape(ctx *Context, args *GetImageShapeArgs, opts ...InvokeOption) (*GetImageShapeResult, error)
func GetImageShapeOutput(ctx *Context, args *GetImageShapeOutputArgs, opts ...InvokeOption) GetImageShapeResultOutput
Copy

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

public static class GetImageShape 
{
    public static Task<GetImageShapeResult> InvokeAsync(GetImageShapeArgs args, InvokeOptions? opts = null)
    public static Output<GetImageShapeResult> Invoke(GetImageShapeInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetImageShapeResult> getImageShape(GetImageShapeArgs args, InvokeOptions options)
public static Output<GetImageShapeResult> getImageShape(GetImageShapeArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: oci:Core/getImageShape:getImageShape
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ImageId This property is required. string
The OCID of the image.
ShapeName This property is required. string
Shape name.
ImageId This property is required. string
The OCID of the image.
ShapeName This property is required. string
Shape name.
imageId This property is required. String
The OCID of the image.
shapeName This property is required. String
Shape name.
imageId This property is required. string
The OCID of the image.
shapeName This property is required. string
Shape name.
image_id This property is required. str
The OCID of the image.
shape_name This property is required. str
Shape name.
imageId This property is required. String
The OCID of the image.
shapeName This property is required. String
Shape name.

getImageShape Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
ImageId string
The image OCID.
MemoryConstraints List<GetImageShapeMemoryConstraint>
For a flexible image and shape, the amount of memory supported for instances that use this image.
OcpuConstraints List<GetImageShapeOcpuConstraint>
OCPU options for an image and shape.
Shape string
The shape name.
ShapeName string
Id string
The provider-assigned unique ID for this managed resource.
ImageId string
The image OCID.
MemoryConstraints []GetImageShapeMemoryConstraint
For a flexible image and shape, the amount of memory supported for instances that use this image.
OcpuConstraints []GetImageShapeOcpuConstraint
OCPU options for an image and shape.
Shape string
The shape name.
ShapeName string
id String
The provider-assigned unique ID for this managed resource.
imageId String
The image OCID.
memoryConstraints List<GetImageShapeMemoryConstraint>
For a flexible image and shape, the amount of memory supported for instances that use this image.
ocpuConstraints List<GetImageShapeOcpuConstraint>
OCPU options for an image and shape.
shape String
The shape name.
shapeName String
id string
The provider-assigned unique ID for this managed resource.
imageId string
The image OCID.
memoryConstraints GetImageShapeMemoryConstraint[]
For a flexible image and shape, the amount of memory supported for instances that use this image.
ocpuConstraints GetImageShapeOcpuConstraint[]
OCPU options for an image and shape.
shape string
The shape name.
shapeName string
id str
The provider-assigned unique ID for this managed resource.
image_id str
The image OCID.
memory_constraints Sequence[core.GetImageShapeMemoryConstraint]
For a flexible image and shape, the amount of memory supported for instances that use this image.
ocpu_constraints Sequence[core.GetImageShapeOcpuConstraint]
OCPU options for an image and shape.
shape str
The shape name.
shape_name str
id String
The provider-assigned unique ID for this managed resource.
imageId String
The image OCID.
memoryConstraints List<Property Map>
For a flexible image and shape, the amount of memory supported for instances that use this image.
ocpuConstraints List<Property Map>
OCPU options for an image and shape.
shape String
The shape name.
shapeName String

Supporting Types

GetImageShapeMemoryConstraint

MaxInGbs This property is required. int
The maximum amount of memory, in gigabytes.
MinInGbs This property is required. int
The minimum amount of memory, in gigabytes.
MaxInGbs This property is required. int
The maximum amount of memory, in gigabytes.
MinInGbs This property is required. int
The minimum amount of memory, in gigabytes.
maxInGbs This property is required. Integer
The maximum amount of memory, in gigabytes.
minInGbs This property is required. Integer
The minimum amount of memory, in gigabytes.
maxInGbs This property is required. number
The maximum amount of memory, in gigabytes.
minInGbs This property is required. number
The minimum amount of memory, in gigabytes.
max_in_gbs This property is required. int
The maximum amount of memory, in gigabytes.
min_in_gbs This property is required. int
The minimum amount of memory, in gigabytes.
maxInGbs This property is required. Number
The maximum amount of memory, in gigabytes.
minInGbs This property is required. Number
The minimum amount of memory, in gigabytes.

GetImageShapeOcpuConstraint

Max This property is required. int
The maximum number of OCPUs supported for this image and shape.
Min This property is required. int
The minimum number of OCPUs supported for this image and shape.
Max This property is required. int
The maximum number of OCPUs supported for this image and shape.
Min This property is required. int
The minimum number of OCPUs supported for this image and shape.
max This property is required. Integer
The maximum number of OCPUs supported for this image and shape.
min This property is required. Integer
The minimum number of OCPUs supported for this image and shape.
max This property is required. number
The maximum number of OCPUs supported for this image and shape.
min This property is required. number
The minimum number of OCPUs supported for this image and shape.
max This property is required. int
The maximum number of OCPUs supported for this image and shape.
min This property is required. int
The minimum number of OCPUs supported for this image and shape.
max This property is required. Number
The maximum number of OCPUs supported for this image and shape.
min This property is required. Number
The minimum number of OCPUs supported for this image and shape.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi