<reponame>rhysmdnz/pulumi-alicloud-rhys-hacks// *** 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.Ros
{
    /// <summary>
    /// Provides a ROS Template Scratch resource.
    /// 
    /// For information about ROS Template Scratch and how to use it, see [What is Template Scratch](https://www.alibabacloud.com/help/zh/doc-detail/352074.html).
    /// 
    /// &gt; **NOTE:** Available in v1.151.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var @default = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    /// 
    ///     var example = new AliCloud.Ros.TemplateScratch("example", new()
    ///     {
    ///         Description = "tf_testacc",
    ///         TemplateScratchType = "ResourceImport",
    ///         PreferenceParameters = new[]
    ///         {
    ///             new AliCloud.Ros.Inputs.TemplateScratchPreferenceParameterArgs
    ///             {
    ///                 ParameterKey = "DeletionPolicy",
    ///                 ParameterValue = "Retain",
    ///             },
    ///         },
    ///         SourceResourceGroup = new AliCloud.Ros.Inputs.TemplateScratchSourceResourceGroupArgs
    ///         {
    ///             ResourceGroupId = @default.Apply(getResourceGroupsResult =&gt; getResourceGroupsResult).Apply(@default =&gt; @default.Apply(getResourceGroupsResult =&gt; getResourceGroupsResult.Ids[0])),
    ///             ResourceTypeFilters = new[]
    ///             {
    ///                 "ALIYUN::ECS::VPC",
    ///             },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// ROS Template Scratch can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:ros/templateScratch:TemplateScratch example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:ros/templateScratch:TemplateScratch")]
    public partial class TemplateScratch : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The Description of the Template Scratch.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// The execution mode. Valid Values: `Async` or `Sync`.
        /// </summary>
        [Output("executionMode")]
        public Output<string?> ExecutionMode { get; private set; } = null!;

        /// <summary>
        /// Logical ID generation strategy. Valid Values: `LongTypePrefixAndIndexSuffix`, `LongTypePrefixAndHashSuffix` and `ShortTypePrefixAndHashSuffix`.
        /// </summary>
        [Output("logicalIdStrategy")]
        public Output<string> LogicalIdStrategy { get; private set; } = null!;

        /// <summary>
        /// Priority parameter. See the following `Block preference_parameters`.
        /// </summary>
        [Output("preferenceParameters")]
        public Output<ImmutableArray<Outputs.TemplateScratchPreferenceParameter>> PreferenceParameters { get; private set; } = null!;

        /// <summary>
        /// Source resource grouping. See the following `Block source_resource_group`.
        /// </summary>
        [Output("sourceResourceGroup")]
        public Output<Outputs.TemplateScratchSourceResourceGroup?> SourceResourceGroup { get; private set; } = null!;

        /// <summary>
        /// Source resource. See the following `Block source_resources`.
        /// </summary>
        [Output("sourceResources")]
        public Output<ImmutableArray<Outputs.TemplateScratchSourceResource>> SourceResources { get; private set; } = null!;

        /// <summary>
        /// Source tag. See the following `Block source_tag`.
        /// </summary>
        [Output("sourceTag")]
        public Output<Outputs.TemplateScratchSourceTag?> SourceTag { get; private set; } = null!;

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

        /// <summary>
        /// The type of the Template scan. Valid Values: `ResourceImport` or `ArchitectureReplication`.
        /// </summary>
        [Output("templateScratchType")]
        public Output<string> TemplateScratchType { get; private set; } = null!;


        /// <summary>
        /// Create a TemplateScratch 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 TemplateScratch(string name, TemplateScratchArgs args, CustomResourceOptions? options = null)
            : base("alicloud:ros/templateScratch:TemplateScratch", name, args ?? new TemplateScratchArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class TemplateScratchArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Description of the Template Scratch.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The execution mode. Valid Values: `Async` or `Sync`.
        /// </summary>
        [Input("executionMode")]
        public Input<string>? ExecutionMode { get; set; }

        /// <summary>
        /// Logical ID generation strategy. Valid Values: `LongTypePrefixAndIndexSuffix`, `LongTypePrefixAndHashSuffix` and `ShortTypePrefixAndHashSuffix`.
        /// </summary>
        [Input("logicalIdStrategy")]
        public Input<string>? LogicalIdStrategy { get; set; }

        [Input("preferenceParameters")]
        private InputList<Inputs.TemplateScratchPreferenceParameterArgs>? _preferenceParameters;

        /// <summary>
        /// Priority parameter. See the following `Block preference_parameters`.
        /// </summary>
        public InputList<Inputs.TemplateScratchPreferenceParameterArgs> PreferenceParameters
        {
            get => _preferenceParameters ?? (_preferenceParameters = new InputList<Inputs.TemplateScratchPreferenceParameterArgs>());
            set => _preferenceParameters = value;
        }

        /// <summary>
        /// Source resource grouping. See the following `Block source_resource_group`.
        /// </summary>
        [Input("sourceResourceGroup")]
        public Input<Inputs.TemplateScratchSourceResourceGroupArgs>? SourceResourceGroup { get; set; }

        [Input("sourceResources")]
        private InputList<Inputs.TemplateScratchSourceResourceArgs>? _sourceResources;

        /// <summary>
        /// Source resource. See the following `Block source_resources`.
        /// </summary>
        public InputList<Inputs.TemplateScratchSourceResourceArgs> SourceResources
        {
            get => _sourceResources ?? (_sourceResources = new InputList<Inputs.TemplateScratchSourceResourceArgs>());
            set => _sourceResources = value;
        }

        /// <summary>
        /// Source tag. See the following `Block source_tag`.
        /// </summary>
        [Input("sourceTag")]
        public Input<Inputs.TemplateScratchSourceTagArgs>? SourceTag { get; set; }

        /// <summary>
        /// The type of the Template scan. Valid Values: `ResourceImport` or `ArchitectureReplication`.
        /// </summary>
        [Input("templateScratchType", required: true)]
        public Input<string> TemplateScratchType { get; set; } = null!;

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

    public sealed class TemplateScratchState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Description of the Template Scratch.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The execution mode. Valid Values: `Async` or `Sync`.
        /// </summary>
        [Input("executionMode")]
        public Input<string>? ExecutionMode { get; set; }

        /// <summary>
        /// Logical ID generation strategy. Valid Values: `LongTypePrefixAndIndexSuffix`, `LongTypePrefixAndHashSuffix` and `ShortTypePrefixAndHashSuffix`.
        /// </summary>
        [Input("logicalIdStrategy")]
        public Input<string>? LogicalIdStrategy { get; set; }

        [Input("preferenceParameters")]
        private InputList<Inputs.TemplateScratchPreferenceParameterGetArgs>? _preferenceParameters;

        /// <summary>
        /// Priority parameter. See the following `Block preference_parameters`.
        /// </summary>
        public InputList<Inputs.TemplateScratchPreferenceParameterGetArgs> PreferenceParameters
        {
            get => _preferenceParameters ?? (_preferenceParameters = new InputList<Inputs.TemplateScratchPreferenceParameterGetArgs>());
            set => _preferenceParameters = value;
        }

        /// <summary>
        /// Source resource grouping. See the following `Block source_resource_group`.
        /// </summary>
        [Input("sourceResourceGroup")]
        public Input<Inputs.TemplateScratchSourceResourceGroupGetArgs>? SourceResourceGroup { get; set; }

        [Input("sourceResources")]
        private InputList<Inputs.TemplateScratchSourceResourceGetArgs>? _sourceResources;

        /// <summary>
        /// Source resource. See the following `Block source_resources`.
        /// </summary>
        public InputList<Inputs.TemplateScratchSourceResourceGetArgs> SourceResources
        {
            get => _sourceResources ?? (_sourceResources = new InputList<Inputs.TemplateScratchSourceResourceGetArgs>());
            set => _sourceResources = value;
        }

        /// <summary>
        /// Source tag. See the following `Block source_tag`.
        /// </summary>
        [Input("sourceTag")]
        public Input<Inputs.TemplateScratchSourceTagGetArgs>? SourceTag { get; set; }

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

        /// <summary>
        /// The type of the Template scan. Valid Values: `ResourceImport` or `ArchitectureReplication`.
        /// </summary>
        [Input("templateScratchType")]
        public Input<string>? TemplateScratchType { get; set; }

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