Reputation: 8616
Is there a Rest API to get products, subscribe to products in AWS MarketPlace products?
I was searching for this but had no luck finding anything related to AWS Marketplace.
Upvotes: 2
Views: 603
Reputation: 10887
by using aws sdk for node.js
var params = {
DryRun: false || false,
Owners: ['aws-marketplace'] //show images where Owner is aws-marketplace
};
//EC2 Describe image to get market place images
ec2.describeImages(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
One of the result record
{ ImageId: 'ami-001a9130',
ImageLocation: 'aws-marketplace/turnkey-piwik-12.0-squeeze-x86.ebs_2-f04a7ac8-c067-48f6-872b-c0bb29e4755f-ami-50dd5a39.1',
State: 'available',
OwnerId: '679593333241',
CreationDate: '2013-01-18T19:54:11.000Z',
Public: true,
ProductCodes: [Object],
Architecture: 'i386',
ImageType: 'machine',
KernelId: 'aki-dce26fec',
ImageOwnerAlias: 'aws-marketplace',
Name: 'turnkey-piwik-12.0-squeeze-x86.ebs_2-f04a7ac8-c067-48f6-872b-c0bb29e4755f-ami-50dd5a39.1',
Description: 'http://www.turnkeylinux.org/piwik',
RootDeviceType: 'ebs',
RootDeviceName: '/dev/sda1',
BlockDeviceMappings: [Object],
VirtualizationType: 'paravirtual',
Tags: [],
Hypervisor: 'xen' }
More filters can be used as explained here: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/EC2.html#describeImages-property
Upvotes: 1