<filename>sdk/dotnet/OrganizationmanagerSamlFederation.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;

namespace Pulumi.Yandex
{
    /// <summary>
    /// Allows management of a single SAML Federation within an existing Yandex.Cloud Organization.
    /// 
    /// ## Example Usage
    /// 
    /// ```csharp
    /// using System.Collections.Generic;
    /// using Pulumi;
    /// using Yandex = Pulumi.Yandex;
    /// 
    /// return await Deployment.RunAsync(() =&gt; 
    /// {
    ///     var federation = new Yandex.OrganizationmanagerSamlFederation("federation", new()
    ///     {
    ///         Description = "My new SAML federation",
    ///         Issuer = "my-issuer",
    ///         OrganizationId = "sdf4*********3fr",
    ///         SsoBinding = "POST",
    ///         SsoUrl = "https://my-sso.url",
    ///     });
    /// 
    /// });
    /// ```
    /// 
    /// ## Import
    /// 
    /// A Yandex SAML Federation can be imported using the `id` of the resource, e.g.
    /// 
    /// ```sh
    ///  $ pulumi import yandex:index/organizationmanagerSamlFederation:OrganizationmanagerSamlFederation federation "federation_id"
    /// ```
    /// </summary>
    [YandexResourceType("yandex:index/organizationmanagerSamlFederation:OrganizationmanagerSamlFederation")]
    public partial class OrganizationmanagerSamlFederation : global::Pulumi.CustomResource
    {
        /// <summary>
        /// Add new users automatically on successful authentication. The user will get the `resource-manager.clouds.member` role automatically, but you need to grant other roles to them. If the value is `false`, users who aren't added to the cloud can't log in, even if they have authenticated on your server.
        /// </summary>
        [Output("autoCreateAccountOnLogin")]
        public Output<bool> AutoCreateAccountOnLogin { get; private set; } = null!;

        /// <summary>
        /// Use case-insensitive name ids.
        /// </summary>
        [Output("caseInsensitiveNameIds")]
        public Output<bool> CaseInsensitiveNameIds { get; private set; } = null!;

        /// <summary>
        /// The lifetime of a Browser cookie in seconds. If the cookie is still valid, the management console authenticates the user immediately and redirects them to the home page. The default value is `8h`.
        /// </summary>
        [Output("cookieMaxAge")]
        public Output<string> CookieMaxAge { get; private set; } = null!;

        /// <summary>
        /// (Computed) The SAML Federation creation timestamp.
        /// </summary>
        [Output("createdAt")]
        public Output<string> CreatedAt { get; private set; } = null!;

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

        /// <summary>
        /// The ID of the IdP server to be used for authentication. The IdP server also responds to IAM with this ID after the user authenticates.
        /// </summary>
        [Output("issuer")]
        public Output<string> Issuer { get; private set; } = null!;

        /// <summary>
        /// A set of key/value label pairs assigned to the SAML Federation.
        /// </summary>
        [Output("labels")]
        public Output<ImmutableDictionary<string, string>?> Labels { get; private set; } = null!;

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

        /// <summary>
        /// The organization to attach this SAML Federation to.
        /// </summary>
        [Output("organizationId")]
        public Output<string> OrganizationId { get; private set; } = null!;

        /// <summary>
        /// Federation security settings, structure is documented below.
        /// </summary>
        [Output("securitySettings")]
        public Output<Outputs.OrganizationmanagerSamlFederationSecuritySettings> SecuritySettings { get; private set; } = null!;

        /// <summary>
        /// Single sign-on endpoint binding type. Most Identity Providers support the `POST` binding type. SAML Binding is a mapping of a SAML protocol message onto standard messaging formats and/or communications protocols.
        /// </summary>
        [Output("ssoBinding")]
        public Output<string> SsoBinding { get; private set; } = null!;

        /// <summary>
        /// Single sign-on endpoint URL. Specify the link to the IdP login page here.
        /// </summary>
        [Output("ssoUrl")]
        public Output<string> SsoUrl { get; private set; } = null!;


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

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

    public sealed class OrganizationmanagerSamlFederationArgs : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Add new users automatically on successful authentication. The user will get the `resource-manager.clouds.member` role automatically, but you need to grant other roles to them. If the value is `false`, users who aren't added to the cloud can't log in, even if they have authenticated on your server.
        /// </summary>
        [Input("autoCreateAccountOnLogin")]
        public Input<bool>? AutoCreateAccountOnLogin { get; set; }

        /// <summary>
        /// Use case-insensitive name ids.
        /// </summary>
        [Input("caseInsensitiveNameIds")]
        public Input<bool>? CaseInsensitiveNameIds { get; set; }

        /// <summary>
        /// The lifetime of a Browser cookie in seconds. If the cookie is still valid, the management console authenticates the user immediately and redirects them to the home page. The default value is `8h`.
        /// </summary>
        [Input("cookieMaxAge")]
        public Input<string>? CookieMaxAge { get; set; }

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

        /// <summary>
        /// The ID of the IdP server to be used for authentication. The IdP server also responds to IAM with this ID after the user authenticates.
        /// </summary>
        [Input("issuer", required: true)]
        public Input<string> Issuer { get; set; } = null!;

        [Input("labels")]
        private InputMap<string>? _labels;

        /// <summary>
        /// A set of key/value label pairs assigned to the SAML Federation.
        /// </summary>
        public InputMap<string> Labels
        {
            get => _labels ?? (_labels = new InputMap<string>());
            set => _labels = value;
        }

        /// <summary>
        /// The name of the SAML Federation.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The organization to attach this SAML Federation to.
        /// </summary>
        [Input("organizationId", required: true)]
        public Input<string> OrganizationId { get; set; } = null!;

        /// <summary>
        /// Federation security settings, structure is documented below.
        /// </summary>
        [Input("securitySettings")]
        public Input<Inputs.OrganizationmanagerSamlFederationSecuritySettingsArgs>? SecuritySettings { get; set; }

        /// <summary>
        /// Single sign-on endpoint binding type. Most Identity Providers support the `POST` binding type. SAML Binding is a mapping of a SAML protocol message onto standard messaging formats and/or communications protocols.
        /// </summary>
        [Input("ssoBinding", required: true)]
        public Input<string> SsoBinding { get; set; } = null!;

        /// <summary>
        /// Single sign-on endpoint URL. Specify the link to the IdP login page here.
        /// </summary>
        [Input("ssoUrl", required: true)]
        public Input<string> SsoUrl { get; set; } = null!;

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

    public sealed class OrganizationmanagerSamlFederationState : global::Pulumi.ResourceArgs
    {
        /// <summary>
        /// Add new users automatically on successful authentication. The user will get the `resource-manager.clouds.member` role automatically, but you need to grant other roles to them. If the value is `false`, users who aren't added to the cloud can't log in, even if they have authenticated on your server.
        /// </summary>
        [Input("autoCreateAccountOnLogin")]
        public Input<bool>? AutoCreateAccountOnLogin { get; set; }

        /// <summary>
        /// Use case-insensitive name ids.
        /// </summary>
        [Input("caseInsensitiveNameIds")]
        public Input<bool>? CaseInsensitiveNameIds { get; set; }

        /// <summary>
        /// The lifetime of a Browser cookie in seconds. If the cookie is still valid, the management console authenticates the user immediately and redirects them to the home page. The default value is `8h`.
        /// </summary>
        [Input("cookieMaxAge")]
        public Input<string>? CookieMaxAge { get; set; }

        /// <summary>
        /// (Computed) The SAML Federation creation timestamp.
        /// </summary>
        [Input("createdAt")]
        public Input<string>? CreatedAt { get; set; }

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

        /// <summary>
        /// The ID of the IdP server to be used for authentication. The IdP server also responds to IAM with this ID after the user authenticates.
        /// </summary>
        [Input("issuer")]
        public Input<string>? Issuer { get; set; }

        [Input("labels")]
        private InputMap<string>? _labels;

        /// <summary>
        /// A set of key/value label pairs assigned to the SAML Federation.
        /// </summary>
        public InputMap<string> Labels
        {
            get => _labels ?? (_labels = new InputMap<string>());
            set => _labels = value;
        }

        /// <summary>
        /// The name of the SAML Federation.
        /// </summary>
        [Input("name")]
        public Input<string>? Name { get; set; }

        /// <summary>
        /// The organization to attach this SAML Federation to.
        /// </summary>
        [Input("organizationId")]
        public Input<string>? OrganizationId { get; set; }

        /// <summary>
        /// Federation security settings, structure is documented below.
        /// </summary>
        [Input("securitySettings")]
        public Input<Inputs.OrganizationmanagerSamlFederationSecuritySettingsGetArgs>? SecuritySettings { get; set; }

        /// <summary>
        /// Single sign-on endpoint binding type. Most Identity Providers support the `POST` binding type. SAML Binding is a mapping of a SAML protocol message onto standard messaging formats and/or communications protocols.
        /// </summary>
        [Input("ssoBinding")]
        public Input<string>? SsoBinding { get; set; }

        /// <summary>
        /// Single sign-on endpoint URL. Specify the link to the IdP login page here.
        /// </summary>
        [Input("ssoUrl")]
        public Input<string>? SsoUrl { get; set; }

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