Gateway File Share
Provides a Cloud Storage Gateway Gateway File Share resource. For information about Cloud Storage Gateway Gateway File Share and how to use it, see What is Gateway File Share.
NOTE: Available in v1.144.0+.
Example Usage
Basic Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudstoragegateway.CloudstoragegatewayFunctions;
import com.pulumi.alicloud.cloudstoragegateway.inputs.GetStocksArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.cloudstoragegateway.StorageBundle;
import com.pulumi.alicloud.cloudstoragegateway.StorageBundleArgs;
import com.pulumi.alicloud.cloudstoragegateway.Gateway;
import com.pulumi.alicloud.cloudstoragegateway.GatewayArgs;
import com.pulumi.alicloud.cloudstoragegateway.GatewayCacheDisk;
import com.pulumi.alicloud.cloudstoragegateway.GatewayCacheDiskArgs;
import com.pulumi.alicloud.oss.Bucket;
import com.pulumi.alicloud.oss.BucketArgs;
import com.pulumi.alicloud.cloudstoragegateway.GatewayFileShare;
import com.pulumi.alicloud.cloudstoragegateway.GatewayFileShareArgs;
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 defaultStocks = CloudstoragegatewayFunctions.getStocks(GetStocksArgs.builder()
.gatewayClass("Standard")
.build());
var vpc = new Network("vpc", NetworkArgs.builder()
.vpcName("example_value")
.cidrBlock("172.16.0.0/12")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vpcId(vpc.id())
.cidrBlock("172.16.0.0/21")
.zoneId(defaultStocks.applyValue(getStocksResult -> getStocksResult.stocks()[0].zoneId()))
.vswitchName("example_value")
.build());
var defaultStorageBundle = new StorageBundle("defaultStorageBundle", StorageBundleArgs.builder()
.storageBundleName("example_value")
.build());
var defaultGateway = new Gateway("defaultGateway", GatewayArgs.builder()
.description("tf-acctestDesalone")
.gatewayClass("Standard")
.type("File")
.paymentType("PayAsYouGo")
.vswitchId(defaultSwitch.id())
.releaseAfterExpiration(true)
.publicNetworkBandwidth(10)
.storageBundleId(defaultStorageBundle.id())
.location("Cloud")
.gatewayName("example_value")
.build());
var defaultGatewayCacheDisk = new GatewayCacheDisk("defaultGatewayCacheDisk", GatewayCacheDiskArgs.builder()
.cacheDiskCategory("cloud_efficiency")
.gatewayId(defaultGateway.id())
.cacheDiskSizeInGb(50)
.build());
var defaultBucket = new Bucket("defaultBucket", BucketArgs.builder()
.bucket("example_value")
.build());
var defaultGatewayFileShare = new GatewayFileShare("defaultGatewayFileShare", GatewayFileShareArgs.builder()
.gatewayFileShareName("example_value")
.gatewayId(defaultGateway.id())
.localPath(defaultGatewayCacheDisk.localFilePath())
.ossBucketName(defaultBucket.bucket())
.ossEndpoint(defaultBucket.extranetEndpoint())
.protocol("NFS")
.remoteSync(true)
.pollingInterval(4500)
.feLimit(0)
.backendLimit(0)
.cacheMode("Cache")
.squash("none")
.lagPeriod(5)
.build());
}
}
Content copied to clipboard
Import
Cloud Storage Gateway Gateway File Share can be imported using the id, e.g.
$ pulumi import alicloud:cloudstoragegateway/gatewayFileShare:GatewayFileShare example <gateway_id>:<index_id>
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
The maximum download speed of the gateway file share. Unit: MB/s
. 0
means unlimited. Value range: 0
~ 1280
. NOTE: only in copy mode and enable download file data can be set. only when the shared opens the reverse synchronization or acceded to by the speed synchronization Group when, this parameter will not take effect. Gateway version >= 1.3.0 above support.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard