<filename>sdk/dotnet/ScopedUserRole.cs<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;
using Pulumi;

namespace PiersKarsenbarg.Octopusdeploy
{
    /// <summary>
    /// This resource manages scoped user roles in Octopus Deploy.
    /// 
    /// &gt; **NOTE on Team User Roles and Scoped User Roles:** We currently
    /// provides both a standalone Scoped User Role resource
    /// and a Team resource with `user_roles` blocks defined in-line. At this time you
    /// cannot use a Team with in-line user_roles in conjunction with any Scoped User Role
    /// resources. Doing so will cause a conflict of user role settings and will overwrite
    /// user roles.
    /// </summary>
    [OctopusdeployResourceType("octopusdeploy:index/scopedUserRole:ScopedUserRole")]
    public partial class ScopedUserRole : global::Pulumi.CustomResource
    {
        [Output("environmentIds")]
        public Output<ImmutableArray<string>> EnvironmentIds { get; private set; } = null!;

        [Output("projectGroupIds")]
        public Output<ImmutableArray<string>> ProjectGroupIds { get; private set; } = null!;

        [Output("projectIds")]
        public Output<ImmutableArray<string>> ProjectIds { get; private set; } = null!;

        [Output("spaceId")]
        public Output<string> SpaceId { get; private set; } = null!;

        [Output("teamId")]
        public Output<string> TeamId { get; private set; } = null!;

        [Output("tenantIds")]
        public Output<ImmutableArray<string>> TenantIds { get; private set; } = null!;

        [Output("userRoleId")]
        public Output<string> UserRoleId { get; private set; } = null!;


        /// <summary>
        /// Create a ScopedUserRole 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 ScopedUserRole(string name, ScopedUserRoleArgs args, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/scopedUserRole:ScopedUserRole", name, args ?? new ScopedUserRoleArgs(), MakeResourceOptions(options, ""))
        {
        }

        private ScopedUserRole(string name, Input<string> id, ScopedUserRoleState? state = null, CustomResourceOptions? options = null)
            : base("octopusdeploy:index/scopedUserRole:ScopedUserRole", 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 ScopedUserRole 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 ScopedUserRole Get(string name, Input<string> id, ScopedUserRoleState? state = null, CustomResourceOptions? options = null)
        {
            return new ScopedUserRole(name, id, state, options);
        }
    }

    public sealed class ScopedUserRoleArgs : global::Pulumi.ResourceArgs
    {
        [Input("environmentIds")]
        private InputList<string>? _environmentIds;
        public InputList<string> EnvironmentIds
        {
            get => _environmentIds ?? (_environmentIds = new InputList<string>());
            set => _environmentIds = value;
        }

        [Input("projectGroupIds")]
        private InputList<string>? _projectGroupIds;
        public InputList<string> ProjectGroupIds
        {
            get => _projectGroupIds ?? (_projectGroupIds = new InputList<string>());
            set => _projectGroupIds = value;
        }

        [Input("projectIds")]
        private InputList<string>? _projectIds;
        public InputList<string> ProjectIds
        {
            get => _projectIds ?? (_projectIds = new InputList<string>());
            set => _projectIds = value;
        }

        [Input("spaceId", required: true)]
        public Input<string> SpaceId { get; set; } = null!;

        [Input("teamId", required: true)]
        public Input<string> TeamId { get; set; } = null!;

        [Input("tenantIds")]
        private InputList<string>? _tenantIds;
        public InputList<string> TenantIds
        {
            get => _tenantIds ?? (_tenantIds = new InputList<string>());
            set => _tenantIds = value;
        }

        [Input("userRoleId", required: true)]
        public Input<string> UserRoleId { get; set; } = null!;

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

    public sealed class ScopedUserRoleState : global::Pulumi.ResourceArgs
    {
        [Input("environmentIds")]
        private InputList<string>? _environmentIds;
        public InputList<string> EnvironmentIds
        {
            get => _environmentIds ?? (_environmentIds = new InputList<string>());
            set => _environmentIds = value;
        }

        [Input("projectGroupIds")]
        private InputList<string>? _projectGroupIds;
        public InputList<string> ProjectGroupIds
        {
            get => _projectGroupIds ?? (_projectGroupIds = new InputList<string>());
            set => _projectGroupIds = value;
        }

        [Input("projectIds")]
        private InputList<string>? _projectIds;
        public InputList<string> ProjectIds
        {
            get => _projectIds ?? (_projectIds = new InputList<string>());
            set => _projectIds = value;
        }

        [Input("spaceId")]
        public Input<string>? SpaceId { get; set; }

        [Input("teamId")]
        public Input<string>? TeamId { get; set; }

        [Input("tenantIds")]
        private InputList<string>? _tenantIds;
        public InputList<string> TenantIds
        {
            get => _tenantIds ?? (_tenantIds = new InputList<string>());
            set => _tenantIds = value;
        }

        [Input("userRoleId")]
        public Input<string>? UserRoleId { get; set; }

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