AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CreateLayerInput

import "github.com/aws/aws-sdk-go/service/opsworks"

type CreateLayerInput struct { Attributes map[string]*string `type:"map"` AutoAssignElasticIps *bool `type:"boolean"` AutoAssignPublicIps *bool `type:"boolean"` CloudWatchLogsConfiguration *CloudWatchLogsConfiguration `type:"structure"` CustomInstanceProfileArn *string `type:"string"` CustomJson *string `type:"string"` CustomRecipes *Recipes `type:"structure"` CustomSecurityGroupIds []*string `type:"list"` EnableAutoHealing *bool `type:"boolean"` InstallUpdatesOnBoot *bool `type:"boolean"` LifecycleEventConfiguration *LifecycleEventConfiguration `type:"structure"` Name *string `type:"string" required:"true"` Packages []*string `type:"list"` Shortname *string `type:"string" required:"true"` StackId *string `type:"string" required:"true"` Type *string `type:"string" required:"true" enum:"LayerType"` UseEbsOptimizedInstances *bool `type:"boolean"` VolumeConfigurations []*VolumeConfiguration `type:"list"` }

Attributes

Type: map[string]*string

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

To create a cluster layer, set the EcsClusterArn attribute to the cluster's ARN.

AutoAssignElasticIps

Type: *bool

Whether to automatically assign an Elastic IP address (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) to the layer's instances. For more information, see How to Edit a Layer (https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html).

AutoAssignPublicIps

Type: *bool

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 (https://docs.aws.amazon.com/opsworks/latest/userguide/workinglayers-basics-edit.html).

CloudWatchLogsConfiguration

Describes the Amazon CloudWatch logs configuration for a layer.

CustomInstanceProfileArn

Type: *string

The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/Using_Identifiers.html).

CustomJson

Type: *string

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 (https://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-json-override.html). This feature is supported as of version 1.7.42 of the AWS CLI.

CustomRecipes

AWS OpsWorks Stacks supports five lifecycle events: setup, configuration, deploy, undeploy, and shutdown. For each layer, AWS OpsWorks Stacks runs a set of standard recipes for each event. In addition, you can provide custom recipes for any or all layers and events. AWS OpsWorks Stacks runs custom event recipes after the standard recipes. LayerCustomRecipes specifies the custom recipes for a particular layer to be run in response to each of the five events.

To specify a recipe, use the cookbook's directory name in the repository followed by two colons and the recipe name, which is the recipe's file name without the .rb extension. For example: phpapp2::dbsetup specifies the dbsetup.rb recipe in the repository's phpapp2 folder.

CustomSecurityGroupIds

Type: []*string

An array containing the layer custom security group IDs.

EnableAutoHealing

Type: *bool

Whether to disable auto healing for the layer.

InstallUpdatesOnBoot

Type: *bool

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 by manually running yum (Amazon Linux) or apt-get (Ubuntu) on the instances.

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

LifecycleEventConfiguration

Specifies the lifecycle event configuration

Name

Type: *string

The layer name, which is used by the console.

Name is a required field

Packages

Type: []*string

An array of Package objects that describes the layer packages.

Shortname

Type: *string

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 recipes. 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, which are limited to the alphanumeric characters, '-', '_', and '.'.

The built-in layers' short names are defined by AWS OpsWorks Stacks. For more information, see the Layer Reference (https://docs.aws.amazon.com/opsworks/latest/userguide/layers.html).

Shortname is a required field

StackId

Type: *string

The layer stack ID.

StackId is a required field

Type

Type: *string

The layer type. A stack cannot have more than one built-in layer of the same type. It can have any number of custom layers. Built-in layers are not available in Chef 12 stacks.

Type is a required field

UseEbsOptimizedInstances

Type: *bool

Whether to use Amazon EBS-optimized instances.

VolumeConfigurations

Describes an Amazon EBS volume configuration.

Method

GoString

func (s CreateLayerInput) GoString() string

GoString returns the string representation

SetAttributes

func (s *CreateLayerInput) SetAttributes(v map[string]*string) *CreateLayerInput

SetAttributes sets the Attributes field's value.

SetAutoAssignElasticIps

func (s *CreateLayerInput) SetAutoAssignElasticIps(v bool) *CreateLayerInput

SetAutoAssignElasticIps sets the AutoAssignElasticIps field's value.

SetAutoAssignPublicIps

func (s *CreateLayerInput) SetAutoAssignPublicIps(v bool) *CreateLayerInput

SetAutoAssignPublicIps sets the AutoAssignPublicIps field's value.

SetCloudWatchLogsConfiguration

func (s *CreateLayerInput) SetCloudWatchLogsConfiguration(v *CloudWatchLogsConfiguration) *CreateLayerInput

SetCloudWatchLogsConfiguration sets the CloudWatchLogsConfiguration field's value.

SetCustomInstanceProfileArn

func (s *CreateLayerInput) SetCustomInstanceProfileArn(v string) *CreateLayerInput

SetCustomInstanceProfileArn sets the CustomInstanceProfileArn field's value.

SetCustomJson

func (s *CreateLayerInput) SetCustomJson(v string) *CreateLayerInput

SetCustomJson sets the CustomJson field's value.

SetCustomRecipes

func (s *CreateLayerInput) SetCustomRecipes(v *Recipes) *CreateLayerInput

SetCustomRecipes sets the CustomRecipes field's value.

SetCustomSecurityGroupIds

func (s *CreateLayerInput) SetCustomSecurityGroupIds(v []*string) *CreateLayerInput

SetCustomSecurityGroupIds sets the CustomSecurityGroupIds field's value.

SetEnableAutoHealing

func (s *CreateLayerInput) SetEnableAutoHealing(v bool) *CreateLayerInput

SetEnableAutoHealing sets the EnableAutoHealing field's value.

SetInstallUpdatesOnBoot

func (s *CreateLayerInput) SetInstallUpdatesOnBoot(v bool) *CreateLayerInput

SetInstallUpdatesOnBoot sets the InstallUpdatesOnBoot field's value.

SetLifecycleEventConfiguration

func (s *CreateLayerInput) SetLifecycleEventConfiguration(v *LifecycleEventConfiguration) *CreateLayerInput

SetLifecycleEventConfiguration sets the LifecycleEventConfiguration field's value.

SetName

func (s *CreateLayerInput) SetName(v string) *CreateLayerInput

SetName sets the Name field's value.

SetPackages

func (s *CreateLayerInput) SetPackages(v []*string) *CreateLayerInput

SetPackages sets the Packages field's value.

SetShortname

func (s *CreateLayerInput) SetShortname(v string) *CreateLayerInput

SetShortname sets the Shortname field's value.

SetStackId

func (s *CreateLayerInput) SetStackId(v string) *CreateLayerInput

SetStackId sets the StackId field's value.

SetType

func (s *CreateLayerInput) SetType(v string) *CreateLayerInput

SetType sets the Type field's value.

SetUseEbsOptimizedInstances

func (s *CreateLayerInput) SetUseEbsOptimizedInstances(v bool) *CreateLayerInput

SetUseEbsOptimizedInstances sets the UseEbsOptimizedInstances field's value.

SetVolumeConfigurations

func (s *CreateLayerInput) SetVolumeConfigurations(v []*VolumeConfiguration) *CreateLayerInput

SetVolumeConfigurations sets the VolumeConfigurations field's value.

String

func (s CreateLayerInput) String() string

String returns the string representation

Validate

func (s *CreateLayerInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: