Skip to main content
Module

x/aws_api/services/route53/mod.ts

From-scratch Typescript client for accessing AWS APIs
Extremely Popular
Latest
File
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787
// Autogenerated API client for: Amazon Route 53
export * from "./structs.ts";import * as client from "../../client/common.ts";import * as cmnP from "../../encoding/common.ts";import * as xmlP from "../../encoding/xml.ts";import type * as s from "./structs.ts";
export class Route53 { #client: client.ServiceClient; constructor(apiFactory: client.ApiFactory) { this.#client = apiFactory.buildServiceClient(Route53.ApiMetadata); }
static ApiMetadata: client.ApiMetadata = { "apiVersion": "2013-04-01", "endpointPrefix": "route53", "globalEndpoint": "route53.amazonaws.com", "protocol": "rest-xml", "serviceAbbreviation": "Route 53", "serviceFullName": "Amazon Route 53", "serviceId": "Route 53", "signatureVersion": "v4", "uid": "route53-2013-04-01" };
async activateKeySigningKey( params: s.ActivateKeySigningKeyRequest, opts: client.RequestOptions = {}, ): Promise<s.ActivateKeySigningKeyResponse> {
const resp = await this.#client.performRequest({ opts, action: "ActivateKeySigningKey", requestUri: cmnP.encodePath`/2013-04-01/keysigningkey/${params["HostedZoneId"]}/${params["Name"]}/activate`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async associateVPCWithHostedZone( params: s.AssociateVPCWithHostedZoneRequest, opts: client.RequestOptions = {}, ): Promise<s.AssociateVPCWithHostedZoneResponse> { const body = xmlP.stringify({ name: "AssociateVPCWithHostedZoneRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "VPC", ...VPC_Serialize(params["VPC"])}, {name: "Comment", content: params["Comment"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "AssociateVPCWithHostedZone", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/associatevpc`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async changeResourceRecordSets( params: s.ChangeResourceRecordSetsRequest, opts: client.RequestOptions = {}, ): Promise<s.ChangeResourceRecordSetsResponse> { const body = xmlP.stringify({ name: "ChangeResourceRecordSetsRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "ChangeBatch", ...ChangeBatch_Serialize(params["ChangeBatch"])}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "ChangeResourceRecordSets", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/rrset/`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async changeTagsForResource( params: s.ChangeTagsForResourceRequest, opts: client.RequestOptions = {}, ): Promise<void> { const body = xmlP.stringify({ name: "ChangeTagsForResourceRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "AddTags", children: params["AddTags"]?.map(x => ({name: "Tag", ...Tag_Serialize(x)}))}, {name: "RemoveTagKeys", children: params["RemoveTagKeys"]?.map(x => ({name: "Key", content: x}))}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "ChangeTagsForResource", requestUri: cmnP.encodePath`/2013-04-01/tags/${params["ResourceType"]}/${params["ResourceId"]}`, }); await resp.body?.cancel(); }
async createHealthCheck( params: s.CreateHealthCheckRequest, opts: client.RequestOptions = {}, ): Promise<s.CreateHealthCheckResponse> { const body = xmlP.stringify({ name: "CreateHealthCheckRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "CallerReference", content: params["CallerReference"]?.toString()}, {name: "HealthCheckConfig", ...HealthCheckConfig_Serialize(params["HealthCheckConfig"])}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "CreateHealthCheck", requestUri: "/2013-04-01/healthcheck", responseCode: 201, }); const xml = xmlP.readXmlResult(await resp.text()); return { Location: resp.headers.get("Location") ?? "", ...{ HealthCheck: xml.first("HealthCheck", true, HealthCheck_Parse), }, }; }
async createHostedZone( params: s.CreateHostedZoneRequest, opts: client.RequestOptions = {}, ): Promise<s.CreateHostedZoneResponse> { const body = xmlP.stringify({ name: "CreateHostedZoneRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "Name", content: params["Name"]?.toString()}, {name: "VPC", ...VPC_Serialize(params["VPC"])}, {name: "CallerReference", content: params["CallerReference"]?.toString()}, {name: "HostedZoneConfig", ...HostedZoneConfig_Serialize(params["HostedZoneConfig"])}, {name: "DelegationSetId", content: params["DelegationSetId"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "CreateHostedZone", requestUri: "/2013-04-01/hostedzone", responseCode: 201, }); const xml = xmlP.readXmlResult(await resp.text()); return { Location: resp.headers.get("Location") ?? "", ...{ HostedZone: xml.first("HostedZone", true, HostedZone_Parse), ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), DelegationSet: xml.first("DelegationSet", true, DelegationSet_Parse), VPC: xml.first("VPC", false, VPC_Parse), }, }; }
async createKeySigningKey( params: s.CreateKeySigningKeyRequest, opts: client.RequestOptions = {}, ): Promise<s.CreateKeySigningKeyResponse> { const body = xmlP.stringify({ name: "CreateKeySigningKeyRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "CallerReference", content: params["CallerReference"]?.toString()}, {name: "HostedZoneId", content: params["HostedZoneId"]?.toString()}, {name: "KeyManagementServiceArn", content: params["KeyManagementServiceArn"]?.toString()}, {name: "Name", content: params["Name"]?.toString()}, {name: "Status", content: params["Status"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "CreateKeySigningKey", requestUri: "/2013-04-01/keysigningkey", responseCode: 201, }); const xml = xmlP.readXmlResult(await resp.text()); return { Location: resp.headers.get("Location") ?? "", ...{ ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), KeySigningKey: xml.first("KeySigningKey", true, KeySigningKey_Parse), }, }; }
async createQueryLoggingConfig( params: s.CreateQueryLoggingConfigRequest, opts: client.RequestOptions = {}, ): Promise<s.CreateQueryLoggingConfigResponse> { const body = xmlP.stringify({ name: "CreateQueryLoggingConfigRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "HostedZoneId", content: params["HostedZoneId"]?.toString()}, {name: "CloudWatchLogsLogGroupArn", content: params["CloudWatchLogsLogGroupArn"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "CreateQueryLoggingConfig", requestUri: "/2013-04-01/queryloggingconfig", responseCode: 201, }); const xml = xmlP.readXmlResult(await resp.text()); return { Location: resp.headers.get("Location") ?? "", ...{ QueryLoggingConfig: xml.first("QueryLoggingConfig", true, QueryLoggingConfig_Parse), }, }; }
async createReusableDelegationSet( params: s.CreateReusableDelegationSetRequest, opts: client.RequestOptions = {}, ): Promise<s.CreateReusableDelegationSetResponse> { const body = xmlP.stringify({ name: "CreateReusableDelegationSetRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "CallerReference", content: params["CallerReference"]?.toString()}, {name: "HostedZoneId", content: params["HostedZoneId"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "CreateReusableDelegationSet", requestUri: "/2013-04-01/delegationset", responseCode: 201, }); const xml = xmlP.readXmlResult(await resp.text()); return { Location: resp.headers.get("Location") ?? "", ...{ DelegationSet: xml.first("DelegationSet", true, DelegationSet_Parse), }, }; }
async createTrafficPolicy( params: s.CreateTrafficPolicyRequest, opts: client.RequestOptions = {}, ): Promise<s.CreateTrafficPolicyResponse> { const body = xmlP.stringify({ name: "CreateTrafficPolicyRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "Name", content: params["Name"]?.toString()}, {name: "Document", content: params["Document"]?.toString()}, {name: "Comment", content: params["Comment"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "CreateTrafficPolicy", requestUri: "/2013-04-01/trafficpolicy", responseCode: 201, }); const xml = xmlP.readXmlResult(await resp.text()); return { Location: resp.headers.get("Location") ?? "", ...{ TrafficPolicy: xml.first("TrafficPolicy", true, TrafficPolicy_Parse), }, }; }
async createTrafficPolicyInstance( params: s.CreateTrafficPolicyInstanceRequest, opts: client.RequestOptions = {}, ): Promise<s.CreateTrafficPolicyInstanceResponse> { const body = xmlP.stringify({ name: "CreateTrafficPolicyInstanceRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "HostedZoneId", content: params["HostedZoneId"]?.toString()}, {name: "Name", content: params["Name"]?.toString()}, {name: "TTL", content: params["TTL"]?.toString()}, {name: "TrafficPolicyId", content: params["TrafficPolicyId"]?.toString()}, {name: "TrafficPolicyVersion", content: params["TrafficPolicyVersion"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "CreateTrafficPolicyInstance", requestUri: "/2013-04-01/trafficpolicyinstance", responseCode: 201, }); const xml = xmlP.readXmlResult(await resp.text()); return { Location: resp.headers.get("Location") ?? "", ...{ TrafficPolicyInstance: xml.first("TrafficPolicyInstance", true, TrafficPolicyInstance_Parse), }, }; }
async createTrafficPolicyVersion( params: s.CreateTrafficPolicyVersionRequest, opts: client.RequestOptions = {}, ): Promise<s.CreateTrafficPolicyVersionResponse> { const body = xmlP.stringify({ name: "CreateTrafficPolicyVersionRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "Document", content: params["Document"]?.toString()}, {name: "Comment", content: params["Comment"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "CreateTrafficPolicyVersion", requestUri: cmnP.encodePath`/2013-04-01/trafficpolicy/${params["Id"]}`, responseCode: 201, }); const xml = xmlP.readXmlResult(await resp.text()); return { Location: resp.headers.get("Location") ?? "", ...{ TrafficPolicy: xml.first("TrafficPolicy", true, TrafficPolicy_Parse), }, }; }
async createVPCAssociationAuthorization( params: s.CreateVPCAssociationAuthorizationRequest, opts: client.RequestOptions = {}, ): Promise<s.CreateVPCAssociationAuthorizationResponse> { const body = xmlP.stringify({ name: "CreateVPCAssociationAuthorizationRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "VPC", ...VPC_Serialize(params["VPC"])}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "CreateVPCAssociationAuthorization", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/authorizevpcassociation`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"HostedZoneId":true}, }), VPC: xml.first("VPC", true, VPC_Parse), }; }
async deactivateKeySigningKey( params: s.DeactivateKeySigningKeyRequest, opts: client.RequestOptions = {}, ): Promise<s.DeactivateKeySigningKeyResponse> {
const resp = await this.#client.performRequest({ opts, action: "DeactivateKeySigningKey", requestUri: cmnP.encodePath`/2013-04-01/keysigningkey/${params["HostedZoneId"]}/${params["Name"]}/deactivate`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async deleteHealthCheck( params: s.DeleteHealthCheckRequest, opts: client.RequestOptions = {}, ): Promise<void> {
const resp = await this.#client.performRequest({ opts, action: "DeleteHealthCheck", method: "DELETE", requestUri: cmnP.encodePath`/2013-04-01/healthcheck/${params["HealthCheckId"]}`, }); await resp.body?.cancel(); }
async deleteHostedZone( params: s.DeleteHostedZoneRequest, opts: client.RequestOptions = {}, ): Promise<s.DeleteHostedZoneResponse> {
const resp = await this.#client.performRequest({ opts, action: "DeleteHostedZone", method: "DELETE", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["Id"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async deleteKeySigningKey( params: s.DeleteKeySigningKeyRequest, opts: client.RequestOptions = {}, ): Promise<s.DeleteKeySigningKeyResponse> {
const resp = await this.#client.performRequest({ opts, action: "DeleteKeySigningKey", method: "DELETE", requestUri: cmnP.encodePath`/2013-04-01/keysigningkey/${params["HostedZoneId"]}/${params["Name"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async deleteQueryLoggingConfig( params: s.DeleteQueryLoggingConfigRequest, opts: client.RequestOptions = {}, ): Promise<void> {
const resp = await this.#client.performRequest({ opts, action: "DeleteQueryLoggingConfig", method: "DELETE", requestUri: cmnP.encodePath`/2013-04-01/queryloggingconfig/${params["Id"]}`, }); await resp.body?.cancel(); }
async deleteReusableDelegationSet( params: s.DeleteReusableDelegationSetRequest, opts: client.RequestOptions = {}, ): Promise<void> {
const resp = await this.#client.performRequest({ opts, action: "DeleteReusableDelegationSet", method: "DELETE", requestUri: cmnP.encodePath`/2013-04-01/delegationset/${params["Id"]}`, }); await resp.body?.cancel(); }
async deleteTrafficPolicy( params: s.DeleteTrafficPolicyRequest, opts: client.RequestOptions = {}, ): Promise<void> {
const resp = await this.#client.performRequest({ opts, action: "DeleteTrafficPolicy", method: "DELETE", requestUri: cmnP.encodePath`/2013-04-01/trafficpolicy/${params["Id"]}/${params["Version"].toString()}`, }); await resp.body?.cancel(); }
async deleteTrafficPolicyInstance( params: s.DeleteTrafficPolicyInstanceRequest, opts: client.RequestOptions = {}, ): Promise<void> {
const resp = await this.#client.performRequest({ opts, action: "DeleteTrafficPolicyInstance", method: "DELETE", requestUri: cmnP.encodePath`/2013-04-01/trafficpolicyinstance/${params["Id"]}`, }); await resp.body?.cancel(); }
async deleteVPCAssociationAuthorization( params: s.DeleteVPCAssociationAuthorizationRequest, opts: client.RequestOptions = {}, ): Promise<void> { const body = xmlP.stringify({ name: "DeleteVPCAssociationAuthorizationRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "VPC", ...VPC_Serialize(params["VPC"])}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "DeleteVPCAssociationAuthorization", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/deauthorizevpcassociation`, }); await resp.body?.cancel(); }
async disableHostedZoneDNSSEC( params: s.DisableHostedZoneDNSSECRequest, opts: client.RequestOptions = {}, ): Promise<s.DisableHostedZoneDNSSECResponse> {
const resp = await this.#client.performRequest({ opts, action: "DisableHostedZoneDNSSEC", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/disable-dnssec`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async disassociateVPCFromHostedZone( params: s.DisassociateVPCFromHostedZoneRequest, opts: client.RequestOptions = {}, ): Promise<s.DisassociateVPCFromHostedZoneResponse> { const body = xmlP.stringify({ name: "DisassociateVPCFromHostedZoneRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "VPC", ...VPC_Serialize(params["VPC"])}, {name: "Comment", content: params["Comment"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "DisassociateVPCFromHostedZone", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/disassociatevpc`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async enableHostedZoneDNSSEC( params: s.EnableHostedZoneDNSSECRequest, opts: client.RequestOptions = {}, ): Promise<s.EnableHostedZoneDNSSECResponse> {
const resp = await this.#client.performRequest({ opts, action: "EnableHostedZoneDNSSEC", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/enable-dnssec`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async getAccountLimit( params: s.GetAccountLimitRequest, opts: client.RequestOptions = {}, ): Promise<s.GetAccountLimitResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetAccountLimit", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/accountlimit/${params["Type"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { Limit: xml.first("Limit", true, AccountLimit_Parse), Count: xml.first("Count", true, x => parseInt(x.content ?? '0')), }; }
async getChange( params: s.GetChangeRequest, opts: client.RequestOptions = {}, ): Promise<s.GetChangeResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetChange", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/change/${params["Id"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ChangeInfo: xml.first("ChangeInfo", true, ChangeInfo_Parse), }; }
async getCheckerIpRanges( opts: client.RequestOptions = {}, ): Promise<s.GetCheckerIpRangesResponse> { const body = ''; // TODO: anything more appropriate when no input? const resp = await this.#client.performRequest({ opts, body, action: "GetCheckerIpRanges", method: "GET", requestUri: "/2013-04-01/checkeripranges", }); const xml = xmlP.readXmlResult(await resp.text()); return { CheckerIpRanges: xml.getList("CheckerIpRanges", "member").map(x => x.content ?? ''), }; }
async getDNSSEC( params: s.GetDNSSECRequest, opts: client.RequestOptions = {}, ): Promise<s.GetDNSSECResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetDNSSEC", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/dnssec`, }); const xml = xmlP.readXmlResult(await resp.text()); return { Status: xml.first("Status", true, DNSSECStatus_Parse), KeySigningKeys: xml.getList("KeySigningKeys", "member").map(KeySigningKey_Parse), }; }
async getGeoLocation( params: s.GetGeoLocationRequest = {}, opts: client.RequestOptions = {}, ): Promise<s.GetGeoLocationResponse> { const query = new URLSearchParams; if (params["ContinentCode"] != null) query.set("continentcode", params["ContinentCode"]?.toString() ?? ""); if (params["CountryCode"] != null) query.set("countrycode", params["CountryCode"]?.toString() ?? ""); if (params["SubdivisionCode"] != null) query.set("subdivisioncode", params["SubdivisionCode"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "GetGeoLocation", method: "GET", requestUri: "/2013-04-01/geolocation", }); const xml = xmlP.readXmlResult(await resp.text()); return { GeoLocationDetails: xml.first("GeoLocationDetails", true, GeoLocationDetails_Parse), }; }
async getHealthCheck( params: s.GetHealthCheckRequest, opts: client.RequestOptions = {}, ): Promise<s.GetHealthCheckResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetHealthCheck", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/healthcheck/${params["HealthCheckId"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { HealthCheck: xml.first("HealthCheck", true, HealthCheck_Parse), }; }
async getHealthCheckCount( opts: client.RequestOptions = {}, ): Promise<s.GetHealthCheckCountResponse> { const body = ''; // TODO: anything more appropriate when no input? const resp = await this.#client.performRequest({ opts, body, action: "GetHealthCheckCount", method: "GET", requestUri: "/2013-04-01/healthcheckcount", }); const xml = xmlP.readXmlResult(await resp.text()); return { HealthCheckCount: xml.first("HealthCheckCount", true, x => parseInt(x.content ?? '0')), }; }
async getHealthCheckLastFailureReason( params: s.GetHealthCheckLastFailureReasonRequest, opts: client.RequestOptions = {}, ): Promise<s.GetHealthCheckLastFailureReasonResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetHealthCheckLastFailureReason", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/healthcheck/${params["HealthCheckId"]}/lastfailurereason`, }); const xml = xmlP.readXmlResult(await resp.text()); return { HealthCheckObservations: xml.getList("HealthCheckObservations", "HealthCheckObservation").map(HealthCheckObservation_Parse), }; }
async getHealthCheckStatus( params: s.GetHealthCheckStatusRequest, opts: client.RequestOptions = {}, ): Promise<s.GetHealthCheckStatusResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetHealthCheckStatus", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/healthcheck/${params["HealthCheckId"]}/status`, }); const xml = xmlP.readXmlResult(await resp.text()); return { HealthCheckObservations: xml.getList("HealthCheckObservations", "HealthCheckObservation").map(HealthCheckObservation_Parse), }; }
async getHostedZone( params: s.GetHostedZoneRequest, opts: client.RequestOptions = {}, ): Promise<s.GetHostedZoneResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetHostedZone", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["Id"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { HostedZone: xml.first("HostedZone", true, HostedZone_Parse), DelegationSet: xml.first("DelegationSet", false, DelegationSet_Parse), VPCs: xml.getList("VPCs", "VPC").map(VPC_Parse), }; }
async getHostedZoneCount( opts: client.RequestOptions = {}, ): Promise<s.GetHostedZoneCountResponse> { const body = ''; // TODO: anything more appropriate when no input? const resp = await this.#client.performRequest({ opts, body, action: "GetHostedZoneCount", method: "GET", requestUri: "/2013-04-01/hostedzonecount", }); const xml = xmlP.readXmlResult(await resp.text()); return { HostedZoneCount: xml.first("HostedZoneCount", true, x => parseInt(x.content ?? '0')), }; }
async getHostedZoneLimit( params: s.GetHostedZoneLimitRequest, opts: client.RequestOptions = {}, ): Promise<s.GetHostedZoneLimitResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetHostedZoneLimit", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/hostedzonelimit/${params["HostedZoneId"]}/${params["Type"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { Limit: xml.first("Limit", true, HostedZoneLimit_Parse), Count: xml.first("Count", true, x => parseInt(x.content ?? '0')), }; }
async getQueryLoggingConfig( params: s.GetQueryLoggingConfigRequest, opts: client.RequestOptions = {}, ): Promise<s.GetQueryLoggingConfigResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetQueryLoggingConfig", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/queryloggingconfig/${params["Id"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { QueryLoggingConfig: xml.first("QueryLoggingConfig", true, QueryLoggingConfig_Parse), }; }
async getReusableDelegationSet( params: s.GetReusableDelegationSetRequest, opts: client.RequestOptions = {}, ): Promise<s.GetReusableDelegationSetResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetReusableDelegationSet", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/delegationset/${params["Id"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { DelegationSet: xml.first("DelegationSet", true, DelegationSet_Parse), }; }
async getReusableDelegationSetLimit( params: s.GetReusableDelegationSetLimitRequest, opts: client.RequestOptions = {}, ): Promise<s.GetReusableDelegationSetLimitResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetReusableDelegationSetLimit", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/reusabledelegationsetlimit/${params["DelegationSetId"]}/${params["Type"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { Limit: xml.first("Limit", true, ReusableDelegationSetLimit_Parse), Count: xml.first("Count", true, x => parseInt(x.content ?? '0')), }; }
async getTrafficPolicy( params: s.GetTrafficPolicyRequest, opts: client.RequestOptions = {}, ): Promise<s.GetTrafficPolicyResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetTrafficPolicy", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/trafficpolicy/${params["Id"]}/${params["Version"].toString()}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { TrafficPolicy: xml.first("TrafficPolicy", true, TrafficPolicy_Parse), }; }
async getTrafficPolicyInstance( params: s.GetTrafficPolicyInstanceRequest, opts: client.RequestOptions = {}, ): Promise<s.GetTrafficPolicyInstanceResponse> {
const resp = await this.#client.performRequest({ opts, action: "GetTrafficPolicyInstance", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/trafficpolicyinstance/${params["Id"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { TrafficPolicyInstance: xml.first("TrafficPolicyInstance", true, TrafficPolicyInstance_Parse), }; }
async getTrafficPolicyInstanceCount( opts: client.RequestOptions = {}, ): Promise<s.GetTrafficPolicyInstanceCountResponse> { const body = ''; // TODO: anything more appropriate when no input? const resp = await this.#client.performRequest({ opts, body, action: "GetTrafficPolicyInstanceCount", method: "GET", requestUri: "/2013-04-01/trafficpolicyinstancecount", }); const xml = xmlP.readXmlResult(await resp.text()); return { TrafficPolicyInstanceCount: xml.first("TrafficPolicyInstanceCount", true, x => parseInt(x.content ?? '0')), }; }
async listGeoLocations( params: s.ListGeoLocationsRequest = {}, opts: client.RequestOptions = {}, ): Promise<s.ListGeoLocationsResponse> { const query = new URLSearchParams; if (params["StartContinentCode"] != null) query.set("startcontinentcode", params["StartContinentCode"]?.toString() ?? ""); if (params["StartCountryCode"] != null) query.set("startcountrycode", params["StartCountryCode"]?.toString() ?? ""); if (params["StartSubdivisionCode"] != null) query.set("startsubdivisioncode", params["StartSubdivisionCode"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListGeoLocations", method: "GET", requestUri: "/2013-04-01/geolocations", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"MaxItems":true}, optional: {"NextContinentCode":true,"NextCountryCode":true,"NextSubdivisionCode":true}, }), GeoLocationDetailsList: xml.getList("GeoLocationDetailsList", "GeoLocationDetails").map(GeoLocationDetails_Parse), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listHealthChecks( params: s.ListHealthChecksRequest = {}, opts: client.RequestOptions = {}, ): Promise<s.ListHealthChecksResponse> { const query = new URLSearchParams; if (params["Marker"] != null) query.set("marker", params["Marker"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListHealthChecks", method: "GET", requestUri: "/2013-04-01/healthcheck", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"Marker":true,"MaxItems":true}, optional: {"NextMarker":true}, }), HealthChecks: xml.getList("HealthChecks", "HealthCheck").map(HealthCheck_Parse), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listHostedZones( params: s.ListHostedZonesRequest = {}, opts: client.RequestOptions = {}, ): Promise<s.ListHostedZonesResponse> { const query = new URLSearchParams; if (params["Marker"] != null) query.set("marker", params["Marker"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); if (params["DelegationSetId"] != null) query.set("delegationsetid", params["DelegationSetId"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListHostedZones", method: "GET", requestUri: "/2013-04-01/hostedzone", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"MaxItems":true}, optional: {"Marker":true,"NextMarker":true}, }), HostedZones: xml.getList("HostedZones", "HostedZone").map(HostedZone_Parse), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listHostedZonesByName( params: s.ListHostedZonesByNameRequest = {}, opts: client.RequestOptions = {}, ): Promise<s.ListHostedZonesByNameResponse> { const query = new URLSearchParams; if (params["DNSName"] != null) query.set("dnsname", params["DNSName"]?.toString() ?? ""); if (params["HostedZoneId"] != null) query.set("hostedzoneid", params["HostedZoneId"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListHostedZonesByName", method: "GET", requestUri: "/2013-04-01/hostedzonesbyname", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"MaxItems":true}, optional: {"DNSName":true,"HostedZoneId":true,"NextDNSName":true,"NextHostedZoneId":true}, }), HostedZones: xml.getList("HostedZones", "HostedZone").map(HostedZone_Parse), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listHostedZonesByVPC( params: s.ListHostedZonesByVPCRequest, opts: client.RequestOptions = {}, ): Promise<s.ListHostedZonesByVPCResponse> { const query = new URLSearchParams; query.set("vpcid", params["VPCId"]?.toString() ?? ""); query.set("vpcregion", params["VPCRegion"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); if (params["NextToken"] != null) query.set("nexttoken", params["NextToken"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListHostedZonesByVPC", method: "GET", requestUri: "/2013-04-01/hostedzonesbyvpc", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"MaxItems":true}, optional: {"NextToken":true}, }), HostedZoneSummaries: xml.getList("HostedZoneSummaries", "HostedZoneSummary").map(HostedZoneSummary_Parse), }; }
async listQueryLoggingConfigs( params: s.ListQueryLoggingConfigsRequest = {}, opts: client.RequestOptions = {}, ): Promise<s.ListQueryLoggingConfigsResponse> { const query = new URLSearchParams; if (params["HostedZoneId"] != null) query.set("hostedzoneid", params["HostedZoneId"]?.toString() ?? ""); if (params["NextToken"] != null) query.set("nexttoken", params["NextToken"]?.toString() ?? ""); if (params["MaxResults"] != null) query.set("maxresults", params["MaxResults"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListQueryLoggingConfigs", method: "GET", requestUri: "/2013-04-01/queryloggingconfig", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ optional: {"NextToken":true}, }), QueryLoggingConfigs: xml.getList("QueryLoggingConfigs", "QueryLoggingConfig").map(QueryLoggingConfig_Parse), }; }
async listResourceRecordSets( params: s.ListResourceRecordSetsRequest, opts: client.RequestOptions = {}, ): Promise<s.ListResourceRecordSetsResponse> { const query = new URLSearchParams; if (params["StartRecordName"] != null) query.set("name", params["StartRecordName"]?.toString() ?? ""); if (params["StartRecordType"] != null) query.set("type", params["StartRecordType"]?.toString() ?? ""); if (params["StartRecordIdentifier"] != null) query.set("identifier", params["StartRecordIdentifier"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListResourceRecordSets", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/rrset`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"MaxItems":true}, optional: {"NextRecordName":true,"NextRecordIdentifier":true}, }), ResourceRecordSets: xml.getList("ResourceRecordSets", "ResourceRecordSet").map(ResourceRecordSet_Parse), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), NextRecordType: xml.first("NextRecordType", false, x => (x.content ?? '') as s.RRType), }; }
async listReusableDelegationSets( params: s.ListReusableDelegationSetsRequest = {}, opts: client.RequestOptions = {}, ): Promise<s.ListReusableDelegationSetsResponse> { const query = new URLSearchParams; if (params["Marker"] != null) query.set("marker", params["Marker"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListReusableDelegationSets", method: "GET", requestUri: "/2013-04-01/delegationset", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"Marker":true,"MaxItems":true}, optional: {"NextMarker":true}, }), DelegationSets: xml.getList("DelegationSets", "DelegationSet").map(DelegationSet_Parse), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listTagsForResource( params: s.ListTagsForResourceRequest, opts: client.RequestOptions = {}, ): Promise<s.ListTagsForResourceResponse> {
const resp = await this.#client.performRequest({ opts, action: "ListTagsForResource", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/tags/${params["ResourceType"]}/${params["ResourceId"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ResourceTagSet: xml.first("ResourceTagSet", true, ResourceTagSet_Parse), }; }
async listTagsForResources( params: s.ListTagsForResourcesRequest, opts: client.RequestOptions = {}, ): Promise<s.ListTagsForResourcesResponse> { const body = xmlP.stringify({ name: "ListTagsForResourcesRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "ResourceIds", children: params["ResourceIds"]?.map(x => ({name: "ResourceId", content: x}))}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "ListTagsForResources", requestUri: cmnP.encodePath`/2013-04-01/tags/${params["ResourceType"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ResourceTagSets: xml.getList("ResourceTagSets", "ResourceTagSet").map(ResourceTagSet_Parse), }; }
async listTrafficPolicies( params: s.ListTrafficPoliciesRequest = {}, opts: client.RequestOptions = {}, ): Promise<s.ListTrafficPoliciesResponse> { const query = new URLSearchParams; if (params["TrafficPolicyIdMarker"] != null) query.set("trafficpolicyid", params["TrafficPolicyIdMarker"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListTrafficPolicies", method: "GET", requestUri: "/2013-04-01/trafficpolicies", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"TrafficPolicyIdMarker":true,"MaxItems":true}, }), TrafficPolicySummaries: xml.getList("TrafficPolicySummaries", "TrafficPolicySummary").map(TrafficPolicySummary_Parse), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listTrafficPolicyInstances( params: s.ListTrafficPolicyInstancesRequest = {}, opts: client.RequestOptions = {}, ): Promise<s.ListTrafficPolicyInstancesResponse> { const query = new URLSearchParams; if (params["HostedZoneIdMarker"] != null) query.set("hostedzoneid", params["HostedZoneIdMarker"]?.toString() ?? ""); if (params["TrafficPolicyInstanceNameMarker"] != null) query.set("trafficpolicyinstancename", params["TrafficPolicyInstanceNameMarker"]?.toString() ?? ""); if (params["TrafficPolicyInstanceTypeMarker"] != null) query.set("trafficpolicyinstancetype", params["TrafficPolicyInstanceTypeMarker"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListTrafficPolicyInstances", method: "GET", requestUri: "/2013-04-01/trafficpolicyinstances", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"MaxItems":true}, optional: {"HostedZoneIdMarker":true,"TrafficPolicyInstanceNameMarker":true}, }), TrafficPolicyInstances: xml.getList("TrafficPolicyInstances", "TrafficPolicyInstance").map(TrafficPolicyInstance_Parse), TrafficPolicyInstanceTypeMarker: xml.first("TrafficPolicyInstanceTypeMarker", false, x => (x.content ?? '') as s.RRType), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listTrafficPolicyInstancesByHostedZone( params: s.ListTrafficPolicyInstancesByHostedZoneRequest, opts: client.RequestOptions = {}, ): Promise<s.ListTrafficPolicyInstancesByHostedZoneResponse> { const query = new URLSearchParams; query.set("id", params["HostedZoneId"]?.toString() ?? ""); if (params["TrafficPolicyInstanceNameMarker"] != null) query.set("trafficpolicyinstancename", params["TrafficPolicyInstanceNameMarker"]?.toString() ?? ""); if (params["TrafficPolicyInstanceTypeMarker"] != null) query.set("trafficpolicyinstancetype", params["TrafficPolicyInstanceTypeMarker"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListTrafficPolicyInstancesByHostedZone", method: "GET", requestUri: "/2013-04-01/trafficpolicyinstances/hostedzone", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"MaxItems":true}, optional: {"TrafficPolicyInstanceNameMarker":true}, }), TrafficPolicyInstances: xml.getList("TrafficPolicyInstances", "TrafficPolicyInstance").map(TrafficPolicyInstance_Parse), TrafficPolicyInstanceTypeMarker: xml.first("TrafficPolicyInstanceTypeMarker", false, x => (x.content ?? '') as s.RRType), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listTrafficPolicyInstancesByPolicy( params: s.ListTrafficPolicyInstancesByPolicyRequest, opts: client.RequestOptions = {}, ): Promise<s.ListTrafficPolicyInstancesByPolicyResponse> { const query = new URLSearchParams; query.set("id", params["TrafficPolicyId"]?.toString() ?? ""); query.set("version", params["TrafficPolicyVersion"]?.toString() ?? ""); if (params["HostedZoneIdMarker"] != null) query.set("hostedzoneid", params["HostedZoneIdMarker"]?.toString() ?? ""); if (params["TrafficPolicyInstanceNameMarker"] != null) query.set("trafficpolicyinstancename", params["TrafficPolicyInstanceNameMarker"]?.toString() ?? ""); if (params["TrafficPolicyInstanceTypeMarker"] != null) query.set("trafficpolicyinstancetype", params["TrafficPolicyInstanceTypeMarker"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListTrafficPolicyInstancesByPolicy", method: "GET", requestUri: "/2013-04-01/trafficpolicyinstances/trafficpolicy", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"MaxItems":true}, optional: {"HostedZoneIdMarker":true,"TrafficPolicyInstanceNameMarker":true}, }), TrafficPolicyInstances: xml.getList("TrafficPolicyInstances", "TrafficPolicyInstance").map(TrafficPolicyInstance_Parse), TrafficPolicyInstanceTypeMarker: xml.first("TrafficPolicyInstanceTypeMarker", false, x => (x.content ?? '') as s.RRType), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listTrafficPolicyVersions( params: s.ListTrafficPolicyVersionsRequest, opts: client.RequestOptions = {}, ): Promise<s.ListTrafficPolicyVersionsResponse> { const query = new URLSearchParams; if (params["TrafficPolicyVersionMarker"] != null) query.set("trafficpolicyversion", params["TrafficPolicyVersionMarker"]?.toString() ?? ""); if (params["MaxItems"] != null) query.set("maxitems", params["MaxItems"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListTrafficPolicyVersions", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/trafficpolicies/${params["Id"]}/versions`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"TrafficPolicyVersionMarker":true,"MaxItems":true}, }), TrafficPolicies: xml.getList("TrafficPolicies", "TrafficPolicy").map(TrafficPolicy_Parse), IsTruncated: xml.first("IsTruncated", true, x => x.content === 'true'), }; }
async listVPCAssociationAuthorizations( params: s.ListVPCAssociationAuthorizationsRequest, opts: client.RequestOptions = {}, ): Promise<s.ListVPCAssociationAuthorizationsResponse> { const query = new URLSearchParams; if (params["NextToken"] != null) query.set("nexttoken", params["NextToken"]?.toString() ?? ""); if (params["MaxResults"] != null) query.set("maxresults", params["MaxResults"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListVPCAssociationAuthorizations", method: "GET", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["HostedZoneId"]}/authorizevpcassociation`, }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"HostedZoneId":true}, optional: {"NextToken":true}, }), VPCs: xml.getList("VPCs", "VPC").map(VPC_Parse), }; }
async testDNSAnswer( params: s.TestDNSAnswerRequest, opts: client.RequestOptions = {}, ): Promise<s.TestDNSAnswerResponse> { const query = new URLSearchParams; query.set("hostedzoneid", params["HostedZoneId"]?.toString() ?? ""); query.set("recordname", params["RecordName"]?.toString() ?? ""); query.set("recordtype", params["RecordType"]?.toString() ?? ""); if (params["ResolverIP"] != null) query.set("resolverip", params["ResolverIP"]?.toString() ?? ""); if (params["EDNS0ClientSubnetIP"] != null) query.set("edns0clientsubnetip", params["EDNS0ClientSubnetIP"]?.toString() ?? ""); if (params["EDNS0ClientSubnetMask"] != null) query.set("edns0clientsubnetmask", params["EDNS0ClientSubnetMask"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "TestDNSAnswer", method: "GET", requestUri: "/2013-04-01/testdnsanswer", }); const xml = xmlP.readXmlResult(await resp.text()); return { ...xml.strings({ required: {"Nameserver":true,"RecordName":true,"ResponseCode":true,"Protocol":true}, }), RecordType: xml.first("RecordType", true, x => (x.content ?? '') as s.RRType), RecordData: xml.getList("RecordData", "RecordDataEntry").map(x => x.content ?? ''), }; }
async updateHealthCheck( params: s.UpdateHealthCheckRequest, opts: client.RequestOptions = {}, ): Promise<s.UpdateHealthCheckResponse> { const body = xmlP.stringify({ name: "UpdateHealthCheckRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "HealthCheckVersion", content: params["HealthCheckVersion"]?.toString()}, {name: "IPAddress", content: params["IPAddress"]?.toString()}, {name: "Port", content: params["Port"]?.toString()}, {name: "ResourcePath", content: params["ResourcePath"]?.toString()}, {name: "FullyQualifiedDomainName", content: params["FullyQualifiedDomainName"]?.toString()}, {name: "SearchString", content: params["SearchString"]?.toString()}, {name: "FailureThreshold", content: params["FailureThreshold"]?.toString()}, {name: "Inverted", content: params["Inverted"]?.toString()}, {name: "Disabled", content: params["Disabled"]?.toString()}, {name: "HealthThreshold", content: params["HealthThreshold"]?.toString()}, {name: "ChildHealthChecks", children: params["ChildHealthChecks"]?.map(x => ({name: "ChildHealthCheck", content: x}))}, {name: "EnableSNI", content: params["EnableSNI"]?.toString()}, {name: "Regions", children: params["Regions"]?.map(x => ({name: "Region", content: x}))}, {name: "AlarmIdentifier", ...AlarmIdentifier_Serialize(params["AlarmIdentifier"])}, {name: "InsufficientDataHealthStatus", content: params["InsufficientDataHealthStatus"]?.toString()}, {name: "ResetElements", children: params["ResetElements"]?.map(x => ({name: "ResettableElementName", content: x}))}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "UpdateHealthCheck", requestUri: cmnP.encodePath`/2013-04-01/healthcheck/${params["HealthCheckId"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { HealthCheck: xml.first("HealthCheck", true, HealthCheck_Parse), }; }
async updateHostedZoneComment( params: s.UpdateHostedZoneCommentRequest, opts: client.RequestOptions = {}, ): Promise<s.UpdateHostedZoneCommentResponse> { const body = xmlP.stringify({ name: "UpdateHostedZoneCommentRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "Comment", content: params["Comment"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "UpdateHostedZoneComment", requestUri: cmnP.encodePath`/2013-04-01/hostedzone/${params["Id"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { HostedZone: xml.first("HostedZone", true, HostedZone_Parse), }; }
async updateTrafficPolicyComment( params: s.UpdateTrafficPolicyCommentRequest, opts: client.RequestOptions = {}, ): Promise<s.UpdateTrafficPolicyCommentResponse> { const body = xmlP.stringify({ name: "UpdateTrafficPolicyCommentRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "Comment", content: params["Comment"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "UpdateTrafficPolicyComment", requestUri: cmnP.encodePath`/2013-04-01/trafficpolicy/${params["Id"]}/${params["Version"].toString()}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { TrafficPolicy: xml.first("TrafficPolicy", true, TrafficPolicy_Parse), }; }
async updateTrafficPolicyInstance( params: s.UpdateTrafficPolicyInstanceRequest, opts: client.RequestOptions = {}, ): Promise<s.UpdateTrafficPolicyInstanceResponse> { const body = xmlP.stringify({ name: "UpdateTrafficPolicyInstanceRequest", attributes: {"xmlns":"https://route53.amazonaws.com/doc/2013-04-01/"}, children: [ {name: "TTL", content: params["TTL"]?.toString()}, {name: "TrafficPolicyId", content: params["TrafficPolicyId"]?.toString()}, {name: "TrafficPolicyVersion", content: params["TrafficPolicyVersion"]?.toString()}, ]}); const resp = await this.#client.performRequest({ opts, body, action: "UpdateTrafficPolicyInstance", requestUri: cmnP.encodePath`/2013-04-01/trafficpolicyinstance/${params["Id"]}`, }); const xml = xmlP.readXmlResult(await resp.text()); return { TrafficPolicyInstance: xml.first("TrafficPolicyInstance", true, TrafficPolicyInstance_Parse), }; }
// Resource State Waiters
/** Checks state up to 60 times, 30 seconds apart (about 30 minutes max wait time). */ async waitForResourceRecordSetsChanged( params: s.GetChangeRequest, opts: client.RequestOptions = {}, ): Promise<s.GetChangeResponse> { const errMessage = 'ResourceNotReady: Resource is not in the state ResourceRecordSetsChanged'; for (let i = 0; i < 60; i++) { const resp = await this.getChange(params, opts); if (resp?.ChangeInfo?.Status === "INSYNC") return resp; await new Promise(r => setTimeout(r, 30000)); } throw new Error(errMessage); }
}
function VPC_Serialize(data: s.VPC | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "VPCRegion", content: data["VPCRegion"]?.toString()}, {name: "VPCId", content: data["VPCId"]?.toString()}, ]};}function VPC_Parse(node: xmlP.XmlNode): s.VPC { return { ...node.strings({ optional: {"VPCId":true}, }), VPCRegion: node.first("VPCRegion", false, x => (x.content ?? '') as s.VPCRegion), };}
function ChangeBatch_Serialize(data: s.ChangeBatch | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "Comment", content: data["Comment"]?.toString()}, {name: "Changes", children: data["Changes"]?.map(x => ({name: "Change", ...Change_Serialize(x)}))}, ]};}
function Change_Serialize(data: s.Change | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "Action", content: data["Action"]?.toString()}, {name: "ResourceRecordSet", ...ResourceRecordSet_Serialize(data["ResourceRecordSet"])}, ]};}
function ResourceRecordSet_Serialize(data: s.ResourceRecordSet | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "Name", content: data["Name"]?.toString()}, {name: "Type", content: data["Type"]?.toString()}, {name: "SetIdentifier", content: data["SetIdentifier"]?.toString()}, {name: "Weight", content: data["Weight"]?.toString()}, {name: "Region", content: data["Region"]?.toString()}, {name: "GeoLocation", ...GeoLocation_Serialize(data["GeoLocation"])}, {name: "Failover", content: data["Failover"]?.toString()}, {name: "MultiValueAnswer", content: data["MultiValueAnswer"]?.toString()}, {name: "TTL", content: data["TTL"]?.toString()}, {name: "ResourceRecords", children: data["ResourceRecords"]?.map(x => ({name: "ResourceRecord", ...ResourceRecord_Serialize(x)}))}, {name: "AliasTarget", ...AliasTarget_Serialize(data["AliasTarget"])}, {name: "HealthCheckId", content: data["HealthCheckId"]?.toString()}, {name: "TrafficPolicyInstanceId", content: data["TrafficPolicyInstanceId"]?.toString()}, ]};}function ResourceRecordSet_Parse(node: xmlP.XmlNode): s.ResourceRecordSet { return { ...node.strings({ required: {"Name":true}, optional: {"SetIdentifier":true,"HealthCheckId":true,"TrafficPolicyInstanceId":true}, }), Type: node.first("Type", true, x => (x.content ?? '') as s.RRType), Weight: node.first("Weight", false, x => parseInt(x.content ?? '0')), Region: node.first("Region", false, x => (x.content ?? '') as s.ResourceRecordSetRegion), GeoLocation: node.first("GeoLocation", false, GeoLocation_Parse), Failover: node.first("Failover", false, x => (x.content ?? '') as s.ResourceRecordSetFailover), MultiValueAnswer: node.first("MultiValueAnswer", false, x => x.content === 'true'), TTL: node.first("TTL", false, x => parseInt(x.content ?? '0')), ResourceRecords: node.getList("ResourceRecords", "ResourceRecord").map(ResourceRecord_Parse), AliasTarget: node.first("AliasTarget", false, AliasTarget_Parse), };}
function GeoLocation_Serialize(data: s.GeoLocation | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "ContinentCode", content: data["ContinentCode"]?.toString()}, {name: "CountryCode", content: data["CountryCode"]?.toString()}, {name: "SubdivisionCode", content: data["SubdivisionCode"]?.toString()}, ]};}function GeoLocation_Parse(node: xmlP.XmlNode): s.GeoLocation { return node.strings({ optional: {"ContinentCode":true,"CountryCode":true,"SubdivisionCode":true}, });}
function ResourceRecord_Serialize(data: s.ResourceRecord | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "Value", content: data["Value"]?.toString()}, ]};}function ResourceRecord_Parse(node: xmlP.XmlNode): s.ResourceRecord { return node.strings({ required: {"Value":true}, });}
function AliasTarget_Serialize(data: s.AliasTarget | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "HostedZoneId", content: data["HostedZoneId"]?.toString()}, {name: "DNSName", content: data["DNSName"]?.toString()}, {name: "EvaluateTargetHealth", content: data["EvaluateTargetHealth"]?.toString()}, ]};}function AliasTarget_Parse(node: xmlP.XmlNode): s.AliasTarget { return { ...node.strings({ required: {"HostedZoneId":true,"DNSName":true}, }), EvaluateTargetHealth: node.first("EvaluateTargetHealth", true, x => x.content === 'true'), };}
function Tag_Serialize(data: s.Tag | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "Key", content: data["Key"]?.toString()}, {name: "Value", content: data["Value"]?.toString()}, ]};}function Tag_Parse(node: xmlP.XmlNode): s.Tag { return node.strings({ optional: {"Key":true,"Value":true}, });}
function HealthCheckConfig_Serialize(data: s.HealthCheckConfig | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "IPAddress", content: data["IPAddress"]?.toString()}, {name: "Port", content: data["Port"]?.toString()}, {name: "Type", content: data["Type"]?.toString()}, {name: "ResourcePath", content: data["ResourcePath"]?.toString()}, {name: "FullyQualifiedDomainName", content: data["FullyQualifiedDomainName"]?.toString()}, {name: "SearchString", content: data["SearchString"]?.toString()}, {name: "RequestInterval", content: data["RequestInterval"]?.toString()}, {name: "FailureThreshold", content: data["FailureThreshold"]?.toString()}, {name: "MeasureLatency", content: data["MeasureLatency"]?.toString()}, {name: "Inverted", content: data["Inverted"]?.toString()}, {name: "Disabled", content: data["Disabled"]?.toString()}, {name: "HealthThreshold", content: data["HealthThreshold"]?.toString()}, {name: "ChildHealthChecks", children: data["ChildHealthChecks"]?.map(x => ({name: "ChildHealthCheck", content: x}))}, {name: "EnableSNI", content: data["EnableSNI"]?.toString()}, {name: "Regions", children: data["Regions"]?.map(x => ({name: "Region", content: x}))}, {name: "AlarmIdentifier", ...AlarmIdentifier_Serialize(data["AlarmIdentifier"])}, {name: "InsufficientDataHealthStatus", content: data["InsufficientDataHealthStatus"]?.toString()}, {name: "RoutingControlArn", content: data["RoutingControlArn"]?.toString()}, ]};}function HealthCheckConfig_Parse(node: xmlP.XmlNode): s.HealthCheckConfig { return { ...node.strings({ optional: {"IPAddress":true,"ResourcePath":true,"FullyQualifiedDomainName":true,"SearchString":true,"RoutingControlArn":true}, }), Port: node.first("Port", false, x => parseInt(x.content ?? '0')), Type: node.first("Type", true, x => (x.content ?? '') as s.HealthCheckType), RequestInterval: node.first("RequestInterval", false, x => parseInt(x.content ?? '0')), FailureThreshold: node.first("FailureThreshold", false, x => parseInt(x.content ?? '0')), MeasureLatency: node.first("MeasureLatency", false, x => x.content === 'true'), Inverted: node.first("Inverted", false, x => x.content === 'true'), Disabled: node.first("Disabled", false, x => x.content === 'true'), HealthThreshold: node.first("HealthThreshold", false, x => parseInt(x.content ?? '0')), ChildHealthChecks: node.getList("ChildHealthChecks", "ChildHealthCheck").map(x => x.content ?? ''), EnableSNI: node.first("EnableSNI", false, x => x.content === 'true'), Regions: node.getList("Regions", "Region").map(x => (x.content ?? '') as s.HealthCheckRegion), AlarmIdentifier: node.first("AlarmIdentifier", false, AlarmIdentifier_Parse), InsufficientDataHealthStatus: node.first("InsufficientDataHealthStatus", false, x => (x.content ?? '') as s.InsufficientDataHealthStatus), };}
function AlarmIdentifier_Serialize(data: s.AlarmIdentifier | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "Region", content: data["Region"]?.toString()}, {name: "Name", content: data["Name"]?.toString()}, ]};}function AlarmIdentifier_Parse(node: xmlP.XmlNode): s.AlarmIdentifier { return { ...node.strings({ required: {"Name":true}, }), Region: node.first("Region", true, x => (x.content ?? '') as s.CloudWatchRegion), };}
function HostedZoneConfig_Serialize(data: s.HostedZoneConfig | undefined | null): Partial<xmlP.Node> { if (!data) return {}; return {children: [ {name: "Comment", content: data["Comment"]?.toString()}, {name: "PrivateZone", content: data["PrivateZone"]?.toString()}, ]};}function HostedZoneConfig_Parse(node: xmlP.XmlNode): s.HostedZoneConfig { return { ...node.strings({ optional: {"Comment":true}, }), PrivateZone: node.first("PrivateZone", false, x => x.content === 'true'), };}
function ChangeInfo_Parse(node: xmlP.XmlNode): s.ChangeInfo { return { ...node.strings({ required: {"Id":true}, optional: {"Comment":true}, }), Status: node.first("Status", true, x => (x.content ?? '') as s.ChangeStatus), SubmittedAt: node.first("SubmittedAt", true, x => xmlP.parseTimestamp(x.content)), };}
function HealthCheck_Parse(node: xmlP.XmlNode): s.HealthCheck { return { ...node.strings({ required: {"Id":true,"CallerReference":true}, }), LinkedService: node.first("LinkedService", false, LinkedService_Parse), HealthCheckConfig: node.first("HealthCheckConfig", true, HealthCheckConfig_Parse), HealthCheckVersion: node.first("HealthCheckVersion", true, x => parseInt(x.content ?? '0')), CloudWatchAlarmConfiguration: node.first("CloudWatchAlarmConfiguration", false, CloudWatchAlarmConfiguration_Parse), };}
function LinkedService_Parse(node: xmlP.XmlNode): s.LinkedService { return node.strings({ optional: {"ServicePrincipal":true,"Description":true}, });}
function CloudWatchAlarmConfiguration_Parse(node: xmlP.XmlNode): s.CloudWatchAlarmConfiguration { return { ...node.strings({ required: {"MetricName":true,"Namespace":true}, }), EvaluationPeriods: node.first("EvaluationPeriods", true, x => parseInt(x.content ?? '0')), Threshold: node.first("Threshold", true, x => parseFloat(x.content ?? '0')), ComparisonOperator: node.first("ComparisonOperator", true, x => (x.content ?? '') as s.ComparisonOperator), Period: node.first("Period", true, x => parseInt(x.content ?? '0')), Statistic: node.first("Statistic", true, x => (x.content ?? '') as s.Statistic), Dimensions: node.getList("Dimensions", "Dimension").map(Dimension_Parse), };}
function Dimension_Parse(node: xmlP.XmlNode): s.Dimension { return node.strings({ required: {"Name":true,"Value":true}, });}
function HostedZone_Parse(node: xmlP.XmlNode): s.HostedZone { return { ...node.strings({ required: {"Id":true,"Name":true,"CallerReference":true}, }), Config: node.first("Config", false, HostedZoneConfig_Parse), ResourceRecordSetCount: node.first("ResourceRecordSetCount", false, x => parseInt(x.content ?? '0')), LinkedService: node.first("LinkedService", false, LinkedService_Parse), };}
function DelegationSet_Parse(node: xmlP.XmlNode): s.DelegationSet { return { ...node.strings({ optional: {"Id":true,"CallerReference":true}, }), NameServers: node.getList("NameServers", "NameServer").map(x => x.content ?? ''), };}
function KeySigningKey_Parse(node: xmlP.XmlNode): s.KeySigningKey { return { ...node.strings({ optional: {"Name":true,"KmsArn":true,"SigningAlgorithmMnemonic":true,"DigestAlgorithmMnemonic":true,"DigestValue":true,"PublicKey":true,"DSRecord":true,"DNSKEYRecord":true,"Status":true,"StatusMessage":true}, }), Flag: node.first("Flag", false, x => parseInt(x.content ?? '0')), SigningAlgorithmType: node.first("SigningAlgorithmType", false, x => parseInt(x.content ?? '0')), DigestAlgorithmType: node.first("DigestAlgorithmType", false, x => parseInt(x.content ?? '0')), KeyTag: node.first("KeyTag", false, x => parseInt(x.content ?? '0')), CreatedDate: node.first("CreatedDate", false, x => xmlP.parseTimestamp(x.content)), LastModifiedDate: node.first("LastModifiedDate", false, x => xmlP.parseTimestamp(x.content)), };}
function QueryLoggingConfig_Parse(node: xmlP.XmlNode): s.QueryLoggingConfig { return node.strings({ required: {"Id":true,"HostedZoneId":true,"CloudWatchLogsLogGroupArn":true}, });}
function TrafficPolicy_Parse(node: xmlP.XmlNode): s.TrafficPolicy { return { ...node.strings({ required: {"Id":true,"Name":true,"Document":true}, optional: {"Comment":true}, }), Version: node.first("Version", true, x => parseInt(x.content ?? '0')), Type: node.first("Type", true, x => (x.content ?? '') as s.RRType), };}
function TrafficPolicyInstance_Parse(node: xmlP.XmlNode): s.TrafficPolicyInstance { return { ...node.strings({ required: {"Id":true,"HostedZoneId":true,"Name":true,"State":true,"Message":true,"TrafficPolicyId":true}, }), TTL: node.first("TTL", true, x => parseInt(x.content ?? '0')), TrafficPolicyVersion: node.first("TrafficPolicyVersion", true, x => parseInt(x.content ?? '0')), TrafficPolicyType: node.first("TrafficPolicyType", true, x => (x.content ?? '') as s.RRType), };}
function AccountLimit_Parse(node: xmlP.XmlNode): s.AccountLimit { return { Type: node.first("Type", true, x => (x.content ?? '') as s.AccountLimitType), Value: node.first("Value", true, x => parseInt(x.content ?? '0')), };}
function DNSSECStatus_Parse(node: xmlP.XmlNode): s.DNSSECStatus { return node.strings({ optional: {"ServeSignature":true,"StatusMessage":true}, });}
function GeoLocationDetails_Parse(node: xmlP.XmlNode): s.GeoLocationDetails { return node.strings({ optional: {"ContinentCode":true,"ContinentName":true,"CountryCode":true,"CountryName":true,"SubdivisionCode":true,"SubdivisionName":true}, });}
function HealthCheckObservation_Parse(node: xmlP.XmlNode): s.HealthCheckObservation { return { ...node.strings({ optional: {"IPAddress":true}, }), Region: node.first("Region", false, x => (x.content ?? '') as s.HealthCheckRegion), StatusReport: node.first("StatusReport", false, StatusReport_Parse), };}
function StatusReport_Parse(node: xmlP.XmlNode): s.StatusReport { return { ...node.strings({ optional: {"Status":true}, }), CheckedTime: node.first("CheckedTime", false, x => xmlP.parseTimestamp(x.content)), };}
function HostedZoneLimit_Parse(node: xmlP.XmlNode): s.HostedZoneLimit { return { Type: node.first("Type", true, x => (x.content ?? '') as s.HostedZoneLimitType), Value: node.first("Value", true, x => parseInt(x.content ?? '0')), };}
function ReusableDelegationSetLimit_Parse(node: xmlP.XmlNode): s.ReusableDelegationSetLimit { return { Type: node.first("Type", true, x => (x.content ?? '') as s.ReusableDelegationSetLimitType), Value: node.first("Value", true, x => parseInt(x.content ?? '0')), };}
function HostedZoneSummary_Parse(node: xmlP.XmlNode): s.HostedZoneSummary { return { ...node.strings({ required: {"HostedZoneId":true,"Name":true}, }), Owner: node.first("Owner", true, HostedZoneOwner_Parse), };}
function HostedZoneOwner_Parse(node: xmlP.XmlNode): s.HostedZoneOwner { return node.strings({ optional: {"OwningAccount":true,"OwningService":true}, });}
function ResourceTagSet_Parse(node: xmlP.XmlNode): s.ResourceTagSet { return { ...node.strings({ optional: {"ResourceId":true}, }), ResourceType: node.first("ResourceType", false, x => (x.content ?? '') as s.TagResourceType), Tags: node.getList("Tags", "Tag").map(Tag_Parse), };}
function TrafficPolicySummary_Parse(node: xmlP.XmlNode): s.TrafficPolicySummary { return { ...node.strings({ required: {"Id":true,"Name":true}, }), Type: node.first("Type", true, x => (x.content ?? '') as s.RRType), LatestVersion: node.first("LatestVersion", true, x => parseInt(x.content ?? '0')), TrafficPolicyCount: node.first("TrafficPolicyCount", true, x => parseInt(x.content ?? '0')), };}