# 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 json
import warnings
import pulumi
import pulumi.runtime
from .. import utilities, tables

class ManagedDisk(pulumi.CustomResource):
    create_option: pulumi.Output[str]
    """
    The method to use when creating the managed disk. Possible values include:
    """
    disk_size_gb: pulumi.Output[float]
    """
    Specifies the size of the managed disk to create in gigabytes.
    If `create_option` is `Copy` or `FromImage`, then the value must be equal to or greater than the source's size.
    """
    encryption_settings: pulumi.Output[dict]
    """
    an `encryption_settings` block as defined below.
    """
    image_reference_id: pulumi.Output[str]
    """
    ID of an existing platform/marketplace disk image to copy when `create_option` is `FromImage`.
    """
    location: pulumi.Output[str]
    """
    Specified the supported Azure location where the resource exists.
    Changing this forces a new resource to be created.
    """
    name: pulumi.Output[str]
    """
    Specifies the name of the managed disk. Changing this forces a
    new resource to be created.
    """
    os_type: pulumi.Output[str]
    """
    Specify a value when the source of an `Import` or `Copy`
    operation targets a source that contains an operating system. Valid values are `Linux` or `Windows`
    """
    resource_group_name: pulumi.Output[str]
    """
    The name of the resource group in which to create
    the managed disk.
    """
    source_resource_id: pulumi.Output[str]
    """
    ID of an existing managed disk to copy `create_option` is `Copy`
    or the recovery point to restore when `create_option` is `Restore`
    """
    source_uri: pulumi.Output[str]
    """
    URI to a valid VHD file to be used when `create_option` is `Import`.
    """
    storage_account_type: pulumi.Output[str]
    """
    The type of storage to use for the managed disk.
    Allowable values are `Standard_LRS`, `Premium_LRS`, `StandardSSD_LRS` or `UltraSSD_LRS`.
    """
    tags: pulumi.Output[dict]
    """
    A mapping of tags to assign to the resource.
    """
    zones: pulumi.Output[str]
    """
    A collection containing the availability zone to allocate the Managed Disk in.
    """
    def __init__(__self__, resource_name, opts=None, create_option=None, disk_size_gb=None, encryption_settings=None, image_reference_id=None, location=None, name=None, os_type=None, resource_group_name=None, source_resource_id=None, source_uri=None, storage_account_type=None, tags=None, zones=None, __props__=None, __name__=None, __opts__=None):
        """
        Manage a managed disk.
        
        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] create_option: The method to use when creating the managed disk. Possible values include:
        :param pulumi.Input[float] disk_size_gb: Specifies the size of the managed disk to create in gigabytes.
               If `create_option` is `Copy` or `FromImage`, then the value must be equal to or greater than the source's size.
        :param pulumi.Input[dict] encryption_settings: an `encryption_settings` block as defined below.
        :param pulumi.Input[str] image_reference_id: ID of an existing platform/marketplace disk image to copy when `create_option` is `FromImage`.
        :param pulumi.Input[str] location: Specified the supported Azure location where the resource exists.
               Changing this forces a new resource to be created.
        :param pulumi.Input[str] name: Specifies the name of the managed disk. Changing this forces a
               new resource to be created.
        :param pulumi.Input[str] os_type: Specify a value when the source of an `Import` or `Copy`
               operation targets a source that contains an operating system. Valid values are `Linux` or `Windows`
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create
               the managed disk.
        :param pulumi.Input[str] source_resource_id: ID of an existing managed disk to copy `create_option` is `Copy`
               or the recovery point to restore when `create_option` is `Restore`
        :param pulumi.Input[str] source_uri: URI to a valid VHD file to be used when `create_option` is `Import`.
        :param pulumi.Input[str] storage_account_type: The type of storage to use for the managed disk.
               Allowable values are `Standard_LRS`, `Premium_LRS`, `StandardSSD_LRS` or `UltraSSD_LRS`.
        :param pulumi.Input[dict] tags: A mapping of tags to assign to the resource.
        :param pulumi.Input[str] zones: A collection containing the availability zone to allocate the Managed Disk in.

        > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/managed_disk.html.markdown.
        """
        if __name__ is not None:
            warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
            resource_name = __name__
        if __opts__ is not None:
            warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
            opts = __opts__
        if opts is None:
            opts = pulumi.ResourceOptions()
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.version is None:
            opts.version = utilities.get_version()
        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__ = dict()

            if create_option is None:
                raise TypeError("Missing required property 'create_option'")
            __props__['create_option'] = create_option
            __props__['disk_size_gb'] = disk_size_gb
            __props__['encryption_settings'] = encryption_settings
            __props__['image_reference_id'] = image_reference_id
            __props__['location'] = location
            __props__['name'] = name
            __props__['os_type'] = os_type
            if resource_group_name is None:
                raise TypeError("Missing required property 'resource_group_name'")
            __props__['resource_group_name'] = resource_group_name
            __props__['source_resource_id'] = source_resource_id
            __props__['source_uri'] = source_uri
            if storage_account_type is None:
                raise TypeError("Missing required property 'storage_account_type'")
            __props__['storage_account_type'] = storage_account_type
            __props__['tags'] = tags
            __props__['zones'] = zones
        super(ManagedDisk, __self__).__init__(
            'azure:compute/managedDisk:ManagedDisk',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name, id, opts=None, create_option=None, disk_size_gb=None, encryption_settings=None, image_reference_id=None, location=None, name=None, os_type=None, resource_group_name=None, source_resource_id=None, source_uri=None, storage_account_type=None, tags=None, zones=None):
        """
        Get an existing ManagedDisk 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 str id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[str] create_option: The method to use when creating the managed disk. Possible values include:
        :param pulumi.Input[float] disk_size_gb: Specifies the size of the managed disk to create in gigabytes.
               If `create_option` is `Copy` or `FromImage`, then the value must be equal to or greater than the source's size.
        :param pulumi.Input[dict] encryption_settings: an `encryption_settings` block as defined below.
        :param pulumi.Input[str] image_reference_id: ID of an existing platform/marketplace disk image to copy when `create_option` is `FromImage`.
        :param pulumi.Input[str] location: Specified the supported Azure location where the resource exists.
               Changing this forces a new resource to be created.
        :param pulumi.Input[str] name: Specifies the name of the managed disk. Changing this forces a
               new resource to be created.
        :param pulumi.Input[str] os_type: Specify a value when the source of an `Import` or `Copy`
               operation targets a source that contains an operating system. Valid values are `Linux` or `Windows`
        :param pulumi.Input[str] resource_group_name: The name of the resource group in which to create
               the managed disk.
        :param pulumi.Input[str] source_resource_id: ID of an existing managed disk to copy `create_option` is `Copy`
               or the recovery point to restore when `create_option` is `Restore`
        :param pulumi.Input[str] source_uri: URI to a valid VHD file to be used when `create_option` is `Import`.
        :param pulumi.Input[str] storage_account_type: The type of storage to use for the managed disk.
               Allowable values are `Standard_LRS`, `Premium_LRS`, `StandardSSD_LRS` or `UltraSSD_LRS`.
        :param pulumi.Input[dict] tags: A mapping of tags to assign to the resource.
        :param pulumi.Input[str] zones: A collection containing the availability zone to allocate the Managed Disk in.

        > This content is derived from https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/website/docs/r/managed_disk.html.markdown.
        """
        opts = pulumi.ResourceOptions(id=id) if opts is None else opts.merge(pulumi.ResourceOptions(id=id))

        __props__ = dict()
        __props__["create_option"] = create_option
        __props__["disk_size_gb"] = disk_size_gb
        __props__["encryption_settings"] = encryption_settings
        __props__["image_reference_id"] = image_reference_id
        __props__["location"] = location
        __props__["name"] = name
        __props__["os_type"] = os_type
        __props__["resource_group_name"] = resource_group_name
        __props__["source_resource_id"] = source_resource_id
        __props__["source_uri"] = source_uri
        __props__["storage_account_type"] = storage_account_type
        __props__["tags"] = tags
        __props__["zones"] = zones
        return ManagedDisk(resource_name, opts=opts, __props__=__props__)
    def translate_output_property(self, prop):
        return tables._CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop

    def translate_input_property(self, prop):
        return tables._SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop

