<gh_stars>0// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.CloudStorageGateway
{
    /// <summary>
    /// 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](https://www.alibabacloud.com/help/en/doc-detail/53972.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.144.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var config = new Config();
    ///     var name = config.Get("name") ?? "tftest";
    ///     var region = config.Get("region") ?? "cn-shanghai";
    ///     var defaultStocks = AliCloud.CloudStorageGateway.GetStocks.Invoke(new()
    ///     {
    ///         GatewayClass = "Standard",
    ///     });
    /// 
    ///     var vpc = new AliCloud.Vpc.Network("vpc", new()
    ///     {
    ///         VpcName = name,
    ///         CidrBlock = "192.16.0.0/12",
    ///     });
    /// 
    ///     var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
    ///     {
    ///         VpcId = vpc.Id,
    ///         CidrBlock = "192.16.0.0/21",
    ///         ZoneId = defaultStocks.Apply(getStocksResult =&gt; getStocksResult.Stocks[0]?.ZoneId),
    ///         VswitchName = name,
    ///     });
    /// 
    ///     var defaultStorageBundle = new AliCloud.CloudStorageGateway.StorageBundle("defaultStorageBundle", new()
    ///     {
    ///         StorageBundleName = name,
    ///     });
    /// 
    ///     var defaultGateway = new AliCloud.CloudStorageGateway.Gateway("defaultGateway", new()
    ///     {
    ///         Description = "tf-acctestDesalone",
    ///         GatewayClass = "Standard",
    ///         Type = "File",
    ///         PaymentType = "PayAsYouGo",
    ///         VswitchId = defaultSwitch.Id,
    ///         ReleaseAfterExpiration = true,
    ///         PublicNetworkBandwidth = 10,
    ///         StorageBundleId = defaultStorageBundle.Id,
    ///         Location = "Cloud",
    ///         GatewayName = name,
    ///     });
    /// 
    ///     var defaultGatewayCacheDisk = new AliCloud.CloudStorageGateway.GatewayCacheDisk("defaultGatewayCacheDisk", new()
    ///     {
    ///         CacheDiskCategory = "cloud_efficiency",
    ///         GatewayId = defaultGateway.Id,
    ///         CacheDiskSizeInGb = 50,
    ///     });
    /// 
    ///     var defaultBucket = new AliCloud.Oss.Bucket("defaultBucket", new()
    ///     {
    ///         BucketName = name,
    ///     });
    /// 
    ///     var defaultGatewayFileShare = new AliCloud.CloudStorageGateway.GatewayFileShare("defaultGatewayFileShare", new()
    ///     {
    ///         GatewayFileShareName = name,
    ///         GatewayId = defaultGateway.Id,
    ///         LocalPath = defaultGatewayCacheDisk.LocalFilePath,
    ///         OssBucketName = defaultBucket.BucketName,
    ///         OssEndpoint = defaultBucket.ExtranetEndpoint,
    ///         Protocol = "NFS",
    ///         RemoteSync = false,
    ///         FeLimit = 0,
    ///         BackendLimit = 0,
    ///         CacheMode = "Cache",
    ///         Squash = "none",
    ///         LagPeriod = 5,
    ///     });
    /// 
    ///     var defaultExpressSync = new AliCloud.CloudStorageGateway.ExpressSync("defaultExpressSync", new()
    ///     {
    ///         BucketName = defaultGatewayFileShare.OssBucketName,
    ///         BucketRegion = region,
    ///         Description = name,
    ///         ExpressSyncName = name,
    ///     });
    /// 
    ///     var defaultExpressSyncShareAttachment = new AliCloud.CloudStorageGateway.ExpressSyncShareAttachment("defaultExpressSyncShareAttachment", new()
    ///     {
    ///         ExpressSyncId = defaultExpressSync.Id,
    ///         GatewayId = defaultGateway.Id,
    ///         ShareName = defaultGatewayFileShare.GatewayFileShareName,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// Cloud Storage Gateway Express Sync Share Attachment can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:cloudstoragegateway/expressSyncShareAttachment:ExpressSyncShareAttachment example &lt;express_sync_id&gt;:&lt;gateway_id&gt;:&lt;share_name&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:cloudstoragegateway/expressSyncShareAttachment:ExpressSyncShareAttachment")]
    public partial class ExpressSyncShareAttachment : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The ID of the ExpressSync.
        /// </summary>
        [Output("expressSyncId")]
        public Output<string> ExpressSyncId { get; private set; } = null!;

        /// <summary>
        /// The ID of the Gateway.
        /// </summary>
        [Output("gatewayId")]
        public Output<string> GatewayId { get; private set; } = null!;

        /// <summary>
        /// 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.
        /// </summary>
        [Output("shareName")]
        public Output<string> ShareName { get; private set; } = null!;


        /// <summary>
        /// Create a ExpressSyncShareAttachment resource with the given unique name, arguments, and options.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resource</param>
        /// <param name="args">The arguments used to populate this resource's properties</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public ExpressSyncShareAttachment(string name, ExpressSyncShareAttachmentArgs args, CustomResourceOptions? options = null)
            : base("alicloud:cloudstoragegateway/expressSyncShareAttachment:ExpressSyncShareAttachment", name, args ?? new ExpressSyncShareAttachmentArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ExpressSyncShareAttachment(string name, Input<string> id, ExpressSyncShareAttachmentState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:cloudstoragegateway/expressSyncShareAttachment:ExpressSyncShareAttachment", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "github://api.github.com/rhysmdnz/pulumi-alicloud",
            };
            var merged = CustomResourceOptions.Merge(defaultOptions, options);
            // Override the ID if one was specified for consistency with other language SDKs.
            merged.Id = id ?? merged.Id;
            return merged;
        }
        /// <summary>
        /// Get an existing ExpressSyncShareAttachment resource's state with the given name, ID, and optional extra
        /// properties used to qualify the lookup.
        /// </summary>
        ///
        /// <param name="name">The unique name of the resulting resource.</param>
        /// <param name="id">The unique provider ID of the resource to lookup.</param>
        /// <param name="state">Any extra arguments used during the lookup.</param>
        /// <param name="options">A bag of options that control this resource's behavior</param>
        public static ExpressSyncShareAttachment Get(string name, Input<string> id, ExpressSyncShareAttachmentState? state = null, CustomResourceOptions? options = null)
        {
            return new ExpressSyncShareAttachment(name, id, state, options);
        }
    }

    public sealed class ExpressSyncShareAttachmentArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of the ExpressSync.
        /// </summary>
        [Input("expressSyncId", required: true)]
        public Input<string> ExpressSyncId { get; set; } = null!;

        /// <summary>
        /// The ID of the Gateway.
        /// </summary>
        [Input("gatewayId", required: true)]
        public Input<string> GatewayId { get; set; } = null!;

        /// <summary>
        /// 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.
        /// </summary>
        [Input("shareName", required: true)]
        public Input<string> ShareName { get; set; } = null!;

        public ExpressSyncShareAttachmentArgs()
        {
        }
        public static new ExpressSyncShareAttachmentArgs Empty => new ExpressSyncShareAttachmentArgs();
    }

    public sealed class ExpressSyncShareAttachmentState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The ID of the ExpressSync.
        /// </summary>
        [Input("expressSyncId")]
        public Input<string>? ExpressSyncId { get; set; }

        /// <summary>
        /// The ID of the Gateway.
        /// </summary>
        [Input("gatewayId")]
        public Input<string>? GatewayId { get; set; }

        /// <summary>
        /// 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.
        /// </summary>
        [Input("shareName")]
        public Input<string>? ShareName { get; set; }

        public ExpressSyncShareAttachmentState()
        {
        }
        public static new ExpressSyncShareAttachmentState Empty => new ExpressSyncShareAttachmentState();
    }
}
