Gateway Cache Disk Args
data class GatewayCacheDiskArgs(val cacheDiskCategory: Output<String>? = null, val cacheDiskSizeInGb: Output<Int>? = null, val gatewayId: Output<String>? = null) : ConvertibleToJava<GatewayCacheDiskArgs>
Provides a Cloud Storage Gateway Gateway Cache Disk resource. For information about Cloud Storage Gateway Gateway Cache Disk and how to use it, see What is Gateway Cache Disk.
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 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 exampleStocks = 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 exampleSwitch = new Switch("exampleSwitch", SwitchArgs.builder()
.vpcId(vpc.id())
.cidrBlock("172.16.0.0/21")
.zoneId(exampleStocks.applyValue(getStocksResult -> getStocksResult.stocks()[0].zoneId()))
.vswitchName("example_value")
.build());
var exampleStorageBundle = new StorageBundle("exampleStorageBundle", StorageBundleArgs.builder()
.storageBundleName("example_value")
.build());
var exampleGateway = new Gateway("exampleGateway", GatewayArgs.builder()
.description("tf-acctestDesalone")
.gatewayClass("Standard")
.type("File")
.paymentType("PayAsYouGo")
.vswitchId(exampleSwitch.id())
.releaseAfterExpiration(true)
.publicNetworkBandwidth(10)
.storageBundleId(exampleStorageBundle.id())
.location("Cloud")
.gatewayName("example_value")
.build());
var exampleGatewayCacheDisk = new GatewayCacheDisk("exampleGatewayCacheDisk", GatewayCacheDiskArgs.builder()
.cacheDiskCategory("cloud_efficiency")
.gatewayId(alicloud_cloud_storage_gateway_gateways.example().id())
.cacheDiskSizeInGb(50)
.build());
}
}
Content copied to clipboard
Import
Cloud Storage Gateway Gateway Cache Disk can be imported using the id, e.g.
$ pulumi import alicloud:cloudstoragegateway/gatewayCacheDisk:GatewayCacheDisk example <gateway_id>:<cache_id>:<local_file_path>
Content copied to clipboard
Constructors
Link copied to clipboard
fun GatewayCacheDiskArgs(cacheDiskCategory: Output<String>? = null, cacheDiskSizeInGb: Output<Int>? = null, gatewayId: Output<String>? = null)
Functions
Properties
Link copied to clipboard
size of the cache disk. Unit: GB
. The upper limit of the basic gateway cache disk is 1
TB (1024
GB), that of the standard gateway is 2
TB (2048
GB), and that of other gateway cache disks is 32
TB (32768
GB). The lower limit for the file gateway cache disk capacity is 40
GB, and the lower limit for the block gateway cache disk capacity is 20
GB.