英文:
List of all windows server names from parameter store
问题
我有这个参数,并且它按预期工作。
参数:
LatestAmiId:
类型:'AWS::SSM::Parameter::ValueAWS::EC2::Image::Id'
默认值:/aws/service/ami-windows-latest/Windows_Server-2016-English-Core-Containers
但是,我如何获取所有Windows服务器的列表?以下命令不返回任何内容。
aws ssm get-parameters-by-path --path "/aws/service/ami-windows-latest" --region us-east-1
英文:
I have this parameter and it works as expected.
Parameters:
LatestAmiId:
Type: 'AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>'
Default: /aws/service/ami-windows-latest/Windows_Server-2016-English-Core-Containers
But how do I get the list of all windows servers? The following command does not return anything.
> aws ssm get-parameters-by-path --path "/aws/service/ami-windows-latest" --region us-east-1
答案1
得分: 1
这个命令对我来说运行正常,返回了23个AMI:
aws ssm get-parameters-by-path --path "/aws/service/ami-windows-latest" --region us-east-1
示例输出:
{
"Parameters": [
{
"Name": "/aws/service/ami-windows-latest/Windows_Server-2008-R2_SP1-English-64Bit-SQL_2012_SP4_Express",
"Type": "String",
"Value": "ami-0a2e90df8bb31df6f",
"Version": 29,
"LastModifiedDate": 1576555239.669,
"ARN": "arn:aws:ssm:us-east-1::parameter/aws/service/ami-windows-latest/Windows_Server-2008-R2_SP1-English-64Bit-SQL_2012_SP4_Express"
},
{
"Name": "/aws/service/ami-windows-latest/Windows_Server-2012-R2_RTM-Chinese_Simplified-64Bit-Base",
"Type": "String",
"Value": "ami-0bedade339716cc2b",
"Version": 48,
"LastModifiedDate": 1576555364.453,
"ARN": "arn:aws:ssm:us-east-1::parameter/aws/service/ami-windows-latest/Windows_Server-2012-R2_RTM-Chinese_Simplified-64Bit-Base"
},
...
我正在使用Mac。如果您正在使用Windows,您可能需要调整引号(甚至删除它们)。
英文:
This command works fine for me, returning 23 AMIs:
aws ssm get-parameters-by-path --path "/aws/service/ami-windows-latest" --region us-east-1
Sample output:
{
"Parameters": [
{
"Name": "/aws/service/ami-windows-latest/Windows_Server-2008-R2_SP1-English-64Bit-SQL_2012_SP4_Express",
"Type": "String",
"Value": "ami-0a2e90df8bb31df6f",
"Version": 29,
"LastModifiedDate": 1576555239.669,
"ARN": "arn:aws:ssm:us-east-1::parameter/aws/service/ami-windows-latest/Windows_Server-2008-R2_SP1-English-64Bit-SQL_2012_SP4_Express"
},
{
"Name": "/aws/service/ami-windows-latest/Windows_Server-2012-R2_RTM-Chinese_Simplified-64Bit-Base",
"Type": "String",
"Value": "ami-0bedade339716cc2b",
"Version": 48,
"LastModifiedDate": 1576555364.453,
"ARN": "arn:aws:ssm:us-east-1::parameter/aws/service/ami-windows-latest/Windows_Server-2012-R2_RTM-Chinese_Simplified-64Bit-Base"
},
...
I'm using a Mac. If you are using Windows, you might need to fiddle with the quotation marks (or even remove them).
答案2
得分: 1
在Windows上也正常运行。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论