This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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