# 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 ._enums import *

__all__ = [
    'GetInsightsAccountResult',
    'AwaitableGetInsightsAccountResult',
    'get_insights_account',
    'get_insights_account_output',
]

@pulumi.output_type
class GetInsightsAccountResult:
    def __init__(__self__, account_name=None, environment=None, insights_account_id=None, organization_name=None, provider=None, provider_config=None, scan_schedule=None, scheduled_scan_enabled=None, tags=None):
        if account_name and not isinstance(account_name, str):
            raise TypeError("Expected argument 'account_name' to be a str")
        pulumi.set(__self__, "account_name", account_name)
        if environment and not isinstance(environment, str):
            raise TypeError("Expected argument 'environment' to be a str")
        pulumi.set(__self__, "environment", environment)
        if insights_account_id and not isinstance(insights_account_id, str):
            raise TypeError("Expected argument 'insights_account_id' to be a str")
        pulumi.set(__self__, "insights_account_id", insights_account_id)
        if organization_name and not isinstance(organization_name, str):
            raise TypeError("Expected argument 'organization_name' to be a str")
        pulumi.set(__self__, "organization_name", organization_name)
        if provider and not isinstance(provider, str):
            raise TypeError("Expected argument 'provider' to be a str")
        pulumi.set(__self__, "provider", provider)
        if provider_config and not isinstance(provider_config, dict):
            raise TypeError("Expected argument 'provider_config' to be a dict")
        pulumi.set(__self__, "provider_config", provider_config)
        if scan_schedule and not isinstance(scan_schedule, str):
            raise TypeError("Expected argument 'scan_schedule' to be a str")
        pulumi.set(__self__, "scan_schedule", scan_schedule)
        if scheduled_scan_enabled and not isinstance(scheduled_scan_enabled, bool):
            raise TypeError("Expected argument 'scheduled_scan_enabled' to be a bool")
        pulumi.set(__self__, "scheduled_scan_enabled", scheduled_scan_enabled)
        if tags and not isinstance(tags, dict):
            raise TypeError("Expected argument 'tags' to be a dict")
        pulumi.set(__self__, "tags", tags)

    @_builtins.property
    @pulumi.getter(name="accountName")
    def account_name(self) -> _builtins.str:
        """
        Name of the insights account.
        """
        return pulumi.get(self, "account_name")

    @_builtins.property
    @pulumi.getter
    def environment(self) -> _builtins.str:
        """
        The ESC environment used for provider credentials. Format: 'project/environment' with optional '@version' suffix (e.g., 'my-project/prod-env' or 'my-project/prod-env@v1.0').
        """
        return pulumi.get(self, "environment")

    @_builtins.property
    @pulumi.getter(name="insightsAccountId")
    def insights_account_id(self) -> _builtins.str:
        """
        The insights account identifier.
        """
        return pulumi.get(self, "insights_account_id")

    @_builtins.property
    @pulumi.getter(name="organizationName")
    def organization_name(self) -> _builtins.str:
        """
        The organization's name.
        """
        return pulumi.get(self, "organization_name")

    @_builtins.property
    @pulumi.getter
    def provider(self) -> 'CloudProvider':
        """
        The cloud provider for scanning.
        """
        return pulumi.get(self, "provider")

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional[Mapping[str, Any]]:
        """
        Provider-specific configuration as a JSON object. For AWS, specify regions to scan: {"regions": ["us-west-1", "us-west-2"]}.
        """
        return pulumi.get(self, "provider_config")

    @_builtins.property
    @pulumi.getter(name="scanSchedule")
    def scan_schedule(self) -> 'ScanSchedule':
        """
        Schedule for automated scanning. Use 'daily' to enable daily scans, or 'none' to disable scheduled scanning. Defaults to 'none'.
        """
        return pulumi.get(self, "scan_schedule")

    @_builtins.property
    @pulumi.getter(name="scheduledScanEnabled")
    def scheduled_scan_enabled(self) -> _builtins.bool:
        """
        Whether scheduled scanning is enabled.
        """
        return pulumi.get(self, "scheduled_scan_enabled")

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Optional[Mapping[str, _builtins.str]]:
        """
        Key-value tags to associate with the insights account.
        """
        return pulumi.get(self, "tags")


class AwaitableGetInsightsAccountResult(GetInsightsAccountResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetInsightsAccountResult(
            account_name=self.account_name,
            environment=self.environment,
            insights_account_id=self.insights_account_id,
            organization_name=self.organization_name,
            provider=self.provider,
            provider_config=self.provider_config,
            scan_schedule=self.scan_schedule,
            scheduled_scan_enabled=self.scheduled_scan_enabled,
            tags=self.tags)


def get_insights_account(account_name: Optional[_builtins.str] = None,
                         organization_name: Optional[_builtins.str] = None,
                         opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInsightsAccountResult:
    """
    Get details about a specific Insights account.
    """
    __args__ = dict()
    __args__['accountName'] = account_name
    __args__['organizationName'] = organization_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('pulumiservice:index:getInsightsAccount', __args__, opts=opts, typ=GetInsightsAccountResult).value

    return AwaitableGetInsightsAccountResult(
        account_name=pulumi.get(__ret__, 'account_name'),
        environment=pulumi.get(__ret__, 'environment'),
        insights_account_id=pulumi.get(__ret__, 'insights_account_id'),
        organization_name=pulumi.get(__ret__, 'organization_name'),
        provider=pulumi.get(__ret__, 'provider'),
        provider_config=pulumi.get(__ret__, 'provider_config'),
        scan_schedule=pulumi.get(__ret__, 'scan_schedule'),
        scheduled_scan_enabled=pulumi.get(__ret__, 'scheduled_scan_enabled'),
        tags=pulumi.get(__ret__, 'tags'))
def get_insights_account_output(account_name: Optional[pulumi.Input[_builtins.str]] = None,
                                organization_name: Optional[pulumi.Input[_builtins.str]] = None,
                                opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetInsightsAccountResult]:
    """
    Get details about a specific Insights account.
    """
    __args__ = dict()
    __args__['accountName'] = account_name
    __args__['organizationName'] = organization_name
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('pulumiservice:index:getInsightsAccount', __args__, opts=opts, typ=GetInsightsAccountResult)
    return __ret__.apply(lambda __response__: GetInsightsAccountResult(
        account_name=pulumi.get(__response__, 'account_name'),
        environment=pulumi.get(__response__, 'environment'),
        insights_account_id=pulumi.get(__response__, 'insights_account_id'),
        organization_name=pulumi.get(__response__, 'organization_name'),
        provider=pulumi.get(__response__, 'provider'),
        provider_config=pulumi.get(__response__, 'provider_config'),
        scan_schedule=pulumi.get(__response__, 'scan_schedule'),
        scheduled_scan_enabled=pulumi.get(__response__, 'scheduled_scan_enabled'),
        tags=pulumi.get(__response__, 'tags')))
