Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data CreateLayer = CreateLayer' {
- customInstanceProfileArn :: Maybe Text
- customSecurityGroupIds :: Maybe [Text]
- installUpdatesOnBoot :: Maybe Bool
- cloudWatchLogsConfiguration :: Maybe CloudWatchLogsConfiguration
- lifecycleEventConfiguration :: Maybe LifecycleEventConfiguration
- customRecipes :: Maybe Recipes
- customJson :: Maybe Text
- volumeConfigurations :: Maybe [VolumeConfiguration]
- enableAutoHealing :: Maybe Bool
- packages :: Maybe [Text]
- attributes :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
- autoAssignPublicIps :: Maybe Bool
- useEbsOptimizedInstances :: Maybe Bool
- autoAssignElasticIps :: Maybe Bool
- stackId :: Text
- type' :: LayerType
- name :: Text
- shortname :: Text
- newCreateLayer :: Text -> LayerType -> Text -> Text -> CreateLayer
- createLayer_customInstanceProfileArn :: Lens' CreateLayer (Maybe Text)
- createLayer_customSecurityGroupIds :: Lens' CreateLayer (Maybe [Text])
- createLayer_installUpdatesOnBoot :: Lens' CreateLayer (Maybe Bool)
- createLayer_cloudWatchLogsConfiguration :: Lens' CreateLayer (Maybe CloudWatchLogsConfiguration)
- createLayer_lifecycleEventConfiguration :: Lens' CreateLayer (Maybe LifecycleEventConfiguration)
- createLayer_customRecipes :: Lens' CreateLayer (Maybe Recipes)
- createLayer_customJson :: Lens' CreateLayer (Maybe Text)
- createLayer_volumeConfigurations :: Lens' CreateLayer (Maybe [VolumeConfiguration])
- createLayer_enableAutoHealing :: Lens' CreateLayer (Maybe Bool)
- createLayer_packages :: Lens' CreateLayer (Maybe [Text])
- createLayer_attributes :: Lens' CreateLayer (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
- createLayer_autoAssignPublicIps :: Lens' CreateLayer (Maybe Bool)
- createLayer_useEbsOptimizedInstances :: Lens' CreateLayer (Maybe Bool)
- createLayer_autoAssignElasticIps :: Lens' CreateLayer (Maybe Bool)
- createLayer_stackId :: Lens' CreateLayer Text
- createLayer_type :: Lens' CreateLayer LayerType
- createLayer_name :: Lens' CreateLayer Text
- createLayer_shortname :: Lens' CreateLayer Text
- data CreateLayerResponse = CreateLayerResponse' {
- layerId :: Maybe Text
- httpStatus :: Int
- newCreateLayerResponse :: Int -> CreateLayerResponse
- createLayerResponse_layerId :: Lens' CreateLayerResponse (Maybe Text)
- createLayerResponse_httpStatus :: Lens' CreateLayerResponse Int
Creating a Request
data CreateLayer Source #
See: newCreateLayer
smart constructor.
CreateLayer' | |
|
Instances
:: Text | |
-> LayerType | |
-> Text | |
-> Text | |
-> CreateLayer |
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_stackId :: Lens' CreateLayer Text Source #
The layer stack ID.
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.
CreateLayerResponse' | |
|
Instances
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
createLayerResponse_layerId :: Lens' CreateLayerResponse (Maybe Text) Source #
The layer ID.
createLayerResponse_httpStatus :: Lens' CreateLayerResponse Int Source #
The response's http status code.