# coding=utf-8
# *** 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! ***

import copy
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__ = [
    'GetCockpitResult',
    'AwaitableGetCockpitResult',
    'get_cockpit',
    'get_cockpit_output',
]

@pulumi.output_type
class GetCockpitResult:
    """
    A collection of values returned by getCockpit.
    """
    def __init__(__self__, endpoints=None, id=None, plan=None, plan_id=None, project_id=None, push_urls=None):
        if endpoints and not isinstance(endpoints, list):
            raise TypeError("Expected argument 'endpoints' to be a list")
        pulumi.set(__self__, "endpoints", endpoints)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if plan and not isinstance(plan, str):
            raise TypeError("Expected argument 'plan' to be a str")
        pulumi.set(__self__, "plan", plan)
        if plan_id and not isinstance(plan_id, str):
            raise TypeError("Expected argument 'plan_id' to be a str")
        pulumi.set(__self__, "plan_id", plan_id)
        if project_id and not isinstance(project_id, str):
            raise TypeError("Expected argument 'project_id' to be a str")
        pulumi.set(__self__, "project_id", project_id)
        if push_urls and not isinstance(push_urls, list):
            raise TypeError("Expected argument 'push_urls' to be a list")
        pulumi.set(__self__, "push_urls", push_urls)

    @property
    @pulumi.getter
    def endpoints(self) -> Sequence['outputs.GetCockpitEndpointResult']:
        """
        (Deprecated) A list of [endpoints](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#endpoints) related to Cockpit, each with specific URLs:
        """
        return pulumi.get(self, "endpoints")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The provider-assigned unique ID for this managed resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def plan(self) -> str:
        return pulumi.get(self, "plan")

    @property
    @pulumi.getter(name="planId")
    def plan_id(self) -> str:
        """
        (Deprecated) ID of the current pricing plan
        """
        return pulumi.get(self, "plan_id")

    @property
    @pulumi.getter(name="projectId")
    def project_id(self) -> Optional[str]:
        return pulumi.get(self, "project_id")

    @property
    @pulumi.getter(name="pushUrls")
    def push_urls(self) -> Sequence['outputs.GetCockpitPushUrlResult']:
        return pulumi.get(self, "push_urls")


class AwaitableGetCockpitResult(GetCockpitResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetCockpitResult(
            endpoints=self.endpoints,
            id=self.id,
            plan=self.plan,
            plan_id=self.plan_id,
            project_id=self.project_id,
            push_urls=self.push_urls)


def get_cockpit(project_id: Optional[str] = None,
                opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCockpitResult:
    """
    > **Important:**  The data source `Cockpit` has been deprecated and will no longer be supported. Instead, use resource `Cockpit`.

    > **Note:**
    As of April 2024, Cockpit has introduced [regionalization](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#region) to offer more flexibility and resilience.
    If you have created customized dashboards with data for your Scaleway resources before April 2024, you will need to update your queries in Grafana, with the new regionalized data sources.

    The `Cockpit` data source is used to retrieve information about a Scaleway Cockpit associated with a given Project. This can be the default Project or a specific Project identified by its ID.

    Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information.

    ## Retrieve a Cockpit

    The following commands allow you to:

    - get information on the Cockpit associated with your Scaleway default Project
    - get information on the Cockpit associated with a specific Scaleway Project

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get the default Project's Cockpit
    main = scaleway.get_cockpit()
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get a specific Project's Cockpit
    main = scaleway.get_cockpit(project_id="11111111-1111-1111-1111-111111111111")
    ```


    :param str project_id: Specifies the ID of the Scaleway Project that the Cockpit is associated with. If not specified, it defaults to the Project ID specified in the provider configuration.
    """
    __args__ = dict()
    __args__['projectId'] = project_id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:index/getCockpit:getCockpit', __args__, opts=opts, typ=GetCockpitResult).value

    return AwaitableGetCockpitResult(
        endpoints=pulumi.get(__ret__, 'endpoints'),
        id=pulumi.get(__ret__, 'id'),
        plan=pulumi.get(__ret__, 'plan'),
        plan_id=pulumi.get(__ret__, 'plan_id'),
        project_id=pulumi.get(__ret__, 'project_id'),
        push_urls=pulumi.get(__ret__, 'push_urls'))
def get_cockpit_output(project_id: Optional[pulumi.Input[Optional[str]]] = None,
                       opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetCockpitResult]:
    """
    > **Important:**  The data source `Cockpit` has been deprecated and will no longer be supported. Instead, use resource `Cockpit`.

    > **Note:**
    As of April 2024, Cockpit has introduced [regionalization](https://www.scaleway.com/en/docs/observability/cockpit/concepts/#region) to offer more flexibility and resilience.
    If you have created customized dashboards with data for your Scaleway resources before April 2024, you will need to update your queries in Grafana, with the new regionalized data sources.

    The `Cockpit` data source is used to retrieve information about a Scaleway Cockpit associated with a given Project. This can be the default Project or a specific Project identified by its ID.

    Refer to Cockpit's [product documentation](https://www.scaleway.com/en/docs/observability/cockpit/concepts/) and [API documentation](https://www.scaleway.com/en/developers/api/cockpit/regional-api) for more information.

    ## Retrieve a Cockpit

    The following commands allow you to:

    - get information on the Cockpit associated with your Scaleway default Project
    - get information on the Cockpit associated with a specific Scaleway Project

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get the default Project's Cockpit
    main = scaleway.get_cockpit()
    ```

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get a specific Project's Cockpit
    main = scaleway.get_cockpit(project_id="11111111-1111-1111-1111-111111111111")
    ```


    :param str project_id: Specifies the ID of the Scaleway Project that the Cockpit is associated with. If not specified, it defaults to the Project ID specified in the provider configuration.
    """
    __args__ = dict()
    __args__['projectId'] = project_id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:index/getCockpit:getCockpit', __args__, opts=opts, typ=GetCockpitResult)
    return __ret__.apply(lambda __response__: GetCockpitResult(
        endpoints=pulumi.get(__response__, 'endpoints'),
        id=pulumi.get(__response__, 'id'),
        plan=pulumi.get(__response__, 'plan'),
        plan_id=pulumi.get(__response__, 'plan_id'),
        project_id=pulumi.get(__response__, 'project_id'),
        push_urls=pulumi.get(__response__, 'push_urls')))
