1. Packages
  2. Hpegl Provider
  3. API Docs
  4. MetalImage
hpegl 0.4.17 published on Monday, Apr 14, 2025 by hpe

hpegl.MetalImage

Explore with Pulumi AI

Provides service image resource. This allows creation, deletion and update of Metal OS service images.

Example Usage

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

const image = new hpegl.MetalImage("image", {osServiceImageFile: "./service.yml"});
Copy
import pulumi
import pulumi_hpegl as hpegl

image = hpegl.MetalImage("image", os_service_image_file="./service.yml")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hpegl/hpegl"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := hpegl.NewMetalImage(ctx, "image", &hpegl.MetalImageArgs{
			OsServiceImageFile: pulumi.String("./service.yml"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Hpegl = Pulumi.Hpegl;

return await Deployment.RunAsync(() => 
{
    var image = new Hpegl.MetalImage("image", new()
    {
        OsServiceImageFile = "./service.yml",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hpegl.MetalImage;
import com.pulumi.hpegl.MetalImageArgs;
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) {
        var image = new MetalImage("image", MetalImageArgs.builder()
            .osServiceImageFile("./service.yml")
            .build());

    }
}
Copy
resources:
  image:
    type: hpegl:MetalImage
    properties:
      osServiceImageFile: ./service.yml
Copy

Create MetalImage Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new MetalImage(name: string, args: MetalImageArgs, opts?: CustomResourceOptions);
@overload
def MetalImage(resource_name: str,
               args: MetalImageArgs,
               opts: Optional[ResourceOptions] = None)

@overload
def MetalImage(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               os_service_image_file: Optional[str] = None,
               metal_image_id: Optional[str] = None)
func NewMetalImage(ctx *Context, name string, args MetalImageArgs, opts ...ResourceOption) (*MetalImage, error)
public MetalImage(string name, MetalImageArgs args, CustomResourceOptions? opts = null)
public MetalImage(String name, MetalImageArgs args)
public MetalImage(String name, MetalImageArgs args, CustomResourceOptions options)
type: hpegl:MetalImage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. MetalImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. MetalImageArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. MetalImageArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. MetalImageArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. MetalImageArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var metalImageResource = new Hpegl.MetalImage("metalImageResource", new()
{
    OsServiceImageFile = "string",
    MetalImageId = "string",
});
Copy
example, err := hpegl.NewMetalImage(ctx, "metalImageResource", &hpegl.MetalImageArgs{
OsServiceImageFile: pulumi.String("string"),
MetalImageId: pulumi.String("string"),
})
Copy
var metalImageResource = new MetalImage("metalImageResource", MetalImageArgs.builder()
    .osServiceImageFile("string")
    .metalImageId("string")
    .build());
Copy
metal_image_resource = hpegl.MetalImage("metalImageResource",
    os_service_image_file="string",
    metal_image_id="string")
Copy
const metalImageResource = new hpegl.MetalImage("metalImageResource", {
    osServiceImageFile: "string",
    metalImageId: "string",
});
Copy
type: hpegl:MetalImage
properties:
    metalImageId: string
    osServiceImageFile: string
Copy

MetalImage Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The MetalImage resource accepts the following input properties:

OsServiceImageFile This property is required. string
Path to the YAML file containing the service image definition.
MetalImageId string
The ID of this resource.
OsServiceImageFile This property is required. string
Path to the YAML file containing the service image definition.
MetalImageId string
The ID of this resource.
osServiceImageFile This property is required. String
Path to the YAML file containing the service image definition.
metalImageId String
The ID of this resource.
osServiceImageFile This property is required. string
Path to the YAML file containing the service image definition.
metalImageId string
The ID of this resource.
os_service_image_file This property is required. str
Path to the YAML file containing the service image definition.
metal_image_id str
The ID of this resource.
osServiceImageFile This property is required. String
Path to the YAML file containing the service image definition.
metalImageId String
The ID of this resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the MetalImage resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing MetalImage Resource

Get an existing MetalImage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: MetalImageState, opts?: CustomResourceOptions): MetalImage
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        metal_image_id: Optional[str] = None,
        os_service_image_file: Optional[str] = None) -> MetalImage
func GetMetalImage(ctx *Context, name string, id IDInput, state *MetalImageState, opts ...ResourceOption) (*MetalImage, error)
public static MetalImage Get(string name, Input<string> id, MetalImageState? state, CustomResourceOptions? opts = null)
public static MetalImage get(String name, Output<String> id, MetalImageState state, CustomResourceOptions options)
resources:  _:    type: hpegl:MetalImage    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
MetalImageId string
The ID of this resource.
OsServiceImageFile string
Path to the YAML file containing the service image definition.
MetalImageId string
The ID of this resource.
OsServiceImageFile string
Path to the YAML file containing the service image definition.
metalImageId String
The ID of this resource.
osServiceImageFile String
Path to the YAML file containing the service image definition.
metalImageId string
The ID of this resource.
osServiceImageFile string
Path to the YAML file containing the service image definition.
metal_image_id str
The ID of this resource.
os_service_image_file str
Path to the YAML file containing the service image definition.
metalImageId String
The ID of this resource.
osServiceImageFile String
Path to the YAML file containing the service image definition.

Package Details

Repository
hpegl hpe/terraform-provider-hpegl
License
Notes
This Pulumi package is based on the hpegl Terraform Provider.