libZSservicesZSamazonka-opsworksZSamazonka-opsworks
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.OpsWorks.CreateLayer

Description

Creates a layer. For more information, see How to Create a Layer.

You should use CreateLayer for noncustom layer types such as PHP App Server only if the stack does not have an existing layer of that type. A stack can have at most one instance of each noncustom layer; if you attempt to create a second instance, CreateLayer fails. A stack can have an arbitrary number of custom layers, so you can call CreateLayer as many times as you like for that layer type.

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.

Synopsis

Creating a Request

data CreateLayer Source #

See: newCreateLayer smart constructor.

Constructors

CreateLayer' 

Fields

  • customInstanceProfileArn :: Maybe Text

    The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

  • customSecurityGroupIds :: Maybe [Text]

    An array containing the layer custom security group IDs.

  • installUpdatesOnBoot :: Maybe 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.

  • cloudWatchLogsConfiguration :: Maybe CloudWatchLogsConfiguration

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

  • lifecycleEventConfiguration :: Maybe LifecycleEventConfiguration

    A LifeCycleEventConfiguration object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.

  • customRecipes :: Maybe Recipes

    A LayerCustomRecipes object that specifies the layer custom recipes.

  • customJson :: Maybe Text

    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. This feature is supported as of version 1.7.42 of the AWS CLI.

  • volumeConfigurations :: Maybe [VolumeConfiguration]

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

  • enableAutoHealing :: Maybe Bool

    Whether to disable auto healing for the layer.

  • packages :: Maybe [Text]

    An array of Package objects that describes the layer packages.

  • attributes :: Maybe (HashMap LayerAttributesKeys (Maybe Text))

    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.

  • autoAssignPublicIps :: Maybe 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.

  • useEbsOptimizedInstances :: Maybe Bool

    Whether to use Amazon EBS-optimized instances.

  • autoAssignElasticIps :: Maybe Bool

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

  • stackId :: Text

    The layer stack ID.

  • type' :: LayerType

    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.

  • name :: Text

    The layer name, which is used by the console.

  • shortname :: Text

    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.

Instances

Instances details
Eq CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Read CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Show CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Generic CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Associated Types

type Rep CreateLayer :: Type -> Type #

NFData CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Methods

rnf :: CreateLayer -> () #

Hashable CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

ToJSON CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

AWSRequest CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Associated Types

type AWSResponse CreateLayer #

ToHeaders CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Methods

toHeaders :: CreateLayer -> [Header] #

ToPath CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

ToQuery CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

type Rep CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

type Rep CreateLayer = D1 ('MetaData "CreateLayer" "Amazonka.OpsWorks.CreateLayer" "libZSservicesZSamazonka-opsworksZSamazonka-opsworks" 'False) (C1 ('MetaCons "CreateLayer'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "customInstanceProfileArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "customSecurityGroupIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))) :*: (S1 ('MetaSel ('Just "installUpdatesOnBoot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "cloudWatchLogsConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CloudWatchLogsConfiguration)))) :*: ((S1 ('MetaSel ('Just "lifecycleEventConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LifecycleEventConfiguration)) :*: S1 ('MetaSel ('Just "customRecipes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Recipes))) :*: (S1 ('MetaSel ('Just "customJson") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "volumeConfigurations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [VolumeConfiguration])) :*: S1 ('MetaSel ('Just "enableAutoHealing") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))))) :*: (((S1 ('MetaSel ('Just "packages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap LayerAttributesKeys (Maybe Text))))) :*: (S1 ('MetaSel ('Just "autoAssignPublicIps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "useEbsOptimizedInstances") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "autoAssignElasticIps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "stackId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "type'") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LayerType) :*: (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "shortname") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))))
type AWSResponse CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

newCreateLayer Source #

Create a value of CreateLayer with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:customInstanceProfileArn:CreateLayer', createLayer_customInstanceProfileArn - The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

$sel:customSecurityGroupIds:CreateLayer', createLayer_customSecurityGroupIds - An array containing the layer custom security group IDs.

$sel:installUpdatesOnBoot:CreateLayer', createLayer_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 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.

$sel:cloudWatchLogsConfiguration:CreateLayer', createLayer_cloudWatchLogsConfiguration - Specifies CloudWatch Logs configuration options for the layer. For more information, see CloudWatchLogsLogStream.

$sel:lifecycleEventConfiguration:CreateLayer', createLayer_lifecycleEventConfiguration - A LifeCycleEventConfiguration object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.

$sel:customRecipes:CreateLayer', createLayer_customRecipes - A LayerCustomRecipes object that specifies the layer custom recipes.

$sel:customJson:CreateLayer', createLayer_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. This feature is supported as of version 1.7.42 of the AWS CLI.

$sel:volumeConfigurations:CreateLayer', createLayer_volumeConfigurations - A VolumeConfigurations object that describes the layer's Amazon EBS volumes.

$sel:enableAutoHealing:CreateLayer', createLayer_enableAutoHealing - Whether to disable auto healing for the layer.

$sel:packages:CreateLayer', createLayer_packages - An array of Package objects that describes the layer packages.

$sel:attributes:CreateLayer', createLayer_attributes - 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.

$sel:autoAssignPublicIps:CreateLayer', createLayer_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.

$sel:useEbsOptimizedInstances:CreateLayer', createLayer_useEbsOptimizedInstances - Whether to use Amazon EBS-optimized instances.

$sel:autoAssignElasticIps:CreateLayer', createLayer_autoAssignElasticIps - Whether to automatically assign an Elastic IP address to the layer's instances. For more information, see How to Edit a Layer.

$sel:stackId:CreateLayer', createLayer_stackId - The layer stack ID.

$sel:type':CreateLayer', createLayer_type - 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.

$sel:name:CreateLayer', createLayer_name - The layer name, which is used by the console.

$sel:shortname:CreateLayer', createLayer_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 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.

Request Lenses

createLayer_customInstanceProfileArn :: Lens' CreateLayer (Maybe Text) Source #

The ARN of an IAM profile to be used for the layer's EC2 instances. For more information about IAM ARNs, see Using Identifiers.

createLayer_customSecurityGroupIds :: Lens' CreateLayer (Maybe [Text]) Source #

An array containing the layer custom security group IDs.

createLayer_installUpdatesOnBoot :: Lens' CreateLayer (Maybe Bool) Source #

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.

createLayer_cloudWatchLogsConfiguration :: Lens' CreateLayer (Maybe CloudWatchLogsConfiguration) Source #

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

createLayer_lifecycleEventConfiguration :: Lens' CreateLayer (Maybe LifecycleEventConfiguration) Source #

A LifeCycleEventConfiguration object that you can use to configure the Shutdown event to specify an execution timeout and enable or disable Elastic Load Balancer connection draining.

createLayer_customRecipes :: Lens' CreateLayer (Maybe Recipes) Source #

A LayerCustomRecipes object that specifies the layer custom recipes.

createLayer_customJson :: Lens' CreateLayer (Maybe Text) Source #

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. This feature is supported as of version 1.7.42 of the AWS CLI.

createLayer_volumeConfigurations :: Lens' CreateLayer (Maybe [VolumeConfiguration]) Source #

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

createLayer_enableAutoHealing :: Lens' CreateLayer (Maybe Bool) Source #

Whether to disable auto healing for the layer.

createLayer_packages :: Lens' CreateLayer (Maybe [Text]) Source #

An array of Package objects that describes the layer packages.

createLayer_attributes :: Lens' CreateLayer (Maybe (HashMap LayerAttributesKeys (Maybe Text))) Source #

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.

createLayer_autoAssignPublicIps :: Lens' CreateLayer (Maybe Bool) Source #

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.

createLayer_useEbsOptimizedInstances :: Lens' CreateLayer (Maybe Bool) Source #

Whether to use Amazon EBS-optimized instances.

createLayer_autoAssignElasticIps :: Lens' CreateLayer (Maybe Bool) Source #

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

createLayer_type :: Lens' CreateLayer LayerType Source #

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.

createLayer_name :: Lens' CreateLayer Text Source #

The layer name, which is used by the console.

createLayer_shortname :: Lens' CreateLayer Text Source #

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.

Destructuring the Response

data CreateLayerResponse Source #

Contains the response to a CreateLayer request.

See: newCreateLayerResponse smart constructor.

Constructors

CreateLayerResponse' 

Fields

Instances

Instances details
Eq CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Read CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Show CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Generic CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Associated Types

type Rep CreateLayerResponse :: Type -> Type #

NFData CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Methods

rnf :: CreateLayerResponse -> () #

type Rep CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

type Rep CreateLayerResponse = D1 ('MetaData "CreateLayerResponse" "Amazonka.OpsWorks.CreateLayer" "libZSservicesZSamazonka-opsworksZSamazonka-opsworks" 'False) (C1 ('MetaCons "CreateLayerResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "layerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newCreateLayerResponse Source #

Create a value of CreateLayerResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:layerId:CreateLayerResponse', createLayerResponse_layerId - The layer ID.

$sel:httpStatus:CreateLayerResponse', createLayerResponse_httpStatus - The response's http status code.

Response Lenses