AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Container for the parameters to the GetLaunchTemplateData operation. 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
, and DescribeInstanceAttribute
. Or, you can allow describe*
depending on your instance requirements.
Namespace: Amazon.EC2.Model
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z
public class GetLaunchTemplateDataRequest : AmazonEC2Request IAmazonWebServiceRequest
The GetLaunchTemplateDataRequest type exposes the following members
Name | Description | |
---|---|---|
GetLaunchTemplateDataRequest() |
Name | Type | Description | |
---|---|---|---|
InstanceId | System.String |
Gets and sets the property InstanceId. The ID of the instance. |
This example gets the launch template data for the specified instance.
var client = new AmazonEC2Client(); var response = client.GetLaunchTemplateData(new GetLaunchTemplateDataRequest { InstanceId = "0123d646e8048babc" }); ResponseLaunchTemplateData launchTemplateData = response.LaunchTemplateData;
.NET:
Supported in: 8.0 and newer, Core 3.1
.NET Standard:
Supported in: 2.0
.NET Framework:
Supported in: 4.5 and newer, 3.5