Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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' {
- attributes :: Maybe (HashMap LayerAttributesKeys (Maybe Text))
- autoAssignElasticIps :: Maybe Bool
- autoAssignPublicIps :: Maybe Bool
- cloudWatchLogsConfiguration :: Maybe CloudWatchLogsConfiguration
- customInstanceProfileArn :: Maybe Text
- customJson :: Maybe Text
- customRecipes :: Maybe Recipes
- customSecurityGroupIds :: Maybe [Text]
- enableAutoHealing :: Maybe Bool
- installUpdatesOnBoot :: Maybe Bool
- lifecycleEventConfiguration :: Maybe LifecycleEventConfiguration
- packages :: Maybe [Text]
- useEbsOptimizedInstances :: Maybe Bool
- volumeConfigurations :: Maybe [VolumeConfiguration]
- stackId :: Text
- type' :: LayerType
- name :: Text
- shortname :: Text
- newCreateLayer :: Text -> LayerType -> Text -> Text -> CreateLayer
- createLayer_attributes :: Lens' CreateLayer (Maybe (HashMap LayerAttributesKeys (Maybe Text)))
- createLayer_autoAssignElasticIps :: Lens' CreateLayer (Maybe Bool)
- createLayer_autoAssignPublicIps :: Lens' CreateLayer (Maybe Bool)
- createLayer_cloudWatchLogsConfiguration :: Lens' CreateLayer (Maybe CloudWatchLogsConfiguration)
- createLayer_customInstanceProfileArn :: Lens' CreateLayer (Maybe Text)
- createLayer_customJson :: Lens' CreateLayer (Maybe Text)
- createLayer_customRecipes :: Lens' CreateLayer (Maybe Recipes)
- createLayer_customSecurityGroupIds :: Lens' CreateLayer (Maybe [Text])
- createLayer_enableAutoHealing :: Lens' CreateLayer (Maybe Bool)
- createLayer_installUpdatesOnBoot :: Lens' CreateLayer (Maybe Bool)
- createLayer_lifecycleEventConfiguration :: Lens' CreateLayer (Maybe LifecycleEventConfiguration)
- createLayer_packages :: Lens' CreateLayer (Maybe [Text])
- createLayer_useEbsOptimizedInstances :: Lens' CreateLayer (Maybe Bool)
- createLayer_volumeConfigurations :: Lens' CreateLayer (Maybe [VolumeConfiguration])
- 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
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:
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.
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.
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.
CreateLayer
, createLayer_cloudWatchLogsConfiguration
- Specifies CloudWatch Logs configuration options for the layer. For more
information, see CloudWatchLogsLogStream.
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.
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.
CreateLayer
, createLayer_customRecipes
- A LayerCustomRecipes
object that specifies the layer custom recipes.
CreateLayer
, createLayer_customSecurityGroupIds
- An array containing the layer custom security group IDs.
CreateLayer
, createLayer_enableAutoHealing
- Whether to disable auto healing for the layer.
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
.
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.
CreateLayer
, createLayer_packages
- An array of Package
objects that describes the layer packages.
CreateLayer
, createLayer_useEbsOptimizedInstances
- Whether to use Amazon EBS-optimized instances.
CreateLayer
, createLayer_volumeConfigurations
- A VolumeConfigurations
object that describes the layer's Amazon EBS
volumes.
CreateLayer
, createLayer_stackId
- The layer stack ID.
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.
CreateLayer
, createLayer_name
- The layer name, which is used by the console.
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_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_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_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_cloudWatchLogsConfiguration :: Lens' CreateLayer (Maybe CloudWatchLogsConfiguration) Source #
Specifies CloudWatch Logs configuration options for the layer. For more information, see CloudWatchLogsLogStream.
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_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_customRecipes :: Lens' CreateLayer (Maybe Recipes) Source #
A LayerCustomRecipes
object that specifies the layer custom recipes.
createLayer_customSecurityGroupIds :: Lens' CreateLayer (Maybe [Text]) Source #
An array containing the layer custom security group IDs.
createLayer_enableAutoHealing :: Lens' CreateLayer (Maybe Bool) Source #
Whether to disable auto healing for the layer.
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_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_packages :: Lens' CreateLayer (Maybe [Text]) Source #
An array of Package
objects that describes the layer packages.
createLayer_useEbsOptimizedInstances :: Lens' CreateLayer (Maybe Bool) Source #
Whether to use Amazon EBS-optimized instances.
createLayer_volumeConfigurations :: Lens' CreateLayer (Maybe [VolumeConfiguration]) Source #
A VolumeConfigurations
object that describes the layer's Amazon EBS
volumes.
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:
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.