Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 0 additions & 87 deletions .doc_gen/metadata/iot_sitewise_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,35 +119,6 @@ iotsitewise_CreateGateway:
- iotsitewise.JavaScript.Basics.createGateway
services:
iotsitewise: {CreateGateway}
iotsitewise_DescribePortal:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/iotsitewise
excerpts:
- description:
snippet_tags:
- sitewise.java2.describe.portal.main
Python:
versions:
- sdk_version: 3
github: python/example_code/iotsitewise
excerpts:
- description:
snippet_tags:
- python.example_code.iotsitewise.IoTSitewiseWrapper.decl
- python.example_code.iotsitewise.CreateGateway
JavaScript:
versions:
- sdk_version: 3
github: javascriptv3/example_code/iotsitewise
excerpts:
- description:
snippet_tags:
- iotsitewise.JavaScript.Basics.describePortal
services:
iotsitewise: {DescribePortal}
iotsitewise_ListAssetModels:
languages:
Java:
Expand Down Expand Up @@ -177,64 +148,6 @@ iotsitewise_ListAssetModels:
- iotsitewise.JavaScript.Basics.listAssetModels
services:
iotsitewise: {ListAssetModels}
iotsitewise_DeletePortal:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/iotsitewise
excerpts:
- description:
snippet_tags:
- sitewise.java2.delete.portal.main
Python:
versions:
- sdk_version: 3
github: python/example_code/iotsitewise
excerpts:
- description:
snippet_tags:
- python.example_code.iotsitewise.IoTSitewiseWrapper.decl
- python.example_code.iotsitewise.DeletePortal
JavaScript:
versions:
- sdk_version: 3
github: javascriptv3/example_code/iotsitewise
excerpts:
- description:
snippet_tags:
- iotsitewise.JavaScript.Basics.deletePortal
services:
iotsitewise: {DeletePortal}
iotsitewise_CreatePortal:
languages:
Java:
versions:
- sdk_version: 2
github: javav2/example_code/iotsitewise
excerpts:
- description:
snippet_tags:
- sitewise.java2.create.portal.main
Python:
versions:
- sdk_version: 3
github: python/example_code/iotsitewise
excerpts:
- description:
snippet_tags:
- python.example_code.iotsitewise.IoTSitewiseWrapper.decl
- python.example_code.iotsitewise.CreatePortal
JavaScript:
versions:
- sdk_version: 3
github: javascriptv3/example_code/iotsitewise
excerpts:
- description:
snippet_tags:
- iotsitewise.JavaScript.Basics.createPortal
services:
iotsitewise: {CreatePortal}
iotsitewise_DeleteAssetModel:
languages:
Java:
Expand Down
3 changes: 0 additions & 3 deletions javascriptv3/example_code/iotsitewise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,11 @@ Code excerpts that show you how to call individual service functions.
- [CreateAsset](actions/create-asset.js#L4)
- [CreateAssetModel](actions/create-asset-model.js#L4)
- [CreateGateway](actions/create-gateway.js#L4)
- [CreatePortal](actions/create-portal.js#L4)
- [DeleteAsset](actions/delete-asset.js#L4)
- [DeleteAssetModel](actions/delete-asset-model.js#L4)
- [DeleteGateway](actions/delete-gateway.js#L4)
- [DeletePortal](actions/delete-portal.js#L4)
- [DescribeAssetModel](actions/describe-asset-model.js#L4)
- [DescribeGateway](actions/describe-gateway.js#L4)
- [DescribePortal](actions/describe-portal.js#L4)
- [GetAssetPropertyValue](actions/get-asset-property-value.js#L4)
- [ListAssetModels](actions/list-asset-models.js#L4)

Expand Down
3 changes: 0 additions & 3 deletions javav2/example_code/iotsitewise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,11 @@ Code excerpts that show you how to call individual service functions.
- [CreateAsset](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L138)
- [CreateAssetModel](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L88)
- [CreateGateway](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L468)
- [CreatePortal](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L347)
- [DeleteAsset](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L293)
- [DeleteAssetModel](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L320)
- [DeleteGateway](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L513)
- [DeletePortal](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L381)
- [DescribeAssetModel](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L264)
- [DescribeGateway](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L540)
- [DescribePortal](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L439)
- [GetAssetPropertyValue](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L233)
- [ListAssetModels](src/main/java/com/example/iotsitewise/scenario/SitewiseActions.java#L408)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,53 +219,7 @@ public static void runScenario(String assetModelName, String assetName, String
logger.info(DASHES);

logger.info(DASHES);
logger.info("6. Create an IoT SiteWise Portal");
logger.info("""
An IoT SiteWise Portal allows you to aggregate data from multiple industrial sources,
such as sensors, equipment, and control systems, into a centralized platform.
""");
waitForInputToContinue(scanner);
String portalId;
try {
portalId = sitewiseActions.createPortalAsync(portalName, iamRole, contactEmail).join();
logger.info("Portal created successfully. Portal ID {}", portalId);
} catch (CompletionException ce) {
Throwable cause = ce.getCause();
if (cause instanceof IoTSiteWiseException siteWiseEx) {
logger.error("IoT SiteWise error occurred: Error message: {}, Error code {}",
siteWiseEx.getMessage(), siteWiseEx.awsErrorDetails().errorCode(), siteWiseEx);
} else {
logger.error("An unexpected error occurred: {}", cause.getMessage());
}
return;
}
waitForInputToContinue(scanner);
logger.info(DASHES);

logger.info(DASHES);
logger.info("7. Describe the Portal");
logger.info("""
In this step, we get a description of the portal and display the portal URL.
""");
waitForInputToContinue(scanner);
try {
String portalUrl = sitewiseActions.describePortalAsync(portalId).join();
logger.info("Portal URL: {}", portalUrl);
} catch (CompletionException ce) {
Throwable cause = ce.getCause();
if (cause instanceof ResourceNotFoundException notFoundException) {
logger.error("A ResourceNotFoundException occurred: Error message: {}, Error code {}",
notFoundException.getMessage(), notFoundException.awsErrorDetails().errorCode(), notFoundException);
} else {
logger.error("An unexpected error occurred: {}", cause.getMessage());
}
return;
}
waitForInputToContinue(scanner);
logger.info(DASHES);

logger.info(DASHES);
logger.info("8. Create an IoT SiteWise Gateway");
logger.info("6. Create an IoT SiteWise Gateway");
logger.info(
"""
IoT SiteWise Gateway serves as the bridge between industrial equipment, sensors, and the
Expand All @@ -292,7 +246,7 @@ public static void runScenario(String assetModelName, String assetName, String
logger.info(DASHES);
logger.info(DASHES);

logger.info("9. Describe the IoT SiteWise Gateway");
logger.info("7. Describe the IoT SiteWise Gateway");
waitForInputToContinue(scanner);
try {
sitewiseActions.describeGatewayAsync(gatewayId)
Expand All @@ -315,7 +269,7 @@ public static void runScenario(String assetModelName, String assetName, String
logger.info(DASHES);

logger.info(DASHES);
logger.info("10. Delete the AWS IoT SiteWise Assets");
logger.info("8. Delete the AWS IoT SiteWise Assets");
logger.info(
"""
Before you can delete the Asset Model, you must delete the assets.
Expand All @@ -325,20 +279,6 @@ public static void runScenario(String assetModelName, String assetName, String
String delAns = scanner.nextLine().trim();
if (delAns.equalsIgnoreCase("y")) {
logger.info("You selected to delete the SiteWise assets.");
waitForInputToContinue(scanner);
try {
sitewiseActions.deletePortalAsync(portalId).join();
logger.info("Portal {} was deleted successfully.", portalId);

} catch (CompletionException ce) {
Throwable cause = ce.getCause();
if (cause instanceof ResourceNotFoundException notFoundException) {
logger.error("A ResourceNotFoundException occurred: Error message: {}, Error code {}",
notFoundException.getMessage(), notFoundException.awsErrorDetails().errorCode(), notFoundException);
} else {
logger.error("An unexpected error occurred: {}", cause.getMessage());
}
}

try {
sitewiseActions.deleteGatewayAsync(gatewayId).join();
Expand Down
32 changes: 0 additions & 32 deletions javav2/example_code/iotsitewise/src/test/java/SitewiseTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,6 @@ public void testGETHumValue() {
logger.info("Test 6 passed");
}

@Test
@Tag("IntegrationTest")
@Order(7)
public void testCreatePortal() {
assertDoesNotThrow(() -> {
portalId = sitewiseActions.createPortalAsync(portalName, iamRole, contactEmail).join();
assertNotNull(portalId);
});
logger.info("Test 7 passed");
}

@Test
@Tag("IntegrationTest")
@Order(8)
public void testDescribePortal() {
assertDoesNotThrow(() -> {
String portalUrl = sitewiseActions.describePortalAsync(portalId).join();
assertNotNull(portalUrl);
});
logger.info("Test 8 passed");
}

@Test
@Tag("IntegrationTest")
Expand All @@ -194,17 +173,6 @@ public void testDescribeGateway() {
logger.info("Test 10 passed");
}

@Test
@Tag("IntegrationTest")
@Order(11)
public void testDeletePortal() throws InterruptedException {
Thread.sleep(30000);
assertDoesNotThrow(() -> {
sitewiseActions.deletePortalAsync(portalId).join();
});
logger.info("Test 11 passed");
}

@Test
@Tag("IntegrationTest")
@Order(12)
Expand Down
3 changes: 0 additions & 3 deletions python/example_code/iotsitewise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,10 @@ Code excerpts that show you how to call individual service functions.
- [CreateAsset](iotsitewise_wrapper.py#L75)
- [CreateAssetModel](iotsitewise_wrapper.py#L41)
- [CreateGateway](iotsitewise_wrapper.py#L315)
- [CreatePortal](iotsitewise_wrapper.py#L259)
- [DeleteAsset](iotsitewise_wrapper.py#L415)
- [DeleteAssetModel](iotsitewise_wrapper.py#L434)
- [DeleteGateway](iotsitewise_wrapper.py#L371)
- [DeletePortal](iotsitewise_wrapper.py#L393)
- [DescribeGateway](iotsitewise_wrapper.py#L347)
- [DescribePortal](iotsitewise_wrapper.py#L315)
- [GetAssetPropertyValue](iotsitewise_wrapper.py#L229)
- [ListAssetModels](iotsitewise_wrapper.py#L105)

Expand Down
Loading
Loading