Merge pull request #131 from scottslowe/postman-aws-api

Add sample JavaScript tests
This commit is contained in:
Scott S. Lowe 2020-04-10 15:24:24 -06:00 committed by GitHub
commit 4be8a216ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,2 @@
var jsonObject = xml2Json(pm.response.text());
pm.environment.set("firstAz", jsonObject.DescribeAvailabilityZonesResponse.availabilityZoneInfo.item[0].zoneName);

View file

@ -0,0 +1,2 @@
var jsonObject = xml2Json(pm.response.text());
pm.environment.set("imageId", jsonObject.DescribeImagesResponse.imagesSet.item.imageId);

View file

@ -0,0 +1,2 @@
var jsonObject = xml2Json(pm.response.text());
pm.environment.set("sshKeyName", jsonObject.DescribeKeyPairsResponse.keySet.item[0].keyName);

View file

@ -0,0 +1,2 @@
var jsonObject = xml2Json(pm.response.text());
pm.environment.set("SubnetId", jsonObject.DescribeSubnetsResponse.subnetSet.item.subnetId);

View file

@ -0,0 +1,2 @@
var jsonObject = xml2Json(pm.response.text());
pm.environment.set("defaultVpcId", jsonObject.DescribeVpcsResponse.vpcSet.item.vpcId);