<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.ResourceManager
{
    /// <summary>
    /// Provides a Resource Manager Account resource. Member accounts are containers for resources in a resource directory. These accounts isolate resources and serve as organizational units in the resource directory. You can create member accounts in a folder and then manage them in a unified manner.
    /// For information about Resource Manager Account and how to use it, see [What is Resource Manager Account](https://www.alibabacloud.com/help/en/doc-detail/111231.htm).
    /// 
    /// &gt; **NOTE:** Available in v1.83.0+.
    /// 
    /// &gt; **NOTE:** From version 1.188.0, the resource can be destroyed. The member deletion feature is in invitational preview. You can contact the service manager of Alibaba Cloud to apply for a trial. see [how to destroy it](https://www.alibabacloud.com/help/en/resource-management/latest/delete-account).
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using AliCloud = Pulumi.AliCloud;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     // Add a Resource Manager Account.
    ///     var f1 = new AliCloud.ResourceManager.Folder("f1", new()
    ///     {
    ///         FolderName = "test1",
    ///     });
    /// 
    ///     var example = new AliCloud.ResourceManager.Account("example", new()
    ///     {
    ///         DisplayName = "RDAccount",
    ///         FolderId = f1.Id,
    ///     });
    /// 
    /// });
    /// ```
    /// ### Deleting `alicloud.resourcemanager.Account` or removing it from your configuration
    /// 
    /// Deleting the resource manager account or removing it from your configuration will remove it from your state file and management,
    /// but may not destroy the account. If there are some dependent resource in the account,
    /// the deleting account will enter a silence period of 45 days. After the silence period ends,
    /// the system automatically starts to delete the member. [See More Details](https://www.alibabacloud.com/help/en/resource-management/latest/delete-resource-account).
    /// 
    /// ## Import
    /// 
    /// Resource Manager Account can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:resourcemanager/account:Account example 13148890145*****
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:resourcemanager/account:Account")]
    public partial class Account : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The IDs of the check items that you can choose to ignore for the member deletion. 
        /// If you want to delete the account, please use datasource `alicloud_resource_manager_account_deletion_check_task`
        /// to get check ids and set them.
        /// </summary>
        [Output("abandonAbleCheckIds")]
        public Output<ImmutableArray<string>> AbandonAbleCheckIds { get; private set; } = null!;

        /// <summary>
        /// The name prefix of account.
        /// </summary>
        [Output("accountNamePrefix")]
        public Output<string?> AccountNamePrefix { get; private set; } = null!;

        /// <summary>
        /// Member name. The length is 2 ~ 50 characters or Chinese characters, which can include Chinese characters, English letters, numbers, underscores (_), dots (.) And dashes (-).
        /// </summary>
        [Output("displayName")]
        public Output<string> DisplayName { get; private set; } = null!;

        /// <summary>
        /// The ID of the parent folder.
        /// </summary>
        [Output("folderId")]
        public Output<string> FolderId { get; private set; } = null!;

        /// <summary>
        /// Ways for members to join the resource directory. Valid values: `invited`, `created`.
        /// </summary>
        [Output("joinMethod")]
        public Output<string> JoinMethod { get; private set; } = null!;

        /// <summary>
        /// The time when the member joined the resource directory.
        /// </summary>
        [Output("joinTime")]
        public Output<string> JoinTime { get; private set; } = null!;

        /// <summary>
        /// The modification time of the invitation.
        /// </summary>
        [Output("modifyTime")]
        public Output<string> ModifyTime { get; private set; } = null!;

        /// <summary>
        /// The ID of the billing account. If you leave this parameter empty, the current account is used as the billing account.
        /// </summary>
        [Output("payerAccountId")]
        public Output<string?> PayerAccountId { get; private set; } = null!;

        /// <summary>
        /// Resource directory ID.
        /// </summary>
        [Output("resourceDirectoryId")]
        public Output<string> ResourceDirectoryId { get; private set; } = null!;

        /// <summary>
        /// Member joining status. Valid values: `CreateSuccess`,`CreateVerifying`,`CreateFailed`,`CreateExpired`,`CreateCancelled`,`PromoteVerifying`,`PromoteFailed`,`PromoteExpired`,`PromoteCancelled`,`PromoteSuccess`,`InviteSuccess`,`Removed`.
        /// </summary>
        [Output("status")]
        public Output<string> Status { get; private set; } = null!;

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

        /// <summary>
        /// Member type. The value of `ResourceAccount` indicates the resource account.
        /// </summary>
        [Output("type")]
        public Output<string> Type { get; private set; } = null!;


        /// <summary>
        /// Create a Account 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 Account(string name, AccountArgs args, CustomResourceOptions? options = null)
            : base("alicloud:resourcemanager/account:Account", name, args ?? new AccountArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class AccountArgs : global::Pulumi.ResourceArgs
    {
        [Input("abandonAbleCheckIds")]
        private InputList<string>? _abandonAbleCheckIds;

        /// <summary>
        /// The IDs of the check items that you can choose to ignore for the member deletion. 
        /// If you want to delete the account, please use datasource `alicloud_resource_manager_account_deletion_check_task`
        /// to get check ids and set them.
        /// </summary>
        public InputList<string> AbandonAbleCheckIds
        {
            get => _abandonAbleCheckIds ?? (_abandonAbleCheckIds = new InputList<string>());
            set => _abandonAbleCheckIds = value;
        }

        /// <summary>
        /// The name prefix of account.
        /// </summary>
        [Input("accountNamePrefix")]
        public Input<string>? AccountNamePrefix { get; set; }

        /// <summary>
        /// Member name. The length is 2 ~ 50 characters or Chinese characters, which can include Chinese characters, English letters, numbers, underscores (_), dots (.) And dashes (-).
        /// </summary>
        [Input("displayName", required: true)]
        public Input<string> DisplayName { get; set; } = null!;

        /// <summary>
        /// The ID of the parent folder.
        /// </summary>
        [Input("folderId")]
        public Input<string>? FolderId { get; set; }

        /// <summary>
        /// The ID of the billing account. If you leave this parameter empty, the current account is used as the billing account.
        /// </summary>
        [Input("payerAccountId")]
        public Input<string>? PayerAccountId { get; set; }

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

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

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

    public sealed class AccountState : global::Pulumi.ResourceArgs
    {
        [Input("abandonAbleCheckIds")]
        private InputList<string>? _abandonAbleCheckIds;

        /// <summary>
        /// The IDs of the check items that you can choose to ignore for the member deletion. 
        /// If you want to delete the account, please use datasource `alicloud_resource_manager_account_deletion_check_task`
        /// to get check ids and set them.
        /// </summary>
        public InputList<string> AbandonAbleCheckIds
        {
            get => _abandonAbleCheckIds ?? (_abandonAbleCheckIds = new InputList<string>());
            set => _abandonAbleCheckIds = value;
        }

        /// <summary>
        /// The name prefix of account.
        /// </summary>
        [Input("accountNamePrefix")]
        public Input<string>? AccountNamePrefix { get; set; }

        /// <summary>
        /// Member name. The length is 2 ~ 50 characters or Chinese characters, which can include Chinese characters, English letters, numbers, underscores (_), dots (.) And dashes (-).
        /// </summary>
        [Input("displayName")]
        public Input<string>? DisplayName { get; set; }

        /// <summary>
        /// The ID of the parent folder.
        /// </summary>
        [Input("folderId")]
        public Input<string>? FolderId { get; set; }

        /// <summary>
        /// Ways for members to join the resource directory. Valid values: `invited`, `created`.
        /// </summary>
        [Input("joinMethod")]
        public Input<string>? JoinMethod { get; set; }

        /// <summary>
        /// The time when the member joined the resource directory.
        /// </summary>
        [Input("joinTime")]
        public Input<string>? JoinTime { get; set; }

        /// <summary>
        /// The modification time of the invitation.
        /// </summary>
        [Input("modifyTime")]
        public Input<string>? ModifyTime { get; set; }

        /// <summary>
        /// The ID of the billing account. If you leave this parameter empty, the current account is used as the billing account.
        /// </summary>
        [Input("payerAccountId")]
        public Input<string>? PayerAccountId { get; set; }

        /// <summary>
        /// Resource directory ID.
        /// </summary>
        [Input("resourceDirectoryId")]
        public Input<string>? ResourceDirectoryId { get; set; }

        /// <summary>
        /// Member joining status. Valid values: `CreateSuccess`,`CreateVerifying`,`CreateFailed`,`CreateExpired`,`CreateCancelled`,`PromoteVerifying`,`PromoteFailed`,`PromoteExpired`,`PromoteCancelled`,`PromoteSuccess`,`InviteSuccess`,`Removed`.
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

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

        /// <summary>
        /// A mapping of tags to assign to the resource.
        /// </summary>
        public InputMap<object> Tags
        {
            get => _tags ?? (_tags = new InputMap<object>());
            set => _tags = value;
        }

        /// <summary>
        /// Member type. The value of `ResourceAccount` indicates the resource account.
        /// </summary>
        [Input("type")]
        public Input<string>? Type { get; set; }

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