// *** 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.CloudSso
{
    /// <summary>
    /// Provides a Cloud SSO Access Configuration resource.
    /// 
    /// For information about Cloud SSO Access Configuration and how to use it, see [What is Access Configuration](https://www.alibabacloud.com/help/en/doc-detail/266737.html).
    /// 
    /// &gt; **NOTE:** Available in v1.145.0+.
    /// 
    /// &gt; **NOTE:** Cloud SSO Only Support `cn-shanghai` And `us-west-1` Region
    /// 
    /// ## Import
    /// 
    /// Cloud SSO Access Configuration can be imported using the id, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import alicloud:cloudsso/accessConfiguration:AccessConfiguration example &lt;directory_id&gt;:&lt;access_configuration_id&gt;
    /// ```
    /// </summary>
    [AliCloudResourceType("alicloud:cloudsso/accessConfiguration:AccessConfiguration")]
    public partial class AccessConfiguration : global::Pulumi.CustomResource
    {
        /// <summary>
        /// The AccessConfigurationId of the Access Configuration.
        /// </summary>
        [Output("accessConfigurationId")]
        public Output<string> AccessConfigurationId { get; private set; } = null!;

        /// <summary>
        /// The AccessConfigurationName of the Access Configuration. The name of the resource. The name can be up to `32` characters long and can contain letters, digits, and hyphens (-).
        /// </summary>
        [Output("accessConfigurationName")]
        public Output<string> AccessConfigurationName { get; private set; } = null!;

        /// <summary>
        /// The Description of the  Access Configuration. The description can be up to `1024` characters long.
        /// </summary>
        [Output("description")]
        public Output<string?> Description { get; private set; } = null!;

        /// <summary>
        /// The ID of the Directory.
        /// </summary>
        [Output("directoryId")]
        public Output<string> DirectoryId { get; private set; } = null!;

        /// <summary>
        /// This parameter is used to force deletion `permission_policies`. Valid Value: `true` and `false`.
        /// </summary>
        [Output("forceRemovePermissionPolicies")]
        public Output<bool?> ForceRemovePermissionPolicies { get; private set; } = null!;

        /// <summary>
        /// The Policy List. See the following `Block permission_policies`.
        /// </summary>
        [Output("permissionPolicies")]
        public Output<ImmutableArray<Outputs.AccessConfigurationPermissionPolicy>> PermissionPolicies { get; private set; } = null!;

        /// <summary>
        /// The RelayState of the Access Configuration, Cloud SSO users use this access configuration to access the RD account, the initial access page address. Must be the Alibaba Cloud console page, the default is the console home page.
        /// </summary>
        [Output("relayState")]
        public Output<string?> RelayState { get; private set; } = null!;

        /// <summary>
        /// The SessionDuration of the Access Configuration. Valid Value: `900` to `43200`. Unit: Seconds.
        /// </summary>
        [Output("sessionDuration")]
        public Output<int> SessionDuration { get; private set; } = null!;


        /// <summary>
        /// Create a AccessConfiguration 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 AccessConfiguration(string name, AccessConfigurationArgs args, CustomResourceOptions? options = null)
            : base("alicloud:cloudsso/accessConfiguration:AccessConfiguration", name, args ?? new AccessConfigurationArgs(), MakeResourceOptions(options, ""))
        {
        }

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

    public sealed class AccessConfigurationArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The AccessConfigurationName of the Access Configuration. The name of the resource. The name can be up to `32` characters long and can contain letters, digits, and hyphens (-).
        /// </summary>
        [Input("accessConfigurationName", required: true)]
        public Input<string> AccessConfigurationName { get; set; } = null!;

        /// <summary>
        /// The Description of the  Access Configuration. The description can be up to `1024` characters long.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The ID of the Directory.
        /// </summary>
        [Input("directoryId", required: true)]
        public Input<string> DirectoryId { get; set; } = null!;

        /// <summary>
        /// This parameter is used to force deletion `permission_policies`. Valid Value: `true` and `false`.
        /// </summary>
        [Input("forceRemovePermissionPolicies")]
        public Input<bool>? ForceRemovePermissionPolicies { get; set; }

        [Input("permissionPolicies")]
        private InputList<Inputs.AccessConfigurationPermissionPolicyArgs>? _permissionPolicies;

        /// <summary>
        /// The Policy List. See the following `Block permission_policies`.
        /// </summary>
        public InputList<Inputs.AccessConfigurationPermissionPolicyArgs> PermissionPolicies
        {
            get => _permissionPolicies ?? (_permissionPolicies = new InputList<Inputs.AccessConfigurationPermissionPolicyArgs>());
            set => _permissionPolicies = value;
        }

        /// <summary>
        /// The RelayState of the Access Configuration, Cloud SSO users use this access configuration to access the RD account, the initial access page address. Must be the Alibaba Cloud console page, the default is the console home page.
        /// </summary>
        [Input("relayState")]
        public Input<string>? RelayState { get; set; }

        /// <summary>
        /// The SessionDuration of the Access Configuration. Valid Value: `900` to `43200`. Unit: Seconds.
        /// </summary>
        [Input("sessionDuration")]
        public Input<int>? SessionDuration { get; set; }

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

    public sealed class AccessConfigurationState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// The AccessConfigurationId of the Access Configuration.
        /// </summary>
        [Input("accessConfigurationId")]
        public Input<string>? AccessConfigurationId { get; set; }

        /// <summary>
        /// The AccessConfigurationName of the Access Configuration. The name of the resource. The name can be up to `32` characters long and can contain letters, digits, and hyphens (-).
        /// </summary>
        [Input("accessConfigurationName")]
        public Input<string>? AccessConfigurationName { get; set; }

        /// <summary>
        /// The Description of the  Access Configuration. The description can be up to `1024` characters long.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        /// <summary>
        /// The ID of the Directory.
        /// </summary>
        [Input("directoryId")]
        public Input<string>? DirectoryId { get; set; }

        /// <summary>
        /// This parameter is used to force deletion `permission_policies`. Valid Value: `true` and `false`.
        /// </summary>
        [Input("forceRemovePermissionPolicies")]
        public Input<bool>? ForceRemovePermissionPolicies { get; set; }

        [Input("permissionPolicies")]
        private InputList<Inputs.AccessConfigurationPermissionPolicyGetArgs>? _permissionPolicies;

        /// <summary>
        /// The Policy List. See the following `Block permission_policies`.
        /// </summary>
        public InputList<Inputs.AccessConfigurationPermissionPolicyGetArgs> PermissionPolicies
        {
            get => _permissionPolicies ?? (_permissionPolicies = new InputList<Inputs.AccessConfigurationPermissionPolicyGetArgs>());
            set => _permissionPolicies = value;
        }

        /// <summary>
        /// The RelayState of the Access Configuration, Cloud SSO users use this access configuration to access the RD account, the initial access page address. Must be the Alibaba Cloud console page, the default is the console home page.
        /// </summary>
        [Input("relayState")]
        public Input<string>? RelayState { get; set; }

        /// <summary>
        /// The SessionDuration of the Access Configuration. Valid Value: `900` to `43200`. Unit: Seconds.
        /// </summary>
        [Input("sessionDuration")]
        public Input<int>? SessionDuration { get; set; }

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