Skip to content

Commit

Permalink
feat(client-iot-wireless): Adds 5 APIs: PutPositionConfiguration, Get…
Browse files Browse the repository at this point in the history
…PositionConfiguration, ListPositionConfigurations, UpdatePosition, GetPosition for the new Positioning Service feature which enables customers to configure solvers to calculate position of LoRaWAN devices, or specify position of LoRaWAN devices & gateways.
  • Loading branch information
awstools committed Jul 7, 2022
1 parent 3e13ee1 commit 92e8618
Show file tree
Hide file tree
Showing 22 changed files with 3,014 additions and 444 deletions.
179 changes: 177 additions & 2 deletions clients/client-iot-wireless/src/IoTWireless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ import {
GetPartnerAccountCommandInput,
GetPartnerAccountCommandOutput,
} from "./commands/GetPartnerAccountCommand";
import { GetPositionCommand, GetPositionCommandInput, GetPositionCommandOutput } from "./commands/GetPositionCommand";
import {
GetPositionConfigurationCommand,
GetPositionConfigurationCommandInput,
GetPositionConfigurationCommandOutput,
} from "./commands/GetPositionConfigurationCommand";
import {
GetResourceEventConfigurationCommand,
GetResourceEventConfigurationCommandInput,
Expand Down Expand Up @@ -326,6 +332,11 @@ import {
ListPartnerAccountsCommandInput,
ListPartnerAccountsCommandOutput,
} from "./commands/ListPartnerAccountsCommand";
import {
ListPositionConfigurationsCommand,
ListPositionConfigurationsCommandInput,
ListPositionConfigurationsCommandOutput,
} from "./commands/ListPositionConfigurationsCommand";
import {
ListQueuedMessagesCommand,
ListQueuedMessagesCommandInput,
Expand Down Expand Up @@ -356,6 +367,11 @@ import {
ListWirelessGatewayTaskDefinitionsCommandInput,
ListWirelessGatewayTaskDefinitionsCommandOutput,
} from "./commands/ListWirelessGatewayTaskDefinitionsCommand";
import {
PutPositionConfigurationCommand,
PutPositionConfigurationCommandInput,
PutPositionConfigurationCommandOutput,
} from "./commands/PutPositionConfigurationCommand";
import {
PutResourceLogLevelCommand,
PutResourceLogLevelCommandInput,
Expand Down Expand Up @@ -447,6 +463,11 @@ import {
UpdatePartnerAccountCommandInput,
UpdatePartnerAccountCommandOutput,
} from "./commands/UpdatePartnerAccountCommand";
import {
UpdatePositionCommand,
UpdatePositionCommandInput,
UpdatePositionCommandOutput,
} from "./commands/UpdatePositionCommand";
import {
UpdateResourceEventConfigurationCommand,
UpdateResourceEventConfigurationCommandInput,
Expand Down Expand Up @@ -1711,7 +1732,7 @@ export class IoTWireless extends IoTWirelessClient {
}

/**
* <p>Get the event configuration by resource types.</p>
* <p>Get the event configuration based on resource types.</p>
*/
public getEventConfigurationByResourceTypes(
args: GetEventConfigurationByResourceTypesCommandInput,
Expand Down Expand Up @@ -1932,6 +1953,64 @@ export class IoTWireless extends IoTWirelessClient {
}
}

/**
* <p>Get the position information for a given resource.</p>
*/
public getPosition(args: GetPositionCommandInput, options?: __HttpHandlerOptions): Promise<GetPositionCommandOutput>;
public getPosition(args: GetPositionCommandInput, cb: (err: any, data?: GetPositionCommandOutput) => void): void;
public getPosition(
args: GetPositionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetPositionCommandOutput) => void
): void;
public getPosition(
args: GetPositionCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetPositionCommandOutput) => void),
cb?: (err: any, data?: GetPositionCommandOutput) => void
): Promise<GetPositionCommandOutput> | void {
const command = new GetPositionCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Get position configuration for a given resource.</p>
*/
public getPositionConfiguration(
args: GetPositionConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<GetPositionConfigurationCommandOutput>;
public getPositionConfiguration(
args: GetPositionConfigurationCommandInput,
cb: (err: any, data?: GetPositionConfigurationCommandOutput) => void
): void;
public getPositionConfiguration(
args: GetPositionConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GetPositionConfigurationCommandOutput) => void
): void;
public getPositionConfiguration(
args: GetPositionConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: GetPositionConfigurationCommandOutput) => void),
cb?: (err: any, data?: GetPositionConfigurationCommandOutput) => void
): Promise<GetPositionConfigurationCommandOutput> | void {
const command = new GetPositionConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Get the event configuration for a particular resource identifier.</p>
*/
Expand Down Expand Up @@ -2575,6 +2654,38 @@ export class IoTWireless extends IoTWirelessClient {
}
}

/**
* <p>List position configurations for a given resource, such as positioning solvers.</p>
*/
public listPositionConfigurations(
args: ListPositionConfigurationsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListPositionConfigurationsCommandOutput>;
public listPositionConfigurations(
args: ListPositionConfigurationsCommandInput,
cb: (err: any, data?: ListPositionConfigurationsCommandOutput) => void
): void;
public listPositionConfigurations(
args: ListPositionConfigurationsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListPositionConfigurationsCommandOutput) => void
): void;
public listPositionConfigurations(
args: ListPositionConfigurationsCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListPositionConfigurationsCommandOutput) => void),
cb?: (err: any, data?: ListPositionConfigurationsCommandOutput) => void
): Promise<ListPositionConfigurationsCommandOutput> | void {
const command = new ListPositionConfigurationsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>List queued messages in the downlink queue.</p>
*/
Expand Down Expand Up @@ -2767,6 +2878,38 @@ export class IoTWireless extends IoTWirelessClient {
}
}

/**
* <p>Put position configuration for a given resource.</p>
*/
public putPositionConfiguration(
args: PutPositionConfigurationCommandInput,
options?: __HttpHandlerOptions
): Promise<PutPositionConfigurationCommandOutput>;
public putPositionConfiguration(
args: PutPositionConfigurationCommandInput,
cb: (err: any, data?: PutPositionConfigurationCommandOutput) => void
): void;
public putPositionConfiguration(
args: PutPositionConfigurationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: PutPositionConfigurationCommandOutput) => void
): void;
public putPositionConfiguration(
args: PutPositionConfigurationCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: PutPositionConfigurationCommandOutput) => void),
cb?: (err: any, data?: PutPositionConfigurationCommandOutput) => void
): Promise<PutPositionConfigurationCommandOutput> | void {
const command = new PutPositionConfigurationCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Sets the log-level override for a resource-ID and resource-type. This option can be specified for a wireless gateway
* or a wireless device. A limit of 200 log level override can be set per account.</p>
Expand Down Expand Up @@ -3184,7 +3327,7 @@ export class IoTWireless extends IoTWirelessClient {
}

/**
* <p>Update the event configuration by resource types.</p>
* <p>Update the event configuration based on resource types.</p>
*/
public updateEventConfigurationByResourceTypes(
args: UpdateEventConfigurationByResourceTypesCommandInput,
Expand Down Expand Up @@ -3378,6 +3521,38 @@ export class IoTWireless extends IoTWirelessClient {
}
}

/**
* <p>Update the position information of a resource.</p>
*/
public updatePosition(
args: UpdatePositionCommandInput,
options?: __HttpHandlerOptions
): Promise<UpdatePositionCommandOutput>;
public updatePosition(
args: UpdatePositionCommandInput,
cb: (err: any, data?: UpdatePositionCommandOutput) => void
): void;
public updatePosition(
args: UpdatePositionCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: UpdatePositionCommandOutput) => void
): void;
public updatePosition(
args: UpdatePositionCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: UpdatePositionCommandOutput) => void),
cb?: (err: any, data?: UpdatePositionCommandOutput) => void
): Promise<UpdatePositionCommandOutput> | void {
const command = new UpdatePositionCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Update the event configuration for a particular resource identifier.</p>
*/
Expand Down
24 changes: 24 additions & 0 deletions clients/client-iot-wireless/src/IoTWirelessClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ import {
GetNetworkAnalyzerConfigurationCommandOutput,
} from "./commands/GetNetworkAnalyzerConfigurationCommand";
import { GetPartnerAccountCommandInput, GetPartnerAccountCommandOutput } from "./commands/GetPartnerAccountCommand";
import { GetPositionCommandInput, GetPositionCommandOutput } from "./commands/GetPositionCommand";
import {
GetPositionConfigurationCommandInput,
GetPositionConfigurationCommandOutput,
} from "./commands/GetPositionConfigurationCommand";
import {
GetResourceEventConfigurationCommandInput,
GetResourceEventConfigurationCommandOutput,
Expand Down Expand Up @@ -265,6 +270,10 @@ import {
ListPartnerAccountsCommandInput,
ListPartnerAccountsCommandOutput,
} from "./commands/ListPartnerAccountsCommand";
import {
ListPositionConfigurationsCommandInput,
ListPositionConfigurationsCommandOutput,
} from "./commands/ListPositionConfigurationsCommand";
import { ListQueuedMessagesCommandInput, ListQueuedMessagesCommandOutput } from "./commands/ListQueuedMessagesCommand";
import {
ListServiceProfilesCommandInput,
Expand All @@ -286,6 +295,10 @@ import {
ListWirelessGatewayTaskDefinitionsCommandInput,
ListWirelessGatewayTaskDefinitionsCommandOutput,
} from "./commands/ListWirelessGatewayTaskDefinitionsCommand";
import {
PutPositionConfigurationCommandInput,
PutPositionConfigurationCommandOutput,
} from "./commands/PutPositionConfigurationCommand";
import {
PutResourceLogLevelCommandInput,
PutResourceLogLevelCommandOutput,
Expand Down Expand Up @@ -344,6 +357,7 @@ import {
UpdatePartnerAccountCommandInput,
UpdatePartnerAccountCommandOutput,
} from "./commands/UpdatePartnerAccountCommand";
import { UpdatePositionCommandInput, UpdatePositionCommandOutput } from "./commands/UpdatePositionCommand";
import {
UpdateResourceEventConfigurationCommandInput,
UpdateResourceEventConfigurationCommandOutput,
Expand Down Expand Up @@ -404,6 +418,8 @@ export type ServiceInputTypes =
| GetMulticastGroupSessionCommandInput
| GetNetworkAnalyzerConfigurationCommandInput
| GetPartnerAccountCommandInput
| GetPositionCommandInput
| GetPositionConfigurationCommandInput
| GetResourceEventConfigurationCommandInput
| GetResourceLogLevelCommandInput
| GetServiceEndpointCommandInput
Expand All @@ -424,12 +440,14 @@ export type ServiceInputTypes =
| ListMulticastGroupsCommandInput
| ListNetworkAnalyzerConfigurationsCommandInput
| ListPartnerAccountsCommandInput
| ListPositionConfigurationsCommandInput
| ListQueuedMessagesCommandInput
| ListServiceProfilesCommandInput
| ListTagsForResourceCommandInput
| ListWirelessDevicesCommandInput
| ListWirelessGatewayTaskDefinitionsCommandInput
| ListWirelessGatewaysCommandInput
| PutPositionConfigurationCommandInput
| PutResourceLogLevelCommandInput
| ResetAllResourceLogLevelsCommandInput
| ResetResourceLogLevelCommandInput
Expand All @@ -449,6 +467,7 @@ export type ServiceInputTypes =
| UpdateMulticastGroupCommandInput
| UpdateNetworkAnalyzerConfigurationCommandInput
| UpdatePartnerAccountCommandInput
| UpdatePositionCommandInput
| UpdateResourceEventConfigurationCommandInput
| UpdateWirelessDeviceCommandInput
| UpdateWirelessGatewayCommandInput;
Expand Down Expand Up @@ -499,6 +518,8 @@ export type ServiceOutputTypes =
| GetMulticastGroupSessionCommandOutput
| GetNetworkAnalyzerConfigurationCommandOutput
| GetPartnerAccountCommandOutput
| GetPositionCommandOutput
| GetPositionConfigurationCommandOutput
| GetResourceEventConfigurationCommandOutput
| GetResourceLogLevelCommandOutput
| GetServiceEndpointCommandOutput
Expand All @@ -519,12 +540,14 @@ export type ServiceOutputTypes =
| ListMulticastGroupsCommandOutput
| ListNetworkAnalyzerConfigurationsCommandOutput
| ListPartnerAccountsCommandOutput
| ListPositionConfigurationsCommandOutput
| ListQueuedMessagesCommandOutput
| ListServiceProfilesCommandOutput
| ListTagsForResourceCommandOutput
| ListWirelessDevicesCommandOutput
| ListWirelessGatewayTaskDefinitionsCommandOutput
| ListWirelessGatewaysCommandOutput
| PutPositionConfigurationCommandOutput
| PutResourceLogLevelCommandOutput
| ResetAllResourceLogLevelsCommandOutput
| ResetResourceLogLevelCommandOutput
Expand All @@ -544,6 +567,7 @@ export type ServiceOutputTypes =
| UpdateMulticastGroupCommandOutput
| UpdateNetworkAnalyzerConfigurationCommandOutput
| UpdatePartnerAccountCommandOutput
| UpdatePositionCommandOutput
| UpdateResourceEventConfigurationCommandOutput
| UpdateWirelessDeviceCommandOutput
| UpdateWirelessGatewayCommandOutput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface GetEventConfigurationByResourceTypesCommandOutput
__MetadataBearer {}

/**
* <p>Get the event configuration by resource types.</p>
* <p>Get the event configuration based on resource types.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Loading

0 comments on commit 92e8618

Please sign in to comment.