Skip to content

Instantly share code, notes, and snippets.

Embed
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(responseContent);
System.log("StatusCode = " + statusCode);
if (statusCode != 200) {
System.error("Error:");
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
You can’t perform that action at this time.