AWS Security ChangesHomeSearch

AWS code-library documentation change

Service: code-library · 2025-11-25 · Documentation low

File: code-library/latest/ug/javascript_3_iotsitewise_code_examples.md

Summary

Removed code examples for CreatePortal, DeletePortal, and DescribePortal SDK methods

Security assessment

The changes remove code examples but do not address security vulnerabilities or add security documentation. The removed examples were standard SDK usage demonstrations without security-specific context.

Diff

diff --git a/code-library/latest/ug/javascript_3_iotsitewise_code_examples.md b/code-library/latest/ug/javascript_3_iotsitewise_code_examples.md
index b5139f9f1..4b1041a8d 100644
--- a//code-library/latest/ug/javascript_3_iotsitewise_code_examples.md
+++ b//code-library/latest/ug/javascript_3_iotsitewise_code_examples.md
@@ -999,50 +998,0 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-The following code example shows how to use `CreatePortal`.
-
-**SDK for JavaScript (v3)**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javascriptv3/example_code/iotsitewise#code-examples). 
-    
-    
-    import {
-      CreatePortalCommand,
-      IoTSiteWiseClient,
-    } from "@aws-sdk/client-iotsitewise";
-    import { parseArgs } from "node:util";
-    
-    /**
-     * Create a Portal.
-     * @param {{ portalName: string, portalContactEmail: string, roleArn: string }}
-     */
-    export const main = async ({ portalName, portalContactEmail, roleArn }) => {
-      const client = new IoTSiteWiseClient({});
-      try {
-        const result = await client.send(
-          new CreatePortalCommand({
-            portalName: portalName, // The name to give the created Portal.
-            portalContactEmail: portalContactEmail, // A valid contact email.
-            roleArn: roleArn, // The ARN of a service role that allows the portal's users to access the portal's resources.
-          }),
-        );
-        console.log("Portal created successfully.");
-        return result;
-      } catch (caught) {
-        if (caught instanceof Error && caught.name === "IoTSiteWiseError") {
-          console.warn(
-            `${caught.message}. There was a problem creating the Portal.`,
-          );
-        } else {
-          throw caught;
-        }
-      }
-    };
-    
-    
-
-  * For API details, see [CreatePortal](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iotsitewise/command/CreatePortalCommand) in _AWS SDK for JavaScript API Reference_. 
-
-
-
-
@@ -1193,48 +1142,0 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-The following code example shows how to use `DeletePortal`.
-
-**SDK for JavaScript (v3)**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javascriptv3/example_code/iotsitewise#code-examples). 
-    
-    
-    import {
-      DeletePortalCommand,
-      IoTSiteWiseClient,
-    } from "@aws-sdk/client-iotsitewise";
-    import { parseArgs } from "node:util";
-    
-    /**
-     * List asset models.
-     * @param {{ portalId : string }}
-     */
-    export const main = async ({ portalId }) => {
-      const client = new IoTSiteWiseClient({});
-      try {
-        await client.send(
-          new DeletePortalCommand({
-            portalId: portalId, // The id of the portal.
-          }),
-        );
-        console.log("Portal deleted successfully.");
-        return { portalDeleted: true };
-      } catch (caught) {
-        if (caught instanceof Error && caught.name === "ResourceNotFound") {
-          console.warn(
-            `${caught.message}. There was a problem deleting the portal. Please check the portal id.`,
-          );
-        } else {
-          throw caught;
-        }
-      }
-    };
-    
-    
-
-  * For API details, see [DeletePortal](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iotsitewise/command/DeletePortalCommand) in _AWS SDK for JavaScript API Reference_. 
-
-
-
-
@@ -1337,48 +1238,0 @@ There's more on GitHub. Find the complete example and learn how to set up and ru
-The following code example shows how to use `DescribePortal`.
-
-**SDK for JavaScript (v3)**
-    
-
-###### Note
-
-There's more on GitHub. Find the complete example and learn how to set up and run in the [AWS Code Examples Repository](https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/javascriptv3/example_code/iotsitewise#code-examples). 
-    
-    
-    import {
-      DescribePortalCommand,
-      IoTSiteWiseClient,
-    } from "@aws-sdk/client-iotsitewise";
-    import { parseArgs } from "node:util";
-    
-    /**
-     * Describe a portal.
-     * @param {{ portalId: string }}
-     */
-    export const main = async ({ portalId }) => {
-      const client = new IoTSiteWiseClient({});
-      try {
-        const result = await client.send(
-          new DescribePortalCommand({
-            portalId: portalId, // The ID of the Gateway to describe.
-          }),
-        );
-        console.log("Portal information retrieved successfully.");
-        return result;
-      } catch (caught) {
-        if (caught instanceof Error && caught.name === "ResourceNotFound") {
-          console.warn(
-            `${caught.message}. The Portal could not be found. Please check the Portal Id.`,
-          );
-        } else {
-          throw caught;
-        }
-      }
-    };
-    
-    
-
-  * For API details, see [DescribePortal](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/iotsitewise/command/DescribePortalCommand) in _AWS SDK for JavaScript API Reference_. 
-
-
-
-