1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getImageShapes
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Core.getImageShapes

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Core/getImageShapes:getImageShapes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    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.
    ImageShapeCompatibilities List<GetImageShapesImageShapeCompatibility>
    The list of image_shape_compatibilities.
    Filters List<GetImageShapesFilter>
    Id string
    The provider-assigned unique ID for this managed resource.
    ImageId string
    The image OCID.
    ImageShapeCompatibilities []GetImageShapesImageShapeCompatibility
    The list of image_shape_compatibilities.
    Filters []GetImageShapesFilter
    id String
    The provider-assigned unique ID for this managed resource.
    imageId String
    The image OCID.
    imageShapeCompatibilities List<GetImageShapesImageShapeCompatibility>
    The list of image_shape_compatibilities.
    filters List<GetImageShapesFilter>
    id string
    The provider-assigned unique ID for this managed resource.
    imageId string
    The image OCID.
    imageShapeCompatibilities GetImageShapesImageShapeCompatibility[]
    The list of image_shape_compatibilities.
    filters GetImageShapesFilter[]
    id str
    The provider-assigned unique ID for this managed resource.
    image_id str
    The image OCID.
    image_shape_compatibilities Sequence[core.GetImageShapesImageShapeCompatibility]
    The list of image_shape_compatibilities.
    filters Sequence[core.GetImageShapesFilter]
    id String
    The provider-assigned unique ID for this managed resource.
    imageId String
    The image OCID.
    imageShapeCompatibilities List<Property Map>
    The list of image_shape_compatibilities.
    filters List<Property Map>

    Supporting Types

    GetImageShapesFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    GetImageShapesImageShapeCompatibility

    ImageId string
    The OCID of the image.
    MemoryConstraints List<GetImageShapesImageShapeCompatibilityMemoryConstraint>
    For a flexible image and shape, the amount of memory supported for instances that use this image.
    OcpuConstraints List<GetImageShapesImageShapeCompatibilityOcpuConstraint>
    OCPU options for an image and shape.
    Shape string
    The shape name.
    ImageId string
    The OCID of the image.
    MemoryConstraints []GetImageShapesImageShapeCompatibilityMemoryConstraint
    For a flexible image and shape, the amount of memory supported for instances that use this image.
    OcpuConstraints []GetImageShapesImageShapeCompatibilityOcpuConstraint
    OCPU options for an image and shape.
    Shape string
    The shape name.
    imageId String
    The OCID of the image.
    memoryConstraints List<GetImageShapesImageShapeCompatibilityMemoryConstraint>
    For a flexible image and shape, the amount of memory supported for instances that use this image.
    ocpuConstraints List<GetImageShapesImageShapeCompatibilityOcpuConstraint>
    OCPU options for an image and shape.
    shape String
    The shape name.
    imageId string
    The OCID of the image.
    memoryConstraints GetImageShapesImageShapeCompatibilityMemoryConstraint[]
    For a flexible image and shape, the amount of memory supported for instances that use this image.
    ocpuConstraints GetImageShapesImageShapeCompatibilityOcpuConstraint[]
    OCPU options for an image and shape.
    shape string
    The shape name.
    image_id str
    The OCID of the image.
    memory_constraints Sequence[core.GetImageShapesImageShapeCompatibilityMemoryConstraint]
    For a flexible image and shape, the amount of memory supported for instances that use this image.
    ocpu_constraints Sequence[core.GetImageShapesImageShapeCompatibilityOcpuConstraint]
    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

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

    GetImageShapesImageShapeCompatibilityOcpuConstraint

    Max int
    The maximum number of OCPUs supported for this image and shape.
    Min int
    The minimum number of OCPUs supported for this image and shape.
    Max int
    The maximum number of OCPUs supported for this image and shape.
    Min int
    The minimum number of OCPUs supported for this image and shape.
    max Integer
    The maximum number of OCPUs supported for this image and shape.
    min Integer
    The minimum number of OCPUs supported for this image and shape.
    max number
    The maximum number of OCPUs supported for this image and shape.
    min number
    The minimum number of OCPUs supported for this image and shape.
    max int
    The maximum number of OCPUs supported for this image and shape.
    min int
    The minimum number of OCPUs supported for this image and shape.
    max Number
    The maximum number of OCPUs supported for this image and shape.
    min 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.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi