# 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 pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import _utilities

__all__ = ['CollectionMountArgs', 'CollectionMount']

@pulumi.input_type
class CollectionMountArgs:
    def __init__(__self__, *,
                 path: pulumi.Input[str],
                 virtual_instance_id: pulumi.Input[str]):
        """
        The set of arguments for constructing a CollectionMount resource.
        :param pulumi.Input[str] path: Collection path to be mounted, in the form workspace.collection
        :param pulumi.Input[str] virtual_instance_id: Virtual Instance id
        """
        pulumi.set(__self__, "path", path)
        pulumi.set(__self__, "virtual_instance_id", virtual_instance_id)

    @property
    @pulumi.getter
    def path(self) -> pulumi.Input[str]:
        """
        Collection path to be mounted, in the form workspace.collection
        """
        return pulumi.get(self, "path")

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

    @property
    @pulumi.getter(name="virtualInstanceId")
    def virtual_instance_id(self) -> pulumi.Input[str]:
        """
        Virtual Instance id
        """
        return pulumi.get(self, "virtual_instance_id")

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


@pulumi.input_type
class _CollectionMountState:
    def __init__(__self__, *,
                 created_at: Optional[pulumi.Input[str]] = None,
                 last_refresh_time: Optional[pulumi.Input[int]] = None,
                 path: Optional[pulumi.Input[str]] = None,
                 rrn: Optional[pulumi.Input[str]] = None,
                 snapshot_expiration_time: Optional[pulumi.Input[int]] = None,
                 state: Optional[pulumi.Input[str]] = None,
                 virtual_instance_id: Optional[pulumi.Input[str]] = None,
                 virtual_instance_rrn: Optional[pulumi.Input[str]] = None):
        """
        Input properties used for looking up and filtering CollectionMount resources.
        :param pulumi.Input[str] created_at: ISO 8601 date when the mount was created.
        :param pulumi.Input[int] last_refresh_time: UNIX timestamp in milliseconds for most recent refresh. Not applicable for live mounts.
        :param pulumi.Input[str] path: Collection path to be mounted, in the form workspace.collection
        :param pulumi.Input[str] rrn: RRN of this mount.
        :param pulumi.Input[int] snapshot_expiration_time: UNIX timestamp in milliseconds when the snapshot expires.
        :param pulumi.Input[str] state: Mount state.
        :param pulumi.Input[str] virtual_instance_id: Virtual Instance id
        :param pulumi.Input[str] virtual_instance_rrn: Virtual Instance RRN
        """
        if created_at is not None:
            pulumi.set(__self__, "created_at", created_at)
        if last_refresh_time is not None:
            pulumi.set(__self__, "last_refresh_time", last_refresh_time)
        if path is not None:
            pulumi.set(__self__, "path", path)
        if rrn is not None:
            pulumi.set(__self__, "rrn", rrn)
        if snapshot_expiration_time is not None:
            pulumi.set(__self__, "snapshot_expiration_time", snapshot_expiration_time)
        if state is not None:
            pulumi.set(__self__, "state", state)
        if virtual_instance_id is not None:
            pulumi.set(__self__, "virtual_instance_id", virtual_instance_id)
        if virtual_instance_rrn is not None:
            pulumi.set(__self__, "virtual_instance_rrn", virtual_instance_rrn)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> Optional[pulumi.Input[str]]:
        """
        ISO 8601 date when the mount was created.
        """
        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(name="lastRefreshTime")
    def last_refresh_time(self) -> Optional[pulumi.Input[int]]:
        """
        UNIX timestamp in milliseconds for most recent refresh. Not applicable for live mounts.
        """
        return pulumi.get(self, "last_refresh_time")

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

    @property
    @pulumi.getter
    def path(self) -> Optional[pulumi.Input[str]]:
        """
        Collection path to be mounted, in the form workspace.collection
        """
        return pulumi.get(self, "path")

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

    @property
    @pulumi.getter
    def rrn(self) -> Optional[pulumi.Input[str]]:
        """
        RRN of this mount.
        """
        return pulumi.get(self, "rrn")

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

    @property
    @pulumi.getter(name="snapshotExpirationTime")
    def snapshot_expiration_time(self) -> Optional[pulumi.Input[int]]:
        """
        UNIX timestamp in milliseconds when the snapshot expires.
        """
        return pulumi.get(self, "snapshot_expiration_time")

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

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

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

    @property
    @pulumi.getter(name="virtualInstanceId")
    def virtual_instance_id(self) -> Optional[pulumi.Input[str]]:
        """
        Virtual Instance id
        """
        return pulumi.get(self, "virtual_instance_id")

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

    @property
    @pulumi.getter(name="virtualInstanceRrn")
    def virtual_instance_rrn(self) -> Optional[pulumi.Input[str]]:
        """
        Virtual Instance RRN
        """
        return pulumi.get(self, "virtual_instance_rrn")

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


class CollectionMount(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 path: Optional[pulumi.Input[str]] = None,
                 virtual_instance_id: Optional[pulumi.Input[str]] = None,
                 __props__=None):
        """
        Manages a collection mount.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_rockset as rockset

        data = rockset.CollectionMount("data",
            virtual_instance_id=rockset_virtual_instance["secondary"]["id"],
            path="commons.data")
        ```

        ## Import

        ```sh
         $ pulumi import rockset:index/collectionMount:CollectionMount demo 29e4a43c-fff4-4fe6-80e3-1ee57bc22e82
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] path: Collection path to be mounted, in the form workspace.collection
        :param pulumi.Input[str] virtual_instance_id: Virtual Instance id
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: CollectionMountArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Manages a collection mount.

        ## Example Usage

        ```python
        import pulumi
        import pulumi_rockset as rockset

        data = rockset.CollectionMount("data",
            virtual_instance_id=rockset_virtual_instance["secondary"]["id"],
            path="commons.data")
        ```

        ## Import

        ```sh
         $ pulumi import rockset:index/collectionMount:CollectionMount demo 29e4a43c-fff4-4fe6-80e3-1ee57bc22e82
        ```

        :param str resource_name: The name of the resource.
        :param CollectionMountArgs 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(CollectionMountArgs, 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,
                 path: Optional[pulumi.Input[str]] = None,
                 virtual_instance_id: 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__ = CollectionMountArgs.__new__(CollectionMountArgs)

            if path is None and not opts.urn:
                raise TypeError("Missing required property 'path'")
            __props__.__dict__["path"] = path
            if virtual_instance_id is None and not opts.urn:
                raise TypeError("Missing required property 'virtual_instance_id'")
            __props__.__dict__["virtual_instance_id"] = virtual_instance_id
            __props__.__dict__["created_at"] = None
            __props__.__dict__["last_refresh_time"] = None
            __props__.__dict__["rrn"] = None
            __props__.__dict__["snapshot_expiration_time"] = None
            __props__.__dict__["state"] = None
            __props__.__dict__["virtual_instance_rrn"] = None
        super(CollectionMount, __self__).__init__(
            'rockset:index/collectionMount:CollectionMount',
            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,
            last_refresh_time: Optional[pulumi.Input[int]] = None,
            path: Optional[pulumi.Input[str]] = None,
            rrn: Optional[pulumi.Input[str]] = None,
            snapshot_expiration_time: Optional[pulumi.Input[int]] = None,
            state: Optional[pulumi.Input[str]] = None,
            virtual_instance_id: Optional[pulumi.Input[str]] = None,
            virtual_instance_rrn: Optional[pulumi.Input[str]] = None) -> 'CollectionMount':
        """
        Get an existing CollectionMount 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: ISO 8601 date when the mount was created.
        :param pulumi.Input[int] last_refresh_time: UNIX timestamp in milliseconds for most recent refresh. Not applicable for live mounts.
        :param pulumi.Input[str] path: Collection path to be mounted, in the form workspace.collection
        :param pulumi.Input[str] rrn: RRN of this mount.
        :param pulumi.Input[int] snapshot_expiration_time: UNIX timestamp in milliseconds when the snapshot expires.
        :param pulumi.Input[str] state: Mount state.
        :param pulumi.Input[str] virtual_instance_id: Virtual Instance id
        :param pulumi.Input[str] virtual_instance_rrn: Virtual Instance RRN
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _CollectionMountState.__new__(_CollectionMountState)

        __props__.__dict__["created_at"] = created_at
        __props__.__dict__["last_refresh_time"] = last_refresh_time
        __props__.__dict__["path"] = path
        __props__.__dict__["rrn"] = rrn
        __props__.__dict__["snapshot_expiration_time"] = snapshot_expiration_time
        __props__.__dict__["state"] = state
        __props__.__dict__["virtual_instance_id"] = virtual_instance_id
        __props__.__dict__["virtual_instance_rrn"] = virtual_instance_rrn
        return CollectionMount(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> pulumi.Output[str]:
        """
        ISO 8601 date when the mount was created.
        """
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="lastRefreshTime")
    def last_refresh_time(self) -> pulumi.Output[int]:
        """
        UNIX timestamp in milliseconds for most recent refresh. Not applicable for live mounts.
        """
        return pulumi.get(self, "last_refresh_time")

    @property
    @pulumi.getter
    def path(self) -> pulumi.Output[str]:
        """
        Collection path to be mounted, in the form workspace.collection
        """
        return pulumi.get(self, "path")

    @property
    @pulumi.getter
    def rrn(self) -> pulumi.Output[str]:
        """
        RRN of this mount.
        """
        return pulumi.get(self, "rrn")

    @property
    @pulumi.getter(name="snapshotExpirationTime")
    def snapshot_expiration_time(self) -> pulumi.Output[int]:
        """
        UNIX timestamp in milliseconds when the snapshot expires.
        """
        return pulumi.get(self, "snapshot_expiration_time")

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

    @property
    @pulumi.getter(name="virtualInstanceId")
    def virtual_instance_id(self) -> pulumi.Output[str]:
        """
        Virtual Instance id
        """
        return pulumi.get(self, "virtual_instance_id")

    @property
    @pulumi.getter(name="virtualInstanceRrn")
    def virtual_instance_rrn(self) -> pulumi.Output[str]:
        """
        Virtual Instance RRN
        """
        return pulumi.get(self, "virtual_instance_rrn")

