1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. ecs
  5. EcsSnapshot
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.ecs.EcsSnapshot

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a ECS Snapshot resource.

    For information about ECS Snapshot and how to use it, see What is Snapshot.

    NOTE: Available in v1.120.0+.

    Create EcsSnapshot Resource

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

    Constructor syntax

    new EcsSnapshot(name: string, args: EcsSnapshotArgs, opts?: CustomResourceOptions);
    @overload
    def EcsSnapshot(resource_name: str,
                    args: EcsSnapshotArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def EcsSnapshot(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    disk_id: Optional[str] = None,
                    category: Optional[str] = None,
                    description: Optional[str] = None,
                    force: Optional[bool] = None,
                    instant_access: Optional[bool] = None,
                    instant_access_retention_days: Optional[int] = None,
                    name: Optional[str] = None,
                    resource_group_id: Optional[str] = None,
                    retention_days: Optional[int] = None,
                    snapshot_name: Optional[str] = None,
                    tags: Optional[Mapping[str, Any]] = None)
    func NewEcsSnapshot(ctx *Context, name string, args EcsSnapshotArgs, opts ...ResourceOption) (*EcsSnapshot, error)
    public EcsSnapshot(string name, EcsSnapshotArgs args, CustomResourceOptions? opts = null)
    public EcsSnapshot(String name, EcsSnapshotArgs args)
    public EcsSnapshot(String name, EcsSnapshotArgs args, CustomResourceOptions options)
    
    type: alicloud:ecs:EcsSnapshot
    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 EcsSnapshotArgs
    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 EcsSnapshotArgs
    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 EcsSnapshotArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EcsSnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EcsSnapshotArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var ecsSnapshotResource = new AliCloud.Ecs.EcsSnapshot("ecsSnapshotResource", new()
    {
        DiskId = "string",
        Category = "string",
        Description = "string",
        Force = false,
        InstantAccess = false,
        InstantAccessRetentionDays = 0,
        ResourceGroupId = "string",
        RetentionDays = 0,
        SnapshotName = "string",
        Tags = 
        {
            { "string", "any" },
        },
    });
    
    example, err := ecs.NewEcsSnapshot(ctx, "ecsSnapshotResource", &ecs.EcsSnapshotArgs{
    	DiskId:                     pulumi.String("string"),
    	Category:                   pulumi.String("string"),
    	Description:                pulumi.String("string"),
    	Force:                      pulumi.Bool(false),
    	InstantAccess:              pulumi.Bool(false),
    	InstantAccessRetentionDays: pulumi.Int(0),
    	ResourceGroupId:            pulumi.String("string"),
    	RetentionDays:              pulumi.Int(0),
    	SnapshotName:               pulumi.String("string"),
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    })
    
    var ecsSnapshotResource = new EcsSnapshot("ecsSnapshotResource", EcsSnapshotArgs.builder()        
        .diskId("string")
        .category("string")
        .description("string")
        .force(false)
        .instantAccess(false)
        .instantAccessRetentionDays(0)
        .resourceGroupId("string")
        .retentionDays(0)
        .snapshotName("string")
        .tags(Map.of("string", "any"))
        .build());
    
    ecs_snapshot_resource = alicloud.ecs.EcsSnapshot("ecsSnapshotResource",
        disk_id="string",
        category="string",
        description="string",
        force=False,
        instant_access=False,
        instant_access_retention_days=0,
        resource_group_id="string",
        retention_days=0,
        snapshot_name="string",
        tags={
            "string": "any",
        })
    
    const ecsSnapshotResource = new alicloud.ecs.EcsSnapshot("ecsSnapshotResource", {
        diskId: "string",
        category: "string",
        description: "string",
        force: false,
        instantAccess: false,
        instantAccessRetentionDays: 0,
        resourceGroupId: "string",
        retentionDays: 0,
        snapshotName: "string",
        tags: {
            string: "any",
        },
    });
    
    type: alicloud:ecs:EcsSnapshot
    properties:
        category: string
        description: string
        diskId: string
        force: false
        instantAccess: false
        instantAccessRetentionDays: 0
        resourceGroupId: string
        retentionDays: 0
        snapshotName: string
        tags:
            string: any
    

    EcsSnapshot Resource Properties

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

    Inputs

    The EcsSnapshot resource accepts the following input properties:

    DiskId string
    The ID of the disk.
    Category string
    The category of the snapshot. Valid Values: standard and flash.
    Description string
    The description of the snapshot.
    Force bool
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    InstantAccess bool
    Specifies whether to enable the instant access feature.
    InstantAccessRetentionDays int
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    Name string
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    ResourceGroupId string
    The resource group id.
    RetentionDays int
    The retention period of the snapshot.
    SnapshotName string
    The name of the snapshot.
    Tags Dictionary<string, object>

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    DiskId string
    The ID of the disk.
    Category string
    The category of the snapshot. Valid Values: standard and flash.
    Description string
    The description of the snapshot.
    Force bool
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    InstantAccess bool
    Specifies whether to enable the instant access feature.
    InstantAccessRetentionDays int
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    Name string
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    ResourceGroupId string
    The resource group id.
    RetentionDays int
    The retention period of the snapshot.
    SnapshotName string
    The name of the snapshot.
    Tags map[string]interface{}

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    diskId String
    The ID of the disk.
    category String
    The category of the snapshot. Valid Values: standard and flash.
    description String
    The description of the snapshot.
    force Boolean
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    instantAccess Boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays Integer
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    name String
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    resourceGroupId String
    The resource group id.
    retentionDays Integer
    The retention period of the snapshot.
    snapshotName String
    The name of the snapshot.
    tags Map<String,Object>

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    diskId string
    The ID of the disk.
    category string
    The category of the snapshot. Valid Values: standard and flash.
    description string
    The description of the snapshot.
    force boolean
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    instantAccess boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays number
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    name string
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    resourceGroupId string
    The resource group id.
    retentionDays number
    The retention period of the snapshot.
    snapshotName string
    The name of the snapshot.
    tags {[key: string]: any}

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    disk_id str
    The ID of the disk.
    category str
    The category of the snapshot. Valid Values: standard and flash.
    description str
    The description of the snapshot.
    force bool
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    instant_access bool
    Specifies whether to enable the instant access feature.
    instant_access_retention_days int
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    name str
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    resource_group_id str
    The resource group id.
    retention_days int
    The retention period of the snapshot.
    snapshot_name str
    The name of the snapshot.
    tags Mapping[str, Any]

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    diskId String
    The ID of the disk.
    category String
    The category of the snapshot. Valid Values: standard and flash.
    description String
    The description of the snapshot.
    force Boolean
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    instantAccess Boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays Number
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    name String
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    resourceGroupId String
    The resource group id.
    retentionDays Number
    The retention period of the snapshot.
    snapshotName String
    The name of the snapshot.
    tags Map<Any>

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EcsSnapshot resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of snapshot.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of snapshot.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of snapshot.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of snapshot.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of snapshot.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of snapshot.

    Look up Existing EcsSnapshot Resource

    Get an existing EcsSnapshot 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?: EcsSnapshotState, opts?: CustomResourceOptions): EcsSnapshot
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            category: Optional[str] = None,
            description: Optional[str] = None,
            disk_id: Optional[str] = None,
            force: Optional[bool] = None,
            instant_access: Optional[bool] = None,
            instant_access_retention_days: Optional[int] = None,
            name: Optional[str] = None,
            resource_group_id: Optional[str] = None,
            retention_days: Optional[int] = None,
            snapshot_name: Optional[str] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None) -> EcsSnapshot
    func GetEcsSnapshot(ctx *Context, name string, id IDInput, state *EcsSnapshotState, opts ...ResourceOption) (*EcsSnapshot, error)
    public static EcsSnapshot Get(string name, Input<string> id, EcsSnapshotState? state, CustomResourceOptions? opts = null)
    public static EcsSnapshot get(String name, Output<String> id, EcsSnapshotState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Category string
    The category of the snapshot. Valid Values: standard and flash.
    Description string
    The description of the snapshot.
    DiskId string
    The ID of the disk.
    Force bool
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    InstantAccess bool
    Specifies whether to enable the instant access feature.
    InstantAccessRetentionDays int
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    Name string
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    ResourceGroupId string
    The resource group id.
    RetentionDays int
    The retention period of the snapshot.
    SnapshotName string
    The name of the snapshot.
    Status string
    The status of snapshot.
    Tags Dictionary<string, object>

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    Category string
    The category of the snapshot. Valid Values: standard and flash.
    Description string
    The description of the snapshot.
    DiskId string
    The ID of the disk.
    Force bool
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    InstantAccess bool
    Specifies whether to enable the instant access feature.
    InstantAccessRetentionDays int
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    Name string
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    ResourceGroupId string
    The resource group id.
    RetentionDays int
    The retention period of the snapshot.
    SnapshotName string
    The name of the snapshot.
    Status string
    The status of snapshot.
    Tags map[string]interface{}

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    category String
    The category of the snapshot. Valid Values: standard and flash.
    description String
    The description of the snapshot.
    diskId String
    The ID of the disk.
    force Boolean
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    instantAccess Boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays Integer
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    name String
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    resourceGroupId String
    The resource group id.
    retentionDays Integer
    The retention period of the snapshot.
    snapshotName String
    The name of the snapshot.
    status String
    The status of snapshot.
    tags Map<String,Object>

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    category string
    The category of the snapshot. Valid Values: standard and flash.
    description string
    The description of the snapshot.
    diskId string
    The ID of the disk.
    force boolean
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    instantAccess boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays number
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    name string
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    resourceGroupId string
    The resource group id.
    retentionDays number
    The retention period of the snapshot.
    snapshotName string
    The name of the snapshot.
    status string
    The status of snapshot.
    tags {[key: string]: any}

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    category str
    The category of the snapshot. Valid Values: standard and flash.
    description str
    The description of the snapshot.
    disk_id str
    The ID of the disk.
    force bool
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    instant_access bool
    Specifies whether to enable the instant access feature.
    instant_access_retention_days int
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    name str
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    resource_group_id str
    The resource group id.
    retention_days int
    The retention period of the snapshot.
    snapshot_name str
    The name of the snapshot.
    status str
    The status of snapshot.
    tags Mapping[str, Any]

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    category String
    The category of the snapshot. Valid Values: standard and flash.
    description String
    The description of the snapshot.
    diskId String
    The ID of the disk.
    force Boolean
    Specifies whether to forcibly delete the snapshot that has been used to create disks.
    instantAccess Boolean
    Specifies whether to enable the instant access feature.
    instantAccessRetentionDays Number
    Specifies the retention period of the instant access feature. After the retention period ends, the snapshot is automatically released.
    name String
    Field name has been deprecated from provider version 1.120.0. New field snapshot_name instead.

    Deprecated: Field 'name' has been deprecated from provider version 1.120.0. New field 'snapshot_name' instead.

    resourceGroupId String
    The resource group id.
    retentionDays Number
    The retention period of the snapshot.
    snapshotName String
    The name of the snapshot.
    status String
    The status of snapshot.
    tags Map<Any>

    A mapping of tags to assign to the snapshot.

    NOTE: If force is true, After an snapshot is deleted, the disks created from this snapshot cannot be re-initialized.

    Import

    ECS Snapshot can be imported using the id, e.g.

    $ pulumi import alicloud:ecs/ecsSnapshot:EcsSnapshot example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi