CarrierLookup
Source:
src/AWS/PinpointSMSVoiceV2/CarrierLookup.ts
Runtime binding for sms-voice:CarrierLookup.
Looks up carrier metadata for a destination phone number — its E.164
normalization, country, carrier name, and number type (MOBILE,
LANDLINE, VOIP, …). Use it to validate destinations before
sending. Account-level: lookups act on raw phone numbers, so the
deploy-time grant is sms-voice:CarrierLookup on *. Each lookup
incurs a small per-request fee. Provide the implementation with
Effect.provide(AWS.PinpointSMSVoiceV2.CarrierLookupHttp).
Validating Destinations
Section titled “Validating Destinations”// init — bind the account-level operationconst carrierLookup = yield* AWS.PinpointSMSVoiceV2.CarrierLookup();
// runtimeconst info = yield* carrierLookup({ PhoneNumber: "+12065550100" });const isMobile = info.PhoneNumberType === "MOBILE";