ExpressSyncShareAttachmentArgs

data class ExpressSyncShareAttachmentArgs(val expressSyncId: Output<String>? = null, val gatewayId: Output<String>? = null, val shareName: Output<String>? = null) : ConvertibleToJava<ExpressSyncShareAttachmentArgs>

Provides a Cloud Storage Gateway Express Sync Share Attachment resource. For information about Cloud Storage Gateway Express Sync Share Attachment and how to use it, see What is Express Sync Share Attachment.

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 com.pulumi.alicloud.cloudstoragegateway.ExpressSync;
import com.pulumi.alicloud.cloudstoragegateway.ExpressSyncArgs;
import com.pulumi.alicloud.cloudstoragegateway.ExpressSyncShareAttachment;
import com.pulumi.alicloud.cloudstoragegateway.ExpressSyncShareAttachmentArgs;
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("tftest");
final var region = config.get("region").orElse("cn-shanghai");
final var defaultStocks = CloudstoragegatewayFunctions.getStocks(GetStocksArgs.builder()
.gatewayClass("Standard")
.build());
var vpc = new Network("vpc", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("192.16.0.0/12")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vpcId(vpc.id())
.cidrBlock("192.16.0.0/21")
.zoneId(defaultStocks.applyValue(getStocksResult -> getStocksResult.stocks()[0].zoneId()))
.vswitchName(name)
.build());
var defaultStorageBundle = new StorageBundle("defaultStorageBundle", StorageBundleArgs.builder()
.storageBundleName(name)
.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(name)
.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(name)
.build());
var defaultGatewayFileShare = new GatewayFileShare("defaultGatewayFileShare", GatewayFileShareArgs.builder()
.gatewayFileShareName(name)
.gatewayId(defaultGateway.id())
.localPath(defaultGatewayCacheDisk.localFilePath())
.ossBucketName(defaultBucket.bucket())
.ossEndpoint(defaultBucket.extranetEndpoint())
.protocol("NFS")
.remoteSync(false)
.feLimit(0)
.backendLimit(0)
.cacheMode("Cache")
.squash("none")
.lagPeriod(5)
.build());
var defaultExpressSync = new ExpressSync("defaultExpressSync", ExpressSyncArgs.builder()
.bucketName(defaultGatewayFileShare.ossBucketName())
.bucketRegion(region)
.description(name)
.expressSyncName(name)
.build());
var defaultExpressSyncShareAttachment = new ExpressSyncShareAttachment("defaultExpressSyncShareAttachment", ExpressSyncShareAttachmentArgs.builder()
.expressSyncId(defaultExpressSync.id())
.gatewayId(defaultGateway.id())
.shareName(defaultGatewayFileShare.gatewayFileShareName())
.build());
}
}

Import

Cloud Storage Gateway Express Sync Share Attachment can be imported using the id, e.g.

$ pulumi import alicloud:cloudstoragegateway/expressSyncShareAttachment:ExpressSyncShareAttachment example <express_sync_id>:<gateway_id>:<share_name>

Constructors

Link copied to clipboard
fun ExpressSyncShareAttachmentArgs(expressSyncId: Output<String>? = null, gatewayId: Output<String>? = null, shareName: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ExpressSyncShareAttachmentArgs

Properties

Link copied to clipboard
val expressSyncId: Output<String>? = null

The ID of the ExpressSync.

Link copied to clipboard
val gatewayId: Output<String>? = null

The ID of the Gateway.

Link copied to clipboard
val shareName: Output<String>? = null

The name of the GatewayFileShare. NOTE: When GatewayFileShare is associated with a speed sync group, its reverse synchronization function will be turned off by default.