# coding=utf-8
# *** WARNING: this file was generated by pulumi-language-python. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins as _builtins
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['SamlArgs', 'Saml']

@pulumi.input_type
class SamlArgs:
    def __init__(__self__, *,
                 organization_id: Optional[pulumi.Input[_builtins.str]] = None):
        """
        The set of arguments for constructing a Saml resource.
        :param pulumi.Input[_builtins.str] organization_id: The organization ID. If not provided, the default organization ID will be used.
        """
        if organization_id is not None:
            pulumi.set(__self__, "organization_id", organization_id)

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The organization ID. If not provided, the default organization ID will be used.
        """
        return pulumi.get(self, "organization_id")

    @organization_id.setter
    def organization_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "organization_id", value)


@pulumi.input_type
class _SamlState:
    def __init__(__self__, *,
                 entity_id: Optional[pulumi.Input[_builtins.str]] = None,
                 organization_id: Optional[pulumi.Input[_builtins.str]] = None,
                 service_provider: Optional[pulumi.Input['SamlServiceProviderArgs']] = None,
                 single_sign_on_url: Optional[pulumi.Input[_builtins.str]] = None,
                 status: Optional[pulumi.Input[_builtins.str]] = None):
        """
        Input properties used for looking up and filtering Saml resources.
        :param pulumi.Input[_builtins.str] entity_id: (Computed) The entity ID of the Service Provider.
        :param pulumi.Input[_builtins.str] organization_id: The organization ID. If not provided, the default organization ID will be used.
        :param pulumi.Input['SamlServiceProviderArgs'] service_provider: (Computed) The Service Provider information. It contains:
        :param pulumi.Input[_builtins.str] single_sign_on_url: (Computed) The single sign-on URL of the SAML Identity Provider.
        :param pulumi.Input[_builtins.str] status: (Computed) The status of the SAML configuration.
        """
        if entity_id is not None:
            pulumi.set(__self__, "entity_id", entity_id)
        if organization_id is not None:
            pulumi.set(__self__, "organization_id", organization_id)
        if service_provider is not None:
            pulumi.set(__self__, "service_provider", service_provider)
        if single_sign_on_url is not None:
            pulumi.set(__self__, "single_sign_on_url", single_sign_on_url)
        if status is not None:
            pulumi.set(__self__, "status", status)

    @_builtins.property
    @pulumi.getter(name="entityId")
    def entity_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (Computed) The entity ID of the Service Provider.
        """
        return pulumi.get(self, "entity_id")

    @entity_id.setter
    def entity_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "entity_id", value)

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        The organization ID. If not provided, the default organization ID will be used.
        """
        return pulumi.get(self, "organization_id")

    @organization_id.setter
    def organization_id(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "organization_id", value)

    @_builtins.property
    @pulumi.getter(name="serviceProvider")
    def service_provider(self) -> Optional[pulumi.Input['SamlServiceProviderArgs']]:
        """
        (Computed) The Service Provider information. It contains:
        """
        return pulumi.get(self, "service_provider")

    @service_provider.setter
    def service_provider(self, value: Optional[pulumi.Input['SamlServiceProviderArgs']]):
        pulumi.set(self, "service_provider", value)

    @_builtins.property
    @pulumi.getter(name="singleSignOnUrl")
    def single_sign_on_url(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (Computed) The single sign-on URL of the SAML Identity Provider.
        """
        return pulumi.get(self, "single_sign_on_url")

    @single_sign_on_url.setter
    def single_sign_on_url(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "single_sign_on_url", value)

    @_builtins.property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[_builtins.str]]:
        """
        (Computed) The status of the SAML configuration.
        """
        return pulumi.get(self, "status")

    @status.setter
    def status(self, value: Optional[pulumi.Input[_builtins.str]]):
        pulumi.set(self, "status", value)


@pulumi.type_token("scaleway:iam/saml:Saml")
class Saml(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 organization_id: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        """
        Manages SAML activation for an organization. SAML (Security Assertion Markup Language) is an open standard for exchanging authentication and authorization data between parties, specifically between an identity provider and a service provider. This resource allows you to enable and disable SAML-based single sign-on for your Scaleway organization.

        For configuring SAML parameters (`entity_id` and `single_sign_on_url`), use the `scaleway_iam_update_saml_configuration` action.

        ## Example Usage

        ```python
        import pulumi
        import pulumiverse_scaleway as scaleway

        ### Enable IAM SAML for an organization
        main = scaleway.iam.Saml("main", organization_id="11111111-1111-1111-1111-111111111111")
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] organization_id: The organization ID. If not provided, the default organization ID will be used.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[SamlArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages SAML activation for an organization. SAML (Security Assertion Markup Language) is an open standard for exchanging authentication and authorization data between parties, specifically between an identity provider and a service provider. This resource allows you to enable and disable SAML-based single sign-on for your Scaleway organization.

        For configuring SAML parameters (`entity_id` and `single_sign_on_url`), use the `scaleway_iam_update_saml_configuration` action.

        ## Example Usage

        ```python
        import pulumi
        import pulumiverse_scaleway as scaleway

        ### Enable IAM SAML for an organization
        main = scaleway.iam.Saml("main", organization_id="11111111-1111-1111-1111-111111111111")
        ```

        :param str resource_name: The name of the resource.
        :param SamlArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(SamlArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 organization_id: Optional[pulumi.Input[_builtins.str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = SamlArgs.__new__(SamlArgs)

            __props__.__dict__["organization_id"] = organization_id
            __props__.__dict__["entity_id"] = None
            __props__.__dict__["service_provider"] = None
            __props__.__dict__["single_sign_on_url"] = None
            __props__.__dict__["status"] = None
        super(Saml, __self__).__init__(
            'scaleway:iam/saml:Saml',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            entity_id: Optional[pulumi.Input[_builtins.str]] = None,
            organization_id: Optional[pulumi.Input[_builtins.str]] = None,
            service_provider: Optional[pulumi.Input[Union['SamlServiceProviderArgs', 'SamlServiceProviderArgsDict']]] = None,
            single_sign_on_url: Optional[pulumi.Input[_builtins.str]] = None,
            status: Optional[pulumi.Input[_builtins.str]] = None) -> 'Saml':
        """
        Get an existing Saml resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] entity_id: (Computed) The entity ID of the Service Provider.
        :param pulumi.Input[_builtins.str] organization_id: The organization ID. If not provided, the default organization ID will be used.
        :param pulumi.Input[Union['SamlServiceProviderArgs', 'SamlServiceProviderArgsDict']] service_provider: (Computed) The Service Provider information. It contains:
        :param pulumi.Input[_builtins.str] single_sign_on_url: (Computed) The single sign-on URL of the SAML Identity Provider.
        :param pulumi.Input[_builtins.str] status: (Computed) The status of the SAML configuration.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _SamlState.__new__(_SamlState)

        __props__.__dict__["entity_id"] = entity_id
        __props__.__dict__["organization_id"] = organization_id
        __props__.__dict__["service_provider"] = service_provider
        __props__.__dict__["single_sign_on_url"] = single_sign_on_url
        __props__.__dict__["status"] = status
        return Saml(resource_name, opts=opts, __props__=__props__)

    @_builtins.property
    @pulumi.getter(name="entityId")
    def entity_id(self) -> pulumi.Output[_builtins.str]:
        """
        (Computed) The entity ID of the Service Provider.
        """
        return pulumi.get(self, "entity_id")

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> pulumi.Output[_builtins.str]:
        """
        The organization ID. If not provided, the default organization ID will be used.
        """
        return pulumi.get(self, "organization_id")

    @_builtins.property
    @pulumi.getter(name="serviceProvider")
    def service_provider(self) -> pulumi.Output['outputs.SamlServiceProvider']:
        """
        (Computed) The Service Provider information. It contains:
        """
        return pulumi.get(self, "service_provider")

    @_builtins.property
    @pulumi.getter(name="singleSignOnUrl")
    def single_sign_on_url(self) -> pulumi.Output[_builtins.str]:
        """
        (Computed) The single sign-on URL of the SAML Identity Provider.
        """
        return pulumi.get(self, "single_sign_on_url")

    @_builtins.property
    @pulumi.getter
    def status(self) -> pulumi.Output[_builtins.str]:
        """
        (Computed) The status of the SAML configuration.
        """
        return pulumi.get(self, "status")

