# 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

__all__ = [
    'GetInstanceVolumeResult',
    'AwaitableGetInstanceVolumeResult',
    'get_instance_volume',
    'get_instance_volume_output',
]

warnings.warn("""scaleway.index/getinstancevolume.getInstanceVolume has been deprecated in favor of scaleway.instance/getvolume.getVolume""", DeprecationWarning)

@pulumi.output_type
class GetInstanceVolumeResult:
    """
    A collection of values returned by getInstanceVolume.
    """
    def __init__(__self__, from_snapshot_id=None, id=None, migrate_to_sbs=None, name=None, organization_id=None, project_id=None, server_id=None, size_in_gb=None, tags=None, type=None, volume_id=None, zone=None):
        if from_snapshot_id and not isinstance(from_snapshot_id, str):
            raise TypeError("Expected argument 'from_snapshot_id' to be a str")
        pulumi.set(__self__, "from_snapshot_id", from_snapshot_id)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if migrate_to_sbs and not isinstance(migrate_to_sbs, bool):
            raise TypeError("Expected argument 'migrate_to_sbs' to be a bool")
        pulumi.set(__self__, "migrate_to_sbs", migrate_to_sbs)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if organization_id and not isinstance(organization_id, str):
            raise TypeError("Expected argument 'organization_id' to be a str")
        pulumi.set(__self__, "organization_id", organization_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 server_id and not isinstance(server_id, str):
            raise TypeError("Expected argument 'server_id' to be a str")
        pulumi.set(__self__, "server_id", server_id)
        if size_in_gb and not isinstance(size_in_gb, int):
            raise TypeError("Expected argument 'size_in_gb' to be a int")
        pulumi.set(__self__, "size_in_gb", size_in_gb)
        if tags and not isinstance(tags, list):
            raise TypeError("Expected argument 'tags' to be a list")
        pulumi.set(__self__, "tags", tags)
        if type and not isinstance(type, str):
            raise TypeError("Expected argument 'type' to be a str")
        pulumi.set(__self__, "type", type)
        if volume_id and not isinstance(volume_id, str):
            raise TypeError("Expected argument 'volume_id' to be a str")
        pulumi.set(__self__, "volume_id", volume_id)
        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(name="fromSnapshotId")
    def from_snapshot_id(self) -> _builtins.str:
        return pulumi.get(self, "from_snapshot_id")

    @_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="migrateToSbs")
    def migrate_to_sbs(self) -> _builtins.bool:
        return pulumi.get(self, "migrate_to_sbs")

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

    @_builtins.property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> _builtins.str:
        """
        The ID of the organization the volume is associated with.
        """
        return pulumi.get(self, "organization_id")

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

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

    @_builtins.property
    @pulumi.getter(name="sizeInGb")
    def size_in_gb(self) -> _builtins.int:
        return pulumi.get(self, "size_in_gb")

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

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

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

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


class AwaitableGetInstanceVolumeResult(GetInstanceVolumeResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetInstanceVolumeResult(
            from_snapshot_id=self.from_snapshot_id,
            id=self.id,
            migrate_to_sbs=self.migrate_to_sbs,
            name=self.name,
            organization_id=self.organization_id,
            project_id=self.project_id,
            server_id=self.server_id,
            size_in_gb=self.size_in_gb,
            tags=self.tags,
            type=self.type,
            volume_id=self.volume_id,
            zone=self.zone)


def get_instance_volume(name: Optional[_builtins.str] = None,
                        project_id: Optional[_builtins.str] = None,
                        volume_id: Optional[_builtins.str] = None,
                        zone: Optional[_builtins.str] = None,
                        opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetInstanceVolumeResult:
    """
    Gets information about an instance volume.


    :param _builtins.str name: The volume name.
           Only one of `name` and `volume_id` should be specified.
    :param _builtins.str project_id: The ID of the project the volume is associated with.
    :param _builtins.str volume_id: The volume id.
           Only one of `name` and `volume_id` should be specified.
    :param _builtins.str zone: `zone`) The zone in which the volume exists.
    """
    pulumi.log.warn("""get_instance_volume is deprecated: scaleway.index/getinstancevolume.getInstanceVolume has been deprecated in favor of scaleway.instance/getvolume.getVolume""")
    __args__ = dict()
    __args__['name'] = name
    __args__['projectId'] = project_id
    __args__['volumeId'] = volume_id
    __args__['zone'] = zone
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('scaleway:index/getInstanceVolume:getInstanceVolume', __args__, opts=opts, typ=GetInstanceVolumeResult).value

    return AwaitableGetInstanceVolumeResult(
        from_snapshot_id=pulumi.get(__ret__, 'from_snapshot_id'),
        id=pulumi.get(__ret__, 'id'),
        migrate_to_sbs=pulumi.get(__ret__, 'migrate_to_sbs'),
        name=pulumi.get(__ret__, 'name'),
        organization_id=pulumi.get(__ret__, 'organization_id'),
        project_id=pulumi.get(__ret__, 'project_id'),
        server_id=pulumi.get(__ret__, 'server_id'),
        size_in_gb=pulumi.get(__ret__, 'size_in_gb'),
        tags=pulumi.get(__ret__, 'tags'),
        type=pulumi.get(__ret__, 'type'),
        volume_id=pulumi.get(__ret__, 'volume_id'),
        zone=pulumi.get(__ret__, 'zone'))
def get_instance_volume_output(name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                               project_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
                               volume_id: 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[GetInstanceVolumeResult]:
    """
    Gets information about an instance volume.


    :param _builtins.str name: The volume name.
           Only one of `name` and `volume_id` should be specified.
    :param _builtins.str project_id: The ID of the project the volume is associated with.
    :param _builtins.str volume_id: The volume id.
           Only one of `name` and `volume_id` should be specified.
    :param _builtins.str zone: `zone`) The zone in which the volume exists.
    """
    pulumi.log.warn("""get_instance_volume is deprecated: scaleway.index/getinstancevolume.getInstanceVolume has been deprecated in favor of scaleway.instance/getvolume.getVolume""")
    __args__ = dict()
    __args__['name'] = name
    __args__['projectId'] = project_id
    __args__['volumeId'] = volume_id
    __args__['zone'] = zone
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('scaleway:index/getInstanceVolume:getInstanceVolume', __args__, opts=opts, typ=GetInstanceVolumeResult)
    return __ret__.apply(lambda __response__: GetInstanceVolumeResult(
        from_snapshot_id=pulumi.get(__response__, 'from_snapshot_id'),
        id=pulumi.get(__response__, 'id'),
        migrate_to_sbs=pulumi.get(__response__, 'migrate_to_sbs'),
        name=pulumi.get(__response__, 'name'),
        organization_id=pulumi.get(__response__, 'organization_id'),
        project_id=pulumi.get(__response__, 'project_id'),
        server_id=pulumi.get(__response__, 'server_id'),
        size_in_gb=pulumi.get(__response__, 'size_in_gb'),
        tags=pulumi.get(__response__, 'tags'),
        type=pulumi.get(__response__, 'type'),
        volume_id=pulumi.get(__response__, 'volume_id'),
        zone=pulumi.get(__response__, 'zone')))
