1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. CvmExportImages
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.CvmExportImages

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Provides a resource to create a cvm export_images

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const exportImages = new tencentcloud.CvmExportImages("exportImages", {
        bucketName: "xxxxxx",
        fileNamePrefix: "test-",
        imageId: "img-xxxxxx",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    export_images = tencentcloud.CvmExportImages("exportImages",
        bucket_name="xxxxxx",
        file_name_prefix="test-",
        image_id="img-xxxxxx")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewCvmExportImages(ctx, "exportImages", &tencentcloud.CvmExportImagesArgs{
    			BucketName:     pulumi.String("xxxxxx"),
    			FileNamePrefix: pulumi.String("test-"),
    			ImageId:        pulumi.String("img-xxxxxx"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var exportImages = new Tencentcloud.CvmExportImages("exportImages", new()
        {
            BucketName = "xxxxxx",
            FileNamePrefix = "test-",
            ImageId = "img-xxxxxx",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.CvmExportImages;
    import com.pulumi.tencentcloud.CvmExportImagesArgs;
    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 exportImages = new CvmExportImages("exportImages", CvmExportImagesArgs.builder()
                .bucketName("xxxxxx")
                .fileNamePrefix("test-")
                .imageId("img-xxxxxx")
                .build());
    
        }
    }
    
    resources:
      exportImages:
        type: tencentcloud:CvmExportImages
        properties:
          bucketName: xxxxxx
          fileNamePrefix: test-
          imageId: img-xxxxxx
    

    Create CvmExportImages Resource

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

    Constructor syntax

    new CvmExportImages(name: string, args: CvmExportImagesArgs, opts?: CustomResourceOptions);
    @overload
    def CvmExportImages(resource_name: str,
                        args: CvmExportImagesArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def CvmExportImages(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        bucket_name: Optional[str] = None,
                        file_name_prefix: Optional[str] = None,
                        image_id: Optional[str] = None,
                        cvm_export_images_id: Optional[str] = None,
                        dry_run: Optional[bool] = None,
                        export_format: Optional[str] = None,
                        only_export_root_disk: Optional[bool] = None,
                        role_name: Optional[str] = None)
    func NewCvmExportImages(ctx *Context, name string, args CvmExportImagesArgs, opts ...ResourceOption) (*CvmExportImages, error)
    public CvmExportImages(string name, CvmExportImagesArgs args, CustomResourceOptions? opts = null)
    public CvmExportImages(String name, CvmExportImagesArgs args)
    public CvmExportImages(String name, CvmExportImagesArgs args, CustomResourceOptions options)
    
    type: tencentcloud:CvmExportImages
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

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

    BucketName string
    COS bucket name.
    FileNamePrefix string
    Prefix of exported file.
    ImageId string
    Image ID.
    CvmExportImagesId string
    ID of the resource.
    DryRun bool
    Check whether the image can be exported.
    ExportFormat string
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    OnlyExportRootDisk bool
    Whether to export only the system disk.
    RoleName string
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    BucketName string
    COS bucket name.
    FileNamePrefix string
    Prefix of exported file.
    ImageId string
    Image ID.
    CvmExportImagesId string
    ID of the resource.
    DryRun bool
    Check whether the image can be exported.
    ExportFormat string
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    OnlyExportRootDisk bool
    Whether to export only the system disk.
    RoleName string
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    bucketName String
    COS bucket name.
    fileNamePrefix String
    Prefix of exported file.
    imageId String
    Image ID.
    cvmExportImagesId String
    ID of the resource.
    dryRun Boolean
    Check whether the image can be exported.
    exportFormat String
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    onlyExportRootDisk Boolean
    Whether to export only the system disk.
    roleName String
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    bucketName string
    COS bucket name.
    fileNamePrefix string
    Prefix of exported file.
    imageId string
    Image ID.
    cvmExportImagesId string
    ID of the resource.
    dryRun boolean
    Check whether the image can be exported.
    exportFormat string
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    onlyExportRootDisk boolean
    Whether to export only the system disk.
    roleName string
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    bucket_name str
    COS bucket name.
    file_name_prefix str
    Prefix of exported file.
    image_id str
    Image ID.
    cvm_export_images_id str
    ID of the resource.
    dry_run bool
    Check whether the image can be exported.
    export_format str
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    only_export_root_disk bool
    Whether to export only the system disk.
    role_name str
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    bucketName String
    COS bucket name.
    fileNamePrefix String
    Prefix of exported file.
    imageId String
    Image ID.
    cvmExportImagesId String
    ID of the resource.
    dryRun Boolean
    Check whether the image can be exported.
    exportFormat String
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    onlyExportRootDisk Boolean
    Whether to export only the system disk.
    roleName String
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.

    Outputs

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

    Get an existing CvmExportImages 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?: CvmExportImagesState, opts?: CustomResourceOptions): CvmExportImages
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bucket_name: Optional[str] = None,
            cvm_export_images_id: Optional[str] = None,
            dry_run: Optional[bool] = None,
            export_format: Optional[str] = None,
            file_name_prefix: Optional[str] = None,
            image_id: Optional[str] = None,
            only_export_root_disk: Optional[bool] = None,
            role_name: Optional[str] = None) -> CvmExportImages
    func GetCvmExportImages(ctx *Context, name string, id IDInput, state *CvmExportImagesState, opts ...ResourceOption) (*CvmExportImages, error)
    public static CvmExportImages Get(string name, Input<string> id, CvmExportImagesState? state, CustomResourceOptions? opts = null)
    public static CvmExportImages get(String name, Output<String> id, CvmExportImagesState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:CvmExportImages    get:      id: ${id}
    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.
    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:
    BucketName string
    COS bucket name.
    CvmExportImagesId string
    ID of the resource.
    DryRun bool
    Check whether the image can be exported.
    ExportFormat string
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    FileNamePrefix string
    Prefix of exported file.
    ImageId string
    Image ID.
    OnlyExportRootDisk bool
    Whether to export only the system disk.
    RoleName string
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    BucketName string
    COS bucket name.
    CvmExportImagesId string
    ID of the resource.
    DryRun bool
    Check whether the image can be exported.
    ExportFormat string
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    FileNamePrefix string
    Prefix of exported file.
    ImageId string
    Image ID.
    OnlyExportRootDisk bool
    Whether to export only the system disk.
    RoleName string
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    bucketName String
    COS bucket name.
    cvmExportImagesId String
    ID of the resource.
    dryRun Boolean
    Check whether the image can be exported.
    exportFormat String
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    fileNamePrefix String
    Prefix of exported file.
    imageId String
    Image ID.
    onlyExportRootDisk Boolean
    Whether to export only the system disk.
    roleName String
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    bucketName string
    COS bucket name.
    cvmExportImagesId string
    ID of the resource.
    dryRun boolean
    Check whether the image can be exported.
    exportFormat string
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    fileNamePrefix string
    Prefix of exported file.
    imageId string
    Image ID.
    onlyExportRootDisk boolean
    Whether to export only the system disk.
    roleName string
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    bucket_name str
    COS bucket name.
    cvm_export_images_id str
    ID of the resource.
    dry_run bool
    Check whether the image can be exported.
    export_format str
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    file_name_prefix str
    Prefix of exported file.
    image_id str
    Image ID.
    only_export_root_disk bool
    Whether to export only the system disk.
    role_name str
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
    bucketName String
    COS bucket name.
    cvmExportImagesId String
    ID of the resource.
    dryRun Boolean
    Check whether the image can be exported.
    exportFormat String
    Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
    fileNamePrefix String
    Prefix of exported file.
    imageId String
    Image ID.
    onlyExportRootDisk Boolean
    Whether to export only the system disk.
    roleName String
    Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack