Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add getInvalidation and listInvalidations examples

  • Loading branch information...
commit a7d4708a65752e67ab89760bddc51e2ddb08a5ce 1 parent 46ca959
@tellnes authored
Showing with 22 additions and 0 deletions.
  1. +10 −0 examples/getInvalidation.js
  2. +12 −0 examples/listInvalidations.js
View
10 examples/getInvalidation.js
@@ -0,0 +1,10 @@
+var cloudfront = require('..')
+ , inspect = require('eyes').inspector({maxLength: -1})
+
+var cf = cloudfront.createClient(process.env.AWS_KEY, process.env.AWS_SECRET)
+
+cf.getInvalidation(process.argv[2], process.argv[3], function(err, dist) {
+ if (err) return inspect(err)
+
+ inspect(dist)
+})
View
12 examples/listInvalidations.js
@@ -0,0 +1,12 @@
+var cloudfront = require('..')
+ , inspect = require('eyes').inspector({maxLength: -1})
+
+var cf = cloudfront.createClient(process.env.AWS_KEY, process.env.AWS_SECRET)
+
+cf.listInvalidations(process.argv[2], function(err, list, info) {
+ if (err) {
+ inspect(err)
+ } else {
+ inspect(list)
+ }
+})
Please sign in to comment.
Something went wrong with that request. Please try again.