Show / Hide Table of Contents

Class Image

Provides a Linode Image resource. This can be used to create, modify, and delete Linodes Images. Linode Images are snapshots of a Linode Instance Disk which can then be used to provision more Linode Instances. Images can be used across regions.

For more information, see Linode's documentation on Images and the Linode APIv4 docs.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var foo = new Linode.Instance("foo", new Linode.InstanceArgs
    {
        Region = "us-central",
        Type = "g6-nanode-1",
    });
    var bar = new Linode.Image("bar", new Linode.ImageArgs
    {
        Description = "Image taken from foo",
        DiskId = foo.Disks.Apply(disks => disks[0].Id),
        Label = "foo-sda-image",
        LinodeId = foo.Id,
    });
    var barBased = new Linode.Instance("barBased", new Linode.InstanceArgs
    {
        Image = bar.Id,
        Region = "eu-west",
        Type = foo.Type,
    });
}

}

Attributes

This resource exports the following attributes:

  • id - The unique ID of this Image. The ID of private images begin with private/ followed by the numeric identifier of the private image, for example private/12345.

  • created - When this Image was created.

  • created_by - The name of the User who created this Image.

  • deprecated - Whether or not this Image is deprecated. Will only be True for deprecated public Images.

  • is_public - True if the Image is public.

  • size - The minimum size this Image needs to deploy. Size is in MB.

  • type - How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.

  • expiry - Only Images created automatically (from a deleted Linode; type=automatic) will expire.

  • vendor - The upstream distribution vendor. Nil for private Images.

Inheritance
System.Object
Resource
CustomResource
Image
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Linode
Assembly: Pulumi.Linode.dll
Syntax
public class Image : CustomResource

Constructors

View Source

Image(String, ImageArgs, CustomResourceOptions)

Create a Image resource with the given unique name, arguments, and options.

Declaration
public Image(string name, ImageArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ImageArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Created

When this Image was created.

Declaration
public Output<string> Created { get; }
Property Value
Type Description
Output<System.String>
View Source

CreatedBy

The name of the User who created this Image.

Declaration
public Output<string> CreatedBy { get; }
Property Value
Type Description
Output<System.String>
View Source

Deprecated

Whether or not this Image is deprecated. Will only be True for deprecated public Images.

Declaration
public Output<bool> Deprecated { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

Description

A detailed description of this Image.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

DiskId

The ID of the Linode Disk that this Image will be created from.

Declaration
public Output<int> DiskId { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Expiry

Only Images created automatically (from a deleted Linode; type=automatic) will expire.

Declaration
public Output<string> Expiry { get; }
Property Value
Type Description
Output<System.String>
View Source

IsPublic

True if the Image is public.

Declaration
public Output<bool> IsPublic { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

Label

A short description of the Image. Labels cannot contain special characters.

Declaration
public Output<string> Label { get; }
Property Value
Type Description
Output<System.String>
View Source

LinodeId

The ID of the Linode that this Image will be created from.

Declaration
public Output<int> LinodeId { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Size

The minimum size this Image needs to deploy. Size is in MB.

Declaration
public Output<int> Size { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Type

How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.

Declaration
public Output<string> Type { get; }
Property Value
Type Description
Output<System.String>
View Source

Vendor

The upstream distribution vendor. Nil for private Images.

Declaration
public Output<string> Vendor { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, ImageState, CustomResourceOptions)

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

Declaration
public static Image Get(string name, Input<string> id, ImageState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ImageState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Image
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.