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

Searches for cmdlets that invoke a Amazon Web Services service operation, map to an AWS CLI command, or lists all cmdlets that belong to a service identified by one or more words in its name or its cmdlet noun prefix. If no service name or pattern is given all service cmdlets are output.

Syntax

QueryApiOperationOrService (Default)

Get-AWSCmdletName
-ApiOperation <String>
-MatchWithRegex <SwitchParameter>
-Service <String>

FromAwsCliCommand

Get-AWSCmdletName
-AwsCliCommand <String>

Description

Returns the name of the cmdlet that invokes a named Amazon Web Services service operation, optionally restricting the scope of the search to a specific service which can be identified using one or more words from the service name or the prefix applied to the nouns of cmdlets belonging to the service. Returns the names and corresponding service operations for a specific Amazon Web Services service which can be identified using one or more words from the service name or the prefix applied to the nouns of cmdlets belonging to the service. Returns the name of the cmdlet that is the equivalent to an AWS CLI command. In this mode a best-effort is made to extract the service and operation name data from the CLI command using known naming conventions and position rules used by the AWS CLI. If no match is made, no data is output. If the service cannot be identified, an error is displayed.

Parameters

-ApiOperation <String>
The name of the service operation (api) to search for. If not further restricted by service prefix or service name, all cmdlets across all services are inspected for a matching operation.By default the value supplied for this parameter is treated as a simple whole-word pattern to match. If the -MatchWithRegex switch is set the value is used as a regular expression. In both cases the search is case-insensitive/invariant culture.
Required?False
Position?1
Accept pipeline input?True (ByValue, )
-AwsCliCommand <String>
The AWS CLI command to match. For example 'aws ec2 describe-instances'. The cmdlet will make a best-effort to identify the owning service and the operation name by parsing the command using known conventions for the AWS CLI command format. The 'aws' prefix may be omitted and any AWS CLI options (identified by the prefix characters --) are skipped when parsing the value to identify the service code and operation name elements.
Required?True
Position?Named
Accept pipeline input?False
-MatchWithRegex <SwitchParameter>
If set, the value supplied for the ApiOperation parameter is assumed to be a regular expression. By default, the value supplied for ApiOperation is treated as a simple case-insensitive whole-word pattern to match (the cmdlet will surround the ApiOperation value with ^ and $ tokens automatically). If the switch is set no modification of the supplied value is performed.
Required?False
Position?Named
Accept pipeline input?False
-Service <String>
Restricts the search to the cmdlets belonging to services that match the full or partial term supplied to the parameter value, which can be the service prefix (for example 'EC2') or one or more terms from the service name (for example 'compute' or 'compute cloud').When partial names are used (as opposed to a prefix code) all services for which a match can be found are used to assist in the cmdlet results. A regular expression can always be supplied for the parameter value.If this is the only parameter supplied to the cmdlet, the output will list all of the cmdlets belonging to the services matching the search term, together with the corresponding service operation names.
Required?False
Position?Named
Accept pipeline input?False

Inputs

You can pipe a String object to this cmdlet for the ApiOperation parameter.

Outputs

PSObject
A collection of zero or more objects listing cmdlets that implement the specified operation, map to the AWS CLI command or belong to the specified service.

Examples

Example 1

PS C:\>Get-AWSCmdletName -ApiOperation describeinstances

CmdletName ServiceOperation ServiceName CmdletNounPrefix
---------- ---------------- ----------- ----------------
Get-EC2Instance DescribeInstances Amazon Elastic Compute Cloud EC2
Get-OPSInstances DescribeInstances AWS OpsWorks OPS
Returns the names of the all cmdlets that invoke an API matching the term 'describeinstances' across all services. In this example, 'Get-EC2Instance' from Amazon EC2 and Get-OPSInstances from Amazon OpsWorks are output.

Example 2

PS C:\>Get-AWSCmdletName -ApiOperation describeinstances -Service ec2

CmdletName ServiceOperation ServiceName CmdletNounPrefix
---------- ---------------- ----------- ----------------
Get-EC2Instance DescribeInstances Amazon Elastic Compute Cloud EC2
Returns the names of the all cmdlets that invoke an API matching the term 'describeinstances' for the Amazon EC2 service.In this example, 'Get-EC2Instance' is output.

Example 3

PS C:\>Get-AWSCmdletName -ApiOperation describeinstances -Service "compute cloud"

CmdletName ServiceOperation ServiceName CmdletNounPrefix
---------- ---------------- ----------- ----------------
Get-EC2Instance DescribeInstances Amazon Elastic Compute Cloud EC2
Returns the names of the all cmdlets that invoke an API matching the term 'describeinstances' for the Amazon EC2 service.In this example, 'Get-EC2Instance' is output.

Example 4

PS C:\>Get-AWSCmdletName -ApiOperation securitygroup -MatchWithRegex

CmdletName ServiceOperation ServiceName CmdletNounPrefix
---------- ---------------- ----------- ----------------
Approve-ECCacheSecurityGroupIngress AuthorizeCacheSecurityGroupIngress Amazon ElastiCache EC
Get-ECCacheSecurityGroup DescribeCacheSecurityGroups Amazon ElastiCache EC
...
Get-EC2SecurityGroup DescribeSecurityGroups Amazon Elastic Compute Cloud EC2
Grant-EC2SecurityGroupEgress AuthorizeSecurityGroupEgress Amazon Elastic Compute Cloud EC2
Grant-EC2SecurityGroupIngress AuthorizeSecurityGroupIngress Amazon Elastic Compute Cloud EC2
...
New-RDSDBSecurityGroup CreateDBSecurityGroup Amazon Relational Database Service RDS
Remove-RDSDBSecurityGroup DeleteDBSecurityGroup Amazon Relational Database Service RDS
Revoke-RDSDBSecurityGroupIngress RevokeDBSecurityGroupIngress Amazon Relational Database Service RDS
...
Approve-RSClusterSecurityGroupIngress AuthorizeClusterSecurityGroupIngress Amazon Redshift RS
Get-RSClusterSecurityGroups DescribeClusterSecurityGroups Amazon Redshift RS
Returns the names of the all cmdlets that contain the term 'securitygroup' in the operation they invoke, across all services.

Example 5

PS C:\>Get-AWSCmdletName -ApiOperation securitygroup -MatchWithRegex -Service ec2

CmdletName ServiceOperation ServiceName CmdletNounPrefix
---------- ---------------- ----------- ----------------
Get-EC2SecurityGroup DescribeSecurityGroups Amazon Elastic Compute Cloud EC2
Grant-EC2SecurityGroupEgress AuthorizeSecurityGroupEgress Amazon Elastic Compute Cloud EC2
Grant-EC2SecurityGroupIngress AuthorizeSecurityGroupIngress Amazon Elastic Compute Cloud EC2
...
Returns the names of the all Amazon EC2 cmdlets that contain the term 'securitygroup' in the operation they invoke.

Example 6

PS C:\>Get-AWSCmdletName -ApiOperation listmetrics -Service cloudwatch

CmdletName ServiceOperation ServiceName CmdletNounPrefix
---------- ---------------- ----------- ----------------
Get-CWMetrics ListMetrics Amazon CloudWatch CW
Returns the name of the cmdlet that invokes the Amazon CloudWatch 'ListMetrics' operation. In this example, 'Get-CWMetrics' is output. The same result can be obtained by using the service prefix, 'cw' as the value for the -Service parameter.

Example 7

PS C:\>Get-AWSCmdletName -AwsCliCommand "aws ec2 describe-images"

CmdletName ServiceOperation ServiceName CmdletNounPrefix
---------- ---------------- ----------- ----------------
Get-EC2Image DescribeImages Amazon Elastic Compute Cloud EC2
Returns the name of the cmdlet that performs the same operation as the specified AWS CLI command. In this example, 'Get-EC2Image' is output. Any options (prefixed by --) in the AWS CLI command are ignored. The initial 'aws' can also be omitted. This format is useful when transcoding an AWS CLI sample to AWS PowerShell.

Example 8

PS C:\> Get-AWSCmdletName -Service ec2

CmdletName ServiceOperation ServiceName
---------- ---------------- -----------
Add-EC2ClassicLinkVpc AttachClassicLinkVpc Amazon Elastic Compute Cloud
Add-EC2InternetGateway AttachInternetGateway Amazon Elastic Compute Cloud
Add-EC2NetworkInterface AttachNetworkInterface Amazon Elastic Compute Cloud
...
Get-ECSClusterDetail DescribeClusters Amazon EC2 Container Service
Get-ECSClusters ListClusters Amazon EC2 Container Service
Get-ECSClusterService ListServices Amazon EC2 Container Service
...
Performs a search to list all cmdlets that have 'ec2' in either the service name or the cmdlet noun prefix. In this example this matches Amazon Elastic Compute Cloud (search term matches noun prefix) and Amazon EC2 Container Service (search term found in the name).

Example 9

PS C:\> Get-AWSCmdletName -Service compute

CmdletName ServiceOperation ServiceName
---------- ---------------- -----------
Add-EC2ClassicLinkVpc AttachClassicLinkVpc Amazon Elastic Compute Cloud
Add-EC2InternetGateway AttachInternetGateway Amazon Elastic Compute Cloud
Add-EC2NetworkInterface AttachNetworkInterface Amazon Elastic Compute Cloud
...
Unregister-EC2Image DeregisterImage Amazon Elastic Compute Cloud
Unregister-EC2PrivateIpAddress UnassignPrivateIpAddresses Amazon Elastic Compute Cloud
Unregister-EC2RouteTable DisassociateRouteTable Amazon Elastic Compute Cloud
Performs a search to list all cmdlets that have 'compute' in either the service name or the cmdlet noun prefix. In this example the match is for Amazon Elastic Compute Cloud only (search term found in the name).

Supported Version

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