If a user wants to search AWS resources using a starts_with
or “begins with” or “has prefix” query, the AWS CLI natively supports it.
How to query using starts_with
Using AWS CloudFormation as an example, the AWS CLI allows for the following query syntax:
|
|
This outputs all of the CloudFormation stack names that start with a particular prefix.
starts_with
The starts_with
syntax is included in the JMESPath specification.
|
|
Returns
true
if the$subject
starts with the$prefix
, otherwise this function returnsfalse
.