# 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 typing import Union
from .. import utilities, tables

class GetLayerVersionResult:
    """
    A collection of values returned by getLayerVersion.
    """
    def __init__(__self__, arn=None, compatible_runtime=None, compatible_runtimes=None, created_date=None, description=None, id=None, layer_arn=None, layer_name=None, license_info=None, source_code_hash=None, source_code_size=None, version=None):
        if arn and not isinstance(arn, str):
            raise TypeError("Expected argument 'arn' to be a str")
        __self__.arn = arn
        """
        The Amazon Resource Name (ARN) of the Lambda Layer with version.
        """
        if compatible_runtime and not isinstance(compatible_runtime, str):
            raise TypeError("Expected argument 'compatible_runtime' to be a str")
        __self__.compatible_runtime = compatible_runtime
        if compatible_runtimes and not isinstance(compatible_runtimes, list):
            raise TypeError("Expected argument 'compatible_runtimes' to be a list")
        __self__.compatible_runtimes = compatible_runtimes
        """
        A list of [Runtimes](https://docs.aws.amazon.com/lambda/latest/dg/API_GetLayerVersion.html#SSS-GetLayerVersion-response-CompatibleRuntimes) the specific Lambda Layer version is compatible with.
        """
        if created_date and not isinstance(created_date, str):
            raise TypeError("Expected argument 'created_date' to be a str")
        __self__.created_date = created_date
        """
        The date this resource was created.
        """
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        __self__.description = description
        """
        Description of the specific Lambda Layer version.
        """
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        __self__.id = id
        """
        The provider-assigned unique ID for this managed resource.
        """
        if layer_arn and not isinstance(layer_arn, str):
            raise TypeError("Expected argument 'layer_arn' to be a str")
        __self__.layer_arn = layer_arn
        """
        The Amazon Resource Name (ARN) of the Lambda Layer without version.
        """
        if layer_name and not isinstance(layer_name, str):
            raise TypeError("Expected argument 'layer_name' to be a str")
        __self__.layer_name = layer_name
        if license_info and not isinstance(license_info, str):
            raise TypeError("Expected argument 'license_info' to be a str")
        __self__.license_info = license_info
        """
        License info associated with the specific Lambda Layer version.
        """
        if source_code_hash and not isinstance(source_code_hash, str):
            raise TypeError("Expected argument 'source_code_hash' to be a str")
        __self__.source_code_hash = source_code_hash
        """
        Base64-encoded representation of raw SHA-256 sum of the zip file.
        """
        if source_code_size and not isinstance(source_code_size, float):
            raise TypeError("Expected argument 'source_code_size' to be a float")
        __self__.source_code_size = source_code_size
        """
        The size in bytes of the function .zip file.
        """
        if version and not isinstance(version, float):
            raise TypeError("Expected argument 'version' to be a float")
        __self__.version = version
        """
        This Lamba Layer version.
        """
class AwaitableGetLayerVersionResult(GetLayerVersionResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetLayerVersionResult(
            arn=self.arn,
            compatible_runtime=self.compatible_runtime,
            compatible_runtimes=self.compatible_runtimes,
            created_date=self.created_date,
            description=self.description,
            id=self.id,
            layer_arn=self.layer_arn,
            layer_name=self.layer_name,
            license_info=self.license_info,
            source_code_hash=self.source_code_hash,
            source_code_size=self.source_code_size,
            version=self.version)

def get_layer_version(compatible_runtime=None,layer_name=None,version=None,opts=None):
    """
    Provides information about a Lambda Layer Version.

    ## Example Usage



    ```python
    import pulumi
    import pulumi_aws as aws

    config = pulumi.Config()
    layer_name = config.require_object("layerName")
    existing = aws.lambda.get_layer_version(layer_name=layer_name)
    ```



    :param str compatible_runtime: Specific runtime the layer version must support. Conflicts with `version`. If specified, the latest available layer version supporting the provided runtime will be used.
    :param str layer_name: Name of the lambda layer.
    :param float version: Specific layer version. Conflicts with `compatible_runtime`. If omitted, the latest available layer version will be used.
    """
    __args__ = dict()


    __args__['compatibleRuntime'] = compatible_runtime
    __args__['layerName'] = layer_name
    __args__['version'] = version
    if opts is None:
        opts = pulumi.InvokeOptions()
    if opts.version is None:
        opts.version = utilities.get_version()
    __ret__ = pulumi.runtime.invoke('aws:lambda/getLayerVersion:getLayerVersion', __args__, opts=opts).value

    return AwaitableGetLayerVersionResult(
        arn=__ret__.get('arn'),
        compatible_runtime=__ret__.get('compatibleRuntime'),
        compatible_runtimes=__ret__.get('compatibleRuntimes'),
        created_date=__ret__.get('createdDate'),
        description=__ret__.get('description'),
        id=__ret__.get('id'),
        layer_arn=__ret__.get('layerArn'),
        layer_name=__ret__.get('layerName'),
        license_info=__ret__.get('licenseInfo'),
        source_code_hash=__ret__.get('sourceCodeHash'),
        source_code_size=__ret__.get('sourceCodeSize'),
        version=__ret__.get('version'))
