# 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__ = ['InsightsAccountArgs', 'InsightsAccount']

@pulumi.input_type
class InsightsAccountArgs:
    def __init__(__self__, *,
                 account_name: pulumi.Input[_builtins.str],
                 environment: pulumi.Input[_builtins.str],
                 organization_name: pulumi.Input[_builtins.str],
                 provider: pulumi.Input['CloudProvider'],
                 scan_schedule: Optional[pulumi.Input['ScanSchedule']] = None,
                 provider_config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None):
        """
        The set of arguments for constructing a InsightsAccount resource.
        :param pulumi.Input[_builtins.str] account_name: Name of the insights account.
        :param pulumi.Input[_builtins.str] environment: 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').
        :param pulumi.Input[_builtins.str] organization_name: The organization's name.
        :param pulumi.Input['CloudProvider'] provider: The cloud provider for scanning.
        :param pulumi.Input['ScanSchedule'] scan_schedule: Schedule for automated scanning. Use 'daily' to enable daily scans, or 'none' to disable scheduled scanning. Defaults to 'none'.
        :param pulumi.Input[Mapping[str, Any]] provider_config: Provider-specific configuration as a JSON object. For AWS, specify regions to scan: {"regions": ["us-west-1", "us-west-2"]}.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] tags: Key-value tags to associate with the insights account.
        """
        pulumi.set(__self__, "account_name", account_name)
        pulumi.set(__self__, "environment", environment)
        pulumi.set(__self__, "organization_name", organization_name)
        pulumi.set(__self__, "provider", provider)
        if scan_schedule is None:
            scan_schedule = 'none'
        pulumi.set(__self__, "scan_schedule", scan_schedule)
        if provider_config is not None:
            pulumi.set(__self__, "provider_config", provider_config)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)

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

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

    @_builtins.property
    @pulumi.getter
    def environment(self) -> pulumi.Input[_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")

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

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

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

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

    @provider.setter
    def provider(self, value: pulumi.Input['CloudProvider']):
        pulumi.set(self, "provider", value)

    @_builtins.property
    @pulumi.getter(name="scanSchedule")
    def scan_schedule(self) -> pulumi.Input['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")

    @scan_schedule.setter
    def scan_schedule(self, value: pulumi.Input['ScanSchedule']):
        pulumi.set(self, "scan_schedule", value)

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> Optional[pulumi.Input[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")

    @provider_config.setter
    def provider_config(self, value: Optional[pulumi.Input[Mapping[str, Any]]]):
        pulumi.set(self, "provider_config", value)

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

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


@pulumi.type_token("pulumiservice:index:InsightsAccount")
class InsightsAccount(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 account_name: Optional[pulumi.Input[_builtins.str]] = None,
                 environment: Optional[pulumi.Input[_builtins.str]] = None,
                 organization_name: Optional[pulumi.Input[_builtins.str]] = None,
                 provider: Optional[pulumi.Input['CloudProvider']] = None,
                 provider_config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                 scan_schedule: Optional[pulumi.Input['ScanSchedule']] = None,
                 tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]]] = None,
                 __props__=None):
        """
        Insights Account for cloud resource scanning and analysis across AWS, Azure, and GCP.

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[_builtins.str] account_name: Name of the insights account.
        :param pulumi.Input[_builtins.str] environment: 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').
        :param pulumi.Input[_builtins.str] organization_name: The organization's name.
        :param pulumi.Input['CloudProvider'] provider: The cloud provider for scanning.
        :param pulumi.Input[Mapping[str, Any]] provider_config: Provider-specific configuration as a JSON object. For AWS, specify regions to scan: {"regions": ["us-west-1", "us-west-2"]}.
        :param pulumi.Input['ScanSchedule'] scan_schedule: Schedule for automated scanning. Use 'daily' to enable daily scans, or 'none' to disable scheduled scanning. Defaults to 'none'.
        :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] tags: Key-value tags to associate with the insights account.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: InsightsAccountArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Insights Account for cloud resource scanning and analysis across AWS, Azure, and GCP.

        :param str resource_name: The name of the resource.
        :param InsightsAccountArgs 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(InsightsAccountArgs, 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,
                 account_name: Optional[pulumi.Input[_builtins.str]] = None,
                 environment: Optional[pulumi.Input[_builtins.str]] = None,
                 organization_name: Optional[pulumi.Input[_builtins.str]] = None,
                 provider: Optional[pulumi.Input['CloudProvider']] = None,
                 provider_config: Optional[pulumi.Input[Mapping[str, Any]]] = None,
                 scan_schedule: Optional[pulumi.Input['ScanSchedule']] = None,
                 tags: Optional[pulumi.Input[Mapping[str, 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__ = InsightsAccountArgs.__new__(InsightsAccountArgs)

            if account_name is None and not opts.urn:
                raise TypeError("Missing required property 'account_name'")
            __props__.__dict__["account_name"] = account_name
            if environment is None and not opts.urn:
                raise TypeError("Missing required property 'environment'")
            __props__.__dict__["environment"] = environment
            if organization_name is None and not opts.urn:
                raise TypeError("Missing required property 'organization_name'")
            __props__.__dict__["organization_name"] = organization_name
            if provider is None and not opts.urn:
                raise TypeError("Missing required property 'provider'")
            __props__.__dict__["provider"] = provider
            __props__.__dict__["provider_config"] = provider_config
            if scan_schedule is None:
                scan_schedule = 'none'
            if scan_schedule is None and not opts.urn:
                raise TypeError("Missing required property 'scan_schedule'")
            __props__.__dict__["scan_schedule"] = scan_schedule
            __props__.__dict__["tags"] = tags
            __props__.__dict__["insights_account_id"] = None
            __props__.__dict__["scheduled_scan_enabled"] = None
        replace_on_changes = pulumi.ResourceOptions(replace_on_changes=["accountName", "organizationName", "provider"])
        opts = pulumi.ResourceOptions.merge(opts, replace_on_changes)
        super(InsightsAccount, __self__).__init__(
            'pulumiservice:index:InsightsAccount',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None) -> 'InsightsAccount':
        """
        Get an existing InsightsAccount 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.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = InsightsAccountArgs.__new__(InsightsAccountArgs)

        __props__.__dict__["account_name"] = None
        __props__.__dict__["environment"] = None
        __props__.__dict__["insights_account_id"] = None
        __props__.__dict__["organization_name"] = None
        __props__.__dict__["provider"] = None
        __props__.__dict__["provider_config"] = None
        __props__.__dict__["scan_schedule"] = None
        __props__.__dict__["scheduled_scan_enabled"] = None
        __props__.__dict__["tags"] = None
        return InsightsAccount(resource_name, opts=opts, __props__=__props__)

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

    @_builtins.property
    @pulumi.getter
    def environment(self) -> pulumi.Output[_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) -> pulumi.Output[_builtins.str]:
        """
        The insights account identifier.
        """
        return pulumi.get(self, "insights_account_id")

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

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

    @_builtins.property
    @pulumi.getter(name="providerConfig")
    def provider_config(self) -> pulumi.Output[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) -> pulumi.Output['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) -> pulumi.Output[_builtins.bool]:
        """
        Whether scheduled scanning is enabled.
        """
        return pulumi.get(self, "scheduled_scan_enabled")

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

