UpdateLayer - OpsWorks

UpdateLayer

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.

Request Syntax

{ "Attributes": { "string" : "string" }, "AutoAssignElasticIps": boolean, "AutoAssignPublicIps": boolean, "CloudWatchLogsConfiguration": { "Enabled": boolean, "LogStreams": [ { "BatchCount": number, "BatchSize": number, "BufferDuration": number, "DatetimeFormat": "string", "Encoding": "string", "File": "string", "FileFingerprintLines": "string", "InitialPosition": "string", "LogGroupName": "string", "MultiLineStartPattern": "string", "TimeZone": "string" } ] }, "CustomInstanceProfileArn": "string", "CustomJson": "string", "CustomRecipes": { "Configure": [ "string" ], "Deploy": [ "string" ], "Setup": [ "string" ], "Shutdown": [ "string" ], "Undeploy": [ "string" ] }, "CustomSecurityGroupIds": [ "string" ], "EnableAutoHealing": boolean, "InstallUpdatesOnBoot": boolean, "LayerId": "string", "LifecycleEventConfiguration": { "Shutdown": { "DelayUntilElbConnectionsDrained": boolean, "ExecutionTimeout": number } }, "Name": "string", "Packages": [ "string" ], "Shortname": "string", "UseEbsOptimizedInstances": boolean, "VolumeConfigurations": [ { "Encrypted": boolean, "Iops": number, "MountPoint": "string", "NumberOfDisks": number, "RaidLevel": number, "Size": number, "VolumeType": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

Attributes

One or more user-defined key/value pairs to be added to the stack attributes.

Type: String to string map

Valid Keys: EcsClusterArn | EnableHaproxyStats | HaproxyStatsUrl | HaproxyStatsUser | HaproxyStatsPassword | HaproxyHealthCheckUrl | HaproxyHealthCheckMethod | MysqlRootPassword | MysqlRootPasswordUbiquitous | GangliaUrl | GangliaUser | GangliaPassword | MemcachedMemory | NodejsVersion | RubyVersion | RubygemsVersion | ManageBundler | BundlerVersion | RailsStack | PassengerVersion | Jvm | JvmVersion | JvmOptions | JavaAppServer | JavaAppServerVersion

Required: No

AutoAssignElasticIps

Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.

Type: Boolean

Required: No

AutoAssignPublicIps

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: Boolean

Required: No

CloudWatchLogsConfiguration

Specifies CloudWatch Logs configuration options for the layer. For more information, see CloudWatchLogsLogStream.

Type: CloudWatchLogsConfiguration object

Required: No

CustomInstanceProfileArn

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: String

Required: No

CustomJson

A JSON-formatted string containing custom stack configuration and deployment attributes to be installed on the layer's instances. For more information, see Using Custom JSON.

Type: String

Required: No

CustomRecipes

A LayerCustomRecipes object that specifies the layer's custom recipes.

Type: Recipes object

Required: No

CustomSecurityGroupIds

An array containing the layer's custom security group IDs.

Type: Array of strings

Required: No

EnableAutoHealing

Whether to disable auto healing for the layer.

Type: Boolean

Required: No

InstallUpdatesOnBoot

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.

Note

We strongly recommend using the default value of true, to ensure that your instances have the latest security updates.

Type: Boolean

Required: No

LayerId

The layer ID.

Type: String

Required: Yes

LifecycleEventConfiguration

Type: LifecycleEventConfiguration object

Required: No

Name

The layer name, which is used by the console. Layer names can be a maximum of 32 characters.

Type: String

Required: No

Packages

An array of Package objects that describe the layer's packages.

Type: Array of strings

Required: No

Shortname

For custom layers only, use this parameter to specify the layer's short name, which is used internally by AWS OpsWorks Stacks and 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 32 characters and must be in the following format: /\A[a-z0-9\-\_\.]+\Z/.

Built-in layer short names are defined by AWS OpsWorks Stacks. For more information, see the Layer reference in the AWS OpsWorks User Guide.

Type: String

Required: No

UseEbsOptimizedInstances

Whether to use Amazon EBS-optimized instances.

Type: Boolean

Required: No

VolumeConfigurations

A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

Type: Array of VolumeConfiguration objects

Required: No

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors.

ResourceNotFoundException

Indicates that a resource was not found.

HTTP Status Code: 400

ValidationException

Indicates that a request was not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: