# 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

__all__ = [
    'GetCockpitPlanResult',
    'AwaitableGetCockpitPlanResult',
    'get_cockpit_plan',
    'get_cockpit_plan_output',
]

@pulumi.output_type
class GetCockpitPlanResult:
    """
    A collection of values returned by getCockpitPlan.
    """
    def __init__(__self__, id=None, name=None):
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)

    @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 name(self) -> str:
        return pulumi.get(self, "name")


class AwaitableGetCockpitPlanResult(GetCockpitPlanResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetCockpitPlanResult(
            id=self.id,
            name=self.name)


def get_cockpit_plan(name: Optional[str] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCockpitPlanResult:
    """
    The `get_cockpit_plan` data source is used to fetch details about a specific Scaleway Cockpit pricing plan. This information can then be used to configure resources like `Cockpit`.

    Find out more about [pricing plans](https://console.scaleway.com/cockpit/plans) in the Scaleway console.

    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.

    ## Fetch and associate a pricing plan to a Cockpit

    The following command shows how to fetch information about the `premium` pricing plan and how to associate it with the Cockpit of your Scaleway default Project.

    ```python
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway

    premium = scaleway.get_cockpit_plan(name="premium")
    main = scaleway.Cockpit("main", plan=premium.id)
    ```


    :param str name: Name of the pricing plan you want to retrieve information about.
    """
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:index/getCockpitPlan:getCockpitPlan', __args__, opts=opts, typ=GetCockpitPlanResult).value

    return AwaitableGetCockpitPlanResult(
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'))
def get_cockpit_plan_output(name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCockpitPlanResult]:
    """
    The `get_cockpit_plan` data source is used to fetch details about a specific Scaleway Cockpit pricing plan. This information can then be used to configure resources like `Cockpit`.

    Find out more about [pricing plans](https://console.scaleway.com/cockpit/plans) in the Scaleway console.

    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.

    ## Fetch and associate a pricing plan to a Cockpit

    The following command shows how to fetch information about the `premium` pricing plan and how to associate it with the Cockpit of your Scaleway default Project.

    ```python
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway

    premium = scaleway.get_cockpit_plan(name="premium")
    main = scaleway.Cockpit("main", plan=premium.id)
    ```


    :param str name: Name of the pricing plan you want to retrieve information about.
    """
    __args__ = dict()
    __args__['name'] = name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:index/getCockpitPlan:getCockpitPlan', __args__, opts=opts, typ=GetCockpitPlanResult)
    return __ret__.apply(lambda __response__: GetCockpitPlanResult(
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name')))
