AWS Tools for Windows PowerShell
Command Reference

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.

Synopsis

Calls the Amazon Elastic Compute Cloud (EC2) DescribeLaunchTemplateVersions API operation.

Syntax

Get-EC2TemplateVersion
-Filter <Filter[]>
-LaunchTemplateId <String>
-LaunchTemplateName <String>
-MaxVersion <String>
-MinVersion <String>
-ResolveAlias <Boolean>
-Version <String[]>
-MaxResult <Int32>
-NextToken <String>
-Select <String>
-NoAutoIteration <SwitchParameter>
-ClientConfig <AmazonEC2Config>

Description

Describes one or more versions of a specified launch template. You can describe all versions, individual versions, or a range of versions. You can also describe all the latest versions or all the default versions of all the launch templates in your account.

This cmdlet automatically pages all available results to the pipeline - parameters related to iteration are only needed if you want to manually control the paginated output. To disable autopagination, use -NoAutoIteration.

Parameters

-ClientConfig <AmazonEC2Config>
Amazon.PowerShell.Cmdlets.EC2.AmazonEC2ClientCmdlet.ClientConfig
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Filter <Filter[]>
One or more filters.
  • create-time - The time the launch template version was created.
  • ebs-optimized - A boolean that indicates whether the instance is optimized for Amazon EBS I/O.
  • http-endpoint - Indicates whether the HTTP metadata endpoint on your instances is enabled (enabled | disabled).
  • http-protocol-ipv4 - Indicates whether the IPv4 endpoint for the instance metadata service is enabled (enabled | disabled).
  • host-resource-group-arn - The ARN of the host resource group in which to launch the instances.
  • http-tokens - The state of token usage for your instance metadata requests (optional | required).
  • iam-instance-profile - The ARN of the IAM instance profile.
  • image-id - The ID of the AMI.
  • instance-type - The instance type.
  • is-default-version - A boolean that indicates whether the launch template version is the default version.
  • kernel-id - The kernel ID.
  • license-configuration-arn - The ARN of the license configuration.
  • network-card-index - The index of the network card.
  • ram-disk-id - The RAM disk ID.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesFilters
-LaunchTemplateId <String>
The ID of the launch template.To describe one or more versions of a specified launch template, you must specify either the LaunchTemplateId or the LaunchTemplateName, but not both.To describe all the latest or default launch template versions in your account, you must omit this parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-LaunchTemplateName <String>
The name of the launch template.To describe one or more versions of a specified launch template, you must specify either the LaunchTemplateName or the LaunchTemplateId, but not both.To describe all the latest or default launch template versions in your account, you must omit this parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MaxResult <Int32>
The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned NextToken value. This value can be between 1 and 200.
Note: In AWSPowerShell and AWSPowerShell.NetCore this parameter is used to limit the total number of items returned by the cmdlet.
In AWS.Tools this parameter is simply passed to the service to specify how many items should be returned by each service call.
Pipe the output of this cmdlet into Select-Object -First to terminate retrieving data pages early and control the number of items returned.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesMaxItems, MaxResults
-MaxVersion <String>
The version number up to which to describe launch template versions.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-MinVersion <String>
The version number after which to describe launch template versions.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NextToken <String>
The token to request the next page of results.
Note: This parameter is only used if you are manually controlling output pagination of the service API call.
In order to manually control output pagination, use '-NextToken $null' for the first call and '-NextToken $AWSHistory.LastServiceResponse.NextToken' for subsequent calls.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NoAutoIteration <SwitchParameter>
By default the cmdlet will auto-iterate and retrieve all results to the pipeline by performing multiple service calls. If set, the cmdlet will retrieve only the next 'page' of results using the value of NextToken as the start point.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-ResolveAlias <Boolean>
If true, and if a Systems Manager parameter is specified for ImageId, the AMI ID is displayed in the response for imageId.If false, and if a Systems Manager parameter is specified for ImageId, the parameter is displayed in the response for imageId. For more information, see Use a Systems Manager parameter instead of an AMI ID in the Amazon Elastic Compute Cloud User Guide.Default: false
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Select <String>
Use the -Select parameter to control the cmdlet output. The default value is 'LaunchTemplateVersions'. Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.EC2.Model.DescribeLaunchTemplateVersionsResponse). Specifying the name of a property of type Amazon.EC2.Model.DescribeLaunchTemplateVersionsResponse will result in that property being returned. Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-Version <String[]>
One or more versions of the launch template. Valid values depend on whether you are describing a specified launch template (by ID or name) or all launch templates in your account.To describe one or more versions of a specified launch template, valid values are $Latest, $Default, and numbers.To describe all launch templates in your account that are defined as the latest version, the valid value is $Latest. To describe all launch templates in your account that are defined as the default version, the valid value is $Default. You can specify $Latest and $Default in the same request. You cannot specify numbers.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesVersions

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAK
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-EndpointUrl <String>
The endpoint to make the call against.Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required?False
Position?Named
Accept pipeline input?True (ByValue, ByPropertyName)
-ProfileLocation <String>
Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials.If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesAWSProfilesLocation, ProfilesLocation
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesStoredCredentials, AWSProfileName
-Region <Object>
The system name of an AWS region or an AWSRegion instance. This governs the endpoint that will be used when calling service operations. Note that the AWS resources referenced in a call are usually region-specific.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesRegionToCall
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesSK, SecretAccessKey
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required?False
Position?Named
Accept pipeline input?True (ByPropertyName)
AliasesST

Outputs

This cmdlet returns a collection of Amazon.EC2.Model.LaunchTemplateVersion objects. The service call response (type Amazon.EC2.Model.DescribeLaunchTemplateVersionsResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z