# 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

__all__ = [
    'GetSamlResult',
    'AwaitableGetSamlResult',
    'get_saml',
    'get_saml_output',
]

@pulumi.output_type
class GetSamlResult:
    """
    A collection of values returned by getSaml.
    """
    def __init__(__self__, entity_id=None, id=None, organization_id=None, service_provider=None, single_sign_on_url=None, status=None):
        if entity_id and not isinstance(entity_id, str):
            raise TypeError("Expected argument 'entity_id' to be a str")
        pulumi.set(__self__, "entity_id", entity_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if organization_id and not isinstance(organization_id, str):
            raise TypeError("Expected argument 'organization_id' to be a str")
        pulumi.set(__self__, "organization_id", organization_id)
        if service_provider and not isinstance(service_provider, dict):
            raise TypeError("Expected argument 'service_provider' to be a dict")
        pulumi.set(__self__, "service_provider", service_provider)
        if single_sign_on_url and not isinstance(single_sign_on_url, str):
            raise TypeError("Expected argument 'single_sign_on_url' to be a str")
        pulumi.set(__self__, "single_sign_on_url", single_sign_on_url)
        if status and not isinstance(status, str):
            raise TypeError("Expected argument 'status' to be a str")
        pulumi.set(__self__, "status", status)

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

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        The ID of the SAML configuration
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> _builtins.str:
        """
        The organization ID
        """
        return pulumi.get(self, "organization_id")

    @_builtins.property
    @pulumi.getter(name="serviceProvider")
    def service_provider(self) -> 'outputs.GetSamlServiceProviderResult':
        """
        The Service Provider information
        """
        return pulumi.get(self, "service_provider")

    @_builtins.property
    @pulumi.getter(name="singleSignOnUrl")
    def single_sign_on_url(self) -> _builtins.str:
        """
        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) -> _builtins.str:
        """
        The status of the SAML configuration
        """
        return pulumi.get(self, "status")


class AwaitableGetSamlResult(GetSamlResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetSamlResult(
            entity_id=self.entity_id,
            id=self.id,
            organization_id=self.organization_id,
            service_provider=self.service_provider,
            single_sign_on_url=self.single_sign_on_url,
            status=self.status)


def get_saml(organization_id: Optional[_builtins.str] = None,
             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetSamlResult:
    """
    Retrieves SAML configuration for an organization. This data source enables you to retrieve the SAML-based single sign-on (SSO) configuration for your Scaleway 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.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    ### Get information about an organization's SAML configuration
    main = scaleway.iam.get_saml(organization_id="11111111-1111-1111-1111-111111111111")
    ```


    :param _builtins.str organization_id: The organization ID
    """
    __args__ = dict()
    __args__['organizationId'] = organization_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:iam/getSaml:getSaml', __args__, opts=opts, typ=GetSamlResult).value

    return AwaitableGetSamlResult(
        entity_id=pulumi.get(__ret__, 'entity_id'),
        id=pulumi.get(__ret__, 'id'),
        organization_id=pulumi.get(__ret__, 'organization_id'),
        service_provider=pulumi.get(__ret__, 'service_provider'),
        single_sign_on_url=pulumi.get(__ret__, 'single_sign_on_url'),
        status=pulumi.get(__ret__, 'status'))
def get_saml_output(organization_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetSamlResult]:
    """
    Retrieves SAML configuration for an organization. This data source enables you to retrieve the SAML-based single sign-on (SSO) configuration for your Scaleway 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.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    ### Get information about an organization's SAML configuration
    main = scaleway.iam.get_saml(organization_id="11111111-1111-1111-1111-111111111111")
    ```


    :param _builtins.str organization_id: The organization ID
    """
    __args__ = dict()
    __args__['organizationId'] = organization_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:iam/getSaml:getSaml', __args__, opts=opts, typ=GetSamlResult)
    return __ret__.apply(lambda __response__: GetSamlResult(
        entity_id=pulumi.get(__response__, 'entity_id'),
        id=pulumi.get(__response__, 'id'),
        organization_id=pulumi.get(__response__, 'organization_id'),
        service_provider=pulumi.get(__response__, 'service_provider'),
        single_sign_on_url=pulumi.get(__response__, 'single_sign_on_url'),
        status=pulumi.get(__response__, 'status')))
