Skip to content

Instantly share code, notes, and snippets.

Last active July 13, 2020 17:16
What would you like to do?
//Compute the full URL
var requestUrlString = "/2013-04-01/hostedzone/" + attHostedZone + "/rrset";
var request = attRestHost.createRequest("POST", requestUrlString, attBody);
//Set the authentication header
request.setHeader("Authorization", attAuthString);
request.setHeader("X-Amz-Content-Sha256", attHashedPayload);
request.setHeader("X-Amz-Date", attAmzDate);
//Execute the request and get the response
var response;
response = request.execute();
var statusCode = response.statusCode;
var responseContent = response.contentAsString;
System.log("StatusCode = " + statusCode);
if (statusCode != 200) {
throw new Error("Failed to modify Route53 hosted zone: " + statusCode);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment