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 withprivate/followed by the numeric identifier of the private image, for exampleprivate/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.
Inherited Members
Namespace: Pulumi.Linode
Assembly: Pulumi.Linode.dll
Syntax
public class Image : CustomResource
Constructors
View SourceImage(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 SourceCreated
When this Image was created.
Declaration
public Output<string> Created { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CreatedBy
The name of the User who created this Image.
Declaration
public Output<string> CreatedBy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
Description
A detailed description of this Image.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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> |
IsPublic
True if the Image is public.
Declaration
public Output<bool> IsPublic { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
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> |
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> |
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> |
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> |
Vendor
The upstream distribution vendor. Nil for private Images.
Declaration
public Output<string> Vendor { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(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 |