alicloud logo
Alibaba Cloud v3.34.0, Mar 17 23

alicloud.nas.RecycleBin

Provides a Network Attached Storage (NAS) Recycle Bin resource.

For information about Network Attached Storage (NAS) Recycle Bin and how to use it, see What is Recycle Bin.

NOTE: Available in v1.155.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var exampleFileSystem = new AliCloud.Nas.FileSystem("exampleFileSystem", new()
    {
        ProtocolType = "NFS",
        StorageType = "Performance",
        Description = @var.Name,
        EncryptType = 1,
    });

    var exampleRecycleBin = new AliCloud.Nas.RecycleBin("exampleRecycleBin", new()
    {
        FileSystemId = exampleFileSystem.Id,
        ReservedDays = 3,
    });

});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/nas"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleFileSystem, err := nas.NewFileSystem(ctx, "exampleFileSystem", &nas.FileSystemArgs{
			ProtocolType: pulumi.String("NFS"),
			StorageType:  pulumi.String("Performance"),
			Description:  pulumi.Any(_var.Name),
			EncryptType:  pulumi.Int(1),
		})
		if err != nil {
			return err
		}
		_, err = nas.NewRecycleBin(ctx, "exampleRecycleBin", &nas.RecycleBinArgs{
			FileSystemId: exampleFileSystem.ID(),
			ReservedDays: pulumi.Int(3),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.nas.FileSystem;
import com.pulumi.alicloud.nas.FileSystemArgs;
import com.pulumi.alicloud.nas.RecycleBin;
import com.pulumi.alicloud.nas.RecycleBinArgs;
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 exampleFileSystem = new FileSystem("exampleFileSystem", FileSystemArgs.builder()        
            .protocolType("NFS")
            .storageType("Performance")
            .description(var_.name())
            .encryptType("1")
            .build());

        var exampleRecycleBin = new RecycleBin("exampleRecycleBin", RecycleBinArgs.builder()        
            .fileSystemId(exampleFileSystem.id())
            .reservedDays(3)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

example_file_system = alicloud.nas.FileSystem("exampleFileSystem",
    protocol_type="NFS",
    storage_type="Performance",
    description=var["name"],
    encrypt_type=1)
example_recycle_bin = alicloud.nas.RecycleBin("exampleRecycleBin",
    file_system_id=example_file_system.id,
    reserved_days=3)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const exampleFileSystem = new alicloud.nas.FileSystem("exampleFileSystem", {
    protocolType: "NFS",
    storageType: "Performance",
    description: _var.name,
    encryptType: 1,
});
const exampleRecycleBin = new alicloud.nas.RecycleBin("exampleRecycleBin", {
    fileSystemId: exampleFileSystem.id,
    reservedDays: 3,
});
resources:
  exampleFileSystem:
    type: alicloud:nas:FileSystem
    properties:
      protocolType: NFS
      storageType: Performance
      description: ${var.name}
      encryptType: '1'
  exampleRecycleBin:
    type: alicloud:nas:RecycleBin
    properties:
      fileSystemId: ${exampleFileSystem.id}
      reservedDays: 3

Create RecycleBin Resource

new RecycleBin(name: string, args: RecycleBinArgs, opts?: CustomResourceOptions);
@overload
def RecycleBin(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               file_system_id: Optional[str] = None,
               reserved_days: Optional[int] = None)
@overload
def RecycleBin(resource_name: str,
               args: RecycleBinArgs,
               opts: Optional[ResourceOptions] = None)
func NewRecycleBin(ctx *Context, name string, args RecycleBinArgs, opts ...ResourceOption) (*RecycleBin, error)
public RecycleBin(string name, RecycleBinArgs args, CustomResourceOptions? opts = null)
public RecycleBin(String name, RecycleBinArgs args)
public RecycleBin(String name, RecycleBinArgs args, CustomResourceOptions options)
type: alicloud:nas:RecycleBin
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args RecycleBinArgs
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 RecycleBinArgs
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 RecycleBinArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args RecycleBinArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args RecycleBinArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

FileSystemId string

The ID of the file system for which you want to enable the recycle bin feature.

ReservedDays int

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

FileSystemId string

The ID of the file system for which you want to enable the recycle bin feature.

ReservedDays int

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

fileSystemId String

The ID of the file system for which you want to enable the recycle bin feature.

reservedDays Integer

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

fileSystemId string

The ID of the file system for which you want to enable the recycle bin feature.

reservedDays number

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

file_system_id str

The ID of the file system for which you want to enable the recycle bin feature.

reserved_days int

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

fileSystemId String

The ID of the file system for which you want to enable the recycle bin feature.

reservedDays Number

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the recycle bin.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The status of the recycle bin.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the recycle bin.

id string

The provider-assigned unique ID for this managed resource.

status string

The status of the recycle bin.

id str

The provider-assigned unique ID for this managed resource.

status str

The status of the recycle bin.

id String

The provider-assigned unique ID for this managed resource.

status String

The status of the recycle bin.

Look up Existing RecycleBin Resource

Get an existing RecycleBin 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?: RecycleBinState, opts?: CustomResourceOptions): RecycleBin
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        file_system_id: Optional[str] = None,
        reserved_days: Optional[int] = None,
        status: Optional[str] = None) -> RecycleBin
func GetRecycleBin(ctx *Context, name string, id IDInput, state *RecycleBinState, opts ...ResourceOption) (*RecycleBin, error)
public static RecycleBin Get(string name, Input<string> id, RecycleBinState? state, CustomResourceOptions? opts = null)
public static RecycleBin get(String name, Output<String> id, RecycleBinState 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:
FileSystemId string

The ID of the file system for which you want to enable the recycle bin feature.

ReservedDays int

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

Status string

The status of the recycle bin.

FileSystemId string

The ID of the file system for which you want to enable the recycle bin feature.

ReservedDays int

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

Status string

The status of the recycle bin.

fileSystemId String

The ID of the file system for which you want to enable the recycle bin feature.

reservedDays Integer

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

status String

The status of the recycle bin.

fileSystemId string

The ID of the file system for which you want to enable the recycle bin feature.

reservedDays number

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

status string

The status of the recycle bin.

file_system_id str

The ID of the file system for which you want to enable the recycle bin feature.

reserved_days int

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

status str

The status of the recycle bin.

fileSystemId String

The ID of the file system for which you want to enable the recycle bin feature.

reservedDays Number

The period for which the files in the recycle bin are retained. Unit: days. Valid values: 1 to 180.

status String

The status of the recycle bin.

Import

Network Attached Storage (NAS) Recycle Bin can be imported using the id, e.g.

 $ pulumi import alicloud:nas/recycleBin:RecycleBin example <file_system_id>

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.