'Updates a specified layer.
**Required Permissions**: To use this action, an IAM user must
have a Manage permissions level for the stack, or an attached
policy that explicitly grants permissions. For more
information on user permissions, see `Managing User
Permissions`_.
:type layer_id: string
:param layer_id: The layer ID.
:type name: string
:param name: The layer name, which is used by the console.
:type shortname: string
:param shortname: The layer short name, which is used internally by AWS
OpsWorksand by Chef. The short name is also used as the name for
the directory where your app files are installed. It can have a
maximum of 200 characters and must be in the following format:
/\A[a-z0-9\-\_\.]+\Z/.
:type attributes: map
:param attributes: One or more user-defined key/value pairs to be added
to the stack attributes.
:type custom_instance_profile_arn: string
:param custom_instance_profile_arn: The ARN of an IAM profile to be
used for all of the layer\'s EC2 instances. For more information
about IAM ARNs, see `Using Identifiers`_.
:type custom_security_group_ids: list
:param custom_security_group_ids: An array containing the layer\'s
custom security group IDs.
:type packages: list
:param packages: An array of `Package` objects that describe the
layer\'s packages.
:type volume_configurations: list
:param volume_configurations: A `VolumeConfigurations` object that
describes the layer\'s Amazon EBS volumes.
:type enable_auto_healing: boolean
:param enable_auto_healing: Whether to disable auto healing for the
layer.
:type auto_assign_elastic_ips: boolean
:param auto_assign_elastic_ips: Whether to automatically assign an
`Elastic IP address`_ to the layer\'s instances. For more
information, see `How to Edit a Layer`_.
:type auto_assign_public_ips: boolean
:param auto_assign_public_ips: For stacks that are running in a VPC,
whether to automatically assign a public IP address to the layer\'s
instances. For more information, see `How to Edit a Layer`_.
:type custom_recipes: dict
:param custom_recipes: A `LayerCustomRecipes` object that specifies the
layer\'s custom recipes.
:type install_updates_on_boot: boolean
:param install_updates_on_boot:
Whether to install operating system and package updates when the
instance boots. The default value is `True`. To control when
updates are installed, set this value to `False`. You must then
update your instances manually by using CreateDeployment to run the
`update_dependencies` stack command or manually running `yum`
(Amazon Linux) or `apt-get` (Ubuntu) on the instances.
We strongly recommend using the default value of `True`, to ensure that
your instances have the latest security updates.
:type use_ebs_optimized_instances: boolean
:param use_ebs_optimized_instances: Whether to use Amazon EBS-optimized
instances.
:type lifecycle_event_configuration: dict
:param lifecycle_event_configuration:'

def update_layer(self, layer_id, name=None, shortname=None, attributes=None, custom_instance_profile_arn=None, custom_security_group_ids=None, packages=None, volume_configurations=None, enable_auto_healing=None, auto_assign_elastic_ips=None, auto_assign_public_ips=None, custom_recipes=None, install_updates_on_boot=None, use_ebs_optimized_instances=None, lifecycle_event_configuration=None):

    params = {'LayerId': layer_id}
    if (name is not None):
        params['Name'] = name
    if (shortname is not None):
        params['Shortname'] = shortname
    if (attributes is not None):
        params['Attributes'] = attributes
    if (custom_instance_profile_arn is not None):
        params['CustomInstanceProfileArn'] = custom_instance_profile_arn
    if (custom_security_group_ids is not None):
        params['CustomSecurityGroupIds'] = custom_security_group_ids
    if (packages is not None):
        params['Packages'] = packages
    if (volume_configurations is not None):
        params['VolumeConfigurations'] = volume_configurations
    if (enable_auto_healing is not None):
        params['EnableAutoHealing'] = enable_auto_healing
    if (auto_assign_elastic_ips is not None):
        params['AutoAssignElasticIps'] = auto_assign_elastic_ips
    if (auto_assign_public_ips is not None):
        params['AutoAssignPublicIps'] = auto_assign_public_ips
    if (custom_recipes is not None):
        params['CustomRecipes'] = custom_recipes
    if (install_updates_on_boot is not None):
        params['InstallUpdatesOnBoot'] = install_updates_on_boot
    if (use_ebs_optimized_instances is not None):
        params['UseEbsOptimizedInstances'] = use_ebs_optimized_instances
    if (lifecycle_event_configuration is not None):
        params['LifecycleEventConfiguration'] = lifecycle_event_configuration
    return self.make_request(action='UpdateLayer', body=json.dumps(params))
