# 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
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__ = [
    'VolumeAttachmentArgs',
    'VolumeAttachmentArgsDict',
    'VolumeSchedulerHintArgs',
    'VolumeSchedulerHintArgsDict',
]

MYPY = False

if not MYPY:
    class VolumeAttachmentArgsDict(TypedDict):
        device: NotRequired[pulumi.Input[builtins.str]]
        id: NotRequired[pulumi.Input[builtins.str]]
        instance_id: NotRequired[pulumi.Input[builtins.str]]
elif False:
    VolumeAttachmentArgsDict: TypeAlias = Mapping[str, Any]

@pulumi.input_type
class VolumeAttachmentArgs:
    def __init__(__self__, *,
                 device: Optional[pulumi.Input[builtins.str]] = None,
                 id: Optional[pulumi.Input[builtins.str]] = None,
                 instance_id: Optional[pulumi.Input[builtins.str]] = None):
        if device is not None:
            pulumi.set(__self__, "device", device)
        if id is not None:
            pulumi.set(__self__, "id", id)
        if instance_id is not None:
            pulumi.set(__self__, "instance_id", instance_id)

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

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

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

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

    @property
    @pulumi.getter(name="instanceId")
    def instance_id(self) -> Optional[pulumi.Input[builtins.str]]:
        return pulumi.get(self, "instance_id")

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


if not MYPY:
    class VolumeSchedulerHintArgsDict(TypedDict):
        additional_properties: NotRequired[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]
        """
        Arbitrary key/value pairs of additional
        properties to pass to the scheduler.
        """
        different_hosts: NotRequired[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]
        """
        The volume should be scheduled on a 
        different host from the set of volumes specified in the list provided.
        """
        local_to_instance: NotRequired[pulumi.Input[builtins.str]]
        """
        An instance UUID. The volume should be 
        scheduled on the same host as the instance.
        """
        query: NotRequired[pulumi.Input[builtins.str]]
        """
        A conditional query that a back-end must pass in
        order to host a volume. The query must use the `JsonFilter` syntax
        which is described
        [here](https://docs.openstack.org/cinder/latest/configuration/block-storage/scheduler-filters.html#jsonfilter).
        At this time, only simple queries are supported. Compound queries using
        `and`, `or`, or `not` are not supported. An example of a simple query is:

        ```
        [“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
        ```
        """
        same_hosts: NotRequired[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]
        """
        A list of volume UUIDs. The volume should be
        scheduled on the same host as another volume specified in the list provided.
        """
elif False:
    VolumeSchedulerHintArgsDict: TypeAlias = Mapping[str, Any]

@pulumi.input_type
class VolumeSchedulerHintArgs:
    def __init__(__self__, *,
                 additional_properties: Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]] = None,
                 different_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None,
                 local_to_instance: Optional[pulumi.Input[builtins.str]] = None,
                 query: Optional[pulumi.Input[builtins.str]] = None,
                 same_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]] = None):
        """
        :param pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]] additional_properties: Arbitrary key/value pairs of additional
               properties to pass to the scheduler.
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] different_hosts: The volume should be scheduled on a 
               different host from the set of volumes specified in the list provided.
        :param pulumi.Input[builtins.str] local_to_instance: An instance UUID. The volume should be 
               scheduled on the same host as the instance.
        :param pulumi.Input[builtins.str] query: A conditional query that a back-end must pass in
               order to host a volume. The query must use the `JsonFilter` syntax
               which is described
               [here](https://docs.openstack.org/cinder/latest/configuration/block-storage/scheduler-filters.html#jsonfilter).
               At this time, only simple queries are supported. Compound queries using
               `and`, `or`, or `not` are not supported. An example of a simple query is:
               
               ```
               [“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
               ```
        :param pulumi.Input[Sequence[pulumi.Input[builtins.str]]] same_hosts: A list of volume UUIDs. The volume should be
               scheduled on the same host as another volume specified in the list provided.
        """
        if additional_properties is not None:
            pulumi.set(__self__, "additional_properties", additional_properties)
        if different_hosts is not None:
            pulumi.set(__self__, "different_hosts", different_hosts)
        if local_to_instance is not None:
            pulumi.set(__self__, "local_to_instance", local_to_instance)
        if query is not None:
            pulumi.set(__self__, "query", query)
        if same_hosts is not None:
            pulumi.set(__self__, "same_hosts", same_hosts)

    @property
    @pulumi.getter(name="additionalProperties")
    def additional_properties(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[builtins.str]]]]:
        """
        Arbitrary key/value pairs of additional
        properties to pass to the scheduler.
        """
        return pulumi.get(self, "additional_properties")

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

    @property
    @pulumi.getter(name="differentHosts")
    def different_hosts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        The volume should be scheduled on a 
        different host from the set of volumes specified in the list provided.
        """
        return pulumi.get(self, "different_hosts")

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

    @property
    @pulumi.getter(name="localToInstance")
    def local_to_instance(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        An instance UUID. The volume should be 
        scheduled on the same host as the instance.
        """
        return pulumi.get(self, "local_to_instance")

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

    @property
    @pulumi.getter
    def query(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        A conditional query that a back-end must pass in
        order to host a volume. The query must use the `JsonFilter` syntax
        which is described
        [here](https://docs.openstack.org/cinder/latest/configuration/block-storage/scheduler-filters.html#jsonfilter).
        At this time, only simple queries are supported. Compound queries using
        `and`, `or`, or `not` are not supported. An example of a simple query is:

        ```
        [“=”, “$backend_id”, “rbd:vol@ceph#cloud”]
        ```
        """
        return pulumi.get(self, "query")

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

    @property
    @pulumi.getter(name="sameHosts")
    def same_hosts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[builtins.str]]]]:
        """
        A list of volume UUIDs. The volume should be
        scheduled on the same host as another volume specified in the list provided.
        """
        return pulumi.get(self, "same_hosts")

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


