amazonka-opsworks-2.0: Amazon OpsWorks SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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

  • 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.

  • 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.

  • 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.

  • cloudWatchLogsConfiguration :: Maybe CloudWatchLogsConfiguration

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

  • 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.

  • 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.

  • customRecipes :: Maybe Recipes

    A LayerCustomRecipes object that specifies the layer custom recipes.

  • customSecurityGroupIds :: Maybe [Text]

    An array containing the layer custom security group IDs.

  • enableAutoHealing :: Maybe Bool

    Whether to disable auto healing for the layer.

  • 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.

  • 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.

  • packages :: Maybe [Text]

    An array of Package objects that describes the layer packages.

  • useEbsOptimizedInstances :: Maybe Bool

    Whether to use Amazon EBS-optimized instances.

  • volumeConfigurations :: Maybe [VolumeConfiguration]

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

  • 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
ToJSON CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.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

AWSRequest CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Associated Types

type AWSResponse CreateLayer #

Generic CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Associated Types

type Rep CreateLayer :: Type -> Type #

Read CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Show CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

NFData CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Methods

rnf :: CreateLayer -> () #

Eq CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Hashable CreateLayer Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

type AWSResponse 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" "amazonka-opsworks-2.0-7XrzSD2vbuN9lVUGWMVZ7S" 'False) (C1 ('MetaCons "CreateLayer'" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "attributes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap LayerAttributesKeys (Maybe Text)))) :*: S1 ('MetaSel ('Just "autoAssignElasticIps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "autoAssignPublicIps") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "cloudWatchLogsConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe CloudWatchLogsConfiguration)))) :*: ((S1 ('MetaSel ('Just "customInstanceProfileArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "customJson") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "customRecipes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Recipes)) :*: (S1 ('MetaSel ('Just "customSecurityGroupIds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "enableAutoHealing") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))))) :*: (((S1 ('MetaSel ('Just "installUpdatesOnBoot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "lifecycleEventConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LifecycleEventConfiguration))) :*: (S1 ('MetaSel ('Just "packages") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "useEbsOptimizedInstances") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "volumeConfigurations") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [VolumeConfiguration])) :*: 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)))))))

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:

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_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
Generic CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Associated Types

type Rep CreateLayerResponse :: Type -> Type #

Read CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Show CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

NFData CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

Methods

rnf :: CreateLayerResponse -> () #

Eq CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

type Rep CreateLayerResponse Source # 
Instance details

Defined in Amazonka.OpsWorks.CreateLayer

type Rep CreateLayerResponse = D1 ('MetaData "CreateLayerResponse" "Amazonka.OpsWorks.CreateLayer" "amazonka-opsworks-2.0-7XrzSD2vbuN9lVUGWMVZ7S" '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:

CreateLayerResponse, createLayerResponse_layerId - The layer ID.

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

Response Lenses