AWS Marketplace搜索/查询API

时间:2018-04-24 15:06:03

标签: amazon-web-services marketplace

我需要以编程方式访问AWS marketplace UI功能。到目前为止,我发现了" AmazonEC2.describeImages" API,但我发现它非常有限:

1)结果与UI中的结果不符。作为Tomcat AMI的简单查询示例:

Filter isPublic = new Filter().withName("is-public").withValues("true");
Filter tomcat = new Filter().withName("name").withValues("Tomcat*");
DescribeImagesRequest req = new DescribeImagesRequest().withFilters( isPublic, tomcat );
DescribeImagesResult resp = ec2.describeImages( req );

结果:

Found total 9 images
ID: ami-542eae43
Name:   Tomcat7_v01
Desc:   [Copied ami-00369873 from eu-west-1] Tomcat7_v01
Arch:   x86_64
Type:   machine
Owner:  616727669948
    Device name:    /dev/sda1  (size: 10)
ID: ami-5b1b7a4c
Name:   TomcatInstance
Desc:   TomcatInstance
Arch:   x86_64
Type:   machine
Owner:  312088435046
    Device name:    /dev/sda1  (size: 10)
ID: ami-61137676
Name:   Tomcat 9 on windows powered by GlobalSolutions-1ba56c23-b93c-4f5d-b31b-159b21b7b943-ami-1dc75d0a.3
Desc:   Tomcat 9 on windows powered by GlobalSolutions
Arch:   x86_64
Platform:   windows
Type:   machine
Owner:  679593333241
    Device name:    /dev/sda1  (size: 30)
ID: ami-7153e20b
Name:   Tomcat 9-472baf5a-498f-41a9-8f1d-861fe627200c-ami-b45bf1ce.4
Desc:   Updated debian.cnf
Arch:   x86_64
Type:   machine
Owner:  679593333241
    Device name:    /dev/sda1  (size: 8)
ID: ami-8c4d81e4
Name:   TomcatPGSQLWorking
Desc:   [Copied ami-19552c29 from us-west-2] TomcatPGSQLWorking
Arch:   x86_64
Type:   machine
Owner:  525242879332
    Device name:    /dev/sda1  (size: 8)
ID: ami-95da17fc
Name:   Tomcat7
Desc:   Tomcat 7 Image
Arch:   x86_64
Type:   machine
Owner:  209720127264
    Device name:    /dev/sda1  (size: 8)
ID: ami-a9b9d1c0
Name:   Tomcat_06
Desc:   
Arch:   x86_64
Type:   machine
Owner:  550038334991
    Device name:    /dev/sda1  (size: 8)
    Device name:    /dev/sdb
ID: ami-b2c9a6da
Name:   Tomcat Designer and Search Image (with genomes)
Desc:   [Copied ami-236f7266 from us-west-1] Tomcat Designer and Search Image (with genomes)
Arch:   x86_64
Type:   machine
Owner:  872553423352
    Device name:    /dev/xvda  (size: 200)
ID: ami-b9bbc5ae
Name:   Tomcat8.5.5.-PotgreSQL9.5-Server
Desc:   
Arch:   x86_64
Type:   machine
Owner:  541102566093
    Device name:    /dev/xvda  (size: 20)

当我在UI中执行该搜索时,我获得了28次点击。显然,我不知道UI正在使用的特定过滤器组合,所以我使用了一个非常简单的组合。

2)缺少名称和描述

看看上面的结果。名字也不算太差,bur描述通常没用。有些很好,如#34; Tomcat 7 image",有时则是空白或只是公司网址。描述到处都是。

3)支持的实例类型

在marketplace UI中,我可以查看AMI并查看可以部署AMI的受支持实例类型的表。然而,在desribeImages结果中,我没有看到这些信息。如何访问适用的实例类型列表。

总之,

是否有其他API可以为我提供有关特定AMI的更多信息,例如:

desribeImageDetails(String imageId)

那会给我详细资料吗?

感谢

0 个答案:

没有答案