tencentcloud.CvmExportImages
Explore with Pulumi AI
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:
- Bucket
Name string - COS bucket name.
- File
Name stringPrefix - Prefix of exported file.
- Image
Id string - Image ID.
- Cvm
Export stringImages Id - ID of the resource.
- Dry
Run bool - Check whether the image can be exported.
- Export
Format string - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- Only
Export boolRoot Disk - Whether to export only the system disk.
- Role
Name string - Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
- Bucket
Name string - COS bucket name.
- File
Name stringPrefix - Prefix of exported file.
- Image
Id string - Image ID.
- Cvm
Export stringImages Id - ID of the resource.
- Dry
Run bool - Check whether the image can be exported.
- Export
Format string - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- Only
Export boolRoot Disk - Whether to export only the system disk.
- Role
Name string - Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
- bucket
Name String - COS bucket name.
- file
Name StringPrefix - Prefix of exported file.
- image
Id String - Image ID.
- cvm
Export StringImages Id - ID of the resource.
- dry
Run Boolean - Check whether the image can be exported.
- export
Format String - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- only
Export BooleanRoot Disk - Whether to export only the system disk.
- role
Name String - Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
- bucket
Name string - COS bucket name.
- file
Name stringPrefix - Prefix of exported file.
- image
Id string - Image ID.
- cvm
Export stringImages Id - ID of the resource.
- dry
Run boolean - Check whether the image can be exported.
- export
Format string - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- only
Export booleanRoot Disk - Whether to export only the system disk.
- role
Name 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_ strprefix - Prefix of exported file.
- image_
id str - Image ID.
- cvm_
export_ strimages_ id - 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_ boolroot_ disk - 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.
- bucket
Name String - COS bucket name.
- file
Name StringPrefix - Prefix of exported file.
- image
Id String - Image ID.
- cvm
Export StringImages Id - ID of the resource.
- dry
Run Boolean - Check whether the image can be exported.
- export
Format String - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- only
Export BooleanRoot Disk - Whether to export only the system disk.
- role
Name 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.
- Bucket
Name string - COS bucket name.
- Cvm
Export stringImages Id - ID of the resource.
- Dry
Run bool - Check whether the image can be exported.
- Export
Format string - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- File
Name stringPrefix - Prefix of exported file.
- Image
Id string - Image ID.
- Only
Export boolRoot Disk - Whether to export only the system disk.
- Role
Name string - Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
- Bucket
Name string - COS bucket name.
- Cvm
Export stringImages Id - ID of the resource.
- Dry
Run bool - Check whether the image can be exported.
- Export
Format string - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- File
Name stringPrefix - Prefix of exported file.
- Image
Id string - Image ID.
- Only
Export boolRoot Disk - Whether to export only the system disk.
- Role
Name string - Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
- bucket
Name String - COS bucket name.
- cvm
Export StringImages Id - ID of the resource.
- dry
Run Boolean - Check whether the image can be exported.
- export
Format String - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- file
Name StringPrefix - Prefix of exported file.
- image
Id String - Image ID.
- only
Export BooleanRoot Disk - Whether to export only the system disk.
- role
Name String - Role name (Default: CVM_QcsRole). Before exporting the images, make sure the role exists, and it has write permission to COS.
- bucket
Name string - COS bucket name.
- cvm
Export stringImages Id - ID of the resource.
- dry
Run boolean - Check whether the image can be exported.
- export
Format string - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- file
Name stringPrefix - Prefix of exported file.
- image
Id string - Image ID.
- only
Export booleanRoot Disk - Whether to export only the system disk.
- role
Name 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_ strimages_ id - 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_ strprefix - Prefix of exported file.
- image_
id str - Image ID.
- only_
export_ boolroot_ disk - 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.
- bucket
Name String - COS bucket name.
- cvm
Export StringImages Id - ID of the resource.
- dry
Run Boolean - Check whether the image can be exported.
- export
Format String - Format of the exported image file. Valid values: RAW, QCOW2, VHD and VMDK. Default value: RAW.
- file
Name StringPrefix - Prefix of exported file.
- image
Id String - Image ID.
- only
Export BooleanRoot Disk - Whether to export only the system disk.
- role
Name 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.