1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. databasefilesystem
  5. Snapshot
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.databasefilesystem.Snapshot

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    Provides a DBFS Snapshot resource.

    For information about DBFS Snapshot and how to use it.

    NOTE: Available since v1.156.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const zoneId = "cn-hangzhou-i";
    const example = alicloud.ecs.getInstanceTypes({
        availabilityZone: zoneId,
        instanceTypeFamily: "ecs.g7se",
    });
    const exampleGetImages = Promise.all([example, example.then(example => example.instanceTypes).length]).then(([example, length]) => alicloud.ecs.getImages({
        instanceType: example.instanceTypes[length - 1].id,
        nameRegex: "^aliyun_2_1903_x64_20G_alibase_20231221.vhd",
        owners: "system",
    }));
    const default = alicloud.vpc.getNetworks({
        nameRegex: "^default-NODELETING$",
    });
    const defaultGetSwitches = _default.then(_default => alicloud.vpc.getSwitches({
        vpcId: _default.ids?.[0],
        zoneId: zoneId,
    }));
    const exampleSecurityGroup = new alicloud.ecs.SecurityGroup("example", {
        name: name,
        vpcId: _default.then(_default => _default.ids?.[0]),
    });
    const defaultInstance = new alicloud.ecs.Instance("default", {
        availabilityZone: zoneId,
        instanceName: name,
        imageId: exampleGetImages.then(exampleGetImages => exampleGetImages.images?.[0]?.id),
        instanceType: Promise.all([example, example.then(example => example.instanceTypes).length]).then(([example, length]) => example.instanceTypes[length - 1].id),
        securityGroups: [exampleSecurityGroup.id],
        vswitchId: defaultGetSwitches.then(defaultGetSwitches => defaultGetSwitches.ids?.[0]),
        systemDiskCategory: "cloud_essd",
    });
    const defaultInstance2 = new alicloud.databasefilesystem.Instance("default", {
        category: "enterprise",
        zoneId: defaultInstance.availabilityZone,
        performanceLevel: "PL1",
        fsName: name,
        size: 100,
    });
    const defaultInstanceAttachment = new alicloud.databasefilesystem.InstanceAttachment("default", {
        ecsId: defaultInstance.id,
        instanceId: defaultInstance2.id,
    });
    const exampleSnapshot = new alicloud.databasefilesystem.Snapshot("example", {
        instanceId: defaultInstanceAttachment.instanceId,
        snapshotName: name,
        description: name,
        retentionDays: 30,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    zone_id = "cn-hangzhou-i"
    example = alicloud.ecs.get_instance_types(availability_zone=zone_id,
        instance_type_family="ecs.g7se")
    example_get_images = alicloud.ecs.get_images(instance_type=example.instance_types[len(example.instance_types) - 1].id,
        name_regex="^aliyun_2_1903_x64_20G_alibase_20231221.vhd",
        owners="system")
    default = alicloud.vpc.get_networks(name_regex="^default-NODELETING$")
    default_get_switches = alicloud.vpc.get_switches(vpc_id=default.ids[0],
        zone_id=zone_id)
    example_security_group = alicloud.ecs.SecurityGroup("example",
        name=name,
        vpc_id=default.ids[0])
    default_instance = alicloud.ecs.Instance("default",
        availability_zone=zone_id,
        instance_name=name,
        image_id=example_get_images.images[0].id,
        instance_type=example.instance_types[len(example.instance_types) - 1].id,
        security_groups=[example_security_group.id],
        vswitch_id=default_get_switches.ids[0],
        system_disk_category="cloud_essd")
    default_instance2 = alicloud.databasefilesystem.Instance("default",
        category="enterprise",
        zone_id=default_instance.availability_zone,
        performance_level="PL1",
        fs_name=name,
        size=100)
    default_instance_attachment = alicloud.databasefilesystem.InstanceAttachment("default",
        ecs_id=default_instance.id,
        instance_id=default_instance2.id)
    example_snapshot = alicloud.databasefilesystem.Snapshot("example",
        instance_id=default_instance_attachment.instance_id,
        snapshot_name=name,
        description=name,
        retention_days=30)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/databasefilesystem"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		zoneId := "cn-hangzhou-i"
    		example, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone:   pulumi.StringRef(zoneId),
    			InstanceTypeFamily: pulumi.StringRef("ecs.g7se"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			InstanceType: pulumi.StringRef(example.InstanceTypes[len(example.InstanceTypes)-1].Id),
    			NameRegex:    pulumi.StringRef("^aliyun_2_1903_x64_20G_alibase_20231221.vhd"),
    			Owners:       pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_default, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
    			NameRegex: pulumi.StringRef("^default-NODELETING$"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
    			VpcId:  pulumi.StringRef(_default.Ids[0]),
    			ZoneId: pulumi.StringRef(zoneId),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleSecurityGroup, err := ecs.NewSecurityGroup(ctx, "example", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: pulumi.String(_default.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
    			AvailabilityZone: pulumi.String(zoneId),
    			InstanceName:     pulumi.String(name),
    			ImageId:          pulumi.String(exampleGetImages.Images[0].Id),
    			InstanceType:     example.InstanceTypes[len(example.InstanceTypes)-1].Id,
    			SecurityGroups: pulumi.StringArray{
    				exampleSecurityGroup.ID(),
    			},
    			VswitchId:          pulumi.String(defaultGetSwitches.Ids[0]),
    			SystemDiskCategory: pulumi.String("cloud_essd"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance2, err := databasefilesystem.NewInstance(ctx, "default", &databasefilesystem.InstanceArgs{
    			Category:         pulumi.String("enterprise"),
    			ZoneId:           defaultInstance.AvailabilityZone,
    			PerformanceLevel: pulumi.String("PL1"),
    			FsName:           pulumi.String(name),
    			Size:             pulumi.Int(100),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstanceAttachment, err := databasefilesystem.NewInstanceAttachment(ctx, "default", &databasefilesystem.InstanceAttachmentArgs{
    			EcsId:      defaultInstance.ID(),
    			InstanceId: defaultInstance2.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = databasefilesystem.NewSnapshot(ctx, "example", &databasefilesystem.SnapshotArgs{
    			InstanceId:    defaultInstanceAttachment.InstanceId,
    			SnapshotName:  pulumi.String(name),
    			Description:   pulumi.String(name),
    			RetentionDays: pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var zoneId = "cn-hangzhou-i";
    
        var example = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = zoneId,
            InstanceTypeFamily = "ecs.g7se",
        });
    
        var exampleGetImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            InstanceType = example.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes)[example.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes).Length - 1].Id,
            NameRegex = "^aliyun_2_1903_x64_20G_alibase_20231221.vhd",
            Owners = "system",
        });
    
        var @default = AliCloud.Vpc.GetNetworks.Invoke(new()
        {
            NameRegex = "^default-NODELETING$",
        });
    
        var defaultGetSwitches = AliCloud.Vpc.GetSwitches.Invoke(new()
        {
            VpcId = @default.Apply(getNetworksResult => getNetworksResult.Ids[0]),
            ZoneId = zoneId,
        });
    
        var exampleSecurityGroup = new AliCloud.Ecs.SecurityGroup("example", new()
        {
            Name = name,
            VpcId = @default.Apply(@default => @default.Apply(getNetworksResult => getNetworksResult.Ids[0])),
        });
    
        var defaultInstance = new AliCloud.Ecs.Instance("default", new()
        {
            AvailabilityZone = zoneId,
            InstanceName = name,
            ImageId = exampleGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = Output.Tuple(example, example.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes).Length).Apply(values =>
            {
                var example = values.Item1;
                var length = values.Item2;
                return example.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes)[length - 1].Id;
            }),
            SecurityGroups = new[]
            {
                exampleSecurityGroup.Id,
            },
            VswitchId = defaultGetSwitches.Apply(getSwitchesResult => getSwitchesResult.Ids[0]),
            SystemDiskCategory = "cloud_essd",
        });
    
        var defaultInstance2 = new AliCloud.DatabaseFilesystem.Instance("default", new()
        {
            Category = "enterprise",
            ZoneId = defaultInstance.AvailabilityZone,
            PerformanceLevel = "PL1",
            FsName = name,
            Size = 100,
        });
    
        var defaultInstanceAttachment = new AliCloud.DatabaseFilesystem.InstanceAttachment("default", new()
        {
            EcsId = defaultInstance.Id,
            InstanceId = defaultInstance2.Id,
        });
    
        var exampleSnapshot = new AliCloud.DatabaseFilesystem.Snapshot("example", new()
        {
            InstanceId = defaultInstanceAttachment.InstanceId,
            SnapshotName = name,
            Description = name,
            RetentionDays = 30,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.vpc.VpcFunctions;
    import com.pulumi.alicloud.vpc.inputs.GetNetworksArgs;
    import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    import com.pulumi.alicloud.databasefilesystem.Instance;
    import com.pulumi.alicloud.databasefilesystem.InstanceArgs;
    import com.pulumi.alicloud.databasefilesystem.InstanceAttachment;
    import com.pulumi.alicloud.databasefilesystem.InstanceAttachmentArgs;
    import com.pulumi.alicloud.databasefilesystem.Snapshot;
    import com.pulumi.alicloud.databasefilesystem.SnapshotArgs;
    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) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var zoneId = "cn-hangzhou-i";
    
            final var example = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(zoneId)
                .instanceTypeFamily("ecs.g7se")
                .build());
    
            final var exampleGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .instanceType(example.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes())[example.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()).length() - 1].id())
                .nameRegex("^aliyun_2_1903_x64_20G_alibase_20231221.vhd")
                .owners("system")
                .build());
    
            final var default = VpcFunctions.getNetworks(GetNetworksArgs.builder()
                .nameRegex("^default-NODELETING$")
                .build());
    
            final var defaultGetSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
                .vpcId(default_.ids()[0])
                .zoneId(zoneId)
                .build());
    
            var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()        
                .name(name)
                .vpcId(default_.ids()[0])
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .availabilityZone(zoneId)
                .instanceName(name)
                .imageId(exampleGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(example.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes())[example.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()).length() - 1].id())
                .securityGroups(exampleSecurityGroup.id())
                .vswitchId(defaultGetSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
                .systemDiskCategory("cloud_essd")
                .build());
    
            var defaultInstance2 = new Instance("defaultInstance2", InstanceArgs.builder()        
                .category("enterprise")
                .zoneId(defaultInstance.availabilityZone())
                .performanceLevel("PL1")
                .fsName(name)
                .size(100)
                .build());
    
            var defaultInstanceAttachment = new InstanceAttachment("defaultInstanceAttachment", InstanceAttachmentArgs.builder()        
                .ecsId(defaultInstance.id())
                .instanceId(defaultInstance2.id())
                .build());
    
            var exampleSnapshot = new Snapshot("exampleSnapshot", SnapshotArgs.builder()        
                .instanceId(defaultInstanceAttachment.instanceId())
                .snapshotName(name)
                .description(name)
                .retentionDays(30)
                .build());
    
        }
    }
    
    Coming soon!
    

    Create Snapshot Resource

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

    Constructor syntax

    new Snapshot(name: string, args: SnapshotArgs, opts?: CustomResourceOptions);
    @overload
    def Snapshot(resource_name: str,
                 args: SnapshotArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Snapshot(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 instance_id: Optional[str] = None,
                 description: Optional[str] = None,
                 force: Optional[bool] = None,
                 retention_days: Optional[int] = None,
                 snapshot_name: Optional[str] = None)
    func NewSnapshot(ctx *Context, name string, args SnapshotArgs, opts ...ResourceOption) (*Snapshot, error)
    public Snapshot(string name, SnapshotArgs args, CustomResourceOptions? opts = null)
    public Snapshot(String name, SnapshotArgs args)
    public Snapshot(String name, SnapshotArgs args, CustomResourceOptions options)
    
    type: alicloud:databasefilesystem:Snapshot
    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 SnapshotArgs
    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 SnapshotArgs
    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 SnapshotArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SnapshotArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SnapshotArgs
    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 snapshotResource = new AliCloud.DatabaseFilesystem.Snapshot("snapshotResource", new()
    {
        InstanceId = "string",
        Description = "string",
        Force = false,
        RetentionDays = 0,
        SnapshotName = "string",
    });
    
    example, err := databasefilesystem.NewSnapshot(ctx, "snapshotResource", &databasefilesystem.SnapshotArgs{
    	InstanceId:    pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	Force:         pulumi.Bool(false),
    	RetentionDays: pulumi.Int(0),
    	SnapshotName:  pulumi.String("string"),
    })
    
    var snapshotResource = new Snapshot("snapshotResource", SnapshotArgs.builder()        
        .instanceId("string")
        .description("string")
        .force(false)
        .retentionDays(0)
        .snapshotName("string")
        .build());
    
    snapshot_resource = alicloud.databasefilesystem.Snapshot("snapshotResource",
        instance_id="string",
        description="string",
        force=False,
        retention_days=0,
        snapshot_name="string")
    
    const snapshotResource = new alicloud.databasefilesystem.Snapshot("snapshotResource", {
        instanceId: "string",
        description: "string",
        force: false,
        retentionDays: 0,
        snapshotName: "string",
    });
    
    type: alicloud:databasefilesystem:Snapshot
    properties:
        description: string
        force: false
        instanceId: string
        retentionDays: 0
        snapshotName: string
    

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

    InstanceId string
    The ID of the database file system.
    Description string
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    Force bool
    Whether to force deletion of snapshots.
    RetentionDays int
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    SnapshotName string
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    InstanceId string
    The ID of the database file system.
    Description string
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    Force bool
    Whether to force deletion of snapshots.
    RetentionDays int
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    SnapshotName string
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    instanceId String
    The ID of the database file system.
    description String
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    force Boolean
    Whether to force deletion of snapshots.
    retentionDays Integer
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    snapshotName String
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    instanceId string
    The ID of the database file system.
    description string
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    force boolean
    Whether to force deletion of snapshots.
    retentionDays number
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    snapshotName string
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    instance_id str
    The ID of the database file system.
    description str
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    force bool
    Whether to force deletion of snapshots.
    retention_days int
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    snapshot_name str
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    instanceId String
    The ID of the database file system.
    description String
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    force Boolean
    Whether to force deletion of snapshots.
    retentionDays Number
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    snapshotName String
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.

    Outputs

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

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

    Look up Existing Snapshot Resource

    Get an existing Snapshot 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?: SnapshotState, opts?: CustomResourceOptions): Snapshot
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            force: Optional[bool] = None,
            instance_id: Optional[str] = None,
            retention_days: Optional[int] = None,
            snapshot_name: Optional[str] = None,
            status: Optional[str] = None) -> Snapshot
    func GetSnapshot(ctx *Context, name string, id IDInput, state *SnapshotState, opts ...ResourceOption) (*Snapshot, error)
    public static Snapshot Get(string name, Input<string> id, SnapshotState? state, CustomResourceOptions? opts = null)
    public static Snapshot get(String name, Output<String> id, SnapshotState 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:
    Description string
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    Force bool
    Whether to force deletion of snapshots.
    InstanceId string
    The ID of the database file system.
    RetentionDays int
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    SnapshotName string
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    Status string
    The status of the Snapshot.
    Description string
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    Force bool
    Whether to force deletion of snapshots.
    InstanceId string
    The ID of the database file system.
    RetentionDays int
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    SnapshotName string
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    Status string
    The status of the Snapshot.
    description String
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    force Boolean
    Whether to force deletion of snapshots.
    instanceId String
    The ID of the database file system.
    retentionDays Integer
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    snapshotName String
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    status String
    The status of the Snapshot.
    description string
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    force boolean
    Whether to force deletion of snapshots.
    instanceId string
    The ID of the database file system.
    retentionDays number
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    snapshotName string
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    status string
    The status of the Snapshot.
    description str
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    force bool
    Whether to force deletion of snapshots.
    instance_id str
    The ID of the database file system.
    retention_days int
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    snapshot_name str
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    status str
    The status of the Snapshot.
    description String
    Description of the snapshot. The description must be 2 to 256 characters in length. It must start with a letter, and cannot start with http:// or https://.
    force Boolean
    Whether to force deletion of snapshots.
    instanceId String
    The ID of the database file system.
    retentionDays Number
    The retention time of the snapshot. Unit: days. Snapshots are automatically released after the retention time expires. Valid values: 1 to 65536.
    snapshotName String
    The display name of the snapshot. The length is 2 to 128 characters. It must start with a large or small letter or Chinese, and cannot start with http:// and https://. It can contain numbers, colons (:), underscores (_), or hyphens (-). To prevent name conflicts with automatic snapshots, you cannot start with auto.
    status String
    The status of the Snapshot.

    Import

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

    $ pulumi import alicloud:databasefilesystem/snapshot:Snapshot 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.54.0 published on Wednesday, Apr 24, 2024 by Pulumi