<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.Oos
{
    /// <summary>
    /// Provides a OOS State Configuration resource.
    /// 
    /// For information about OOS State Configuration and how to use it, see [What is State Configuration](https://www.alibabacloud.com/help/en/doc-detail/208728.html).
    /// 
    /// &gt; **NOTE:** Available in v1.147.0+.
    /// 
    /// ## Example Usage
    /// 
    /// Basic Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var defaultResourceGroups = AliCloud.ResourceManager.GetResourceGroups.Invoke();
    /// 
    ///     var defaultStateConfiguration = new AliCloud.Oos.StateConfiguration("defaultStateConfiguration", new()
    ///     {
    ///         TemplateName = "ACS-ECS-InventoryDataCollection",
    ///         ConfigureMode = "ApplyOnly",
    ///         Description = @var.Name,
    ///         ScheduleType = "rate",
    ///         ScheduleExpression = "1 hour",
    ///         ResourceGroupId = defaultResourceGroups.Apply(getResourceGroupsResult =&gt; getResourceGroupsResult.Ids[0]),
    ///         Targets = "{\"Filters\": [{\"Type\": \"All\", \"Parameters\": {\"InstanceChargeType\": \"PrePaid\"}}], \"ResourceType\": \"ALIYUN::ECS::Instance\"}",
    ///         Parameters = "{\"policy\": {\"ACS:Application\": {\"Collection\": \"Enabled\"}}}",
    ///         Tags = 
    ///         {
    ///             { "Created", "TF" },
    ///             { "For", "Test" },
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// OOS State Configuration can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:oos/stateConfiguration:StateConfiguration example &lt;id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:oos/stateConfiguration:StateConfiguration")]
    public partial class StateConfiguration : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Configuration mode. Valid values: `ApplyAndAutoCorrect`, `ApplyAndMonitor`, `ApplyOnly`.
        /// </summary>
        [Output("configureMode")]
        public Output<string> ConfigureMode { get; private set; } = null!;

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

        /// <summary>
        /// The parameter of the Template. This field is in the format of JSON strings. For detailed definition instructions, please refer to [Metadata types that are supported by a configuration list](https://www.alibabacloud.com/help/en/doc-detail/208276.html).
        /// </summary>
        [Output("parameters")]
        public Output<string?> Parameters { get; private set; } = null!;

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

        /// <summary>
        /// Timing expression.
        /// </summary>
        [Output("scheduleExpression")]
        public Output<string> ScheduleExpression { get; private set; } = null!;

        /// <summary>
        /// Timing type. Valid values: `rate`.
        /// </summary>
        [Output("scheduleType")]
        public Output<string> ScheduleType { get; private set; } = null!;

        /// <summary>
        /// The tag of the resource.
        /// </summary>
        [Output("tags")]
        public Output<ImmutableDictionary<string, object>?> Tags { get; private set; } = null!;

        /// <summary>
        /// The Target resources.  This field is in the format of JSON strings. For detailed definition instructions, please refer to [Parameter](https://www.alibabacloud.com/help/en/doc-detail/120674.html).
        /// </summary>
        [Output("targets")]
        public Output<string> Targets { get; private set; } = null!;

        /// <summary>
        /// The name of the template.
        /// </summary>
        [Output("templateName")]
        public Output<string> TemplateName { get; private set; } = null!;

        /// <summary>
        /// The version number. If you do not specify this parameter, the system uses the latest version.
        /// </summary>
        [Output("templateVersion")]
        public Output<string> TemplateVersion { get; private set; } = null!;


        /// <summary>
        /// Create a StateConfiguration 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 StateConfiguration(string name, StateConfigurationArgs args, CustomResourceOptions? options = null)
            : base("alicloud:oos/stateConfiguration:StateConfiguration", name, args ?? new StateConfigurationArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class StateConfigurationArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Configuration mode. Valid values: `ApplyAndAutoCorrect`, `ApplyAndMonitor`, `ApplyOnly`.
        /// </summary>
        [Input("configureMode")]
        public Input<string>? ConfigureMode { get; set; }

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

        /// <summary>
        /// The parameter of the Template. This field is in the format of JSON strings. For detailed definition instructions, please refer to [Metadata types that are supported by a configuration list](https://www.alibabacloud.com/help/en/doc-detail/208276.html).
        /// </summary>
        [Input("parameters")]
        public Input<string>? Parameters { get; set; }

        /// <summary>
        /// The ID of the resource group.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// Timing expression.
        /// </summary>
        [Input("scheduleExpression", required: true)]
        public Input<string> ScheduleExpression { get; set; } = null!;

        /// <summary>
        /// Timing type. Valid values: `rate`.
        /// </summary>
        [Input("scheduleType", required: true)]
        public Input<string> ScheduleType { get; set; } = null!;

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// The tag of the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The Target resources.  This field is in the format of JSON strings. For detailed definition instructions, please refer to [Parameter](https://www.alibabacloud.com/help/en/doc-detail/120674.html).
        /// </summary>
        [Input("targets", required: true)]
        public Input<string> Targets { get; set; } = null!;

        /// <summary>
        /// The name of the template.
        /// </summary>
        [Input("templateName", required: true)]
        public Input<string> TemplateName { get; set; } = null!;

        /// <summary>
        /// The version number. If you do not specify this parameter, the system uses the latest version.
        /// </summary>
        [Input("templateVersion")]
        public Input<string>? TemplateVersion { get; set; }

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

    public sealed class StateConfigurationState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Configuration mode. Valid values: `ApplyAndAutoCorrect`, `ApplyAndMonitor`, `ApplyOnly`.
        /// </summary>
        [Input("configureMode")]
        public Input<string>? ConfigureMode { get; set; }

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

        /// <summary>
        /// The parameter of the Template. This field is in the format of JSON strings. For detailed definition instructions, please refer to [Metadata types that are supported by a configuration list](https://www.alibabacloud.com/help/en/doc-detail/208276.html).
        /// </summary>
        [Input("parameters")]
        public Input<string>? Parameters { get; set; }

        /// <summary>
        /// The ID of the resource group.
        /// </summary>
        [Input("resourceGroupId")]
        public Input<string>? ResourceGroupId { get; set; }

        /// <summary>
        /// Timing expression.
        /// </summary>
        [Input("scheduleExpression")]
        public Input<string>? ScheduleExpression { get; set; }

        /// <summary>
        /// Timing type. Valid values: `rate`.
        /// </summary>
        [Input("scheduleType")]
        public Input<string>? ScheduleType { get; set; }

        [Input("tags")]
        private InputMap<object>? _tags;

        /// <summary>
        /// The tag of the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// The Target resources.  This field is in the format of JSON strings. For detailed definition instructions, please refer to [Parameter](https://www.alibabacloud.com/help/en/doc-detail/120674.html).
        /// </summary>
        [Input("targets")]
        public Input<string>? Targets { get; set; }

        /// <summary>
        /// The name of the template.
        /// </summary>
        [Input("templateName")]
        public Input<string>? TemplateName { get; set; }

        /// <summary>
        /// The version number. If you do not specify this parameter, the system uses the latest version.
        /// </summary>
        [Input("templateVersion")]
        public Input<string>? TemplateVersion { get; set; }

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