Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.Core.getImageShape
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 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,
});
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"])
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.GetImageShape(ctx, &core.GetImageShapeArgs{
ImageId: testImage.Id,
ShapeName: testShape.Name,
}, 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 testImageShape = Oci.Core.GetImageShape.Invoke(new()
{
ImageId = testImage.Id,
ShapeName = testShape.Name,
});
});
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());
}
}
variables:
testImageShape:
fn::invoke:
Function: oci:Core:getImageShape
Arguments:
imageId: ${testImage.id}
shapeName: ${testShape.name}
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>
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]
func GetImageShape(ctx *Context, args *GetImageShapeArgs, opts ...InvokeOption) (*GetImageShapeResult, error)
func GetImageShapeOutput(ctx *Context, args *GetImageShapeOutputArgs, opts ...InvokeOption) GetImageShapeResultOutput
> 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)
}
public static CompletableFuture<GetImageShapeResult> getImageShape(GetImageShapeArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Core/getImageShape:getImageShape
arguments:
# arguments dictionary
The following arguments are supported:
- image_
id str - The OCID of the image.
- shape_
name str - Shape name.
getImageShape Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Id string - The image OCID.
- Memory
Constraints List<GetImage Shape Memory Constraint> - For a flexible image and shape, the amount of memory supported for instances that use this image.
- Ocpu
Constraints List<GetImage Shape Ocpu Constraint> - OCPU options for an image and shape.
- Shape string
- The shape name.
- Shape
Name string
- Id string
- The provider-assigned unique ID for this managed resource.
- Image
Id string - The image OCID.
- Memory
Constraints []GetImage Shape Memory Constraint - For a flexible image and shape, the amount of memory supported for instances that use this image.
- Ocpu
Constraints []GetImage Shape Ocpu Constraint - OCPU options for an image and shape.
- Shape string
- The shape name.
- Shape
Name string
- id String
- The provider-assigned unique ID for this managed resource.
- image
Id String - The image OCID.
- memory
Constraints List<GetImage Shape Memory Constraint> - For a flexible image and shape, the amount of memory supported for instances that use this image.
- ocpu
Constraints List<GetImage Shape Ocpu Constraint> - OCPU options for an image and shape.
- shape String
- The shape name.
- shape
Name String
- id string
- The provider-assigned unique ID for this managed resource.
- image
Id string - The image OCID.
- memory
Constraints GetImage Shape Memory Constraint[] - For a flexible image and shape, the amount of memory supported for instances that use this image.
- ocpu
Constraints GetImage Shape Ocpu Constraint[] - OCPU options for an image and shape.
- shape string
- The shape name.
- shape
Name string
- id str
- The provider-assigned unique ID for this managed resource.
- image_
id str - The image OCID.
- memory_
constraints Sequence[core.Get Image Shape 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 Shape Ocpu Constraint] - 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.
- image
Id String - The image OCID.
- 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.
- shape
Name String
Supporting Types
GetImageShapeMemoryConstraint
- max_
in_ intgbs - The maximum amount of memory, in gigabytes.
- min_
in_ intgbs - The minimum amount of memory, in gigabytes.
GetImageShapeOcpuConstraint
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 v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi