<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.Tctest.Ckafka
{
    [TctestResourceType("tctest:Ckafka/instance:Instance")]
    public partial class Instance : Pulumi.CustomResource
    {
        /// <summary>
        /// Instance bandwidth in MBps.
        /// </summary>
        [Output("bandWidth")]
        public Output<int> BandWidth { get; private set; } = null!;

        /// <summary>
        /// Instance configuration.
        /// </summary>
        [Output("config")]
        public Output<Outputs.InstanceConfig?> Config { get; private set; } = null!;

        /// <summary>
        /// Disk Size. Its interval varies with bandwidth, and the input must be within the interval, which can be viewed through
        /// the control. If it is not within the interval, the plan will cause a change when first created.
        /// </summary>
        [Output("diskSize")]
        public Output<int> DiskSize { get; private set; } = null!;

        /// <summary>
        /// Type of disk.
        /// </summary>
        [Output("diskType")]
        public Output<string> DiskType { get; private set; } = null!;

        /// <summary>
        /// Dynamic message retention policy configuration.
        /// </summary>
        [Output("dynamicRetentionConfig")]
        public Output<Outputs.InstanceDynamicRetentionConfig> DynamicRetentionConfig { get; private set; } = null!;

        /// <summary>
        /// Instance name.
        /// </summary>
        [Output("instanceName")]
        public Output<string> InstanceName { get; private set; } = null!;

        /// <summary>
        /// Kafka version (0.10.2/1.1.1/2.4.1).
        /// </summary>
        [Output("kafkaVersion")]
        public Output<string> KafkaVersion { get; private set; } = null!;

        /// <summary>
        /// The maximum retention time of instance logs, in minutes. the default is 10080 (7 days), the maximum is 30 days, and the
        /// default 0 is not filled, which means that the log retention time recovery policy is not enabled.
        /// </summary>
        [Output("msgRetentionTime")]
        public Output<int> MsgRetentionTime { get; private set; } = null!;

        /// <summary>
        /// Indicates whether the instance is multi zones. NOTE: if set to `true`, `zone_ids` must set together.
        /// </summary>
        [Output("multiZoneFlag")]
        public Output<bool?> MultiZoneFlag { get; private set; } = null!;

        /// <summary>
        /// Partition Size. Its interval varies with bandwidth, and the input must be within the interval, which can be viewed
        /// through the control. If it is not within the interval, the plan will cause a change when first created.
        /// </summary>
        [Output("partition")]
        public Output<int> Partition { get; private set; } = null!;

        /// <summary>
        /// Prepaid purchase time, such as 1, is one month.
        /// </summary>
        [Output("period")]
        public Output<int?> Period { get; private set; } = null!;

        /// <summary>
        /// Timestamp.
        /// </summary>
        [Output("publicNetwork")]
        public Output<int> PublicNetwork { get; private set; } = null!;

        /// <summary>
        /// Modification of the rebalancing time after upgrade.
        /// </summary>
        [Output("rebalanceTime")]
        public Output<int?> RebalanceTime { get; private set; } = null!;

        /// <summary>
        /// Prepaid automatic renewal mark, 0 means the default state, the initial state, 1 means automatic renewal, 2 means clear
        /// no automatic renewal (user setting).
        /// </summary>
        [Output("renewFlag")]
        public Output<int> RenewFlag { get; private set; } = null!;

        /// <summary>
        /// Subnet id.
        /// </summary>
        [Output("subnetId")]
        public Output<string> SubnetId { get; private set; } = null!;

        /// <summary>
        /// Partition size, the professional version does not need tag.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableArray<Outputs.InstanceTag>> Tags { get; private set; } = null!;

        /// <summary>
        /// Vpc id.
        /// </summary>
        [Output("vpcId")]
        public Output<string> VpcId { get; private set; } = null!;

        /// <summary>
        /// Available zone id.
        /// </summary>
        [Output("zoneId")]
        public Output<int> ZoneId { get; private set; } = null!;

        /// <summary>
        /// List of available zone id. NOTE: this argument must set together with `multi_zone_flag`.
        /// </summary>
        [Output("zoneIds")]
        public Output<ImmutableArray<int>> ZoneIds { 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("tctest:Ckafka/instance:Instance", name, args ?? new InstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Instance(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
            : base("tctest:Ckafka/instance:Instance", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
            };
            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 : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Instance bandwidth in MBps.
        /// </summary>
        [Input("bandWidth")]
        public Input<int>? BandWidth { get; set; }

        /// <summary>
        /// Instance configuration.
        /// </summary>
        [Input("config")]
        public Input<Inputs.InstanceConfigArgs>? Config { get; set; }

        /// <summary>
        /// Disk Size. Its interval varies with bandwidth, and the input must be within the interval, which can be viewed through
        /// the control. If it is not within the interval, the plan will cause a change when first created.
        /// </summary>
        [Input("diskSize")]
        public Input<int>? DiskSize { get; set; }

        /// <summary>
        /// Type of disk.
        /// </summary>
        [Input("diskType")]
        public Input<string>? DiskType { get; set; }

        /// <summary>
        /// Dynamic message retention policy configuration.
        /// </summary>
        [Input("dynamicRetentionConfig")]
        public Input<Inputs.InstanceDynamicRetentionConfigArgs>? DynamicRetentionConfig { get; set; }

        /// <summary>
        /// Instance name.
        /// </summary>
        [Input("instanceName", required: true)]
        public Input<string> InstanceName { get; set; } = null!;

        /// <summary>
        /// Kafka version (0.10.2/1.1.1/2.4.1).
        /// </summary>
        [Input("kafkaVersion")]
        public Input<string>? KafkaVersion { get; set; }

        /// <summary>
        /// The maximum retention time of instance logs, in minutes. the default is 10080 (7 days), the maximum is 30 days, and the
        /// default 0 is not filled, which means that the log retention time recovery policy is not enabled.
        /// </summary>
        [Input("msgRetentionTime")]
        public Input<int>? MsgRetentionTime { get; set; }

        /// <summary>
        /// Indicates whether the instance is multi zones. NOTE: if set to `true`, `zone_ids` must set together.
        /// </summary>
        [Input("multiZoneFlag")]
        public Input<bool>? MultiZoneFlag { get; set; }

        /// <summary>
        /// Partition Size. Its interval varies with bandwidth, and the input must be within the interval, which can be viewed
        /// through the control. If it is not within the interval, the plan will cause a change when first created.
        /// </summary>
        [Input("partition")]
        public Input<int>? Partition { get; set; }

        /// <summary>
        /// Prepaid purchase time, such as 1, is one month.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// Timestamp.
        /// </summary>
        [Input("publicNetwork")]
        public Input<int>? PublicNetwork { get; set; }

        /// <summary>
        /// Modification of the rebalancing time after upgrade.
        /// </summary>
        [Input("rebalanceTime")]
        public Input<int>? RebalanceTime { get; set; }

        /// <summary>
        /// Prepaid automatic renewal mark, 0 means the default state, the initial state, 1 means automatic renewal, 2 means clear
        /// no automatic renewal (user setting).
        /// </summary>
        [Input("renewFlag")]
        public Input<int>? RenewFlag { get; set; }

        /// <summary>
        /// Subnet id.
        /// </summary>
        [Input("subnetId", required: true)]
        public Input<string> SubnetId { get; set; } = null!;

        [Input("tags")]
        private InputList<Inputs.InstanceTagArgs>? _tags;

        /// <summary>
        /// Partition size, the professional version does not need tag.
        /// </summary>
        public InputList<Inputs.InstanceTagArgs> Tags
        {
            get => _tags ?? (_tags = new InputList<Inputs.InstanceTagArgs>());
            set => _tags = value;
        }

        /// <summary>
        /// Vpc id.
        /// </summary>
        [Input("vpcId", required: true)]
        public Input<string> VpcId { get; set; } = null!;

        /// <summary>
        /// Available zone id.
        /// </summary>
        [Input("zoneId", required: true)]
        public Input<int> ZoneId { get; set; } = null!;

        [Input("zoneIds")]
        private InputList<int>? _zoneIds;

        /// <summary>
        /// List of available zone id. NOTE: this argument must set together with `multi_zone_flag`.
        /// </summary>
        public InputList<int> ZoneIds
        {
            get => _zoneIds ?? (_zoneIds = new InputList<int>());
            set => _zoneIds = value;
        }

        public InstanceArgs()
        {
        }
    }

    public sealed class InstanceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// Instance bandwidth in MBps.
        /// </summary>
        [Input("bandWidth")]
        public Input<int>? BandWidth { get; set; }

        /// <summary>
        /// Instance configuration.
        /// </summary>
        [Input("config")]
        public Input<Inputs.InstanceConfigGetArgs>? Config { get; set; }

        /// <summary>
        /// Disk Size. Its interval varies with bandwidth, and the input must be within the interval, which can be viewed through
        /// the control. If it is not within the interval, the plan will cause a change when first created.
        /// </summary>
        [Input("diskSize")]
        public Input<int>? DiskSize { get; set; }

        /// <summary>
        /// Type of disk.
        /// </summary>
        [Input("diskType")]
        public Input<string>? DiskType { get; set; }

        /// <summary>
        /// Dynamic message retention policy configuration.
        /// </summary>
        [Input("dynamicRetentionConfig")]
        public Input<Inputs.InstanceDynamicRetentionConfigGetArgs>? DynamicRetentionConfig { get; set; }

        /// <summary>
        /// Instance name.
        /// </summary>
        [Input("instanceName")]
        public Input<string>? InstanceName { get; set; }

        /// <summary>
        /// Kafka version (0.10.2/1.1.1/2.4.1).
        /// </summary>
        [Input("kafkaVersion")]
        public Input<string>? KafkaVersion { get; set; }

        /// <summary>
        /// The maximum retention time of instance logs, in minutes. the default is 10080 (7 days), the maximum is 30 days, and the
        /// default 0 is not filled, which means that the log retention time recovery policy is not enabled.
        /// </summary>
        [Input("msgRetentionTime")]
        public Input<int>? MsgRetentionTime { get; set; }

        /// <summary>
        /// Indicates whether the instance is multi zones. NOTE: if set to `true`, `zone_ids` must set together.
        /// </summary>
        [Input("multiZoneFlag")]
        public Input<bool>? MultiZoneFlag { get; set; }

        /// <summary>
        /// Partition Size. Its interval varies with bandwidth, and the input must be within the interval, which can be viewed
        /// through the control. If it is not within the interval, the plan will cause a change when first created.
        /// </summary>
        [Input("partition")]
        public Input<int>? Partition { get; set; }

        /// <summary>
        /// Prepaid purchase time, such as 1, is one month.
        /// </summary>
        [Input("period")]
        public Input<int>? Period { get; set; }

        /// <summary>
        /// Timestamp.
        /// </summary>
        [Input("publicNetwork")]
        public Input<int>? PublicNetwork { get; set; }

        /// <summary>
        /// Modification of the rebalancing time after upgrade.
        /// </summary>
        [Input("rebalanceTime")]
        public Input<int>? RebalanceTime { get; set; }

        /// <summary>
        /// Prepaid automatic renewal mark, 0 means the default state, the initial state, 1 means automatic renewal, 2 means clear
        /// no automatic renewal (user setting).
        /// </summary>
        [Input("renewFlag")]
        public Input<int>? RenewFlag { get; set; }

        /// <summary>
        /// Subnet id.
        /// </summary>
        [Input("subnetId")]
        public Input<string>? SubnetId { get; set; }

        [Input("tags")]
        private InputList<Inputs.InstanceTagGetArgs>? _tags;

        /// <summary>
        /// Partition size, the professional version does not need tag.
        /// </summary>
        public InputList<Inputs.InstanceTagGetArgs> Tags
        {
            get => _tags ?? (_tags = new InputList<Inputs.InstanceTagGetArgs>());
            set => _tags = value;
        }

        /// <summary>
        /// Vpc id.
        /// </summary>
        [Input("vpcId")]
        public Input<string>? VpcId { get; set; }

        /// <summary>
        /// Available zone id.
        /// </summary>
        [Input("zoneId")]
        public Input<int>? ZoneId { get; set; }

        [Input("zoneIds")]
        private InputList<int>? _zoneIds;

        /// <summary>
        /// List of available zone id. NOTE: this argument must set together with `multi_zone_flag`.
        /// </summary>
        public InputList<int> ZoneIds
        {
            get => _zoneIds ?? (_zoneIds = new InputList<int>());
            set => _zoneIds = value;
        }

        public InstanceState()
        {
        }
    }
}
