# 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

__all__ = [
    'GetInstanceGroupResult',
    'AwaitableGetInstanceGroupResult',
    'get_instance_group',
    'get_instance_group_output',
]

@pulumi.output_type
class GetInstanceGroupResult:
    """
    A collection of values returned by getInstanceGroup.
    """
    def __init__(__self__, capacities=None, created_at=None, delete_servers_on_destroy=None, id=None, instance_group_id=None, load_balancers=None, name=None, project_id=None, tags=None, template_id=None, updated_at=None, zone=None):
        if capacities and not isinstance(capacities, list):
            raise TypeError("Expected argument 'capacities' to be a list")
        pulumi.set(__self__, "capacities", capacities)
        if created_at and not isinstance(created_at, str):
            raise TypeError("Expected argument 'created_at' to be a str")
        pulumi.set(__self__, "created_at", created_at)
        if delete_servers_on_destroy and not isinstance(delete_servers_on_destroy, bool):
            raise TypeError("Expected argument 'delete_servers_on_destroy' to be a bool")
        pulumi.set(__self__, "delete_servers_on_destroy", delete_servers_on_destroy)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if instance_group_id and not isinstance(instance_group_id, str):
            raise TypeError("Expected argument 'instance_group_id' to be a str")
        pulumi.set(__self__, "instance_group_id", instance_group_id)
        if load_balancers and not isinstance(load_balancers, list):
            raise TypeError("Expected argument 'load_balancers' to be a list")
        pulumi.set(__self__, "load_balancers", load_balancers)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        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 tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if template_id and not isinstance(template_id, str):
            raise TypeError("Expected argument 'template_id' to be a str")
        pulumi.set(__self__, "template_id", template_id)
        if updated_at and not isinstance(updated_at, str):
            raise TypeError("Expected argument 'updated_at' to be a str")
        pulumi.set(__self__, "updated_at", updated_at)
        if zone and not isinstance(zone, str):
            raise TypeError("Expected argument 'zone' to be a str")
        pulumi.set(__self__, "zone", zone)

    @_builtins.property
    @pulumi.getter
    def capacities(self) -> Sequence['outputs.GetInstanceGroupCapacityResult']:
        return pulumi.get(self, "capacities")

    @_builtins.property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> _builtins.str:
        return pulumi.get(self, "created_at")

    @_builtins.property
    @pulumi.getter(name="deleteServersOnDestroy")
    def delete_servers_on_destroy(self) -> _builtins.bool:
        return pulumi.get(self, "delete_servers_on_destroy")

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

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

    @_builtins.property
    @pulumi.getter(name="loadBalancers")
    def load_balancers(self) -> Sequence['outputs.GetInstanceGroupLoadBalancerResult']:
        return pulumi.get(self, "load_balancers")

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

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

    @_builtins.property
    @pulumi.getter
    def tags(self) -> Sequence[_builtins.str]:
        return pulumi.get(self, "tags")

    @_builtins.property
    @pulumi.getter(name="templateId")
    def template_id(self) -> _builtins.str:
        return pulumi.get(self, "template_id")

    @_builtins.property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> _builtins.str:
        return pulumi.get(self, "updated_at")

    @_builtins.property
    @pulumi.getter
    def zone(self) -> Optional[_builtins.str]:
        return pulumi.get(self, "zone")


class AwaitableGetInstanceGroupResult(GetInstanceGroupResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetInstanceGroupResult(
            capacities=self.capacities,
            created_at=self.created_at,
            delete_servers_on_destroy=self.delete_servers_on_destroy,
            id=self.id,
            instance_group_id=self.instance_group_id,
            load_balancers=self.load_balancers,
            name=self.name,
            project_id=self.project_id,
            tags=self.tags,
            template_id=self.template_id,
            updated_at=self.updated_at,
            zone=self.zone)


def get_instance_group(instance_group_id: Optional[_builtins.str] = None,
                       name: Optional[_builtins.str] = None,
                       zone: Optional[_builtins.str] = None,
                       opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInstanceGroupResult:
    """
    Gets information about an Autoscaling Instance group.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by name
    by_name = scaleway.autoscaling.get_instance_group(name="my-instance-group")
    # Get info by ID
    by_id = scaleway.autoscaling.get_instance_group(instance_group_id="11111111-1111-1111-1111-111111111111")
    ```


    :param _builtins.str instance_group_id: The ID of the Instance group. Only one of `name` and `instance_group_id` should be specified.
    :param _builtins.str name: The name of the Instance group. Only one of `name` and `instance_group_id` should be specified.
    :param _builtins.str zone: `zone`) The zone in which the Instance group exists.
    """
    __args__ = dict()
    __args__['instanceGroupId'] = instance_group_id
    __args__['name'] = name
    __args__['zone'] = zone
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:autoscaling/getInstanceGroup:getInstanceGroup', __args__, opts=opts, typ=GetInstanceGroupResult).value

    return AwaitableGetInstanceGroupResult(
        capacities=pulumi.get(__ret__, 'capacities'),
        created_at=pulumi.get(__ret__, 'created_at'),
        delete_servers_on_destroy=pulumi.get(__ret__, 'delete_servers_on_destroy'),
        id=pulumi.get(__ret__, 'id'),
        instance_group_id=pulumi.get(__ret__, 'instance_group_id'),
        load_balancers=pulumi.get(__ret__, 'load_balancers'),
        name=pulumi.get(__ret__, 'name'),
        project_id=pulumi.get(__ret__, 'project_id'),
        tags=pulumi.get(__ret__, 'tags'),
        template_id=pulumi.get(__ret__, 'template_id'),
        updated_at=pulumi.get(__ret__, 'updated_at'),
        zone=pulumi.get(__ret__, 'zone'))
def get_instance_group_output(instance_group_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                              name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                              zone: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                              opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetInstanceGroupResult]:
    """
    Gets information about an Autoscaling Instance group.

    ## Example Usage

    ```python
    import pulumi
    import pulumi_scaleway as scaleway

    # Get info by name
    by_name = scaleway.autoscaling.get_instance_group(name="my-instance-group")
    # Get info by ID
    by_id = scaleway.autoscaling.get_instance_group(instance_group_id="11111111-1111-1111-1111-111111111111")
    ```


    :param _builtins.str instance_group_id: The ID of the Instance group. Only one of `name` and `instance_group_id` should be specified.
    :param _builtins.str name: The name of the Instance group. Only one of `name` and `instance_group_id` should be specified.
    :param _builtins.str zone: `zone`) The zone in which the Instance group exists.
    """
    __args__ = dict()
    __args__['instanceGroupId'] = instance_group_id
    __args__['name'] = name
    __args__['zone'] = zone
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:autoscaling/getInstanceGroup:getInstanceGroup', __args__, opts=opts, typ=GetInstanceGroupResult)
    return __ret__.apply(lambda __response__: GetInstanceGroupResult(
        capacities=pulumi.get(__response__, 'capacities'),
        created_at=pulumi.get(__response__, 'created_at'),
        delete_servers_on_destroy=pulumi.get(__response__, 'delete_servers_on_destroy'),
        id=pulumi.get(__response__, 'id'),
        instance_group_id=pulumi.get(__response__, 'instance_group_id'),
        load_balancers=pulumi.get(__response__, 'load_balancers'),
        name=pulumi.get(__response__, 'name'),
        project_id=pulumi.get(__response__, 'project_id'),
        tags=pulumi.get(__response__, 'tags'),
        template_id=pulumi.get(__response__, 'template_id'),
        updated_at=pulumi.get(__response__, 'updated_at'),
        zone=pulumi.get(__response__, 'zone')))
