Skip to content

Commit

Permalink
feat(client-iot-data-plane): Update the default AWS IoT Core Data Pla…
Browse files Browse the repository at this point in the history
…ne endpoint from VeriSign signed to ATS signed. If you have firewalls with strict egress rules, configure the rules to grant you access to data-ats.iot.[region].amazonaws.com or data-ats.iot.[region].amazonaws.com.cn.
  • Loading branch information
awstools committed Mar 30, 2022
1 parent 57e29b7 commit 3c918da
Show file tree
Hide file tree
Showing 7 changed files with 949 additions and 1,011 deletions.
6 changes: 3 additions & 3 deletions clients/client-iot-data-plane/src/IoTDataPlane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class IoTDataPlane extends IoTDataPlaneClient {
* incur messaging costs. To list only the topic names of the retained messages, call
* <a href="/iot/latest/developerguide/API_iotdata_ListRetainedMessages.html">ListRetainedMessages</a>.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">GetRetainedMessage</a> action.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT Core
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
* pricing - Messaging</a>.</p>
*/
public getRetainedMessage(
Expand Down Expand Up @@ -196,7 +196,7 @@ export class IoTDataPlane extends IoTDataPlaneClient {
* <a href="https://docs.aws.amazon.com/iot/latest/developerguide/API_iotdata_GetRetainedMessage.html">GetRetainedMessage</a>
* with the topic name of the retained message.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">ListRetainedMessages</a> action.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT Core
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
* pricing - Messaging</a>.</p>
*/
public listRetainedMessages(
Expand Down Expand Up @@ -234,7 +234,7 @@ export class IoTDataPlane extends IoTDataPlaneClient {
* <p>For more information about MQTT messages, see
* <a href="http://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html">MQTT Protocol</a> in the
* IoT Developer Guide.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT Core
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
* pricing - Messaging</a>.</p>
*/
public publish(args: PublishCommandInput, options?: __HttpHandlerOptions): Promise<PublishCommandOutput>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface GetRetainedMessageCommandOutput extends GetRetainedMessageRespo
* incur messaging costs. To list only the topic names of the retained messages, call
* <a href="/iot/latest/developerguide/API_iotdata_ListRetainedMessages.html">ListRetainedMessages</a>.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">GetRetainedMessage</a> action.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT Core
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
* pricing - Messaging</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface ListRetainedMessagesCommandOutput extends ListRetainedMessagesR
* <a href="https://docs.aws.amazon.com/iot/latest/developerguide/API_iotdata_GetRetainedMessage.html">GetRetainedMessage</a>
* with the topic name of the retained message.</p>
* <p>Requires permission to access the <a href="https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiotfleethubfordevicemanagement.html#awsiotfleethubfordevicemanagement-actions-as-permissions">ListRetainedMessages</a> action.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT Core
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
* pricing - Messaging</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface PublishCommandOutput extends __MetadataBearer {}
* <p>For more information about MQTT messages, see
* <a href="http://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html">MQTT Protocol</a> in the
* IoT Developer Guide.</p>
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">IoT Core
* <p>For more information about messaging costs, see <a href="http://aws.amazon.com/iot-core/pricing/#Messaging">Amazon Web Services IoT Core
* pricing - Messaging</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
98 changes: 18 additions & 80 deletions clients/client-iot-data-plane/src/endpoints.ts
Original file line number Diff line number Diff line change
@@ -1,64 +1,7 @@
import { getRegionInfo, PartitionHash, RegionHash } from "@aws-sdk/config-resolver";
import { RegionInfoProvider, RegionInfoProviderOptions } from "@aws-sdk/types";

const regionHash: RegionHash = {
"ca-central-1": {
variants: [
{
hostname: "data.iot-fips.ca-central-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-east-1": {
variants: [
{
hostname: "data.iot-fips.us-east-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-east-2": {
variants: [
{
hostname: "data.iot-fips.us-east-2.amazonaws.com",
tags: ["fips"],
},
],
},
"us-gov-east-1": {
variants: [
{
hostname: "data.iot-fips.us-gov-east-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-gov-west-1": {
variants: [
{
hostname: "data.iot-fips.us-gov-west-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-west-1": {
variants: [
{
hostname: "data.iot-fips.us-west-1.amazonaws.com",
tags: ["fips"],
},
],
},
"us-west-2": {
variants: [
{
hostname: "data.iot-fips.us-west-2.amazonaws.com",
tags: ["fips"],
},
],
},
};
const regionHash: RegionHash = {};

const partitionHash: PartitionHash = {
aws: {
Expand All @@ -79,11 +22,6 @@ const partitionHash: PartitionHash = {
"eu-west-1",
"eu-west-2",
"eu-west-3",
"fips-ca-central-1",
"fips-us-east-1",
"fips-us-east-2",
"fips-us-west-1",
"fips-us-west-2",
"me-south-1",
"sa-east-1",
"us-east-1",
Expand All @@ -94,19 +32,19 @@ const partitionHash: PartitionHash = {
regionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
variants: [
{
hostname: "data.iot.{region}.amazonaws.com",
hostname: "data-ats.iot.{region}.amazonaws.com",
tags: [],
},
{
hostname: "data.iot-fips.{region}.amazonaws.com",
hostname: "data-ats.iot-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "data.iot-fips.{region}.api.aws",
hostname: "data-ats.iot-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "data.iot.{region}.api.aws",
hostname: "data-ats.iot.{region}.api.aws",
tags: ["dualstack"],
},
],
Expand All @@ -116,19 +54,19 @@ const partitionHash: PartitionHash = {
regionRegex: "^cn\\-\\w+\\-\\d+$",
variants: [
{
hostname: "data.iot.{region}.amazonaws.com.cn",
hostname: "data-ats.iot.{region}.amazonaws.com.cn",
tags: [],
},
{
hostname: "data.iot-fips.{region}.amazonaws.com.cn",
hostname: "data-ats.iot-fips.{region}.amazonaws.com.cn",
tags: ["fips"],
},
{
hostname: "data.iot-fips.{region}.api.amazonwebservices.com.cn",
hostname: "data-ats.iot-fips.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack", "fips"],
},
{
hostname: "data.iot.{region}.api.amazonwebservices.com.cn",
hostname: "data-ats.iot.{region}.api.amazonwebservices.com.cn",
tags: ["dualstack"],
},
],
Expand All @@ -138,11 +76,11 @@ const partitionHash: PartitionHash = {
regionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
variants: [
{
hostname: "data.iot.{region}.c2s.ic.gov",
hostname: "data-ats.iot.{region}.c2s.ic.gov",
tags: [],
},
{
hostname: "data.iot-fips.{region}.c2s.ic.gov",
hostname: "data-ats.iot-fips.{region}.c2s.ic.gov",
tags: ["fips"],
},
],
Expand All @@ -152,33 +90,33 @@ const partitionHash: PartitionHash = {
regionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
variants: [
{
hostname: "data.iot.{region}.sc2s.sgov.gov",
hostname: "data-ats.iot.{region}.sc2s.sgov.gov",
tags: [],
},
{
hostname: "data.iot-fips.{region}.sc2s.sgov.gov",
hostname: "data-ats.iot-fips.{region}.sc2s.sgov.gov",
tags: ["fips"],
},
],
},
"aws-us-gov": {
regions: ["fips-us-gov-east-1", "fips-us-gov-west-1", "us-gov-east-1", "us-gov-west-1"],
regions: ["us-gov-east-1", "us-gov-west-1"],
regionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
variants: [
{
hostname: "data.iot.{region}.amazonaws.com",
hostname: "data-ats.iot.{region}.amazonaws.com",
tags: [],
},
{
hostname: "data.iot-fips.{region}.amazonaws.com",
hostname: "data-ats.iot-fips.{region}.amazonaws.com",
tags: ["fips"],
},
{
hostname: "data.iot-fips.{region}.api.aws",
hostname: "data-ats.iot-fips.{region}.api.aws",
tags: ["dualstack", "fips"],
},
{
hostname: "data.iot.{region}.api.aws",
hostname: "data-ats.iot.{region}.api.aws",
tags: ["dualstack"],
},
],
Expand Down
2 changes: 1 addition & 1 deletion clients/client-iot-data-plane/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export interface PublishRequest {
/**
* <p>The message body. MQTT accepts text, binary, and empty (null) message payloads.</p>
* <p>Publishing an empty (null) payload with <b>retain</b> =
* <code>true</code> deletes the retained message identified by <b>topic</b> from IoT Core.</p>
* <code>true</code> deletes the retained message identified by <b>topic</b> from Amazon Web Services IoT Core.</p>
*/
payload?: Uint8Array;
}
Expand Down
Loading

0 comments on commit 3c918da

Please sign in to comment.