alicloud.cloudstoragegateway.Gateway
Explore with Pulumi AI
Provides a Cloud Storage Gateway Gateway resource.
For information about Cloud Storage Gateway Gateway and how to use it, see What is Gateway.
NOTE: Available since v1.132.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const default = alicloud.getZones({});
const defaultInteger = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultStorageBundle = new alicloud.cloudstoragegateway.StorageBundle("default", {storageBundleName: `${name}-${defaultInteger.result}`});
const defaultNetwork = new alicloud.vpc.Network("default", {
vpcName: `${name}-${defaultInteger.result}`,
cidrBlock: "192.168.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vswitchName: `${name}-${defaultInteger.result}`,
vpcId: defaultNetwork.id,
cidrBlock: "192.168.192.0/24",
zoneId: _default.then(_default => _default.zones?.[0]?.id),
});
const defaultGateway = new alicloud.cloudstoragegateway.Gateway("default", {
storageBundleId: defaultStorageBundle.id,
type: "File",
location: "Cloud",
gatewayName: name,
gatewayClass: "Standard",
vswitchId: defaultSwitch.id,
publicNetworkBandwidth: 50,
paymentType: "PayAsYouGo",
description: name,
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.get_zones()
default_integer = random.index.Integer("default",
min=10000,
max=99999)
default_storage_bundle = alicloud.cloudstoragegateway.StorageBundle("default", storage_bundle_name=f"{name}-{default_integer['result']}")
default_network = alicloud.vpc.Network("default",
vpc_name=f"{name}-{default_integer['result']}",
cidr_block="192.168.0.0/16")
default_switch = alicloud.vpc.Switch("default",
vswitch_name=f"{name}-{default_integer['result']}",
vpc_id=default_network.id,
cidr_block="192.168.192.0/24",
zone_id=default.zones[0].id)
default_gateway = alicloud.cloudstoragegateway.Gateway("default",
storage_bundle_id=default_storage_bundle.id,
type="File",
location="Cloud",
gateway_name=name,
gateway_class="Standard",
vswitch_id=default_switch.id,
public_network_bandwidth=50,
payment_type="PayAsYouGo",
description=name)
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudstoragegateway"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"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 := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{}, nil)
if err != nil {
return err
}
defaultInteger, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
defaultStorageBundle, err := cloudstoragegateway.NewStorageBundle(ctx, "default", &cloudstoragegateway.StorageBundleArgs{
StorageBundleName: pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
})
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
VpcName: pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
CidrBlock: pulumi.String("192.168.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VswitchName: pulumi.Sprintf("%v-%v", name, defaultInteger.Result),
VpcId: defaultNetwork.ID(),
CidrBlock: pulumi.String("192.168.192.0/24"),
ZoneId: pulumi.String(_default.Zones[0].Id),
})
if err != nil {
return err
}
_, err = cloudstoragegateway.NewGateway(ctx, "default", &cloudstoragegateway.GatewayArgs{
StorageBundleId: defaultStorageBundle.ID(),
Type: pulumi.String("File"),
Location: pulumi.String("Cloud"),
GatewayName: pulumi.String(name),
GatewayClass: pulumi.String("Standard"),
VswitchId: defaultSwitch.ID(),
PublicNetworkBandwidth: pulumi.Int(50),
PaymentType: pulumi.String("PayAsYouGo"),
Description: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.GetZones.Invoke();
var defaultInteger = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultStorageBundle = new AliCloud.CloudStorageGateway.StorageBundle("default", new()
{
StorageBundleName = $"{name}-{defaultInteger.Result}",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
VpcName = $"{name}-{defaultInteger.Result}",
CidrBlock = "192.168.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VswitchName = $"{name}-{defaultInteger.Result}",
VpcId = defaultNetwork.Id,
CidrBlock = "192.168.192.0/24",
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
});
var defaultGateway = new AliCloud.CloudStorageGateway.Gateway("default", new()
{
StorageBundleId = defaultStorageBundle.Id,
Type = "File",
Location = "Cloud",
GatewayName = name,
GatewayClass = "Standard",
VswitchId = defaultSwitch.Id,
PublicNetworkBandwidth = 50,
PaymentType = "PayAsYouGo",
Description = name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.inputs.GetZonesArgs;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.cloudstoragegateway.StorageBundle;
import com.pulumi.alicloud.cloudstoragegateway.StorageBundleArgs;
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.Gateway;
import com.pulumi.alicloud.cloudstoragegateway.GatewayArgs;
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("terraform-example");
final var default = AlicloudFunctions.getZones();
var defaultInteger = new Integer("defaultInteger", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultStorageBundle = new StorageBundle("defaultStorageBundle", StorageBundleArgs.builder()
.storageBundleName(String.format("%s-%s", name,defaultInteger.result()))
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(String.format("%s-%s", name,defaultInteger.result()))
.cidrBlock("192.168.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vswitchName(String.format("%s-%s", name,defaultInteger.result()))
.vpcId(defaultNetwork.id())
.cidrBlock("192.168.192.0/24")
.zoneId(default_.zones()[0].id())
.build());
var defaultGateway = new Gateway("defaultGateway", GatewayArgs.builder()
.storageBundleId(defaultStorageBundle.id())
.type("File")
.location("Cloud")
.gatewayName(name)
.gatewayClass("Standard")
.vswitchId(defaultSwitch.id())
.publicNetworkBandwidth(50)
.paymentType("PayAsYouGo")
.description(name)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultInteger:
type: random:integer
name: default
properties:
min: 10000
max: 99999
defaultStorageBundle:
type: alicloud:cloudstoragegateway:StorageBundle
name: default
properties:
storageBundleName: ${name}-${defaultInteger.result}
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
vpcName: ${name}-${defaultInteger.result}
cidrBlock: 192.168.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vswitchName: ${name}-${defaultInteger.result}
vpcId: ${defaultNetwork.id}
cidrBlock: 192.168.192.0/24
zoneId: ${default.zones[0].id}
defaultGateway:
type: alicloud:cloudstoragegateway:Gateway
name: default
properties:
storageBundleId: ${defaultStorageBundle.id}
type: File
location: Cloud
gatewayName: ${name}
gatewayClass: Standard
vswitchId: ${defaultSwitch.id}
publicNetworkBandwidth: 50
paymentType: PayAsYouGo
description: ${name}
variables:
default:
fn::invoke:
Function: alicloud:getZones
Arguments: {}
Create Gateway Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Gateway(name: string, args: GatewayArgs, opts?: CustomResourceOptions);
@overload
def Gateway(resource_name: str,
args: GatewayArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Gateway(resource_name: str,
opts: Optional[ResourceOptions] = None,
gateway_name: Optional[str] = None,
location: Optional[str] = None,
storage_bundle_id: Optional[str] = None,
type: Optional[str] = None,
description: Optional[str] = None,
gateway_class: Optional[str] = None,
payment_type: Optional[str] = None,
public_network_bandwidth: Optional[int] = None,
reason_detail: Optional[str] = None,
reason_type: Optional[str] = None,
release_after_expiration: Optional[bool] = None,
vswitch_id: Optional[str] = None)
func NewGateway(ctx *Context, name string, args GatewayArgs, opts ...ResourceOption) (*Gateway, error)
public Gateway(string name, GatewayArgs args, CustomResourceOptions? opts = null)
public Gateway(String name, GatewayArgs args)
public Gateway(String name, GatewayArgs args, CustomResourceOptions options)
type: alicloud:cloudstoragegateway:Gateway
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 GatewayArgs
- 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 GatewayArgs
- 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 GatewayArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GatewayArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GatewayArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var gatewayResource = new AliCloud.CloudStorageGateway.Gateway("gatewayResource", new()
{
GatewayName = "string",
Location = "string",
StorageBundleId = "string",
Type = "string",
Description = "string",
GatewayClass = "string",
PaymentType = "string",
PublicNetworkBandwidth = 0,
ReasonDetail = "string",
ReasonType = "string",
ReleaseAfterExpiration = false,
VswitchId = "string",
});
example, err := cloudstoragegateway.NewGateway(ctx, "gatewayResource", &cloudstoragegateway.GatewayArgs{
GatewayName: pulumi.String("string"),
Location: pulumi.String("string"),
StorageBundleId: pulumi.String("string"),
Type: pulumi.String("string"),
Description: pulumi.String("string"),
GatewayClass: pulumi.String("string"),
PaymentType: pulumi.String("string"),
PublicNetworkBandwidth: pulumi.Int(0),
ReasonDetail: pulumi.String("string"),
ReasonType: pulumi.String("string"),
ReleaseAfterExpiration: pulumi.Bool(false),
VswitchId: pulumi.String("string"),
})
var gatewayResource = new Gateway("gatewayResource", GatewayArgs.builder()
.gatewayName("string")
.location("string")
.storageBundleId("string")
.type("string")
.description("string")
.gatewayClass("string")
.paymentType("string")
.publicNetworkBandwidth(0)
.reasonDetail("string")
.reasonType("string")
.releaseAfterExpiration(false)
.vswitchId("string")
.build());
gateway_resource = alicloud.cloudstoragegateway.Gateway("gatewayResource",
gateway_name="string",
location="string",
storage_bundle_id="string",
type="string",
description="string",
gateway_class="string",
payment_type="string",
public_network_bandwidth=0,
reason_detail="string",
reason_type="string",
release_after_expiration=False,
vswitch_id="string")
const gatewayResource = new alicloud.cloudstoragegateway.Gateway("gatewayResource", {
gatewayName: "string",
location: "string",
storageBundleId: "string",
type: "string",
description: "string",
gatewayClass: "string",
paymentType: "string",
publicNetworkBandwidth: 0,
reasonDetail: "string",
reasonType: "string",
releaseAfterExpiration: false,
vswitchId: "string",
});
type: alicloud:cloudstoragegateway:Gateway
properties:
description: string
gatewayClass: string
gatewayName: string
location: string
paymentType: string
publicNetworkBandwidth: 0
reasonDetail: string
reasonType: string
releaseAfterExpiration: false
storageBundleId: string
type: string
vswitchId: string
Gateway Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Gateway resource accepts the following input properties:
- Gateway
Name string - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - Location string
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - Storage
Bundle stringId - The ID of the gateway cluster.
- Type string
- The type of the gateway. Valid values:
File
,Iscsi
. - Description string
- The description of the gateway.
- Gateway
Class string - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - Payment
Type string - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - Public
Network intBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - Reason
Detail string - The detailed reason why you want to delete the gateway.
- Reason
Type string - The type of the reason why you want to delete the gateway.
- Release
After boolExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- Vswitch
Id string - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- Gateway
Name string - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - Location string
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - Storage
Bundle stringId - The ID of the gateway cluster.
- Type string
- The type of the gateway. Valid values:
File
,Iscsi
. - Description string
- The description of the gateway.
- Gateway
Class string - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - Payment
Type string - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - Public
Network intBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - Reason
Detail string - The detailed reason why you want to delete the gateway.
- Reason
Type string - The type of the reason why you want to delete the gateway.
- Release
After boolExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- Vswitch
Id string - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- gateway
Name String - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - location String
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - storage
Bundle StringId - The ID of the gateway cluster.
- type String
- The type of the gateway. Valid values:
File
,Iscsi
. - description String
- The description of the gateway.
- gateway
Class String - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - payment
Type String - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - public
Network IntegerBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - reason
Detail String - The detailed reason why you want to delete the gateway.
- reason
Type String - The type of the reason why you want to delete the gateway.
- release
After BooleanExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- vswitch
Id String - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- gateway
Name string - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - location string
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - storage
Bundle stringId - The ID of the gateway cluster.
- type string
- The type of the gateway. Valid values:
File
,Iscsi
. - description string
- The description of the gateway.
- gateway
Class string - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - payment
Type string - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - public
Network numberBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - reason
Detail string - The detailed reason why you want to delete the gateway.
- reason
Type string - The type of the reason why you want to delete the gateway.
- release
After booleanExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- vswitch
Id string - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- gateway_
name str - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - location str
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - storage_
bundle_ strid - The ID of the gateway cluster.
- type str
- The type of the gateway. Valid values:
File
,Iscsi
. - description str
- The description of the gateway.
- gateway_
class str - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - payment_
type str - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - public_
network_ intbandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - reason_
detail str - The detailed reason why you want to delete the gateway.
- reason_
type str - The type of the reason why you want to delete the gateway.
- release_
after_ boolexpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- vswitch_
id str - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- gateway
Name String - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - location String
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - storage
Bundle StringId - The ID of the gateway cluster.
- type String
- The type of the gateway. Valid values:
File
,Iscsi
. - description String
- The description of the gateway.
- gateway
Class String - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - payment
Type String - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - public
Network NumberBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - reason
Detail String - The detailed reason why you want to delete the gateway.
- reason
Type String - The type of the reason why you want to delete the gateway.
- release
After BooleanExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- vswitch
Id String - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
Outputs
All input properties are implicitly available as output properties. Additionally, the Gateway resource produces the following output properties:
Look up Existing Gateway Resource
Get an existing Gateway 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?: GatewayState, opts?: CustomResourceOptions): Gateway
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
gateway_class: Optional[str] = None,
gateway_name: Optional[str] = None,
location: Optional[str] = None,
payment_type: Optional[str] = None,
public_network_bandwidth: Optional[int] = None,
reason_detail: Optional[str] = None,
reason_type: Optional[str] = None,
release_after_expiration: Optional[bool] = None,
status: Optional[str] = None,
storage_bundle_id: Optional[str] = None,
type: Optional[str] = None,
vswitch_id: Optional[str] = None) -> Gateway
func GetGateway(ctx *Context, name string, id IDInput, state *GatewayState, opts ...ResourceOption) (*Gateway, error)
public static Gateway Get(string name, Input<string> id, GatewayState? state, CustomResourceOptions? opts = null)
public static Gateway get(String name, Output<String> id, GatewayState 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.
- Description string
- The description of the gateway.
- Gateway
Class string - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - Gateway
Name string - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - Location string
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - Payment
Type string - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - Public
Network intBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - Reason
Detail string - The detailed reason why you want to delete the gateway.
- Reason
Type string - The type of the reason why you want to delete the gateway.
- Release
After boolExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- Status string
- The status of the Gateway.
- Storage
Bundle stringId - The ID of the gateway cluster.
- Type string
- The type of the gateway. Valid values:
File
,Iscsi
. - Vswitch
Id string - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- Description string
- The description of the gateway.
- Gateway
Class string - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - Gateway
Name string - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - Location string
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - Payment
Type string - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - Public
Network intBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - Reason
Detail string - The detailed reason why you want to delete the gateway.
- Reason
Type string - The type of the reason why you want to delete the gateway.
- Release
After boolExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- Status string
- The status of the Gateway.
- Storage
Bundle stringId - The ID of the gateway cluster.
- Type string
- The type of the gateway. Valid values:
File
,Iscsi
. - Vswitch
Id string - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- description String
- The description of the gateway.
- gateway
Class String - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - gateway
Name String - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - location String
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - payment
Type String - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - public
Network IntegerBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - reason
Detail String - The detailed reason why you want to delete the gateway.
- reason
Type String - The type of the reason why you want to delete the gateway.
- release
After BooleanExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- status String
- The status of the Gateway.
- storage
Bundle StringId - The ID of the gateway cluster.
- type String
- The type of the gateway. Valid values:
File
,Iscsi
. - vswitch
Id String - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- description string
- The description of the gateway.
- gateway
Class string - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - gateway
Name string - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - location string
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - payment
Type string - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - public
Network numberBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - reason
Detail string - The detailed reason why you want to delete the gateway.
- reason
Type string - The type of the reason why you want to delete the gateway.
- release
After booleanExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- status string
- The status of the Gateway.
- storage
Bundle stringId - The ID of the gateway cluster.
- type string
- The type of the gateway. Valid values:
File
,Iscsi
. - vswitch
Id string - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- description str
- The description of the gateway.
- gateway_
class str - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - gateway_
name str - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - location str
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - payment_
type str - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - public_
network_ intbandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - reason_
detail str - The detailed reason why you want to delete the gateway.
- reason_
type str - The type of the reason why you want to delete the gateway.
- release_
after_ boolexpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- status str
- The status of the Gateway.
- storage_
bundle_ strid - The ID of the gateway cluster.
- type str
- The type of the gateway. Valid values:
File
,Iscsi
. - vswitch_
id str - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
- description String
- The description of the gateway.
- gateway
Class String - The specification of the gateway. Valid values:
Basic
,Standard
,Enhanced
,Advanced
. NOTE: Iflocation
is set toCloud
,gateway_class
is required. Otherwise,gateway_class
will be ignored. Ifpayment_type
is set toSubscription
,gateway_class
cannot be modified. - gateway
Name String - The name of the gateway. The name must be
1
to60
characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter. - location String
- The location of the gateway. Valid values:
Cloud
,On_Premise
. - payment
Type String - The Payment type of gateway. Valid values:
PayAsYouGo
,Subscription
. NOTE: From version 1.233.0,payment_type
can be set toSubscription
. - public
Network NumberBandwidth - The public bandwidth of the gateway. Default value:
5
. Valid values:5
to200
. NOTE:public_network_bandwidth
is only valid whenlocation
isCloud
. Ifpayment_type
is set toSubscription
,public_network_bandwidth
cannot be modified. - reason
Detail String - The detailed reason why you want to delete the gateway.
- reason
Type String - The type of the reason why you want to delete the gateway.
- release
After BooleanExpiration - Specifies whether to release the gateway after the subscription expires. Valid values:
- status String
- The status of the Gateway.
- storage
Bundle StringId - The ID of the gateway cluster.
- type String
- The type of the gateway. Valid values:
File
,Iscsi
. - vswitch
Id String - The ID of the VSwitch. NOTE: If
location
is set toCloud
,vswitch_id
is required. Otherwise,vswitch_id
will be ignored.
Import
Cloud Storage Gateway Gateway can be imported using the id, e.g.
$ pulumi import alicloud:cloudstoragegateway/gateway:Gateway 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.