1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. ecs
  5. CopyImage
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.ecs.CopyImage

Explore with Pulumi AI

Create CopyImage Resource

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

Constructor syntax

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

@overload
def CopyImage(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              source_image_id: Optional[str] = None,
              source_region_id: Optional[str] = None,
              delete_auto_snapshot: Optional[bool] = None,
              description: Optional[str] = None,
              encrypted: Optional[bool] = None,
              force: Optional[bool] = None,
              image_name: Optional[str] = None,
              kms_key_id: Optional[str] = None,
              name: Optional[str] = None,
              tags: Optional[Mapping[str, str]] = None)
func NewCopyImage(ctx *Context, name string, args CopyImageArgs, opts ...ResourceOption) (*CopyImage, error)
public CopyImage(string name, CopyImageArgs args, CustomResourceOptions? opts = null)
public CopyImage(String name, CopyImageArgs args)
public CopyImage(String name, CopyImageArgs args, CustomResourceOptions options)
type: alicloud:ecs:CopyImage
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. CopyImageArgs
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. CopyImageArgs
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. CopyImageArgs
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. CopyImageArgs
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. CopyImageArgs
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 copyImageResource = new AliCloud.Ecs.CopyImage("copyImageResource", new()
{
    SourceImageId = "string",
    SourceRegionId = "string",
    DeleteAutoSnapshot = false,
    Description = "string",
    Encrypted = false,
    Force = false,
    ImageName = "string",
    KmsKeyId = "string",
    Tags = 
    {
        { "string", "string" },
    },
});
Copy
example, err := ecs.NewCopyImage(ctx, "copyImageResource", &ecs.CopyImageArgs{
	SourceImageId:      pulumi.String("string"),
	SourceRegionId:     pulumi.String("string"),
	DeleteAutoSnapshot: pulumi.Bool(false),
	Description:        pulumi.String("string"),
	Encrypted:          pulumi.Bool(false),
	Force:              pulumi.Bool(false),
	ImageName:          pulumi.String("string"),
	KmsKeyId:           pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
Copy
var copyImageResource = new CopyImage("copyImageResource", CopyImageArgs.builder()
    .sourceImageId("string")
    .sourceRegionId("string")
    .deleteAutoSnapshot(false)
    .description("string")
    .encrypted(false)
    .force(false)
    .imageName("string")
    .kmsKeyId("string")
    .tags(Map.of("string", "string"))
    .build());
Copy
copy_image_resource = alicloud.ecs.CopyImage("copyImageResource",
    source_image_id="string",
    source_region_id="string",
    delete_auto_snapshot=False,
    description="string",
    encrypted=False,
    force=False,
    image_name="string",
    kms_key_id="string",
    tags={
        "string": "string",
    })
Copy
const copyImageResource = new alicloud.ecs.CopyImage("copyImageResource", {
    sourceImageId: "string",
    sourceRegionId: "string",
    deleteAutoSnapshot: false,
    description: "string",
    encrypted: false,
    force: false,
    imageName: "string",
    kmsKeyId: "string",
    tags: {
        string: "string",
    },
});
Copy
type: alicloud:ecs:CopyImage
properties:
    deleteAutoSnapshot: false
    description: string
    encrypted: false
    force: false
    imageName: string
    kmsKeyId: string
    sourceImageId: string
    sourceRegionId: string
    tags:
        string: string
Copy

CopyImage 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 CopyImage resource accepts the following input properties:

SourceImageId
This property is required.
Changes to this property will trigger replacement.
string
SourceRegionId
This property is required.
Changes to this property will trigger replacement.
string
DeleteAutoSnapshot bool
Description string
Encrypted Changes to this property will trigger replacement. bool
Force bool
ImageName string
KmsKeyId Changes to this property will trigger replacement. string
Name string

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

Tags Dictionary<string, string>
SourceImageId
This property is required.
Changes to this property will trigger replacement.
string
SourceRegionId
This property is required.
Changes to this property will trigger replacement.
string
DeleteAutoSnapshot bool
Description string
Encrypted Changes to this property will trigger replacement. bool
Force bool
ImageName string
KmsKeyId Changes to this property will trigger replacement. string
Name string

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

Tags map[string]string
sourceImageId
This property is required.
Changes to this property will trigger replacement.
String
sourceRegionId
This property is required.
Changes to this property will trigger replacement.
String
deleteAutoSnapshot Boolean
description String
encrypted Changes to this property will trigger replacement. Boolean
force Boolean
imageName String
kmsKeyId Changes to this property will trigger replacement. String
name String

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

tags Map<String,String>
sourceImageId
This property is required.
Changes to this property will trigger replacement.
string
sourceRegionId
This property is required.
Changes to this property will trigger replacement.
string
deleteAutoSnapshot boolean
description string
encrypted Changes to this property will trigger replacement. boolean
force boolean
imageName string
kmsKeyId Changes to this property will trigger replacement. string
name string

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

tags {[key: string]: string}
source_image_id
This property is required.
Changes to this property will trigger replacement.
str
source_region_id
This property is required.
Changes to this property will trigger replacement.
str
delete_auto_snapshot bool
description str
encrypted Changes to this property will trigger replacement. bool
force bool
image_name str
kms_key_id Changes to this property will trigger replacement. str
name str

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

tags Mapping[str, str]
sourceImageId
This property is required.
Changes to this property will trigger replacement.
String
sourceRegionId
This property is required.
Changes to this property will trigger replacement.
String
deleteAutoSnapshot Boolean
description String
encrypted Changes to this property will trigger replacement. Boolean
force Boolean
imageName String
kmsKeyId Changes to this property will trigger replacement. String
name String

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

tags Map<String>

Outputs

All input properties are implicitly available as output properties. Additionally, the CopyImage 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 CopyImage Resource

Get an existing CopyImage 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?: CopyImageState, opts?: CustomResourceOptions): CopyImage
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        delete_auto_snapshot: Optional[bool] = None,
        description: Optional[str] = None,
        encrypted: Optional[bool] = None,
        force: Optional[bool] = None,
        image_name: Optional[str] = None,
        kms_key_id: Optional[str] = None,
        name: Optional[str] = None,
        source_image_id: Optional[str] = None,
        source_region_id: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None) -> CopyImage
func GetCopyImage(ctx *Context, name string, id IDInput, state *CopyImageState, opts ...ResourceOption) (*CopyImage, error)
public static CopyImage Get(string name, Input<string> id, CopyImageState? state, CustomResourceOptions? opts = null)
public static CopyImage get(String name, Output<String> id, CopyImageState state, CustomResourceOptions options)
resources:  _:    type: alicloud:ecs:CopyImage    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:
DeleteAutoSnapshot bool
Description string
Encrypted Changes to this property will trigger replacement. bool
Force bool
ImageName string
KmsKeyId Changes to this property will trigger replacement. string
Name string

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

SourceImageId Changes to this property will trigger replacement. string
SourceRegionId Changes to this property will trigger replacement. string
Tags Dictionary<string, string>
DeleteAutoSnapshot bool
Description string
Encrypted Changes to this property will trigger replacement. bool
Force bool
ImageName string
KmsKeyId Changes to this property will trigger replacement. string
Name string

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

SourceImageId Changes to this property will trigger replacement. string
SourceRegionId Changes to this property will trigger replacement. string
Tags map[string]string
deleteAutoSnapshot Boolean
description String
encrypted Changes to this property will trigger replacement. Boolean
force Boolean
imageName String
kmsKeyId Changes to this property will trigger replacement. String
name String

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

sourceImageId Changes to this property will trigger replacement. String
sourceRegionId Changes to this property will trigger replacement. String
tags Map<String,String>
deleteAutoSnapshot boolean
description string
encrypted Changes to this property will trigger replacement. boolean
force boolean
imageName string
kmsKeyId Changes to this property will trigger replacement. string
name string

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

sourceImageId Changes to this property will trigger replacement. string
sourceRegionId Changes to this property will trigger replacement. string
tags {[key: string]: string}
delete_auto_snapshot bool
description str
encrypted Changes to this property will trigger replacement. bool
force bool
image_name str
kms_key_id Changes to this property will trigger replacement. str
name str

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

source_image_id Changes to this property will trigger replacement. str
source_region_id Changes to this property will trigger replacement. str
tags Mapping[str, str]
deleteAutoSnapshot Boolean
description String
encrypted Changes to this property will trigger replacement. Boolean
force Boolean
imageName String
kmsKeyId Changes to this property will trigger replacement. String
name String

Deprecated: Attribute 'name' has been deprecated from version 1.69.0. Use image_name instead.

sourceImageId Changes to this property will trigger replacement. String
sourceRegionId Changes to this property will trigger replacement. String
tags Map<String>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.