UNPKG

@aws-sdk/client-route-53

Version:

AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native

1,342 lines 169 kB
import { loadRestXmlErrorCode, parseXmlBody as parseBody, parseXmlErrorBody as parseErrorBody } from "@aws-sdk/core"; import { XmlNode as __XmlNode } from "@aws-sdk/xml-builder"; import { requestBuilder as rb } from "@smithy/core"; import { collectBody, decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, getArrayIfSingleItem as __getArrayIfSingleItem, map, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, withBaseException, } from "@smithy/smithy-client"; import { CidrBlockInUseException, CidrCollectionAlreadyExistsException, CidrCollectionInUseException, CidrCollectionVersionMismatchException, ConcurrentModification, ConflictingDomainExists, ConflictingTypes, DelegationSetAlreadyCreated, DelegationSetAlreadyReusable, DelegationSetInUse, DelegationSetNotAvailable, DelegationSetNotReusable, DNSSECNotFound, HealthCheckAlreadyExists, HealthCheckInUse, HealthCheckVersionMismatch, HostedZoneAlreadyExists, HostedZoneNotEmpty, HostedZoneNotFound, HostedZoneNotPrivate, HostedZonePartiallyDelegated, IncompatibleVersion, InsufficientCloudWatchLogsResourcePolicy, InvalidArgument, InvalidChangeBatch, InvalidDomainName, InvalidInput, InvalidKeySigningKeyName, InvalidKeySigningKeyStatus, InvalidKMSArn, InvalidPaginationToken, InvalidSigningStatus, InvalidTrafficPolicyDocument, InvalidVPCId, KeySigningKeyAlreadyExists, KeySigningKeyInParentDSRecord, KeySigningKeyInUse, KeySigningKeyWithActiveStatusNotFound, LastVPCAssociation, LimitsExceeded, NoSuchChange, NoSuchCidrCollectionException, NoSuchCidrLocationException, NoSuchCloudWatchLogsLogGroup, NoSuchDelegationSet, NoSuchGeoLocation, NoSuchHealthCheck, NoSuchHostedZone, NoSuchKeySigningKey, NoSuchQueryLoggingConfig, NoSuchTrafficPolicy, NoSuchTrafficPolicyInstance, NotAuthorizedException, PriorRequestNotComplete, PublicZoneVPCAssociation, QueryLoggingConfigAlreadyExists, ThrottlingException, TooManyHealthChecks, TooManyHostedZones, TooManyKeySigningKeys, TooManyTrafficPolicies, TooManyTrafficPolicyInstances, TooManyTrafficPolicyVersionsForCurrentPolicy, TooManyVPCAssociationAuthorizations, TrafficPolicyAlreadyExists, TrafficPolicyInstanceAlreadyExists, TrafficPolicyInUse, VPCAssociationAuthorizationNotFound, VPCAssociationNotFound, } from "../models/models_0"; import { Route53ServiceException as __BaseException } from "../models/Route53ServiceException"; export const se_ActivateKeySigningKeyCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); b.p("Name", () => input.Name, "{Name}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_AssociateVPCWithHostedZoneCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); let body; body = _ve; const bn = new __XmlNode(_AVPCWHZR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_C] != null) { bn.c(__XmlNode.of(_AVPCC, input[_C]).n(_C)); } if (input[_VPC] != null) { bn.c(se_VPC(input[_VPC], context).n(_VPC)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_ChangeCidrCollectionCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/cidrcollection/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; body = _ve; const bn = new __XmlNode(_CCCR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); bn.lc(input, "Changes", "Changes", () => se_CidrCollectionChanges(input[_Ch], context)); if (input[_CV] != null) { bn.c(__XmlNode.of(_CV, String(input[_CV])).n(_CV)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_ChangeResourceRecordSetsCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); let body; body = _ve; const bn = new __XmlNode(_CRRSR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_CB] != null) { bn.c(se_ChangeBatch(input[_CB], context).n(_CB)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_ChangeTagsForResourceCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"); b.p("ResourceType", () => input.ResourceType, "{ResourceType}", false); b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false); let body; body = _ve; const bn = new __XmlNode(_CTFRR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); bn.lc(input, "AddTags", "AddTags", () => se_TagList(input[_AT], context)); bn.lc(input, "RemoveTagKeys", "RemoveTagKeys", () => se_TagKeyList(input[_RTK], context)); body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateCidrCollectionCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/cidrcollection"); let body; body = _ve; const bn = new __XmlNode(_CCCRr); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_CR] != null) { bn.c(__XmlNode.of(_CN, input[_CR]).n(_CR)); } if (input[_N] != null) { bn.c(__XmlNode.of(_CNo, input[_N]).n(_N)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateHealthCheckCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/healthcheck"); let body; body = _ve; const bn = new __XmlNode(_CHCR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_CR] != null) { bn.c(__XmlNode.of(_HCN, input[_CR]).n(_CR)); } if (input[_HCC] != null) { bn.c(se_HealthCheckConfig(input[_HCC], context).n(_HCC)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateHostedZoneCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/hostedzone"); let body; body = _ve; const bn = new __XmlNode(_CHZR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_CR] != null) { bn.c(__XmlNode.of(_No, input[_CR]).n(_CR)); } if (input[_DSI] != null) { bn.c(__XmlNode.of(_RI, input[_DSI]).n(_DSI)); } if (input[_HZC] != null) { bn.c(se_HostedZoneConfig(input[_HZC], context).n(_HZC)); } if (input[_N] != null) { bn.c(__XmlNode.of(_DNSN, input[_N]).n(_N)); } if (input[_VPC] != null) { bn.c(se_VPC(input[_VPC], context).n(_VPC)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateKeySigningKeyCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/keysigningkey"); let body; body = _ve; const bn = new __XmlNode(_CKSKR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_CR] != null) { bn.c(__XmlNode.of(_No, input[_CR]).n(_CR)); } if (input[_HZI] != null) { bn.c(__XmlNode.of(_RI, input[_HZI]).n(_HZI)); } if (input[_KMSA] != null) { bn.c(__XmlNode.of(_SKS, input[_KMSA]).n(_KMSA)); } if (input[_N] != null) { bn.c(__XmlNode.of(_SKN, input[_N]).n(_N)); } if (input[_S] != null) { bn.c(__XmlNode.of(_SKSi, input[_S]).n(_S)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateQueryLoggingConfigCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/queryloggingconfig"); let body; body = _ve; const bn = new __XmlNode(_CQLCR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); bn.cc(input, _CWLLGA); if (input[_HZI] != null) { bn.c(__XmlNode.of(_RI, input[_HZI]).n(_HZI)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateReusableDelegationSetCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/delegationset"); let body; body = _ve; const bn = new __XmlNode(_CRDSR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_CR] != null) { bn.c(__XmlNode.of(_No, input[_CR]).n(_CR)); } if (input[_HZI] != null) { bn.c(__XmlNode.of(_RI, input[_HZI]).n(_HZI)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateTrafficPolicyCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/trafficpolicy"); let body; body = _ve; const bn = new __XmlNode(_CTPR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_C] != null) { bn.c(__XmlNode.of(_TPC, input[_C]).n(_C)); } if (input[_D] != null) { bn.c(__XmlNode.of(_TPD, input[_D]).n(_D)); } if (input[_N] != null) { bn.c(__XmlNode.of(_TPN, input[_N]).n(_N)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateTrafficPolicyInstanceCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/trafficpolicyinstance"); let body; body = _ve; const bn = new __XmlNode(_CTPIR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_HZI] != null) { bn.c(__XmlNode.of(_RI, input[_HZI]).n(_HZI)); } if (input[_N] != null) { bn.c(__XmlNode.of(_DNSN, input[_N]).n(_N)); } if (input[_TTL] != null) { bn.c(__XmlNode.of(_TTL, String(input[_TTL])).n(_TTL)); } bn.cc(input, _TPI); if (input[_TPV] != null) { bn.c(__XmlNode.of(_TPV, String(input[_TPV])).n(_TPV)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateTrafficPolicyVersionCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/trafficpolicy/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; body = _ve; const bn = new __XmlNode(_CTPVR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_C] != null) { bn.c(__XmlNode.of(_TPC, input[_C]).n(_C)); } if (input[_D] != null) { bn.c(__XmlNode.of(_TPD, input[_D]).n(_D)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_CreateVPCAssociationAuthorizationCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); let body; body = _ve; const bn = new __XmlNode(_CVPCAAR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_VPC] != null) { bn.c(se_VPC(input[_VPC], context).n(_VPC)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_DeactivateKeySigningKeyCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); b.p("Name", () => input.Name, "{Name}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_DeleteCidrCollectionCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/cidrcollection/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteHealthCheckCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/healthcheck/{HealthCheckId}"); b.p("HealthCheckId", () => input.HealthCheckId, "{HealthCheckId}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteHostedZoneCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzone/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteKeySigningKeyCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); b.p("Name", () => input.Name, "{Name}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteQueryLoggingConfigCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/queryloggingconfig/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteReusableDelegationSetCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/delegationset/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteTrafficPolicyCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"); b.p("Id", () => input.Id, "{Id}", false); b.p("Version", () => input.Version.toString(), "{Version}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteTrafficPolicyInstanceCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicyinstance/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("DELETE").h(headers).b(body); return b.build(); }; export const se_DeleteVPCAssociationAuthorizationCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); let body; body = _ve; const bn = new __XmlNode(_DVPCAAR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_VPC] != null) { bn.c(se_VPC(input[_VPC], context).n(_VPC)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_DisableHostedZoneDNSSECCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_DisassociateVPCFromHostedZoneCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); let body; body = _ve; const bn = new __XmlNode(_DVPCFHZR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_C] != null) { bn.c(__XmlNode.of(_DVPCC, input[_C]).n(_C)); } if (input[_VPC] != null) { bn.c(se_VPC(input[_VPC], context).n(_VPC)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_EnableHostedZoneDNSSECCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); let body; b.m("POST").h(headers).b(body); return b.build(); }; export const se_GetAccountLimitCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/accountlimit/{Type}"); b.p("Type", () => input.Type, "{Type}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetChangeCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/change/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetCheckerIpRangesCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/checkeripranges"); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetDNSSECCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetGeoLocationCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/geolocation"); const query = map({ [_c]: [, input[_CC]], [_co]: [, input[_CCo]], [_s]: [, input[_SC]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_GetHealthCheckCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/healthcheck/{HealthCheckId}"); b.p("HealthCheckId", () => input.HealthCheckId, "{HealthCheckId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetHealthCheckCountCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/healthcheckcount"); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetHealthCheckLastFailureReasonCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"); b.p("HealthCheckId", () => input.HealthCheckId, "{HealthCheckId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetHealthCheckStatusCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"); b.p("HealthCheckId", () => input.HealthCheckId, "{HealthCheckId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetHostedZoneCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzone/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetHostedZoneCountCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzonecount"); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetHostedZoneLimitCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"); b.p("Type", () => input.Type, "{Type}", false); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetQueryLoggingConfigCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/queryloggingconfig/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetReusableDelegationSetCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/delegationset/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetReusableDelegationSetLimitCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"); b.p("Type", () => input.Type, "{Type}", false); b.p("DelegationSetId", () => input.DelegationSetId, "{DelegationSetId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetTrafficPolicyCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"); b.p("Id", () => input.Id, "{Id}", false); b.p("Version", () => input.Version.toString(), "{Version}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetTrafficPolicyInstanceCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicyinstance/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_GetTrafficPolicyInstanceCountCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicyinstancecount"); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_ListCidrBlocksCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"); b.p("CollectionId", () => input.CollectionId, "{CollectionId}", false); const query = map({ [_l]: [, input[_LN]], [_n]: [, input[_NT]], [_m]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListCidrCollectionsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/cidrcollection"); const query = map({ [_n]: [, input[_NT]], [_m]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListCidrLocationsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/cidrcollection/{CollectionId}"); b.p("CollectionId", () => input.CollectionId, "{CollectionId}", false); const query = map({ [_n]: [, input[_NT]], [_m]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListGeoLocationsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/geolocations"); const query = map({ [_st]: [, input[_SCC]], [_sta]: [, input[_SCCt]], [_star]: [, input[_SSC]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListHealthChecksCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/healthcheck"); const query = map({ [_mar]: [, input[_M]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListHostedZonesCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzone"); const query = map({ [_mar]: [, input[_M]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], [_d]: [, input[_DSI]], [_h]: [, input[_HZT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListHostedZonesByNameCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzonesbyname"); const query = map({ [_dn]: [, input[_DNSN]], [_ho]: [, input[_HZI]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListHostedZonesByVPCCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzonesbyvpc"); const query = map({ [_v]: [, __expectNonNull(input[_VPCI], `VPCId`)], [_vp]: [, __expectNonNull(input[_VPCR], `VPCRegion`)], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], [_n]: [, input[_NT]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListQueryLoggingConfigsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/queryloggingconfig"); const query = map({ [_ho]: [, input[_HZI]], [_n]: [, input[_NT]], [_m]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListResourceRecordSetsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); const query = map({ [_na]: [, input[_SRN]], [_t]: [, input[_SRT]], [_i]: [, input[_SRI]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListReusableDelegationSetsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/delegationset"); const query = map({ [_mar]: [, input[_M]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListTagsForResourceCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"); b.p("ResourceType", () => input.ResourceType, "{ResourceType}", false); b.p("ResourceId", () => input.ResourceId, "{ResourceId}", false); let body; b.m("GET").h(headers).b(body); return b.build(); }; export const se_ListTagsForResourcesCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/tags/{ResourceType}"); b.p("ResourceType", () => input.ResourceType, "{ResourceType}", false); let body; body = _ve; const bn = new __XmlNode(_LTFRR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); bn.lc(input, "ResourceIds", "ResourceIds", () => se_TagResourceIdList(input[_RIe], context)); body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_ListTrafficPoliciesCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicies"); const query = map({ [_tr]: [, input[_TPIM]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListTrafficPolicyInstancesCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicyinstances"); const query = map({ [_ho]: [, input[_HZIM]], [_tra]: [, input[_TPINM]], [_traf]: [, input[_TPITM]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListTrafficPolicyInstancesByHostedZoneCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicyinstances/hostedzone"); const query = map({ [_id]: [, __expectNonNull(input[_HZI], `HostedZoneId`)], [_tra]: [, input[_TPINM]], [_traf]: [, input[_TPITM]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListTrafficPolicyInstancesByPolicyCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy"); const query = map({ [_id]: [, __expectNonNull(input[_TPI], `TrafficPolicyId`)], [_ver]: [ __expectNonNull(input.TrafficPolicyVersion, `TrafficPolicyVersion`) != null, () => input[_TPV].toString(), ], [_ho]: [, input[_HZIM]], [_tra]: [, input[_TPINM]], [_traf]: [, input[_TPITM]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListTrafficPolicyVersionsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/trafficpolicies/{Id}/versions"); b.p("Id", () => input.Id, "{Id}", false); const query = map({ [_traff]: [, input[_TPVM]], [_ma]: [() => input.MaxItems !== void 0, () => input[_MI].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_ListVPCAssociationAuthorizationsCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"); b.p("HostedZoneId", () => input.HostedZoneId, "{HostedZoneId}", false); const query = map({ [_n]: [, input[_NT]], [_m]: [() => input.MaxResults !== void 0, () => input[_MR].toString()], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_TestDNSAnswerCommand = async (input, context) => { const b = rb(input, context); const headers = {}; b.bp("/2013-04-01/testdnsanswer"); const query = map({ [_ho]: [, __expectNonNull(input[_HZI], `HostedZoneId`)], [_r]: [, __expectNonNull(input[_RN], `RecordName`)], [_re]: [, __expectNonNull(input[_RT], `RecordType`)], [_res]: [, input[_RIP]], [_e]: [, input[_EDNSCSIP]], [_ed]: [, input[_EDNSCSM]], }); let body; b.m("GET").h(headers).q(query).b(body); return b.build(); }; export const se_UpdateHealthCheckCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/healthcheck/{HealthCheckId}"); b.p("HealthCheckId", () => input.HealthCheckId, "{HealthCheckId}", false); let body; body = _ve; const bn = new __XmlNode(_UHCR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_AI] != null) { bn.c(se_AlarmIdentifier(input[_AI], context).n(_AI)); } bn.lc(input, "ChildHealthChecks", "ChildHealthChecks", () => se_ChildHealthCheckList(input[_CHC], context)); if (input[_Di] != null) { bn.c(__XmlNode.of(_Di, String(input[_Di])).n(_Di)); } if (input[_ESNI] != null) { bn.c(__XmlNode.of(_ESNI, String(input[_ESNI])).n(_ESNI)); } if (input[_FT] != null) { bn.c(__XmlNode.of(_FT, String(input[_FT])).n(_FT)); } bn.cc(input, _FQDN); if (input[_HCV] != null) { bn.c(__XmlNode.of(_HCV, String(input[_HCV])).n(_HCV)); } if (input[_HT] != null) { bn.c(__XmlNode.of(_HT, String(input[_HT])).n(_HT)); } bn.cc(input, _IPA); bn.cc(input, _IDHS); if (input[_I] != null) { bn.c(__XmlNode.of(_I, String(input[_I])).n(_I)); } if (input[_P] != null) { bn.c(__XmlNode.of(_P, String(input[_P])).n(_P)); } bn.lc(input, "Regions", "Regions", () => se_HealthCheckRegionList(input[_R], context)); bn.lc(input, "ResetElements", "ResetElements", () => se_ResettableElementNameList(input[_RE], context)); bn.cc(input, _RP); bn.cc(input, _SS); body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_UpdateHostedZoneCommentCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/hostedzone/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; body = _ve; const bn = new __XmlNode(_UHZCR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_C] != null) { bn.c(__XmlNode.of(_RD, input[_C]).n(_C)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_UpdateTrafficPolicyCommentCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"); b.p("Id", () => input.Id, "{Id}", false); b.p("Version", () => input.Version.toString(), "{Version}", false); let body; body = _ve; const bn = new __XmlNode(_UTPCR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_C] != null) { bn.c(__XmlNode.of(_TPC, input[_C]).n(_C)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const se_UpdateTrafficPolicyInstanceCommand = async (input, context) => { const b = rb(input, context); const headers = { "content-type": "application/xml", }; b.bp("/2013-04-01/trafficpolicyinstance/{Id}"); b.p("Id", () => input.Id, "{Id}", false); let body; body = _ve; const bn = new __XmlNode(_UTPIR); bn.a("xmlns", "https://route53.amazonaws.com/doc/2013-04-01/"); if (input[_TTL] != null) { bn.c(__XmlNode.of(_TTL, String(input[_TTL])).n(_TTL)); } bn.cc(input, _TPI); if (input[_TPV] != null) { bn.c(__XmlNode.of(_TPV, String(input[_TPV])).n(_TPV)); } body += bn.toString(); b.m("POST").h(headers).b(body); return b.build(); }; export const de_ActivateKeySigningKeyCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_CI] != null) { contents[_CI] = de_ChangeInfo(data[_CI], context); } return contents; }; export const de_AssociateVPCWithHostedZoneCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_CI] != null) { contents[_CI] = de_ChangeInfo(data[_CI], context); } return contents; }; export const de_ChangeCidrCollectionCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_Id] != null) { contents[_Id] = __expectString(data[_Id]); } return contents; }; export const de_ChangeResourceRecordSetsCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_CI] != null) { contents[_CI] = de_ChangeInfo(data[_CI], context); } return contents; }; export const de_ChangeTagsForResourceCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_CreateCidrCollectionCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), [_L]: [, output.headers[_l]], }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_Co] != null) { contents[_Co] = de_CidrCollection(data[_Co], context); } return contents; }; export const de_CreateHealthCheckCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), [_L]: [, output.headers[_l]], }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_HC] != null) { contents[_HC] = de_HealthCheck(data[_HC], context); } return contents; }; export const de_CreateHostedZoneCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), [_L]: [, output.headers[_l]], }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_CI] != null) { contents[_CI] = de_ChangeInfo(data[_CI], context); } if (data[_DS] != null) { contents[_DS] = de_DelegationSet(data[_DS], context); } if (data[_HZ] != null) { contents[_HZ] = de_HostedZone(data[_HZ], context); } if (data[_VPC] != null) { contents[_VPC] = de_VPC(data[_VPC], context); } return contents; }; export const de_CreateKeySigningKeyCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), [_L]: [, output.headers[_l]], }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_CI] != null) { contents[_CI] = de_ChangeInfo(data[_CI], context); } if (data[_KSK] != null) { contents[_KSK] = de_KeySigningKey(data[_KSK], context); } return contents; }; export const de_CreateQueryLoggingConfigCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), [_L]: [, output.headers[_l]], }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_QLC] != null) { contents[_QLC] = de_QueryLoggingConfig(data[_QLC], context); } return contents; }; export const de_CreateReusableDelegationSetCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), [_L]: [, output.headers[_l]], }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_DS] != null) { contents[_DS] = de_DelegationSet(data[_DS], context); } return contents; }; export const de_CreateTrafficPolicyCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), [_L]: [, output.headers[_l]], }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_TP] != null) { contents[_TP] = de_TrafficPolicy(data[_TP], context); } return contents; }; export const de_CreateTrafficPolicyInstanceCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), [_L]: [, output.headers[_l]], }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_TPIr] != null) { contents[_TPIr] = de_TrafficPolicyInstance(data[_TPIr], context); } return contents; }; export const de_CreateTrafficPolicyVersionCommand = async (output, context) => { if (output.statusCode !== 201 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), [_L]: [, output.headers[_l]], }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_TP] != null) { contents[_TP] = de_TrafficPolicy(data[_TP], context); } return contents; }; export const de_CreateVPCAssociationAuthorizationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_HZI] != null) { contents[_HZI] = __expectString(data[_HZI]); } if (data[_VPC] != null) { contents[_VPC] = de_VPC(data[_VPC], context); } return contents; }; export const de_DeactivateKeySigningKeyCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_CI] != null) { contents[_CI] = de_ChangeInfo(data[_CI], context); } return contents; }; export const de_DeleteCidrCollectionCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_DeleteHealthCheckCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_DeleteHostedZoneCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_CI] != null) { contents[_CI] = de_ChangeInfo(data[_CI], context); } return contents; }; export const de_DeleteKeySigningKeyCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_CI] != null) { contents[_CI] = de_ChangeInfo(data[_CI], context); } return contents; }; export const de_DeleteQueryLoggingConfigCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_DeleteReusableDelegationSetCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_DeleteTrafficPolicyCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_DeleteTrafficPolicyInstanceCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_DeleteVPCAssociationAuthorizationCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); await collectBody(output.body, context); return contents; }; export const de_DisableHostedZoneDNSSECCommand = async (output, context) => { if (output.statusCode !== 200 && output.statusCode >= 300) { return de_CommandError(output, context); } const contents = map({ $metadata: deserializeMetadata(output), }); const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); if (data[_CI] != null) { contents[_CI] = de_ChangeInfo(data[_CI], context); } return contents; }; export const de_DisassociateVPCFromHostedZoneCommand = async (output, context) => { if (output.status