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

__all__ = [
    'GetServicePlanResult',
    'AwaitableGetServicePlanResult',
    'get_service_plan',
    'get_service_plan_output',
]

@pulumi.output_type
class GetServicePlanResult:
    """
    A collection of values returned by getServicePlan.
    """
    def __init__(__self__, backup_configs=None, base_price_usd=None, cloud_name=None, disk_space_cap_mb=None, disk_space_mb=None, disk_space_step_mb=None, id=None, max_memory_percent=None, node_count=None, object_storage_gb_price_usd=None, project=None, service_plan=None, service_type=None, shard_count=None, timeouts=None):
        if backup_configs and not isinstance(backup_configs, list):
            raise TypeError("Expected argument 'backup_configs' to be a list")
        pulumi.set(__self__, "backup_configs", backup_configs)
        if base_price_usd and not isinstance(base_price_usd, str):
            raise TypeError("Expected argument 'base_price_usd' to be a str")
        pulumi.set(__self__, "base_price_usd", base_price_usd)
        if cloud_name and not isinstance(cloud_name, str):
            raise TypeError("Expected argument 'cloud_name' to be a str")
        pulumi.set(__self__, "cloud_name", cloud_name)
        if disk_space_cap_mb and not isinstance(disk_space_cap_mb, int):
            raise TypeError("Expected argument 'disk_space_cap_mb' to be a int")
        pulumi.set(__self__, "disk_space_cap_mb", disk_space_cap_mb)
        if disk_space_mb and not isinstance(disk_space_mb, int):
            raise TypeError("Expected argument 'disk_space_mb' to be a int")
        pulumi.set(__self__, "disk_space_mb", disk_space_mb)
        if disk_space_step_mb and not isinstance(disk_space_step_mb, int):
            raise TypeError("Expected argument 'disk_space_step_mb' to be a int")
        pulumi.set(__self__, "disk_space_step_mb", disk_space_step_mb)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if max_memory_percent and not isinstance(max_memory_percent, int):
            raise TypeError("Expected argument 'max_memory_percent' to be a int")
        pulumi.set(__self__, "max_memory_percent", max_memory_percent)
        if node_count and not isinstance(node_count, int):
            raise TypeError("Expected argument 'node_count' to be a int")
        pulumi.set(__self__, "node_count", node_count)
        if object_storage_gb_price_usd and not isinstance(object_storage_gb_price_usd, str):
            raise TypeError("Expected argument 'object_storage_gb_price_usd' to be a str")
        pulumi.set(__self__, "object_storage_gb_price_usd", object_storage_gb_price_usd)
        if project and not isinstance(project, str):
            raise TypeError("Expected argument 'project' to be a str")
        pulumi.set(__self__, "project", project)
        if service_plan and not isinstance(service_plan, str):
            raise TypeError("Expected argument 'service_plan' to be a str")
        pulumi.set(__self__, "service_plan", service_plan)
        if service_type and not isinstance(service_type, str):
            raise TypeError("Expected argument 'service_type' to be a str")
        pulumi.set(__self__, "service_type", service_type)
        if shard_count and not isinstance(shard_count, int):
            raise TypeError("Expected argument 'shard_count' to be a int")
        pulumi.set(__self__, "shard_count", shard_count)
        if timeouts and not isinstance(timeouts, dict):
            raise TypeError("Expected argument 'timeouts' to be a dict")
        pulumi.set(__self__, "timeouts", timeouts)

    @_builtins.property
    @pulumi.getter(name="backupConfigs")
    def backup_configs(self) -> Optional[Sequence['outputs.GetServicePlanBackupConfigResult']]:
        """
        Backup configuration for this service plan.
        """
        return pulumi.get(self, "backup_configs")

    @_builtins.property
    @pulumi.getter(name="basePriceUsd")
    def base_price_usd(self) -> _builtins.str:
        """
        Hourly service price in this region in USD.
        """
        return pulumi.get(self, "base_price_usd")

    @_builtins.property
    @pulumi.getter(name="cloudName")
    def cloud_name(self) -> _builtins.str:
        """
        Cloud region name.
        """
        return pulumi.get(self, "cloud_name")

    @_builtins.property
    @pulumi.getter(name="diskSpaceCapMb")
    def disk_space_cap_mb(self) -> _builtins.int:
        """
        Maximum amount of disk space possible for the plan in the given region.
        """
        return pulumi.get(self, "disk_space_cap_mb")

    @_builtins.property
    @pulumi.getter(name="diskSpaceMb")
    def disk_space_mb(self) -> _builtins.int:
        """
        Combined amount of service disk space of all service nodes in megabytes.
        """
        return pulumi.get(self, "disk_space_mb")

    @_builtins.property
    @pulumi.getter(name="diskSpaceStepMb")
    def disk_space_step_mb(self) -> _builtins.int:
        """
        Disk space change step size.
        """
        return pulumi.get(self, "disk_space_step_mb")

    @_builtins.property
    @pulumi.getter
    def id(self) -> _builtins.str:
        """
        Resource ID composed as: `project/service_type/service_plan/cloud_name`.
        """
        return pulumi.get(self, "id")

    @_builtins.property
    @pulumi.getter(name="maxMemoryPercent")
    def max_memory_percent(self) -> _builtins.int:
        """
        Maximum amount of system memory as a percentage (0-100) the service can actually use after taking into account management overhead. This is relevant for memory bound services for which some service management operations require allocating proportional amount of memory on top the basic load.
        """
        return pulumi.get(self, "max_memory_percent")

    @_builtins.property
    @pulumi.getter(name="nodeCount")
    def node_count(self) -> _builtins.int:
        """
        Number of nodes in this service plan.
        """
        return pulumi.get(self, "node_count")

    @_builtins.property
    @pulumi.getter(name="objectStorageGbPriceUsd")
    def object_storage_gb_price_usd(self) -> _builtins.str:
        """
        Hourly object storage price per GiB in this region in USD.
        """
        return pulumi.get(self, "object_storage_gb_price_usd")

    @_builtins.property
    @pulumi.getter
    def project(self) -> _builtins.str:
        """
        Project name.
        """
        return pulumi.get(self, "project")

    @_builtins.property
    @pulumi.getter(name="servicePlan")
    def service_plan(self) -> _builtins.str:
        """
        Service plan name.
        """
        return pulumi.get(self, "service_plan")

    @_builtins.property
    @pulumi.getter(name="serviceType")
    def service_type(self) -> _builtins.str:
        """
        Service type code.
        """
        return pulumi.get(self, "service_type")

    @_builtins.property
    @pulumi.getter(name="shardCount")
    def shard_count(self) -> _builtins.int:
        """
        Number of shards in this service plan.
        """
        return pulumi.get(self, "shard_count")

    @_builtins.property
    @pulumi.getter
    def timeouts(self) -> Optional['outputs.GetServicePlanTimeoutsResult']:
        return pulumi.get(self, "timeouts")


class AwaitableGetServicePlanResult(GetServicePlanResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetServicePlanResult(
            backup_configs=self.backup_configs,
            base_price_usd=self.base_price_usd,
            cloud_name=self.cloud_name,
            disk_space_cap_mb=self.disk_space_cap_mb,
            disk_space_mb=self.disk_space_mb,
            disk_space_step_mb=self.disk_space_step_mb,
            id=self.id,
            max_memory_percent=self.max_memory_percent,
            node_count=self.node_count,
            object_storage_gb_price_usd=self.object_storage_gb_price_usd,
            project=self.project,
            service_plan=self.service_plan,
            service_type=self.service_type,
            shard_count=self.shard_count,
            timeouts=self.timeouts)


def get_service_plan(backup_configs: Optional[Sequence[Union['GetServicePlanBackupConfigArgs', 'GetServicePlanBackupConfigArgsDict']]] = None,
                     cloud_name: Optional[_builtins.str] = None,
                     project: Optional[_builtins.str] = None,
                     service_plan: Optional[_builtins.str] = None,
                     service_type: Optional[_builtins.str] = None,
                     timeouts: Optional[Union['GetServicePlanTimeoutsArgs', 'GetServicePlanTimeoutsArgsDict']] = None,
                     opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetServicePlanResult:
    """
    Gets detailed information about a specific service plan, including specifications and pricing for a cloud region.

    **This resource is in the beta stage and may change without notice.** Set
    the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.


    :param Sequence[Union['GetServicePlanBackupConfigArgs', 'GetServicePlanBackupConfigArgsDict']] backup_configs: Backup configuration for this service plan.
    :param _builtins.str cloud_name: Cloud region name.
    :param _builtins.str project: Project name.
    :param _builtins.str service_plan: Service plan name.
    :param _builtins.str service_type: Service type code.
    """
    __args__ = dict()
    __args__['backupConfigs'] = backup_configs
    __args__['cloudName'] = cloud_name
    __args__['project'] = project
    __args__['servicePlan'] = service_plan
    __args__['serviceType'] = service_type
    __args__['timeouts'] = timeouts
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('aiven:index/getServicePlan:getServicePlan', __args__, opts=opts, typ=GetServicePlanResult).value

    return AwaitableGetServicePlanResult(
        backup_configs=pulumi.get(__ret__, 'backup_configs'),
        base_price_usd=pulumi.get(__ret__, 'base_price_usd'),
        cloud_name=pulumi.get(__ret__, 'cloud_name'),
        disk_space_cap_mb=pulumi.get(__ret__, 'disk_space_cap_mb'),
        disk_space_mb=pulumi.get(__ret__, 'disk_space_mb'),
        disk_space_step_mb=pulumi.get(__ret__, 'disk_space_step_mb'),
        id=pulumi.get(__ret__, 'id'),
        max_memory_percent=pulumi.get(__ret__, 'max_memory_percent'),
        node_count=pulumi.get(__ret__, 'node_count'),
        object_storage_gb_price_usd=pulumi.get(__ret__, 'object_storage_gb_price_usd'),
        project=pulumi.get(__ret__, 'project'),
        service_plan=pulumi.get(__ret__, 'service_plan'),
        service_type=pulumi.get(__ret__, 'service_type'),
        shard_count=pulumi.get(__ret__, 'shard_count'),
        timeouts=pulumi.get(__ret__, 'timeouts'))
def get_service_plan_output(backup_configs: Optional[pulumi.Input[Optional[Sequence[Union['GetServicePlanBackupConfigArgs', 'GetServicePlanBackupConfigArgsDict']]]]] = None,
                            cloud_name: Optional[pulumi.Input[_builtins.str]] = None,
                            project: Optional[pulumi.Input[_builtins.str]] = None,
                            service_plan: Optional[pulumi.Input[_builtins.str]] = None,
                            service_type: Optional[pulumi.Input[_builtins.str]] = None,
                            timeouts: Optional[pulumi.Input[Optional[Union['GetServicePlanTimeoutsArgs', 'GetServicePlanTimeoutsArgsDict']]]] = None,
                            opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServicePlanResult]:
    """
    Gets detailed information about a specific service plan, including specifications and pricing for a cloud region.

    **This resource is in the beta stage and may change without notice.** Set
    the `PROVIDER_AIVEN_ENABLE_BETA` environment variable to use the resource.


    :param Sequence[Union['GetServicePlanBackupConfigArgs', 'GetServicePlanBackupConfigArgsDict']] backup_configs: Backup configuration for this service plan.
    :param _builtins.str cloud_name: Cloud region name.
    :param _builtins.str project: Project name.
    :param _builtins.str service_plan: Service plan name.
    :param _builtins.str service_type: Service type code.
    """
    __args__ = dict()
    __args__['backupConfigs'] = backup_configs
    __args__['cloudName'] = cloud_name
    __args__['project'] = project
    __args__['servicePlan'] = service_plan
    __args__['serviceType'] = service_type
    __args__['timeouts'] = timeouts
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('aiven:index/getServicePlan:getServicePlan', __args__, opts=opts, typ=GetServicePlanResult)
    return __ret__.apply(lambda __response__: GetServicePlanResult(
        backup_configs=pulumi.get(__response__, 'backup_configs'),
        base_price_usd=pulumi.get(__response__, 'base_price_usd'),
        cloud_name=pulumi.get(__response__, 'cloud_name'),
        disk_space_cap_mb=pulumi.get(__response__, 'disk_space_cap_mb'),
        disk_space_mb=pulumi.get(__response__, 'disk_space_mb'),
        disk_space_step_mb=pulumi.get(__response__, 'disk_space_step_mb'),
        id=pulumi.get(__response__, 'id'),
        max_memory_percent=pulumi.get(__response__, 'max_memory_percent'),
        node_count=pulumi.get(__response__, 'node_count'),
        object_storage_gb_price_usd=pulumi.get(__response__, 'object_storage_gb_price_usd'),
        project=pulumi.get(__response__, 'project'),
        service_plan=pulumi.get(__response__, 'service_plan'),
        service_type=pulumi.get(__response__, 'service_type'),
        shard_count=pulumi.get(__response__, 'shard_count'),
        timeouts=pulumi.get(__response__, 'timeouts')))
