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

__all__ = ['BlockStorageVolumeSnapshotArgs', 'BlockStorageVolumeSnapshot']

@pulumi.input_type
class BlockStorageVolumeSnapshotArgs:
    def __init__(__self__, *,
                 volume: pulumi.Input['BlockStorageVolumeSnapshotVolumeArgs'],
                 zone: pulumi.Input[str],
                 labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 timeouts: Optional[pulumi.Input['BlockStorageVolumeSnapshotTimeoutsArgs']] = None):
        """
        The set of arguments for constructing a BlockStorageVolumeSnapshot resource.
        :param pulumi.Input['BlockStorageVolumeSnapshotVolumeArgs'] volume: Volume from which to create a snapshot.
        :param pulumi.Input[str] zone: ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Resource labels.
        :param pulumi.Input[str] name: Volume snapshot name.
        """
        pulumi.set(__self__, "volume", volume)
        pulumi.set(__self__, "zone", zone)
        if labels is not None:
            pulumi.set(__self__, "labels", labels)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if timeouts is not None:
            pulumi.set(__self__, "timeouts", timeouts)

    @property
    @pulumi.getter
    def volume(self) -> pulumi.Input['BlockStorageVolumeSnapshotVolumeArgs']:
        """
        Volume from which to create a snapshot.
        """
        return pulumi.get(self, "volume")

    @volume.setter
    def volume(self, value: pulumi.Input['BlockStorageVolumeSnapshotVolumeArgs']):
        pulumi.set(self, "volume", value)

    @property
    @pulumi.getter
    def zone(self) -> pulumi.Input[str]:
        """
        ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
        """
        return pulumi.get(self, "zone")

    @zone.setter
    def zone(self, value: pulumi.Input[str]):
        pulumi.set(self, "zone", value)

    @property
    @pulumi.getter
    def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        Resource labels.
        """
        return pulumi.get(self, "labels")

    @labels.setter
    def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "labels", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

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

    @timeouts.setter
    def timeouts(self, value: Optional[pulumi.Input['BlockStorageVolumeSnapshotTimeoutsArgs']]):
        pulumi.set(self, "timeouts", value)


@pulumi.input_type
class _BlockStorageVolumeSnapshotState:
    def __init__(__self__, *,
                 created_at: Optional[pulumi.Input[str]] = None,
                 labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 size: Optional[pulumi.Input[int]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 timeouts: Optional[pulumi.Input['BlockStorageVolumeSnapshotTimeoutsArgs']] = None,
                 volume: Optional[pulumi.Input['BlockStorageVolumeSnapshotVolumeArgs']] = None,
                 zone: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering BlockStorageVolumeSnapshot resources.
        :param pulumi.Input[str] created_at: Snapshot creation date.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Resource labels.
        :param pulumi.Input[str] name: Volume snapshot name.
        :param pulumi.Input[int] size: Snapshot size in GB.
        :param pulumi.Input[str] state: Snapshot state.
        :param pulumi.Input['BlockStorageVolumeSnapshotVolumeArgs'] volume: Volume from which to create a snapshot.
        :param pulumi.Input[str] zone: ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
        """
        if created_at is not None:
            pulumi.set(__self__, "created_at", created_at)
        if labels is not None:
            pulumi.set(__self__, "labels", labels)
        if name is not None:
            pulumi.set(__self__, "name", name)
        if size is not None:
            pulumi.set(__self__, "size", size)
        if state is not None:
            pulumi.set(__self__, "state", state)
        if timeouts is not None:
            pulumi.set(__self__, "timeouts", timeouts)
        if volume is not None:
            pulumi.set(__self__, "volume", volume)
        if zone is not None:
            pulumi.set(__self__, "zone", zone)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> Optional[pulumi.Input[str]]:
        """
        Snapshot creation date.
        """
        return pulumi.get(self, "created_at")

    @created_at.setter
    def created_at(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "created_at", value)

    @property
    @pulumi.getter
    def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
        """
        Resource labels.
        """
        return pulumi.get(self, "labels")

    @labels.setter
    def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
        pulumi.set(self, "labels", value)

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

    @name.setter
    def name(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "name", value)

    @property
    @pulumi.getter
    def size(self) -> Optional[pulumi.Input[int]]:
        """
        Snapshot size in GB.
        """
        return pulumi.get(self, "size")

    @size.setter
    def size(self, value: Optional[pulumi.Input[int]]):
        pulumi.set(self, "size", value)

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

    @state.setter
    def state(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "state", value)

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

    @timeouts.setter
    def timeouts(self, value: Optional[pulumi.Input['BlockStorageVolumeSnapshotTimeoutsArgs']]):
        pulumi.set(self, "timeouts", value)

    @property
    @pulumi.getter
    def volume(self) -> Optional[pulumi.Input['BlockStorageVolumeSnapshotVolumeArgs']]:
        """
        Volume from which to create a snapshot.
        """
        return pulumi.get(self, "volume")

    @volume.setter
    def volume(self, value: Optional[pulumi.Input['BlockStorageVolumeSnapshotVolumeArgs']]):
        pulumi.set(self, "volume", value)

    @property
    @pulumi.getter
    def zone(self) -> Optional[pulumi.Input[str]]:
        """
        ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
        """
        return pulumi.get(self, "zone")

    @zone.setter
    def zone(self, value: Optional[pulumi.Input[str]]):
        pulumi.set(self, "zone", value)


class BlockStorageVolumeSnapshot(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 timeouts: Optional[pulumi.Input[Union['BlockStorageVolumeSnapshotTimeoutsArgs', 'BlockStorageVolumeSnapshotTimeoutsArgsDict']]] = None,
                 volume: Optional[pulumi.Input[Union['BlockStorageVolumeSnapshotVolumeArgs', 'BlockStorageVolumeSnapshotVolumeArgsDict']]] = None,
                 zone: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Manage [Exoscale Block Storage](https://community.exoscale.com/documentation/block-storage/) Volume Snapshot.

        Block Storage offers persistent externally attached volumes for your workloads.

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Resource labels.
        :param pulumi.Input[str] name: Volume snapshot name.
        :param pulumi.Input[Union['BlockStorageVolumeSnapshotVolumeArgs', 'BlockStorageVolumeSnapshotVolumeArgsDict']] volume: Volume from which to create a snapshot.
        :param pulumi.Input[str] zone: ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: BlockStorageVolumeSnapshotArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manage [Exoscale Block Storage](https://community.exoscale.com/documentation/block-storage/) Volume Snapshot.

        Block Storage offers persistent externally attached volumes for your workloads.

        :param str resource_name: The name of the resource.
        :param BlockStorageVolumeSnapshotArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(BlockStorageVolumeSnapshotArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 timeouts: Optional[pulumi.Input[Union['BlockStorageVolumeSnapshotTimeoutsArgs', 'BlockStorageVolumeSnapshotTimeoutsArgsDict']]] = None,
                 volume: Optional[pulumi.Input[Union['BlockStorageVolumeSnapshotVolumeArgs', 'BlockStorageVolumeSnapshotVolumeArgsDict']]] = None,
                 zone: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = BlockStorageVolumeSnapshotArgs.__new__(BlockStorageVolumeSnapshotArgs)

            __props__.__dict__["labels"] = labels
            __props__.__dict__["name"] = name
            __props__.__dict__["timeouts"] = timeouts
            if volume is None and not opts.urn:
                raise TypeError("Missing required property 'volume'")
            __props__.__dict__["volume"] = volume
            if zone is None and not opts.urn:
                raise TypeError("Missing required property 'zone'")
            __props__.__dict__["zone"] = zone
            __props__.__dict__["created_at"] = None
            __props__.__dict__["size"] = None
            __props__.__dict__["state"] = None
        super(BlockStorageVolumeSnapshot, __self__).__init__(
            'exoscale:index/blockStorageVolumeSnapshot:BlockStorageVolumeSnapshot',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            created_at: Optional[pulumi.Input[str]] = None,
            labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
            name: Optional[pulumi.Input[str]] = None,
            size: Optional[pulumi.Input[int]] = None,
            state: Optional[pulumi.Input[str]] = None,
            timeouts: Optional[pulumi.Input[Union['BlockStorageVolumeSnapshotTimeoutsArgs', 'BlockStorageVolumeSnapshotTimeoutsArgsDict']]] = None,
            volume: Optional[pulumi.Input[Union['BlockStorageVolumeSnapshotVolumeArgs', 'BlockStorageVolumeSnapshotVolumeArgsDict']]] = None,
            zone: Optional[pulumi.Input[str]] = None) -> 'BlockStorageVolumeSnapshot':
        """
        Get an existing BlockStorageVolumeSnapshot resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] created_at: Snapshot creation date.
        :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Resource labels.
        :param pulumi.Input[str] name: Volume snapshot name.
        :param pulumi.Input[int] size: Snapshot size in GB.
        :param pulumi.Input[str] state: Snapshot state.
        :param pulumi.Input[Union['BlockStorageVolumeSnapshotVolumeArgs', 'BlockStorageVolumeSnapshotVolumeArgsDict']] volume: Volume from which to create a snapshot.
        :param pulumi.Input[str] zone: ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _BlockStorageVolumeSnapshotState.__new__(_BlockStorageVolumeSnapshotState)

        __props__.__dict__["created_at"] = created_at
        __props__.__dict__["labels"] = labels
        __props__.__dict__["name"] = name
        __props__.__dict__["size"] = size
        __props__.__dict__["state"] = state
        __props__.__dict__["timeouts"] = timeouts
        __props__.__dict__["volume"] = volume
        __props__.__dict__["zone"] = zone
        return BlockStorageVolumeSnapshot(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> pulumi.Output[str]:
        """
        Snapshot creation date.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter
    def labels(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
        """
        Resource labels.
        """
        return pulumi.get(self, "labels")

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

    @property
    @pulumi.getter
    def size(self) -> pulumi.Output[int]:
        """
        Snapshot size in GB.
        """
        return pulumi.get(self, "size")

    @property
    @pulumi.getter
    def state(self) -> pulumi.Output[str]:
        """
        Snapshot state.
        """
        return pulumi.get(self, "state")

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

    @property
    @pulumi.getter
    def volume(self) -> pulumi.Output['outputs.BlockStorageVolumeSnapshotVolume']:
        """
        Volume from which to create a snapshot.
        """
        return pulumi.get(self, "volume")

    @property
    @pulumi.getter
    def zone(self) -> pulumi.Output[str]:
        """
        ❗ The Exoscale [Zone](https://www.exoscale.com/datacenters/) name.
        """
        return pulumi.get(self, "zone")

