// *** 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.Yandex
{
    /// <summary>
    /// Allows members management of a single Yandex.Cloud Organization Manager Group. For more information, see [the official documentation](https://cloud.yandex.com/en-ru/docs/organization/manage-groups#add-member).
    /// 
    /// &gt; **Note:** Multiple `yandex_organizationmanager_group_iam_binding` resources with the same group id will produce inconsistent behavior!
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Yandex = Pulumi.Yandex;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var @group = new Yandex.OrganizationmanagerGroupMembership("group", new()
    ///     {
    ///         GroupId = "sdf4*********3fr",
    ///         Members = new[]
    ///         {
    ///             "xdf********123",
    ///         },
    ///     });
    /// 
    /// });
    /// ```
    /// </summary>
    [YandexResourceType("yandex:index/organizationmanagerGroupMembership:organizationmanagerGroupMembership")]
    public partial class OrganizationmanagerGroupMembership : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The Group to add/remove members to/from.
        /// </summary>
        [Output("groupId")]
        public Output<string> GroupId { get; private set; } = null!;

        /// <summary>
        /// A set of members of the Group. Each member is represented by an id.
        /// </summary>
        [Output("members")]
        public Output<ImmutableArray<string>> Members { get; private set; } = null!;


        /// <summary>
        /// Create a OrganizationmanagerGroupMembership 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 OrganizationmanagerGroupMembership(string name, OrganizationmanagerGroupMembershipArgs args, CustomResourceOptions? options = null)
            : base("yandex:index/organizationmanagerGroupMembership:organizationmanagerGroupMembership", name, args ?? new OrganizationmanagerGroupMembershipArgs(), MakeResourceOptions(options, ""))
        {
        }

        private OrganizationmanagerGroupMembership(string name, Input<string> id, OrganizationmanagerGroupMembershipState? state = null, CustomResourceOptions? options = null)
            : base("yandex:index/organizationmanagerGroupMembership:organizationmanagerGroupMembership", name, state, MakeResourceOptions(options, id))
        {
        }

        private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
        {
            var defaultOptions = new CustomResourceOptions
            {
                Version = Utilities.Version,
                PluginDownloadURL = "https://github.com/regrau/pulumi-yandex/releases",
            };
            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 OrganizationmanagerGroupMembership 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 OrganizationmanagerGroupMembership Get(string name, Input<string> id, OrganizationmanagerGroupMembershipState? state = null, CustomResourceOptions? options = null)
        {
            return new OrganizationmanagerGroupMembership(name, id, state, options);
        }
    }

    public sealed class OrganizationmanagerGroupMembershipArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Group to add/remove members to/from.
        /// </summary>
        [Input("groupId", required: true)]
        public Input<string> GroupId { get; set; } = null!;

        [Input("members", required: true)]
        private InputList<string>? _members;

        /// <summary>
        /// A set of members of the Group. Each member is represented by an id.
        /// </summary>
        public InputList<string> Members
        {
            get => _members ?? (_members = new InputList<string>());
            set => _members = value;
        }

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

    public sealed class OrganizationmanagerGroupMembershipState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The Group to add/remove members to/from.
        /// </summary>
        [Input("groupId")]
        public Input<string>? GroupId { get; set; }

        [Input("members")]
        private InputList<string>? _members;

        /// <summary>
        /// A set of members of the Group. Each member is represented by an id.
        /// </summary>
        public InputList<string> Members
        {
            get => _members ?? (_members = new InputList<string>());
            set => _members = value;
        }

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