<filename>sdk/dotnet/Cdh/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.Tctest.Cdh
{
    [TctestResourceType("tctest:Cdh/instance:Instance")]
    public partial class Instance : Pulumi.CustomResource
    {
        /// <summary>
        /// The available zone for the CDH instance.
        /// </summary>
        [Output("availabilityZone")]
        public Output<string> AvailabilityZone { get; private set; } = null!;

        /// <summary>
        /// The charge type of instance. Valid values are `PREPAID`. The default is `PREPAID`.
        /// </summary>
        [Output("chargeType")]
        public Output<string?> ChargeType { get; private set; } = null!;

        /// <summary>
        /// Create time of the instance.
        /// </summary>
        [Output("createTime")]
        public Output<string> CreateTime { get; private set; } = null!;

        /// <summary>
        /// Id of CVM instances that have been created on the CDH instance.
        /// </summary>
        [Output("cvmInstanceIds")]
        public Output<ImmutableArray<string>> CvmInstanceIds { get; private set; } = null!;

        /// <summary>
        /// Expired time of the instance.
        /// </summary>
        [Output("expiredTime")]
        public Output<string> ExpiredTime { get; private set; } = null!;

        /// <summary>
        /// The name of the CDH instance. The max length of host_name is 60.
        /// </summary>
        [Output("hostName")]
        public Output<string> HostName { get; private set; } = null!;

        /// <summary>
        /// An information list of host resource. Each element contains the following attributes:
        /// </summary>
        [Output("hostResources")]
        public Output<ImmutableArray<Outputs.InstanceHostResource>> HostResources { get; private set; } = null!;

        /// <summary>
        /// State of the CDH instance.
        /// </summary>
        [Output("hostState")]
        public Output<string> HostState { get; private set; } = null!;

        /// <summary>
        /// The type of the CDH instance.
        /// </summary>
        [Output("hostType")]
        public Output<string?> HostType { get; private set; } = null!;

        /// <summary>
        /// The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when charge_type is set to `PREPAID`.
        /// Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, `36`.
        /// </summary>
        [Output("prepaidPeriod")]
        public Output<int?> PrepaidPeriod { get; private set; } = null!;

        /// <summary>
        /// Auto renewal flag. Valid values: `NOTIFY_AND_AUTO_RENEW`: notify upon expiration and renew automatically,
        /// `NOTIFY_AND_MANUAL_RENEW`: notify upon expiration but do not renew automatically, `DISABLE_NOTIFY_AND_MANUAL_RENEW`:
        /// neither notify upon expiration nor renew automatically. Default value: `NOTIFY_AND_MANUAL_RENEW`. If this parameter is
        /// specified as `NOTIFY_AND_AUTO_RENEW`, the instance will be automatically renewed on a monthly basis if the account
        /// balance is sufficient. NOTE: it only works when charge_type is set to `PREPAID`.
        /// </summary>
        [Output("prepaidRenewFlag")]
        public Output<string> PrepaidRenewFlag { get; private set; } = null!;

        /// <summary>
        /// The project the instance belongs to, default to 0.
        /// </summary>
        [Output("projectId")]
        public Output<int?> ProjectId { 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:Cdh/instance:Instance", name, args ?? new InstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Instance(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
            : base("tctest:Cdh/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>
        /// The available zone for the CDH instance.
        /// </summary>
        [Input("availabilityZone", required: true)]
        public Input<string> AvailabilityZone { get; set; } = null!;

        /// <summary>
        /// The charge type of instance. Valid values are `PREPAID`. The default is `PREPAID`.
        /// </summary>
        [Input("chargeType")]
        public Input<string>? ChargeType { get; set; }

        /// <summary>
        /// The name of the CDH instance. The max length of host_name is 60.
        /// </summary>
        [Input("hostName")]
        public Input<string>? HostName { get; set; }

        /// <summary>
        /// The type of the CDH instance.
        /// </summary>
        [Input("hostType")]
        public Input<string>? HostType { get; set; }

        /// <summary>
        /// The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when charge_type is set to `PREPAID`.
        /// Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, `36`.
        /// </summary>
        [Input("prepaidPeriod")]
        public Input<int>? PrepaidPeriod { get; set; }

        /// <summary>
        /// Auto renewal flag. Valid values: `NOTIFY_AND_AUTO_RENEW`: notify upon expiration and renew automatically,
        /// `NOTIFY_AND_MANUAL_RENEW`: notify upon expiration but do not renew automatically, `DISABLE_NOTIFY_AND_MANUAL_RENEW`:
        /// neither notify upon expiration nor renew automatically. Default value: `NOTIFY_AND_MANUAL_RENEW`. If this parameter is
        /// specified as `NOTIFY_AND_AUTO_RENEW`, the instance will be automatically renewed on a monthly basis if the account
        /// balance is sufficient. NOTE: it only works when charge_type is set to `PREPAID`.
        /// </summary>
        [Input("prepaidRenewFlag")]
        public Input<string>? PrepaidRenewFlag { get; set; }

        /// <summary>
        /// The project the instance belongs to, default to 0.
        /// </summary>
        [Input("projectId")]
        public Input<int>? ProjectId { get; set; }

        public InstanceArgs()
        {
        }
    }

    public sealed class InstanceState : Pulumi.ResourceArgs
    {
        /// <summary>
        /// The available zone for the CDH instance.
        /// </summary>
        [Input("availabilityZone")]
        public Input<string>? AvailabilityZone { get; set; }

        /// <summary>
        /// The charge type of instance. Valid values are `PREPAID`. The default is `PREPAID`.
        /// </summary>
        [Input("chargeType")]
        public Input<string>? ChargeType { get; set; }

        /// <summary>
        /// Create time of the instance.
        /// </summary>
        [Input("createTime")]
        public Input<string>? CreateTime { get; set; }

        [Input("cvmInstanceIds")]
        private InputList<string>? _cvmInstanceIds;

        /// <summary>
        /// Id of CVM instances that have been created on the CDH instance.
        /// </summary>
        public InputList<string> CvmInstanceIds
        {
            get => _cvmInstanceIds ?? (_cvmInstanceIds = new InputList<string>());
            set => _cvmInstanceIds = value;
        }

        /// <summary>
        /// Expired time of the instance.
        /// </summary>
        [Input("expiredTime")]
        public Input<string>? ExpiredTime { get; set; }

        /// <summary>
        /// The name of the CDH instance. The max length of host_name is 60.
        /// </summary>
        [Input("hostName")]
        public Input<string>? HostName { get; set; }

        [Input("hostResources")]
        private InputList<Inputs.InstanceHostResourceGetArgs>? _hostResources;

        /// <summary>
        /// An information list of host resource. Each element contains the following attributes:
        /// </summary>
        public InputList<Inputs.InstanceHostResourceGetArgs> HostResources
        {
            get => _hostResources ?? (_hostResources = new InputList<Inputs.InstanceHostResourceGetArgs>());
            set => _hostResources = value;
        }

        /// <summary>
        /// State of the CDH instance.
        /// </summary>
        [Input("hostState")]
        public Input<string>? HostState { get; set; }

        /// <summary>
        /// The type of the CDH instance.
        /// </summary>
        [Input("hostType")]
        public Input<string>? HostType { get; set; }

        /// <summary>
        /// The tenancy (time unit is month) of the prepaid instance, NOTE: it only works when charge_type is set to `PREPAID`.
        /// Valid values are `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, `36`.
        /// </summary>
        [Input("prepaidPeriod")]
        public Input<int>? PrepaidPeriod { get; set; }

        /// <summary>
        /// Auto renewal flag. Valid values: `NOTIFY_AND_AUTO_RENEW`: notify upon expiration and renew automatically,
        /// `NOTIFY_AND_MANUAL_RENEW`: notify upon expiration but do not renew automatically, `DISABLE_NOTIFY_AND_MANUAL_RENEW`:
        /// neither notify upon expiration nor renew automatically. Default value: `NOTIFY_AND_MANUAL_RENEW`. If this parameter is
        /// specified as `NOTIFY_AND_AUTO_RENEW`, the instance will be automatically renewed on a monthly basis if the account
        /// balance is sufficient. NOTE: it only works when charge_type is set to `PREPAID`.
        /// </summary>
        [Input("prepaidRenewFlag")]
        public Input<string>? PrepaidRenewFlag { get; set; }

        /// <summary>
        /// The project the instance belongs to, default to 0.
        /// </summary>
        [Input("projectId")]
        public Input<int>? ProjectId { get; set; }

        public InstanceState()
        {
        }
    }
}
