<filename>sdk/dotnet/Image/Instance.cs// *** 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.Image
{
    [TctestResourceType("tctest:Image/instance:Instance")]
    public partial class Instance : Pulumi.CustomResource
    {
        /// <summary>
        /// Cloud disk ID list, When creating a whole machine image based on an instance, specify the data disk ID contained in the
        /// image.
        /// </summary>
        [Output("dataDiskIds")]
        public Output<ImmutableArray<string>> DataDiskIds { get; private set; } = null!;

        /// <summary>
        /// Set whether to force shutdown during mirroring. The default value is `false`, when set to true, it means that the mirror
        /// will be made after shutdown.
        /// </summary>
        [Output("forcePoweroff")]
        public Output<bool?> ForcePoweroff { get; private set; } = null!;

        /// <summary>
        /// Image Description.
        /// </summary>
        [Output("imageDescription")]
        public Output<string?> ImageDescription { get; private set; } = null!;

        /// <summary>
        /// Image name.
        /// </summary>
        [Output("imageName")]
        public Output<string> ImageName { get; private set; } = null!;

        /// <summary>
        /// Cloud server instance ID.
        /// </summary>
        [Output("instanceId")]
        public Output<string?> InstanceId { get; private set; } = null!;

        /// <summary>
        /// Cloud disk snapshot ID list; creating a mirror based on a snapshot must include a system disk snapshot. It cannot be
        /// passed in simultaneously with InstanceId.
        /// </summary>
        [Output("snapshotIds")]
        public Output<ImmutableArray<string>> SnapshotIds { get; private set; } = null!;

        /// <summary>
        /// Sysprep function under Windows. When creating a Windows image, you can select true or false to enable or disable the
        /// Syspre function.
        /// </summary>
        [Output("sysprep")]
        public Output<bool?> Sysprep { 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:Image/instance:Instance", name, args ?? new InstanceArgs(), MakeResourceOptions(options, ""))
        {
        }

        private Instance(string name, Input<string> id, InstanceState? state = null, CustomResourceOptions? options = null)
            : base("tctest:Image/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
    {
        [Input("dataDiskIds")]
        private InputList<string>? _dataDiskIds;

        /// <summary>
        /// Cloud disk ID list, When creating a whole machine image based on an instance, specify the data disk ID contained in the
        /// image.
        /// </summary>
        public InputList<string> DataDiskIds
        {
            get => _dataDiskIds ?? (_dataDiskIds = new InputList<string>());
            set => _dataDiskIds = value;
        }

        /// <summary>
        /// Set whether to force shutdown during mirroring. The default value is `false`, when set to true, it means that the mirror
        /// will be made after shutdown.
        /// </summary>
        [Input("forcePoweroff")]
        public Input<bool>? ForcePoweroff { get; set; }

        /// <summary>
        /// Image Description.
        /// </summary>
        [Input("imageDescription")]
        public Input<string>? ImageDescription { get; set; }

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

        /// <summary>
        /// Cloud server instance ID.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        [Input("snapshotIds")]
        private InputList<string>? _snapshotIds;

        /// <summary>
        /// Cloud disk snapshot ID list; creating a mirror based on a snapshot must include a system disk snapshot. It cannot be
        /// passed in simultaneously with InstanceId.
        /// </summary>
        public InputList<string> SnapshotIds
        {
            get => _snapshotIds ?? (_snapshotIds = new InputList<string>());
            set => _snapshotIds = value;
        }

        /// <summary>
        /// Sysprep function under Windows. When creating a Windows image, you can select true or false to enable or disable the
        /// Syspre function.
        /// </summary>
        [Input("sysprep")]
        public Input<bool>? Sysprep { get; set; }

        public InstanceArgs()
        {
        }
    }

    public sealed class InstanceState : Pulumi.ResourceArgs
    {
        [Input("dataDiskIds")]
        private InputList<string>? _dataDiskIds;

        /// <summary>
        /// Cloud disk ID list, When creating a whole machine image based on an instance, specify the data disk ID contained in the
        /// image.
        /// </summary>
        public InputList<string> DataDiskIds
        {
            get => _dataDiskIds ?? (_dataDiskIds = new InputList<string>());
            set => _dataDiskIds = value;
        }

        /// <summary>
        /// Set whether to force shutdown during mirroring. The default value is `false`, when set to true, it means that the mirror
        /// will be made after shutdown.
        /// </summary>
        [Input("forcePoweroff")]
        public Input<bool>? ForcePoweroff { get; set; }

        /// <summary>
        /// Image Description.
        /// </summary>
        [Input("imageDescription")]
        public Input<string>? ImageDescription { get; set; }

        /// <summary>
        /// Image name.
        /// </summary>
        [Input("imageName")]
        public Input<string>? ImageName { get; set; }

        /// <summary>
        /// Cloud server instance ID.
        /// </summary>
        [Input("instanceId")]
        public Input<string>? InstanceId { get; set; }

        [Input("snapshotIds")]
        private InputList<string>? _snapshotIds;

        /// <summary>
        /// Cloud disk snapshot ID list; creating a mirror based on a snapshot must include a system disk snapshot. It cannot be
        /// passed in simultaneously with InstanceId.
        /// </summary>
        public InputList<string> SnapshotIds
        {
            get => _snapshotIds ?? (_snapshotIds = new InputList<string>());
            set => _snapshotIds = value;
        }

        /// <summary>
        /// Sysprep function under Windows. When creating a Windows image, you can select true or false to enable or disable the
        /// Syspre function.
        /// </summary>
        [Input("sysprep")]
        public Input<bool>? Sysprep { get; set; }

        public InstanceState()
        {
        }
    }
}
