Alibaba Cloud
GatewaySmbUser
Provides a Cloud Storage Gateway Gateway SMB User resource.
For information about Cloud Storage Gateway Gateway SMB User and how to use it, see What is Gateway SMB User.
NOTE: Available in v1.142.0+.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var defaultNetworks = Output.Create(AliCloud.Vpc.GetNetworks.InvokeAsync(new AliCloud.Vpc.GetNetworksArgs
{
NameRegex = "default-NODELETING",
}));
var defaultSwitches = defaultNetworks.Apply(defaultNetworks => Output.Create(AliCloud.Vpc.GetSwitches.InvokeAsync(new AliCloud.Vpc.GetSwitchesArgs
{
VpcId = defaultNetworks.Ids?[0],
})));
var example = new AliCloud.CloudStorageGateway.StorageBundle("example", new AliCloud.CloudStorageGateway.StorageBundleArgs
{
StorageBundleName = "example_value",
});
var defaultGateway = new AliCloud.CloudStorageGateway.Gateway("defaultGateway", new AliCloud.CloudStorageGateway.GatewayArgs
{
Description = "tf-acctestDesalone",
GatewayClass = "Standard",
Type = "File",
PaymentType = "PayAsYouGo",
VswitchId = defaultSwitches.Apply(defaultSwitches => defaultSwitches.Ids?[0]),
ReleaseAfterExpiration = false,
PublicNetworkBandwidth = 40,
StorageBundleId = example.Id,
Location = "Cloud",
GatewayName = "example_value",
});
var defaultGatewaySmbUser = new AliCloud.CloudStorageGateway.GatewaySmbUser("defaultGatewaySmbUser", new AliCloud.CloudStorageGateway.GatewaySmbUserArgs
{
Username = "your_username",
Password = "password",
GatewayId = defaultGateway.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudstoragegateway"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
defaultNetworks, err := vpc.GetNetworks(ctx, &vpc.GetNetworksArgs{
NameRegex: pulumi.StringRef("default-NODELETING"),
}, nil)
if err != nil {
return err
}
defaultSwitches, err := vpc.GetSwitches(ctx, &vpc.GetSwitchesArgs{
VpcId: pulumi.StringRef(defaultNetworks.Ids[0]),
}, nil)
if err != nil {
return err
}
example, err := cloudstoragegateway.NewStorageBundle(ctx, "example", &cloudstoragegateway.StorageBundleArgs{
StorageBundleName: pulumi.String("example_value"),
})
if err != nil {
return err
}
defaultGateway, err := cloudstoragegateway.NewGateway(ctx, "defaultGateway", &cloudstoragegateway.GatewayArgs{
Description: pulumi.String("tf-acctestDesalone"),
GatewayClass: pulumi.String("Standard"),
Type: pulumi.String("File"),
PaymentType: pulumi.String("PayAsYouGo"),
VswitchId: pulumi.String(defaultSwitches.Ids[0]),
ReleaseAfterExpiration: pulumi.Bool(false),
PublicNetworkBandwidth: pulumi.Int(40),
StorageBundleId: example.ID(),
Location: pulumi.String("Cloud"),
GatewayName: pulumi.String("example_value"),
})
if err != nil {
return err
}
_, err = cloudstoragegateway.NewGatewaySmbUser(ctx, "defaultGatewaySmbUser", &cloudstoragegateway.GatewaySmbUserArgs{
Username: pulumi.String("your_username"),
Password: pulumi.String("password"),
GatewayId: defaultGateway.ID(),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
default_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
default_switches = alicloud.vpc.get_switches(vpc_id=default_networks.ids[0])
example = alicloud.cloudstoragegateway.StorageBundle("example", storage_bundle_name="example_value")
default_gateway = alicloud.cloudstoragegateway.Gateway("defaultGateway",
description="tf-acctestDesalone",
gateway_class="Standard",
type="File",
payment_type="PayAsYouGo",
vswitch_id=default_switches.ids[0],
release_after_expiration=False,
public_network_bandwidth=40,
storage_bundle_id=example.id,
location="Cloud",
gateway_name="example_value")
default_gateway_smb_user = alicloud.cloudstoragegateway.GatewaySmbUser("defaultGatewaySmbUser",
username="your_username",
password="password",
gateway_id=default_gateway.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const defaultNetworks = alicloud.vpc.getNetworks({
nameRegex: "default-NODELETING",
});
const defaultSwitches = defaultNetworks.then(defaultNetworks => alicloud.vpc.getSwitches({
vpcId: defaultNetworks.ids?[0],
}));
const example = new alicloud.cloudstoragegateway.StorageBundle("example", {storageBundleName: "example_value"});
const defaultGateway = new alicloud.cloudstoragegateway.Gateway("defaultGateway", {
description: "tf-acctestDesalone",
gatewayClass: "Standard",
type: "File",
paymentType: "PayAsYouGo",
vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.ids?[0]),
releaseAfterExpiration: false,
publicNetworkBandwidth: 40,
storageBundleId: example.id,
location: "Cloud",
gatewayName: "example_value",
});
const defaultGatewaySmbUser = new alicloud.cloudstoragegateway.GatewaySmbUser("defaultGatewaySmbUser", {
username: "your_username",
password: "password",
gatewayId: defaultGateway.id,
});
Coming soon!
Create a GatewaySmbUser Resource
new GatewaySmbUser(name: string, args: GatewaySmbUserArgs, opts?: CustomResourceOptions);
@overload
def GatewaySmbUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
gateway_id: Optional[str] = None,
password: Optional[str] = None,
username: Optional[str] = None)
@overload
def GatewaySmbUser(resource_name: str,
args: GatewaySmbUserArgs,
opts: Optional[ResourceOptions] = None)
func NewGatewaySmbUser(ctx *Context, name string, args GatewaySmbUserArgs, opts ...ResourceOption) (*GatewaySmbUser, error)
public GatewaySmbUser(string name, GatewaySmbUserArgs args, CustomResourceOptions? opts = null)
public GatewaySmbUser(String name, GatewaySmbUserArgs args)
public GatewaySmbUser(String name, GatewaySmbUserArgs args, CustomResourceOptions options)
type: alicloud:cloudstoragegateway:GatewaySmbUser
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GatewaySmbUserArgs
- 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 GatewaySmbUserArgs
- 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 GatewaySmbUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GatewaySmbUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GatewaySmbUserArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
GatewaySmbUser 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 GatewaySmbUser resource accepts the following input properties:
- gateway_
id str The Gateway ID of the Gateway SMB User.
- password str
The password of the Gateway SMB User.
- username str
The username of the Gateway SMB User.
Outputs
All input properties are implicitly available as output properties. Additionally, the GatewaySmbUser resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up an Existing GatewaySmbUser Resource
Get an existing GatewaySmbUser 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?: GatewaySmbUserState, opts?: CustomResourceOptions): GatewaySmbUser
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
gateway_id: Optional[str] = None,
password: Optional[str] = None,
username: Optional[str] = None) -> GatewaySmbUser
func GetGatewaySmbUser(ctx *Context, name string, id IDInput, state *GatewaySmbUserState, opts ...ResourceOption) (*GatewaySmbUser, error)
public static GatewaySmbUser Get(string name, Input<string> id, GatewaySmbUserState? state, CustomResourceOptions? opts = null)
public static GatewaySmbUser get(String name, Output<String> id, GatewaySmbUserState 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.
- gateway_
id str The Gateway ID of the Gateway SMB User.
- password str
The password of the Gateway SMB User.
- username str
The username of the Gateway SMB User.
Import
Cloud Storage Gateway Gateway SMB User can be imported using the id, e.g.
$ pulumi import alicloud:cloudstoragegateway/gatewaySmbUser:GatewaySmbUser example <gateway_id>:<username>
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.