Skip to content

Commit 39a914d

Browse files
This release adds support for the CarrierLookup API, which returns information about a destination phone number including if the number is valid, the carrier, and more.
1 parent d6fb988 commit 39a914d

File tree

65 files changed

+1737
-553
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1737
-553
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<docs>
3+
<doc>
4+
<members>
5+
<member name="M:Amazon.PinpointSMSVoiceV2.IAmazonPinpointSMSVoiceV2.CarrierLookup(Amazon.PinpointSMSVoiceV2.Model.CarrierLookupRequest)" />
6+
<member name="M:Amazon.PinpointSMSVoiceV2.AmazonPinpointSMSVoiceV2Client.CarrierLookup(Amazon.PinpointSMSVoiceV2.Model.CarrierLookupRequest)" />
7+
<member name="T:Amazon.PinpointSMSVoiceV2.Model.CarrierLookupRequest" />
8+
<member name="T:Amazon.PinpointSMSVoiceV2.Model.CarrierLookupResponse" />
9+
</members>
10+
<value>
11+
<example>
12+
<para>
13+
Call the CarrierLookup operation to get information about a customer provided phone number, including if the number is valid. The service accepts phone numbers with various formatting characters and returns the number in E164 format.
14+
</para>
15+
<code
16+
title="Use CarrierLookup"
17+
source=".\AWSSDKDocSamples\PinpointSMSVoiceV2\PinpointSMSVoiceV2.GeneratedSamples.cs"
18+
region="example-1" />
19+
</example>
20+
</value>
21+
</doc>
22+
</docs>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
using Amazon.PinpointSMSVoiceV2;
8+
using Amazon.PinpointSMSVoiceV2.Model;
9+
10+
namespace AWSSDKDocSamples.Amazon.PinpointSMSVoiceV2.Generated
11+
{
12+
class PinpointSMSVoiceV2Samples : ISample
13+
{
14+
public void PinpointSMSVoiceV2CarrierLookup()
15+
{
16+
#region example-1
17+
18+
var client = new AmazonPinpointSMSVoiceV2Client();
19+
var response = client.CarrierLookup(new CarrierLookupRequest
20+
{
21+
PhoneNumber = "+1 (555) 555-5333"
22+
});
23+
24+
string carrier = response.Carrier;
25+
string country = response.Country;
26+
string dialingCountryCode = response.DialingCountryCode;
27+
string e164PhoneNumber = response.E164PhoneNumber;
28+
string isoCountryCode = response.IsoCountryCode;
29+
string mcc = response.MCC;
30+
string mnc = response.MNC;
31+
string phoneNumberType = response.PhoneNumberType;
32+
33+
#endregion
34+
}
35+
36+
37+
# region ISample Members
38+
public virtual void Run()
39+
{
40+
41+
}
42+
# endregion
43+
44+
}
45+
}

generator/ServiceModels/pinpoint-sms-voice-v2/pinpoint-sms-voice-v2-2022-03-31.api.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@
5050
{"shape":"InternalServerException"}
5151
]
5252
},
53+
"CarrierLookup":{
54+
"name":"CarrierLookup",
55+
"http":{
56+
"method":"POST",
57+
"requestUri":"/"
58+
},
59+
"input":{"shape":"CarrierLookupRequest"},
60+
"output":{"shape":"CarrierLookupResult"},
61+
"errors":[
62+
{"shape":"ServiceQuotaExceededException"},
63+
{"shape":"ThrottlingException"},
64+
{"shape":"AccessDeniedException"},
65+
{"shape":"ValidationException"},
66+
{"shape":"InternalServerException"}
67+
]
68+
},
5369
"CreateConfigurationSet":{
5470
"name":"CreateConfigurationSet",
5571
"http":{
@@ -1651,6 +1667,36 @@
16511667
"type":"boolean",
16521668
"box":true
16531669
},
1670+
"CarrierLookupInputPhoneNumberType":{
1671+
"type":"string",
1672+
"max":40,
1673+
"min":1,
1674+
"pattern":"\\+[({\\s\\[]?[1-9][0-9(){}\\s\\[\\],.-]{1,38}"
1675+
},
1676+
"CarrierLookupRequest":{
1677+
"type":"structure",
1678+
"required":["PhoneNumber"],
1679+
"members":{
1680+
"PhoneNumber":{"shape":"CarrierLookupInputPhoneNumberType"}
1681+
}
1682+
},
1683+
"CarrierLookupResult":{
1684+
"type":"structure",
1685+
"required":[
1686+
"E164PhoneNumber",
1687+
"PhoneNumberType"
1688+
],
1689+
"members":{
1690+
"E164PhoneNumber":{"shape":"E164PhoneNumberType"},
1691+
"DialingCountryCode":{"shape":"DialingCountryCodeType"},
1692+
"IsoCountryCode":{"shape":"IsoCountryCode"},
1693+
"Country":{"shape":"String"},
1694+
"MCC":{"shape":"MCCType"},
1695+
"MNC":{"shape":"MNCType"},
1696+
"Carrier":{"shape":"String"},
1697+
"PhoneNumberType":{"shape":"PhoneNumberType"}
1698+
}
1699+
},
16541700
"ClientToken":{
16551701
"type":"string",
16561702
"max":64,
@@ -2835,6 +2881,12 @@
28352881
"max":5,
28362882
"min":0
28372883
},
2884+
"DialingCountryCodeType":{
2885+
"type":"string",
2886+
"max":3,
2887+
"min":1,
2888+
"pattern":"[\\d]+"
2889+
},
28382890
"DisassociateOriginationIdentityRequest":{
28392891
"type":"structure",
28402892
"required":[
@@ -2912,6 +2964,12 @@
29122964
"RegistrationVersionStatusHistory":{"shape":"RegistrationVersionStatusHistory"}
29132965
}
29142966
},
2967+
"E164PhoneNumberType":{
2968+
"type":"string",
2969+
"max":20,
2970+
"min":1,
2971+
"pattern":"\\+[1-9][0-9]{1,18}"
2972+
},
29152973
"EventDestination":{
29162974
"type":"structure",
29172975
"required":[
@@ -3286,6 +3344,18 @@
32863344
"min":20,
32873345
"pattern":"arn:\\S+"
32883346
},
3347+
"MCCType":{
3348+
"type":"string",
3349+
"max":3,
3350+
"min":3,
3351+
"pattern":"[\\d]+"
3352+
},
3353+
"MNCType":{
3354+
"type":"string",
3355+
"max":3,
3356+
"min":2,
3357+
"pattern":"[\\d]+"
3358+
},
32893359
"MaxPrice":{
32903360
"type":"string",
32913361
"max":8,
@@ -3593,6 +3663,15 @@
35933663
"type":"list",
35943664
"member":{"shape":"PhoneNumberInformation"}
35953665
},
3666+
"PhoneNumberType":{
3667+
"type":"string",
3668+
"enum":[
3669+
"MOBILE",
3670+
"LANDLINE",
3671+
"OTHER",
3672+
"INVALID"
3673+
]
3674+
},
35963675
"PhoneOrPoolIdOrArn":{
35973676
"type":"string",
35983677
"max":256,

0 commit comments

Comments
 (0)