Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi
oci.Core.getImageShapes
Explore with Pulumi AI
This data source provides the list of Image Shapes in Oracle Cloud Infrastructure Core service.
Lists the compatible shapes for the specified image.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testImageShapes = oci.Core.getImageShapes({
    imageId: testImage.id,
});
import pulumi
import pulumi_oci as oci
test_image_shapes = oci.Core.get_image_shapes(image_id=test_image["id"])
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.GetImageShapes(ctx, &core.GetImageShapesArgs{
			ImageId: testImage.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testImageShapes = Oci.Core.GetImageShapes.Invoke(new()
    {
        ImageId = testImage.Id,
    });
});
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.GetImageShapesArgs;
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 testImageShapes = CoreFunctions.getImageShapes(GetImageShapesArgs.builder()
            .imageId(testImage.id())
            .build());
    }
}
variables:
  testImageShapes:
    fn::invoke:
      function: oci:Core:getImageShapes
      arguments:
        imageId: ${testImage.id}
Using getImageShapes
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 getImageShapes(args: GetImageShapesArgs, opts?: InvokeOptions): Promise<GetImageShapesResult>
function getImageShapesOutput(args: GetImageShapesOutputArgs, opts?: InvokeOptions): Output<GetImageShapesResult>def get_image_shapes(filters: Optional[Sequence[_core.GetImageShapesFilter]] = None,
                     image_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetImageShapesResult
def get_image_shapes_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetImageShapesFilterArgs]]]] = None,
                     image_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetImageShapesResult]func GetImageShapes(ctx *Context, args *GetImageShapesArgs, opts ...InvokeOption) (*GetImageShapesResult, error)
func GetImageShapesOutput(ctx *Context, args *GetImageShapesOutputArgs, opts ...InvokeOption) GetImageShapesResultOutput> Note: This function is named GetImageShapes in the Go SDK.
public static class GetImageShapes 
{
    public static Task<GetImageShapesResult> InvokeAsync(GetImageShapesArgs args, InvokeOptions? opts = null)
    public static Output<GetImageShapesResult> Invoke(GetImageShapesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetImageShapesResult> getImageShapes(GetImageShapesArgs args, InvokeOptions options)
public static Output<GetImageShapesResult> getImageShapes(GetImageShapesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Core/getImageShapes:getImageShapes
  arguments:
    # arguments dictionaryThe following arguments are supported:
- ImageId string
- The OCID of the image.
- Filters
List<GetImage Shapes Filter> 
- ImageId string
- The OCID of the image.
- Filters
[]GetImage Shapes Filter 
- imageId String
- The OCID of the image.
- filters
List<GetImage Shapes Filter> 
- imageId string
- The OCID of the image.
- filters
GetImage Shapes Filter[] 
- image_id str
- The OCID of the image.
- filters
Sequence[core.Get Image Shapes Filter] 
- imageId String
- The OCID of the image.
- filters List<Property Map>
getImageShapes Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageId string
- The image OCID.
- ImageShape List<GetCompatibilities Image Shapes Image Shape Compatibility> 
- The list of image_shape_compatibilities.
- Filters
List<GetImage Shapes Filter> 
- Id string
- The provider-assigned unique ID for this managed resource.
- ImageId string
- The image OCID.
- ImageShape []GetCompatibilities Image Shapes Image Shape Compatibility 
- The list of image_shape_compatibilities.
- Filters
[]GetImage Shapes Filter 
- id String
- The provider-assigned unique ID for this managed resource.
- imageId String
- The image OCID.
- imageShape List<GetCompatibilities Image Shapes Image Shape Compatibility> 
- The list of image_shape_compatibilities.
- filters
List<GetImage Shapes Filter> 
- id string
- The provider-assigned unique ID for this managed resource.
- imageId string
- The image OCID.
- imageShape GetCompatibilities Image Shapes Image Shape Compatibility[] 
- The list of image_shape_compatibilities.
- filters
GetImage Shapes Filter[] 
- id str
- The provider-assigned unique ID for this managed resource.
- image_id str
- The image OCID.
- image_shape_ Sequence[core.compatibilities Get Image Shapes Image Shape Compatibility] 
- The list of image_shape_compatibilities.
- filters
Sequence[core.Get Image Shapes Filter] 
- id String
- The provider-assigned unique ID for this managed resource.
- imageId String
- The image OCID.
- imageShape List<Property Map>Compatibilities 
- The list of image_shape_compatibilities.
- filters List<Property Map>
Supporting Types
GetImageShapesFilter   
GetImageShapesImageShapeCompatibility     
- ImageId string
- The OCID of the image.
- MemoryConstraints List<GetImage Shapes Image Shape Compatibility Memory Constraint> 
- For a flexible image and shape, the amount of memory supported for instances that use this image.
- OcpuConstraints List<GetImage Shapes Image Shape Compatibility Ocpu Constraint> 
- OCPU options for an image and shape.
- Shape string
- The shape name.
- ImageId string
- The OCID of the image.
- MemoryConstraints []GetImage Shapes Image Shape Compatibility Memory Constraint 
- For a flexible image and shape, the amount of memory supported for instances that use this image.
- OcpuConstraints []GetImage Shapes Image Shape Compatibility Ocpu Constraint 
- OCPU options for an image and shape.
- Shape string
- The shape name.
- imageId String
- The OCID of the image.
- memoryConstraints List<GetImage Shapes Image Shape Compatibility Memory Constraint> 
- For a flexible image and shape, the amount of memory supported for instances that use this image.
- ocpuConstraints List<GetImage Shapes Image Shape Compatibility Ocpu Constraint> 
- OCPU options for an image and shape.
- shape String
- The shape name.
- imageId string
- The OCID of the image.
- memoryConstraints GetImage Shapes Image Shape Compatibility Memory Constraint[] 
- For a flexible image and shape, the amount of memory supported for instances that use this image.
- ocpuConstraints GetImage Shapes Image Shape Compatibility Ocpu Constraint[] 
- OCPU options for an image and shape.
- shape string
- The shape name.
- image_id str
- The OCID of the image.
- memory_constraints Sequence[core.Get Image Shapes Image Shape Compatibility Memory Constraint] 
- For a flexible image and shape, the amount of memory supported for instances that use this image.
- ocpu_constraints Sequence[core.Get Image Shapes Image Shape Compatibility Ocpu Constraint] 
- OCPU options for an image and shape.
- shape str
- The shape name.
- imageId String
- The OCID of the image.
- 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.
GetImageShapesImageShapeCompatibilityMemoryConstraint       
- max_in_ intgbs 
- The maximum amount of memory, in gigabytes.
- min_in_ intgbs 
- The minimum amount of memory, in gigabytes.
GetImageShapesImageShapeCompatibilityOcpuConstraint       
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.