Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Core/getImageShapes:getImageShapes
arguments:
# arguments dictionary
The following arguments are supported:
- Image
Id string - The OCID of the image.
- Filters
List<Get
Image Shapes Filter>
- Image
Id string - The OCID of the image.
- Filters
[]Get
Image Shapes Filter
- image
Id String - The OCID of the image.
- filters
List<Get
Image Shapes Filter>
- image
Id string - The OCID of the image.
- filters
Get
Image Shapes Filter[]
- image_
id str - The OCID of the image.
- filters
Sequence[core.
Get Image Shapes Filter]
- image
Id 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.
- Image
Id string - The image OCID.
- Image
Shape List<GetCompatibilities Image Shapes Image Shape Compatibility> - The list of image_shape_compatibilities.
- Filters
List<Get
Image Shapes Filter>
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Id string - The image OCID.
- Image
Shape []GetCompatibilities Image Shapes Image Shape Compatibility - The list of image_shape_compatibilities.
- Filters
[]Get
Image Shapes Filter
- id String
- The provider-assigned unique ID for this managed resource.
- image
Id String - The image OCID.
- image
Shape List<GetCompatibilities Image Shapes Image Shape Compatibility> - The list of image_shape_compatibilities.
- filters
List<Get
Image Shapes Filter>
- id string
- The provider-assigned unique ID for this managed resource.
- image
Id string - The image OCID.
- image
Shape GetCompatibilities Image Shapes Image Shape Compatibility[] - The list of image_shape_compatibilities.
- filters
Get
Image 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.
- image
Id String - The image OCID.
- image
Shape List<Property Map>Compatibilities - The list of image_shape_compatibilities.
- filters List<Property Map>
Supporting Types
GetImageShapesFilter
GetImageShapesImageShapeCompatibility
- Image
Id string - The OCID of the image.
- Memory
Constraints 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.
- Ocpu
Constraints List<GetImage Shapes Image Shape Compatibility Ocpu Constraint> - OCPU options for an image and shape.
- Shape string
- The shape name.
- Image
Id string - The OCID of the image.
- Memory
Constraints []GetImage 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 []GetImage Shapes Image Shape Compatibility Ocpu Constraint - OCPU options for an image and shape.
- Shape string
- The shape name.
- image
Id String - The OCID of the image.
- memory
Constraints 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.
- ocpu
Constraints List<GetImage Shapes Image Shape Compatibility Ocpu Constraint> - OCPU options for an image and shape.
- shape String
- The shape name.
- image
Id string - The OCID of the image.
- memory
Constraints GetImage 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 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.
- image
Id String - The OCID of the image.
- memory
Constraints List<Property Map> - For a flexible image and shape, the amount of memory supported for instances that use this image.
- ocpu
Constraints 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
oci
Terraform Provider.