Skip to content

Commit a5a02f7

Browse files
author
awstools
committed
feat(client-chime): Chime VoiceConnector will now support ValidateE911Address which will allow customers to prevalidate their addresses included in their SIP invites for emergency calling
1 parent b30346b commit a5a02f7

File tree

9 files changed

+838
-51
lines changed

9 files changed

+838
-51
lines changed

clients/client-chime/src/Chime.ts

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,11 @@ import {
864864
UpdateVoiceConnectorGroupCommandInput,
865865
UpdateVoiceConnectorGroupCommandOutput,
866866
} from "./commands/UpdateVoiceConnectorGroupCommand";
867+
import {
868+
ValidateE911AddressCommand,
869+
ValidateE911AddressCommandInput,
870+
ValidateE911AddressCommandOutput,
871+
} from "./commands/ValidateE911AddressCommand";
867872

868873
/**
869874
* <p>The Amazon Chime API (application programming interface) is designed for developers to
@@ -6075,7 +6080,7 @@ export class Chime extends ChimeClient {
60756080

60766081
/**
60776082
* <p>Adds a streaming configuration for the specified Amazon Chime Voice Connector. The streaming
6078-
* configuration specifies whether media streaming is enabled for sending to Indonesians.
6083+
* configuration specifies whether media streaming is enabled for sending to Kinesis.
60796084
* It also sets the retention period, in hours, for the Amazon Kinesis data.</p>
60806085
*/
60816086
public putVoiceConnectorStreamingConfiguration(
@@ -7376,4 +7381,39 @@ export class Chime extends ChimeClient {
73767381
return this.send(command, optionsOrCb);
73777382
}
73787383
}
7384+
7385+
/**
7386+
* <p>Validates an address to be used for 911 calls made with Amazon
7387+
* Chime Voice Connectors. You can use validated addresses
7388+
* in a Presence Information Data Format Location Object file that you include in SIP requests.
7389+
* That helps ensure that addresses are routed to the appropriate Public Safety Answering Point.</p>
7390+
*/
7391+
public validateE911Address(
7392+
args: ValidateE911AddressCommandInput,
7393+
options?: __HttpHandlerOptions
7394+
): Promise<ValidateE911AddressCommandOutput>;
7395+
public validateE911Address(
7396+
args: ValidateE911AddressCommandInput,
7397+
cb: (err: any, data?: ValidateE911AddressCommandOutput) => void
7398+
): void;
7399+
public validateE911Address(
7400+
args: ValidateE911AddressCommandInput,
7401+
options: __HttpHandlerOptions,
7402+
cb: (err: any, data?: ValidateE911AddressCommandOutput) => void
7403+
): void;
7404+
public validateE911Address(
7405+
args: ValidateE911AddressCommandInput,
7406+
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ValidateE911AddressCommandOutput) => void),
7407+
cb?: (err: any, data?: ValidateE911AddressCommandOutput) => void
7408+
): Promise<ValidateE911AddressCommandOutput> | void {
7409+
const command = new ValidateE911AddressCommand(args);
7410+
if (typeof optionsOrCb === "function") {
7411+
this.send(command, optionsOrCb);
7412+
} else if (typeof cb === "function") {
7413+
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
7414+
this.send(command, optionsOrCb || {}, cb);
7415+
} else {
7416+
return this.send(command, optionsOrCb);
7417+
}
7418+
}
73797419
}

clients/client-chime/src/ChimeClient.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,10 @@ import {
585585
UpdateVoiceConnectorGroupCommandInput,
586586
UpdateVoiceConnectorGroupCommandOutput,
587587
} from "./commands/UpdateVoiceConnectorGroupCommand";
588+
import {
589+
ValidateE911AddressCommandInput,
590+
ValidateE911AddressCommandOutput,
591+
} from "./commands/ValidateE911AddressCommand";
588592
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
589593

590594
export type ServiceInputTypes =
@@ -777,7 +781,8 @@ export type ServiceInputTypes =
777781
| UpdateUserCommandInput
778782
| UpdateUserSettingsCommandInput
779783
| UpdateVoiceConnectorCommandInput
780-
| UpdateVoiceConnectorGroupCommandInput;
784+
| UpdateVoiceConnectorGroupCommandInput
785+
| ValidateE911AddressCommandInput;
781786

782787
export type ServiceOutputTypes =
783788
| AssociatePhoneNumberWithUserCommandOutput
@@ -969,7 +974,8 @@ export type ServiceOutputTypes =
969974
| UpdateUserCommandOutput
970975
| UpdateUserSettingsCommandOutput
971976
| UpdateVoiceConnectorCommandOutput
972-
| UpdateVoiceConnectorGroupCommandOutput;
977+
| UpdateVoiceConnectorGroupCommandOutput
978+
| ValidateE911AddressCommandOutput;
973979

974980
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
975981
/**

clients/client-chime/src/commands/PutVoiceConnectorStreamingConfigurationCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface PutVoiceConnectorStreamingConfigurationCommandOutput
3232

3333
/**
3434
* <p>Adds a streaming configuration for the specified Amazon Chime Voice Connector. The streaming
35-
* configuration specifies whether media streaming is enabled for sending to Indonesians.
35+
* configuration specifies whether media streaming is enabled for sending to Kinesis.
3636
* It also sets the retention period, in hours, for the Amazon Kinesis data.</p>
3737
* @example
3838
* Use a bare-bones client and the command you need to make an API call.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
// smithy-typescript generated code
2+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
4+
import { Command as $Command } from "@aws-sdk/smithy-client";
5+
import {
6+
FinalizeHandlerArguments,
7+
Handler,
8+
HandlerExecutionContext,
9+
HttpHandlerOptions as __HttpHandlerOptions,
10+
MetadataBearer as __MetadataBearer,
11+
MiddlewareStack,
12+
SerdeContext as __SerdeContext,
13+
} from "@aws-sdk/types";
14+
15+
import { ChimeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ChimeClient";
16+
import {
17+
ValidateE911AddressRequest,
18+
ValidateE911AddressRequestFilterSensitiveLog,
19+
ValidateE911AddressResponse,
20+
ValidateE911AddressResponseFilterSensitiveLog,
21+
} from "../models/models_1";
22+
import {
23+
deserializeAws_restJson1ValidateE911AddressCommand,
24+
serializeAws_restJson1ValidateE911AddressCommand,
25+
} from "../protocols/Aws_restJson1";
26+
27+
export interface ValidateE911AddressCommandInput extends ValidateE911AddressRequest {}
28+
export interface ValidateE911AddressCommandOutput extends ValidateE911AddressResponse, __MetadataBearer {}
29+
30+
/**
31+
* <p>Validates an address to be used for 911 calls made with Amazon
32+
* Chime Voice Connectors. You can use validated addresses
33+
* in a Presence Information Data Format Location Object file that you include in SIP requests.
34+
* That helps ensure that addresses are routed to the appropriate Public Safety Answering Point.</p>
35+
* @example
36+
* Use a bare-bones client and the command you need to make an API call.
37+
* ```javascript
38+
* import { ChimeClient, ValidateE911AddressCommand } from "@aws-sdk/client-chime"; // ES Modules import
39+
* // const { ChimeClient, ValidateE911AddressCommand } = require("@aws-sdk/client-chime"); // CommonJS import
40+
* const client = new ChimeClient(config);
41+
* const command = new ValidateE911AddressCommand(input);
42+
* const response = await client.send(command);
43+
* ```
44+
*
45+
* @see {@link ValidateE911AddressCommandInput} for command's `input` shape.
46+
* @see {@link ValidateE911AddressCommandOutput} for command's `response` shape.
47+
* @see {@link ChimeClientResolvedConfig | config} for ChimeClient's `config` shape.
48+
*
49+
*/
50+
export class ValidateE911AddressCommand extends $Command<
51+
ValidateE911AddressCommandInput,
52+
ValidateE911AddressCommandOutput,
53+
ChimeClientResolvedConfig
54+
> {
55+
// Start section: command_properties
56+
// End section: command_properties
57+
58+
constructor(readonly input: ValidateE911AddressCommandInput) {
59+
// Start section: command_constructor
60+
super();
61+
// End section: command_constructor
62+
}
63+
64+
/**
65+
* @internal
66+
*/
67+
resolveMiddleware(
68+
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
69+
configuration: ChimeClientResolvedConfig,
70+
options?: __HttpHandlerOptions
71+
): Handler<ValidateE911AddressCommandInput, ValidateE911AddressCommandOutput> {
72+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
73+
74+
const stack = clientStack.concat(this.middlewareStack);
75+
76+
const { logger } = configuration;
77+
const clientName = "ChimeClient";
78+
const commandName = "ValidateE911AddressCommand";
79+
const handlerExecutionContext: HandlerExecutionContext = {
80+
logger,
81+
clientName,
82+
commandName,
83+
inputFilterSensitiveLog: ValidateE911AddressRequestFilterSensitiveLog,
84+
outputFilterSensitiveLog: ValidateE911AddressResponseFilterSensitiveLog,
85+
};
86+
const { requestHandler } = configuration;
87+
return stack.resolve(
88+
(request: FinalizeHandlerArguments<any>) =>
89+
requestHandler.handle(request.request as __HttpRequest, options || {}),
90+
handlerExecutionContext
91+
);
92+
}
93+
94+
private serialize(input: ValidateE911AddressCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
95+
return serializeAws_restJson1ValidateE911AddressCommand(input, context);
96+
}
97+
98+
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ValidateE911AddressCommandOutput> {
99+
return deserializeAws_restJson1ValidateE911AddressCommand(output, context);
100+
}
101+
102+
// Start section: command_body_extra
103+
// End section: command_body_extra
104+
}

clients/client-chime/src/commands/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,3 +189,4 @@ export * from "./UpdateUserCommand";
189189
export * from "./UpdateUserSettingsCommand";
190190
export * from "./UpdateVoiceConnectorCommand";
191191
export * from "./UpdateVoiceConnectorGroupCommand";
192+
export * from "./ValidateE911AddressCommand";

0 commit comments

Comments
 (0)