<filename>sdk/dotnet/Amqp/Instance.cs<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.Amqp
{
    /// <summary>
    /// Provides a RabbitMQ (AMQP) Instance resource.
    /// 
    /// For information about RabbitMQ (AMQP) Instance and how to use it, see [What is Instance](https://www.alibabacloud.com/help/doc-detail/101631.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.128.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var professional = new AliCloud.Amqp.Instance("professional", new()
    ///     {
    ///         InstanceType = "professional",
    ///         MaxEipTps = "128",
    ///         MaxTps = "1000",
    ///         PaymentType = "Subscription",
    ///         Period = 1,
    ///         QueueCapacity = "50",
    ///         SupportEip = true,
    ///     });
    /// 
    ///     var vip = new AliCloud.Amqp.Instance("vip", new()
    ///     {
    ///         InstanceType = "vip",
    ///         MaxEipTps = "128",
    ///         MaxTps = "5000",
    ///         PaymentType = "Subscription",
    ///         Period = 1,
    ///         QueueCapacity = "50",
    ///         StorageSize = "700",
    ///         SupportEip = true,
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// RabbitMQ (AMQP) Instance can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:amqp/instance:Instance example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:amqp/instance:Instance")]
    public partial class Instance : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The instance name.
        /// </summary>
        [Output("instanceName")]
        public Output<string> InstanceName { get; private set; } = null!;

        /// <summary>
        /// The Instance Type. Valid values: `professional`, `enterprise`, `vip`.
        /// </summary>
        [Output("instanceType")]
        public Output<string> InstanceType { get; private set; } = null!;

        [Output("logistics")]
        public Output<string?> Logistics { get; private set; } = null!;

        /// <summary>
        /// The max eip tps. It is valid when `support_eip` is true. The valid value is [128, 45000] with the step size 128.
        /// </summary>
        [Output("maxEipTps")]
        public Output<string?> MaxEipTps { get; private set; } = null!;

        /// <summary>
        /// The peak TPS traffic. The smallest valid value is 1000 and the largest value is 100,000.
        /// </summary>
        [Output("maxTps")]
        public Output<string> MaxTps { get; private set; } = null!;

        /// <summary>
        /// The modify type. Valid values: `Downgrade`, `Upgrade`. It is required when updating other attributes.
        /// </summary>
        [Output("modifyType")]
        public Output<string?> ModifyType { get; private set; } = null!;

        /// <summary>
        /// The payment type. Valid values: `Subscription`.
        /// </summary>
        [Output("paymentType")]
        public Output<string> PaymentType { get; private set; } = null!;

        /// <summary>
        /// The period. Valid values: `1`, `12`, `2`, `24`, `3`, `6`.
        /// </summary>
        [Output("period")]
        public Output<int?> Period { get; private set; } = null!;

        /// <summary>
        /// The queue capacity. The smallest value is 50 and the step size 5.
        /// </summary>
        [Output("queueCapacity")]
        public Output<string> QueueCapacity { get; private set; } = null!;

        /// <summary>
        /// RenewalDuration. Valid values: `1`, `12`, `2`, `3`, `6`.
        /// </summary>
        [Output("renewalDuration")]
        public Output<int?> RenewalDuration { get; private set; } = null!;

        /// <summary>
        /// Auto-Renewal Cycle Unit Values Include: Month: Month. Year: Years. Valid values: `Month`, `Year`.
        /// </summary>
        [Output("renewalDurationUnit")]
        public Output<string?> RenewalDurationUnit { get; private set; } = null!;

        /// <summary>
        /// Whether to renew an instance automatically or not. Default to "ManualRenewal".
        /// - `AutoRenewal`: Auto renewal.
        /// - `ManualRenewal`: Manual renewal.
        /// - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
        /// </summary>
        [Output("renewalStatus")]
        public Output<string> RenewalStatus { get; private set; } = null!;

        /// <summary>
        /// The status of the resource.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

        /// <summary>
        /// The storage size. It is valid when `instance_type` is vip.
        /// </summary>
        [Output("storageSize")]
        public Output<string?> StorageSize { get; private set; } = null!;

        /// <summary>
        /// Whether to support EIP.
        /// </summary>
        [Output("supportEip")]
        public Output<bool> SupportEip { get; private set; } = null!;


        /// <summary>
        /// Create a Instance 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 Instance(string name, InstanceArgs args, CustomResourceOptions? options = null)
            : base("alicloud:amqp/instance:Instance", name, args ?? new InstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Instance(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
            : base("alicloud:amqp/instance:Instance", 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 Instance 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 Instance Get(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
        {
            return new Instance(name, id, state, options);
        }
    }

    public sealed class InstanceArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The instance name.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// The Instance Type. Valid values: `professional`, `enterprise`, `vip`.
        /// </summary>
        [Input("instanceType", required: true)]
        public Input<string> InstanceType { get; set; } = null!;

        [Input("logistics")]
        public Input<string>? Logistics { get; set; }

        /// <summary>
        /// The max eip tps. It is valid when `support_eip` is true. The valid value is [128, 45000] with the step size 128.
        /// </summary>
        [Input("maxEipTps")]
        public Input<string>? MaxEipTps { get; set; }

        /// <summary>
        /// The peak TPS traffic. The smallest valid value is 1000 and the largest value is 100,000.
        /// </summary>
        [Input("maxTps", required: true)]
        public Input<string> MaxTps { get; set; } = null!;

        /// <summary>
        /// The modify type. Valid values: `Downgrade`, `Upgrade`. It is required when updating other attributes.
        /// </summary>
        [Input("modifyType")]
        public Input<string>? ModifyType { get; set; }

        /// <summary>
        /// The payment type. Valid values: `Subscription`.
        /// </summary>
        [Input("paymentType", required: true)]
        public Input<string> PaymentType { get; set; } = null!;

        /// <summary>
        /// The period. Valid values: `1`, `12`, `2`, `24`, `3`, `6`.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// The queue capacity. The smallest value is 50 and the step size 5.
        /// </summary>
        [Input("queueCapacity", required: true)]
        public Input<string> QueueCapacity { get; set; } = null!;

        /// <summary>
        /// RenewalDuration. Valid values: `1`, `12`, `2`, `3`, `6`.
        /// </summary>
        [Input("renewalDuration")]
        public Input<int>? RenewalDuration { get; set; }

        /// <summary>
        /// Auto-Renewal Cycle Unit Values Include: Month: Month. Year: Years. Valid values: `Month`, `Year`.
        /// </summary>
        [Input("renewalDurationUnit")]
        public Input<string>? RenewalDurationUnit { get; set; }

        /// <summary>
        /// Whether to renew an instance automatically or not. Default to "ManualRenewal".
        /// - `AutoRenewal`: Auto renewal.
        /// - `ManualRenewal`: Manual renewal.
        /// - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
        /// </summary>
        [Input("renewalStatus")]
        public Input<string>? RenewalStatus { get; set; }

        /// <summary>
        /// The storage size. It is valid when `instance_type` is vip.
        /// </summary>
        [Input("storageSize")]
        public Input<string>? StorageSize { get; set; }

        /// <summary>
        /// Whether to support EIP.
        /// </summary>
        [Input("supportEip", required: true)]
        public Input<bool> SupportEip { get; set; } = null!;

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

    public sealed class InstanceState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The instance name.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// The Instance Type. Valid values: `professional`, `enterprise`, `vip`.
        /// </summary>
        [Input("instanceType")]
        public Input<string>? InstanceType { get; set; }

        [Input("logistics")]
        public Input<string>? Logistics { get; set; }

        /// <summary>
        /// The max eip tps. It is valid when `support_eip` is true. The valid value is [128, 45000] with the step size 128.
        /// </summary>
        [Input("maxEipTps")]
        public Input<string>? MaxEipTps { get; set; }

        /// <summary>
        /// The peak TPS traffic. The smallest valid value is 1000 and the largest value is 100,000.
        /// </summary>
        [Input("maxTps")]
        public Input<string>? MaxTps { get; set; }

        /// <summary>
        /// The modify type. Valid values: `Downgrade`, `Upgrade`. It is required when updating other attributes.
        /// </summary>
        [Input("modifyType")]
        public Input<string>? ModifyType { get; set; }

        /// <summary>
        /// The payment type. Valid values: `Subscription`.
        /// </summary>
        [Input("paymentType")]
        public Input<string>? PaymentType { get; set; }

        /// <summary>
        /// The period. Valid values: `1`, `12`, `2`, `24`, `3`, `6`.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// The queue capacity. The smallest value is 50 and the step size 5.
        /// </summary>
        [Input("queueCapacity")]
        public Input<string>? QueueCapacity { get; set; }

        /// <summary>
        /// RenewalDuration. Valid values: `1`, `12`, `2`, `3`, `6`.
        /// </summary>
        [Input("renewalDuration")]
        public Input<int>? RenewalDuration { get; set; }

        /// <summary>
        /// Auto-Renewal Cycle Unit Values Include: Month: Month. Year: Years. Valid values: `Month`, `Year`.
        /// </summary>
        [Input("renewalDurationUnit")]
        public Input<string>? RenewalDurationUnit { get; set; }

        /// <summary>
        /// Whether to renew an instance automatically or not. Default to "ManualRenewal".
        /// - `AutoRenewal`: Auto renewal.
        /// - `ManualRenewal`: Manual renewal.
        /// - `NotRenewal`: No renewal any longer. After you specify this value, Alibaba Cloud stop sending notification of instance expiry, and only gives a brief reminder on the third day before the instance expiry.
        /// </summary>
        [Input("renewalStatus")]
        public Input<string>? RenewalStatus { get; set; }

        /// <summary>
        /// The status of the resource.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        /// <summary>
        /// The storage size. It is valid when `instance_type` is vip.
        /// </summary>
        [Input("storageSize")]
        public Input<string>? StorageSize { get; set; }

        /// <summary>
        /// Whether to support EIP.
        /// </summary>
        [Input("supportEip")]
        public Input<bool>? SupportEip { get; set; }

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