# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['LayerArgs', 'Layer']

@pulumi.input_type
class LayerArgs:
    def __init__(__self__, *,
                 auto_assign_elastic_ips: pulumi.Input[bool],
                 auto_assign_public_ips: pulumi.Input[bool],
                 enable_auto_healing: pulumi.Input[bool],
                 name: pulumi.Input[str],
                 shortname: pulumi.Input[str],
                 stack_id: pulumi.Input[str],
                 type: pulumi.Input[str],
                 attributes: Optional[Any] = None,
                 custom_instance_profile_arn: Optional[pulumi.Input[str]] = None,
                 custom_json: Optional[Any] = None,
                 custom_recipes: Optional[pulumi.Input['LayerRecipesArgs']] = None,
                 custom_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 install_updates_on_boot: Optional[pulumi.Input[bool]] = None,
                 lifecycle_event_configuration: Optional[pulumi.Input['LayerLifecycleEventConfigurationArgs']] = None,
                 load_based_auto_scaling: Optional[pulumi.Input['LayerLoadBasedAutoScalingArgs']] = None,
                 packages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input['LayerTagArgs']]]] = None,
                 use_ebs_optimized_instances: Optional[pulumi.Input[bool]] = None,
                 volume_configurations: Optional[pulumi.Input[Sequence[pulumi.Input['LayerVolumeConfigurationArgs']]]] = None):
        """
        The set of arguments for constructing a Layer resource.
        """
        pulumi.set(__self__, "auto_assign_elastic_ips", auto_assign_elastic_ips)
        pulumi.set(__self__, "auto_assign_public_ips", auto_assign_public_ips)
        pulumi.set(__self__, "enable_auto_healing", enable_auto_healing)
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "shortname", shortname)
        pulumi.set(__self__, "stack_id", stack_id)
        pulumi.set(__self__, "type", type)
        if attributes is not None:
            pulumi.set(__self__, "attributes", attributes)
        if custom_instance_profile_arn is not None:
            pulumi.set(__self__, "custom_instance_profile_arn", custom_instance_profile_arn)
        if custom_json is not None:
            pulumi.set(__self__, "custom_json", custom_json)
        if custom_recipes is not None:
            pulumi.set(__self__, "custom_recipes", custom_recipes)
        if custom_security_group_ids is not None:
            pulumi.set(__self__, "custom_security_group_ids", custom_security_group_ids)
        if install_updates_on_boot is not None:
            pulumi.set(__self__, "install_updates_on_boot", install_updates_on_boot)
        if lifecycle_event_configuration is not None:
            pulumi.set(__self__, "lifecycle_event_configuration", lifecycle_event_configuration)
        if load_based_auto_scaling is not None:
            pulumi.set(__self__, "load_based_auto_scaling", load_based_auto_scaling)
        if packages is not None:
            pulumi.set(__self__, "packages", packages)
        if tags is not None:
            pulumi.set(__self__, "tags", tags)
        if use_ebs_optimized_instances is not None:
            pulumi.set(__self__, "use_ebs_optimized_instances", use_ebs_optimized_instances)
        if volume_configurations is not None:
            pulumi.set(__self__, "volume_configurations", volume_configurations)

    @property
    @pulumi.getter(name="autoAssignElasticIps")
    def auto_assign_elastic_ips(self) -> pulumi.Input[bool]:
        return pulumi.get(self, "auto_assign_elastic_ips")

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

    @property
    @pulumi.getter(name="autoAssignPublicIps")
    def auto_assign_public_ips(self) -> pulumi.Input[bool]:
        return pulumi.get(self, "auto_assign_public_ips")

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

    @property
    @pulumi.getter(name="enableAutoHealing")
    def enable_auto_healing(self) -> pulumi.Input[bool]:
        return pulumi.get(self, "enable_auto_healing")

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

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

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

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

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

    @property
    @pulumi.getter(name="stackId")
    def stack_id(self) -> pulumi.Input[str]:
        return pulumi.get(self, "stack_id")

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

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

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

    @property
    @pulumi.getter
    def attributes(self) -> Optional[Any]:
        return pulumi.get(self, "attributes")

    @attributes.setter
    def attributes(self, value: Optional[Any]):
        pulumi.set(self, "attributes", value)

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

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

    @property
    @pulumi.getter(name="customJson")
    def custom_json(self) -> Optional[Any]:
        return pulumi.get(self, "custom_json")

    @custom_json.setter
    def custom_json(self, value: Optional[Any]):
        pulumi.set(self, "custom_json", value)

    @property
    @pulumi.getter(name="customRecipes")
    def custom_recipes(self) -> Optional[pulumi.Input['LayerRecipesArgs']]:
        return pulumi.get(self, "custom_recipes")

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

    @property
    @pulumi.getter(name="customSecurityGroupIds")
    def custom_security_group_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
        return pulumi.get(self, "custom_security_group_ids")

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

    @property
    @pulumi.getter(name="installUpdatesOnBoot")
    def install_updates_on_boot(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "install_updates_on_boot")

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

    @property
    @pulumi.getter(name="lifecycleEventConfiguration")
    def lifecycle_event_configuration(self) -> Optional[pulumi.Input['LayerLifecycleEventConfigurationArgs']]:
        return pulumi.get(self, "lifecycle_event_configuration")

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

    @property
    @pulumi.getter(name="loadBasedAutoScaling")
    def load_based_auto_scaling(self) -> Optional[pulumi.Input['LayerLoadBasedAutoScalingArgs']]:
        return pulumi.get(self, "load_based_auto_scaling")

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

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

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

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

    @tags.setter
    def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['LayerTagArgs']]]]):
        pulumi.set(self, "tags", value)

    @property
    @pulumi.getter(name="useEbsOptimizedInstances")
    def use_ebs_optimized_instances(self) -> Optional[pulumi.Input[bool]]:
        return pulumi.get(self, "use_ebs_optimized_instances")

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

    @property
    @pulumi.getter(name="volumeConfigurations")
    def volume_configurations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['LayerVolumeConfigurationArgs']]]]:
        return pulumi.get(self, "volume_configurations")

    @volume_configurations.setter
    def volume_configurations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['LayerVolumeConfigurationArgs']]]]):
        pulumi.set(self, "volume_configurations", value)


warnings.warn("""Layer is not yet supported by AWS Native, so its creation will currently fail. Please use the classic AWS provider, if possible.""", DeprecationWarning)


class Layer(pulumi.CustomResource):
    warnings.warn("""Layer is not yet supported by AWS Native, so its creation will currently fail. Please use the classic AWS provider, if possible.""", DeprecationWarning)

    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 attributes: Optional[Any] = None,
                 auto_assign_elastic_ips: Optional[pulumi.Input[bool]] = None,
                 auto_assign_public_ips: Optional[pulumi.Input[bool]] = None,
                 custom_instance_profile_arn: Optional[pulumi.Input[str]] = None,
                 custom_json: Optional[Any] = None,
                 custom_recipes: Optional[pulumi.Input[pulumi.InputType['LayerRecipesArgs']]] = None,
                 custom_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 enable_auto_healing: Optional[pulumi.Input[bool]] = None,
                 install_updates_on_boot: Optional[pulumi.Input[bool]] = None,
                 lifecycle_event_configuration: Optional[pulumi.Input[pulumi.InputType['LayerLifecycleEventConfigurationArgs']]] = None,
                 load_based_auto_scaling: Optional[pulumi.Input[pulumi.InputType['LayerLoadBasedAutoScalingArgs']]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 packages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 shortname: Optional[pulumi.Input[str]] = None,
                 stack_id: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LayerTagArgs']]]]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 use_ebs_optimized_instances: Optional[pulumi.Input[bool]] = None,
                 volume_configurations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LayerVolumeConfigurationArgs']]]]] = None,
                 __props__=None):
        """
        Resource Type definition for AWS::OpsWorks::Layer

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: LayerArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        Resource Type definition for AWS::OpsWorks::Layer

        :param str resource_name: The name of the resource.
        :param LayerArgs 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(LayerArgs, 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,
                 attributes: Optional[Any] = None,
                 auto_assign_elastic_ips: Optional[pulumi.Input[bool]] = None,
                 auto_assign_public_ips: Optional[pulumi.Input[bool]] = None,
                 custom_instance_profile_arn: Optional[pulumi.Input[str]] = None,
                 custom_json: Optional[Any] = None,
                 custom_recipes: Optional[pulumi.Input[pulumi.InputType['LayerRecipesArgs']]] = None,
                 custom_security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 enable_auto_healing: Optional[pulumi.Input[bool]] = None,
                 install_updates_on_boot: Optional[pulumi.Input[bool]] = None,
                 lifecycle_event_configuration: Optional[pulumi.Input[pulumi.InputType['LayerLifecycleEventConfigurationArgs']]] = None,
                 load_based_auto_scaling: Optional[pulumi.Input[pulumi.InputType['LayerLoadBasedAutoScalingArgs']]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 packages: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 shortname: Optional[pulumi.Input[str]] = None,
                 stack_id: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LayerTagArgs']]]]] = None,
                 type: Optional[pulumi.Input[str]] = None,
                 use_ebs_optimized_instances: Optional[pulumi.Input[bool]] = None,
                 volume_configurations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['LayerVolumeConfigurationArgs']]]]] = None,
                 __props__=None):
        pulumi.log.warn("""Layer is deprecated: Layer is not yet supported by AWS Native, so its creation will currently fail. Please use the classic AWS provider, if possible.""")
        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__ = LayerArgs.__new__(LayerArgs)

            __props__.__dict__["attributes"] = attributes
            if auto_assign_elastic_ips is None and not opts.urn:
                raise TypeError("Missing required property 'auto_assign_elastic_ips'")
            __props__.__dict__["auto_assign_elastic_ips"] = auto_assign_elastic_ips
            if auto_assign_public_ips is None and not opts.urn:
                raise TypeError("Missing required property 'auto_assign_public_ips'")
            __props__.__dict__["auto_assign_public_ips"] = auto_assign_public_ips
            __props__.__dict__["custom_instance_profile_arn"] = custom_instance_profile_arn
            __props__.__dict__["custom_json"] = custom_json
            __props__.__dict__["custom_recipes"] = custom_recipes
            __props__.__dict__["custom_security_group_ids"] = custom_security_group_ids
            if enable_auto_healing is None and not opts.urn:
                raise TypeError("Missing required property 'enable_auto_healing'")
            __props__.__dict__["enable_auto_healing"] = enable_auto_healing
            __props__.__dict__["install_updates_on_boot"] = install_updates_on_boot
            __props__.__dict__["lifecycle_event_configuration"] = lifecycle_event_configuration
            __props__.__dict__["load_based_auto_scaling"] = load_based_auto_scaling
            if name is None and not opts.urn:
                raise TypeError("Missing required property 'name'")
            __props__.__dict__["name"] = name
            __props__.__dict__["packages"] = packages
            if shortname is None and not opts.urn:
                raise TypeError("Missing required property 'shortname'")
            __props__.__dict__["shortname"] = shortname
            if stack_id is None and not opts.urn:
                raise TypeError("Missing required property 'stack_id'")
            __props__.__dict__["stack_id"] = stack_id
            __props__.__dict__["tags"] = tags
            if type is None and not opts.urn:
                raise TypeError("Missing required property 'type'")
            __props__.__dict__["type"] = type
            __props__.__dict__["use_ebs_optimized_instances"] = use_ebs_optimized_instances
            __props__.__dict__["volume_configurations"] = volume_configurations
        super(Layer, __self__).__init__(
            'aws-native:opsworks:Layer',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None) -> 'Layer':
        """
        Get an existing Layer 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.
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = LayerArgs.__new__(LayerArgs)

        __props__.__dict__["attributes"] = None
        __props__.__dict__["auto_assign_elastic_ips"] = None
        __props__.__dict__["auto_assign_public_ips"] = None
        __props__.__dict__["custom_instance_profile_arn"] = None
        __props__.__dict__["custom_json"] = None
        __props__.__dict__["custom_recipes"] = None
        __props__.__dict__["custom_security_group_ids"] = None
        __props__.__dict__["enable_auto_healing"] = None
        __props__.__dict__["install_updates_on_boot"] = None
        __props__.__dict__["lifecycle_event_configuration"] = None
        __props__.__dict__["load_based_auto_scaling"] = None
        __props__.__dict__["name"] = None
        __props__.__dict__["packages"] = None
        __props__.__dict__["shortname"] = None
        __props__.__dict__["stack_id"] = None
        __props__.__dict__["tags"] = None
        __props__.__dict__["type"] = None
        __props__.__dict__["use_ebs_optimized_instances"] = None
        __props__.__dict__["volume_configurations"] = None
        return Layer(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def attributes(self) -> pulumi.Output[Optional[Any]]:
        return pulumi.get(self, "attributes")

    @property
    @pulumi.getter(name="autoAssignElasticIps")
    def auto_assign_elastic_ips(self) -> pulumi.Output[bool]:
        return pulumi.get(self, "auto_assign_elastic_ips")

    @property
    @pulumi.getter(name="autoAssignPublicIps")
    def auto_assign_public_ips(self) -> pulumi.Output[bool]:
        return pulumi.get(self, "auto_assign_public_ips")

    @property
    @pulumi.getter(name="customInstanceProfileArn")
    def custom_instance_profile_arn(self) -> pulumi.Output[Optional[str]]:
        return pulumi.get(self, "custom_instance_profile_arn")

    @property
    @pulumi.getter(name="customJson")
    def custom_json(self) -> pulumi.Output[Optional[Any]]:
        return pulumi.get(self, "custom_json")

    @property
    @pulumi.getter(name="customRecipes")
    def custom_recipes(self) -> pulumi.Output[Optional['outputs.LayerRecipes']]:
        return pulumi.get(self, "custom_recipes")

    @property
    @pulumi.getter(name="customSecurityGroupIds")
    def custom_security_group_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
        return pulumi.get(self, "custom_security_group_ids")

    @property
    @pulumi.getter(name="enableAutoHealing")
    def enable_auto_healing(self) -> pulumi.Output[bool]:
        return pulumi.get(self, "enable_auto_healing")

    @property
    @pulumi.getter(name="installUpdatesOnBoot")
    def install_updates_on_boot(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "install_updates_on_boot")

    @property
    @pulumi.getter(name="lifecycleEventConfiguration")
    def lifecycle_event_configuration(self) -> pulumi.Output[Optional['outputs.LayerLifecycleEventConfiguration']]:
        return pulumi.get(self, "lifecycle_event_configuration")

    @property
    @pulumi.getter(name="loadBasedAutoScaling")
    def load_based_auto_scaling(self) -> pulumi.Output[Optional['outputs.LayerLoadBasedAutoScaling']]:
        return pulumi.get(self, "load_based_auto_scaling")

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

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

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

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

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

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

    @property
    @pulumi.getter(name="useEbsOptimizedInstances")
    def use_ebs_optimized_instances(self) -> pulumi.Output[Optional[bool]]:
        return pulumi.get(self, "use_ebs_optimized_instances")

    @property
    @pulumi.getter(name="volumeConfigurations")
    def volume_configurations(self) -> pulumi.Output[Optional[Sequence['outputs.LayerVolumeConfiguration']]]:
        return pulumi.get(self, "volume_configurations")

