amazonka-ec2-2.0: Amazon Elastic Compute Cloud 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.EC2.CreateLaunchTemplate

Description

Creates a launch template.

A launch template contains the parameters to launch an instance. When you launch an instance using RunInstances, you can specify a launch template instead of providing the launch parameters in the request. For more information, see Launch an instance from a launch template in the Amazon Elastic Compute Cloud User Guide.

If you want to clone an existing launch template as the basis for creating a new launch template, you can use the Amazon EC2 console. The API, SDKs, and CLI do not support cloning a template. For more information, see Create a launch template from an existing launch template in the Amazon Elastic Compute Cloud User Guide.

Synopsis

Creating a Request

data CreateLaunchTemplate Source #

See: newCreateLaunchTemplate smart constructor.

Constructors

CreateLaunchTemplate' 

Fields

Instances

Instances details
ToHeaders CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

ToPath CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

ToQuery CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

AWSRequest CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

Associated Types

type AWSResponse CreateLaunchTemplate #

Generic CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

Associated Types

type Rep CreateLaunchTemplate :: Type -> Type #

Show CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

NFData CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

Methods

rnf :: CreateLaunchTemplate -> () #

Eq CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

Hashable CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

type AWSResponse CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

type Rep CreateLaunchTemplate Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

type Rep CreateLaunchTemplate = D1 ('MetaData "CreateLaunchTemplate" "Amazonka.EC2.CreateLaunchTemplate" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateLaunchTemplate'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "dryRun") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "tagSpecifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [TagSpecification])))) :*: (S1 ('MetaSel ('Just "versionDescription") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "launchTemplateName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "launchTemplateData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive RequestLaunchTemplateData))))))

newCreateLaunchTemplate Source #

Create a value of CreateLaunchTemplate 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:

CreateLaunchTemplate, createLaunchTemplate_clientToken - Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

Constraint: Maximum 128 ASCII characters.

$sel:dryRun:CreateLaunchTemplate', createLaunchTemplate_dryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

CreateLaunchTemplate, createLaunchTemplate_tagSpecifications - The tags to apply to the launch template on creation. To tag the launch template, the resource type must be launch-template.

To specify the tags for the resources that are created when an instance is launched, you must use the TagSpecifications parameter in the launch template data structure.

CreateLaunchTemplate, createLaunchTemplate_versionDescription - A description for the first version of the launch template.

CreateLaunchTemplate, createLaunchTemplate_launchTemplateName - A name for the launch template.

CreateLaunchTemplate, createLaunchTemplate_launchTemplateData - The information for the launch template.

Request Lenses

createLaunchTemplate_clientToken :: Lens' CreateLaunchTemplate (Maybe Text) Source #

Unique, case-sensitive identifier you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.

Constraint: Maximum 128 ASCII characters.

createLaunchTemplate_dryRun :: Lens' CreateLaunchTemplate (Maybe Bool) Source #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

createLaunchTemplate_tagSpecifications :: Lens' CreateLaunchTemplate (Maybe [TagSpecification]) Source #

The tags to apply to the launch template on creation. To tag the launch template, the resource type must be launch-template.

To specify the tags for the resources that are created when an instance is launched, you must use the TagSpecifications parameter in the launch template data structure.

createLaunchTemplate_versionDescription :: Lens' CreateLaunchTemplate (Maybe Text) Source #

A description for the first version of the launch template.

Destructuring the Response

data CreateLaunchTemplateResponse Source #

See: newCreateLaunchTemplateResponse smart constructor.

Constructors

CreateLaunchTemplateResponse' 

Fields

Instances

Instances details
Generic CreateLaunchTemplateResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

Associated Types

type Rep CreateLaunchTemplateResponse :: Type -> Type #

Read CreateLaunchTemplateResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

Show CreateLaunchTemplateResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

NFData CreateLaunchTemplateResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

Eq CreateLaunchTemplateResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

type Rep CreateLaunchTemplateResponse Source # 
Instance details

Defined in Amazonka.EC2.CreateLaunchTemplate

type Rep CreateLaunchTemplateResponse = D1 ('MetaData "CreateLaunchTemplateResponse" "Amazonka.EC2.CreateLaunchTemplate" "amazonka-ec2-2.0-48L9RAJvmvzAdBkRegqWCL" 'False) (C1 ('MetaCons "CreateLaunchTemplateResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "launchTemplate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LaunchTemplate)) :*: (S1 ('MetaSel ('Just "warning") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ValidationWarning)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateLaunchTemplateResponse Source #

Create a value of CreateLaunchTemplateResponse 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:

CreateLaunchTemplateResponse, createLaunchTemplateResponse_launchTemplate - Information about the launch template.

$sel:warning:CreateLaunchTemplateResponse', createLaunchTemplateResponse_warning - If the launch template contains parameters or parameter combinations that are not valid, an error code and an error message are returned for each issue that's found.

$sel:httpStatus:CreateLaunchTemplateResponse', createLaunchTemplateResponse_httpStatus - The response's http status code.

Response Lenses

createLaunchTemplateResponse_warning :: Lens' CreateLaunchTemplateResponse (Maybe ValidationWarning) Source #

If the launch template contains parameters or parameter combinations that are not valid, an error code and an error message are returned for each issue that's found.