ImageExport

Export a custom image to the OSS bucket in the same region as the custom image.

NOTE: If you create an ECS instance using a mirror image and create a system disk snapshot again, exporting a custom image created from the system disk snapshot is not supported.

NOTE: Support for exporting custom images that include data disk snapshot information in the image. The number of data disks cannot exceed 4 and the maximum capacity of a single data disk cannot exceed 500 GiB.

NOTE: Before exporting the image, you must authorize the cloud server ECS official service account to write OSS permissions through RAM.

NOTE: Available in 1.68.0+.

Attributes Reference0

The following attributes are exported:

  • id - ID of the image.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = new AliCloud.Ecs.ImageExport("default", new AliCloud.Ecs.ImageExportArgs
        {
            ImageId = "m-bp1gxy***",
            OssBucket = "ecsimageexportconfig",
            OssPrefix = "ecsExport",
        });
    }

}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

default = alicloud.ecs.ImageExport("default",
    image_id="m-bp1gxy***",
    oss_bucket="ecsimageexportconfig",
    oss_prefix="ecsExport")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultImageExport = new alicloud.ecs.ImageExport("default", {
    imageId: "m-bp1gxy***",
    ossBucket: "ecsimageexportconfig",
    ossPrefix: "ecsExport",
});

Create a ImageExport Resource

def ImageExport(resource_name, opts=None, image_id=None, oss_bucket=None, oss_prefix=None, __props__=None);
func NewImageExport(ctx *Context, name string, args ImageExportArgs, opts ...ResourceOption) (*ImageExport, error)
public ImageExport(string name, ImageExportArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ImageExportArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ImageExportArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ImageExportArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ImageExport Resource Properties

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

Inputs

The ImageExport resource accepts the following input properties:

ImageId string

The source image ID.

OssBucket string

Save the exported OSS bucket.

OssPrefix string

The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.

ImageId string

The source image ID.

OssBucket string

Save the exported OSS bucket.

OssPrefix string

The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.

imageId string

The source image ID.

ossBucket string

Save the exported OSS bucket.

ossPrefix string

The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.

image_id str

The source image ID.

oss_bucket str

Save the exported OSS bucket.

oss_prefix str

The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.

Outputs

All input properties are implicitly available as output properties. Additionally, the ImageExport 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing ImageExport Resource

Get an existing ImageExport 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?: ImageExportState, opts?: CustomResourceOptions): ImageExport
static get(resource_name, id, opts=None, image_id=None, oss_bucket=None, oss_prefix=None, __props__=None);
func GetImageExport(ctx *Context, name string, id IDInput, state *ImageExportState, opts ...ResourceOption) (*ImageExport, error)
public static ImageExport Get(string name, Input<string> id, ImageExportState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:

ImageId string

The source image ID.

OssBucket string

Save the exported OSS bucket.

OssPrefix string

The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.

ImageId string

The source image ID.

OssBucket string

Save the exported OSS bucket.

OssPrefix string

The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.

imageId string

The source image ID.

ossBucket string

Save the exported OSS bucket.

ossPrefix string

The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.

image_id str

The source image ID.

oss_bucket str

Save the exported OSS bucket.

oss_prefix str

The prefix of your OSS Object. It can be composed of numbers or letters, and the character length is 1 ~ 30.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.