Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GetLaunchTemplateDataCommand

Retrieves the configuration data of the specified instance. You can use this data to create a launch template.

This action calls on other describe actions to get instance information. Depending on your instance configuration, you may need to allow the following actions in your IAM policy: DescribeSpotInstanceRequests, DescribeInstanceCreditSpecifications, DescribeVolumes, DescribeInstanceAttribute, and DescribeElasticGpus. Or, you can allow describe* depending on your instance requirements.

example

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, GetLaunchTemplateDataCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, GetLaunchTemplateDataCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const command = new GetLaunchTemplateDataCommand(input);
const response = await client.send(command);
see

GetLaunchTemplateDataCommandInput for command's input shape.

see

GetLaunchTemplateDataCommandOutput for command's response shape.

see

config for EC2Client's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: GetLaunchTemplateDataCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions