From d69b9277bffaafe4aa97166ac6bda5e46ed05765 Mon Sep 17 00:00:00 2001
From: awstools
Date: Tue, 13 Aug 2024 18:13:05 +0000
Subject: [PATCH] feat(client-fis): This release adds support for additional
error information on experiment failure. It adds the error code, location,
and account id on relevant failures to the GetExperiment and ListExperiment
API responses.
---
clients/client-fis/README.md | 2 +-
clients/client-fis/src/Fis.ts | 2 +-
clients/client-fis/src/FisClient.ts | 2 +-
.../src/commands/GetExperimentCommand.ts | 5 ++
.../src/commands/ListExperimentsCommand.ts | 5 ++
.../src/commands/StartExperimentCommand.ts | 5 ++
.../src/commands/StopExperimentCommand.ts | 5 ++
clients/client-fis/src/index.ts | 2 +-
clients/client-fis/src/models/models_0.ts | 30 +++++++++++
.../client-fis/src/protocols/Aws_restJson1.ts | 2 +
codegen/sdk-codegen/aws-models/fis.json | 50 ++++++++++++++++++-
11 files changed, 105 insertions(+), 5 deletions(-)
diff --git a/clients/client-fis/README.md b/clients/client-fis/README.md
index 1af1fe10be1c..f086de9e92f0 100644
--- a/clients/client-fis/README.md
+++ b/clients/client-fis/README.md
@@ -6,7 +6,7 @@
AWS SDK for JavaScript Fis Client for Node.js, Browser and React Native.
-Fault Injection Service is a managed service that enables you to perform fault injection
+
Amazon Web Services Fault Injection Service is a managed service that enables you to perform fault injection
experiments on your Amazon Web Services workloads. For more information, see the Fault Injection Service User Guide.
## Installing
diff --git a/clients/client-fis/src/Fis.ts b/clients/client-fis/src/Fis.ts
index 7206209519f5..a63ad5b2aa22 100644
--- a/clients/client-fis/src/Fis.ts
+++ b/clients/client-fis/src/Fis.ts
@@ -515,7 +515,7 @@ export interface Fis {
}
/**
- * Fault Injection Service is a managed service that enables you to perform fault injection
+ *
Amazon Web Services Fault Injection Service is a managed service that enables you to perform fault injection
* experiments on your Amazon Web Services workloads. For more information, see the Fault Injection Service User Guide.
* @public
*/
diff --git a/clients/client-fis/src/FisClient.ts b/clients/client-fis/src/FisClient.ts
index 1bb910aadb55..4758e3a66c43 100644
--- a/clients/client-fis/src/FisClient.ts
+++ b/clients/client-fis/src/FisClient.ts
@@ -366,7 +366,7 @@ export type FisClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHa
export interface FisClientResolvedConfig extends FisClientResolvedConfigType {}
/**
- * Fault Injection Service is a managed service that enables you to perform fault injection
+ *
Amazon Web Services Fault Injection Service is a managed service that enables you to perform fault injection
* experiments on your Amazon Web Services workloads. For more information, see the Fault Injection Service User Guide.
* @public
*/
diff --git a/clients/client-fis/src/commands/GetExperimentCommand.ts b/clients/client-fis/src/commands/GetExperimentCommand.ts
index b94a47a5fc8a..e62c8a001388 100644
--- a/clients/client-fis/src/commands/GetExperimentCommand.ts
+++ b/clients/client-fis/src/commands/GetExperimentCommand.ts
@@ -49,6 +49,11 @@ export interface GetExperimentCommandOutput extends GetExperimentResponse, __Met
* // state: { // ExperimentState
* // status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed",
* // reason: "STRING_VALUE",
+ * // error: { // ExperimentError
+ * // accountId: "STRING_VALUE",
+ * // code: "STRING_VALUE",
+ * // location: "STRING_VALUE",
+ * // },
* // },
* // targets: { // ExperimentTargetMap
* // "": { // ExperimentTarget
diff --git a/clients/client-fis/src/commands/ListExperimentsCommand.ts b/clients/client-fis/src/commands/ListExperimentsCommand.ts
index c2f00a60d9df..9568fc21d6cc 100644
--- a/clients/client-fis/src/commands/ListExperimentsCommand.ts
+++ b/clients/client-fis/src/commands/ListExperimentsCommand.ts
@@ -51,6 +51,11 @@ export interface ListExperimentsCommandOutput extends ListExperimentsResponse, _
* // state: { // ExperimentState
* // status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed",
* // reason: "STRING_VALUE",
+ * // error: { // ExperimentError
+ * // accountId: "STRING_VALUE",
+ * // code: "STRING_VALUE",
+ * // location: "STRING_VALUE",
+ * // },
* // },
* // creationTime: new Date("TIMESTAMP"),
* // tags: { // TagMap
diff --git a/clients/client-fis/src/commands/StartExperimentCommand.ts b/clients/client-fis/src/commands/StartExperimentCommand.ts
index 056a6c0da9d6..c9e5f24146fb 100644
--- a/clients/client-fis/src/commands/StartExperimentCommand.ts
+++ b/clients/client-fis/src/commands/StartExperimentCommand.ts
@@ -56,6 +56,11 @@ export interface StartExperimentCommandOutput extends StartExperimentResponse, _
* // state: { // ExperimentState
* // status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed",
* // reason: "STRING_VALUE",
+ * // error: { // ExperimentError
+ * // accountId: "STRING_VALUE",
+ * // code: "STRING_VALUE",
+ * // location: "STRING_VALUE",
+ * // },
* // },
* // targets: { // ExperimentTargetMap
* // "": { // ExperimentTarget
diff --git a/clients/client-fis/src/commands/StopExperimentCommand.ts b/clients/client-fis/src/commands/StopExperimentCommand.ts
index b355bd2b8afa..973af5e3cd5d 100644
--- a/clients/client-fis/src/commands/StopExperimentCommand.ts
+++ b/clients/client-fis/src/commands/StopExperimentCommand.ts
@@ -49,6 +49,11 @@ export interface StopExperimentCommandOutput extends StopExperimentResponse, __M
* // state: { // ExperimentState
* // status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed",
* // reason: "STRING_VALUE",
+ * // error: { // ExperimentError
+ * // accountId: "STRING_VALUE",
+ * // code: "STRING_VALUE",
+ * // location: "STRING_VALUE",
+ * // },
* // },
* // targets: { // ExperimentTargetMap
* // "": { // ExperimentTarget
diff --git a/clients/client-fis/src/index.ts b/clients/client-fis/src/index.ts
index 69766df3f304..d234246a93c6 100644
--- a/clients/client-fis/src/index.ts
+++ b/clients/client-fis/src/index.ts
@@ -1,7 +1,7 @@
// smithy-typescript generated code
/* eslint-disable */
/**
- * Fault Injection Service is a managed service that enables you to perform fault injection
+ *
Amazon Web Services Fault Injection Service is a managed service that enables you to perform fault injection
* experiments on your Amazon Web Services workloads. For more information, see the Fault Injection Service User Guide.
*
* @packageDocumentation
diff --git a/clients/client-fis/src/models/models_0.ts b/clients/client-fis/src/models/models_0.ts
index e8d15c2c19d8..e28bf5fc843c 100644
--- a/clients/client-fis/src/models/models_0.ts
+++ b/clients/client-fis/src/models/models_0.ts
@@ -1074,6 +1074,30 @@ export interface ExperimentLogConfiguration {
logSchemaVersion?: number;
}
+/**
+ * Describes the error when an experiment has failed
.
+ * @public
+ */
+export interface ExperimentError {
+ /**
+ * The Amazon Web Services Account ID where the experiment failure occurred.
+ * @public
+ */
+ accountId?: string;
+
+ /**
+ * The error code for the failed experiment.
+ * @public
+ */
+ code?: string;
+
+ /**
+ * Context for the section of the experiment template that failed.
+ * @public
+ */
+ location?: string;
+}
+
/**
* @public
* @enum
@@ -1109,6 +1133,12 @@ export interface ExperimentState {
* @public
*/
reason?: string;
+
+ /**
+ * The error information of the experiment when the action has failed
.
+ * @public
+ */
+ error?: ExperimentError;
}
/**
diff --git a/clients/client-fis/src/protocols/Aws_restJson1.ts b/clients/client-fis/src/protocols/Aws_restJson1.ts
index 139b255f45f4..228dd7d7ec35 100644
--- a/clients/client-fis/src/protocols/Aws_restJson1.ts
+++ b/clients/client-fis/src/protocols/Aws_restJson1.ts
@@ -1343,6 +1343,8 @@ const de_ExperimentActionMap = (output: any, context: __SerdeContext): RecordThe Amazon Web Services Account ID where the experiment failure occurred.
"
+ }
+ },
+ "code": {
+ "target": "com.amazonaws.fis#ExperimentErrorCode",
+ "traits": {
+ "smithy.api#documentation": "The error code for the failed experiment.
"
+ }
+ },
+ "location": {
+ "target": "com.amazonaws.fis#ExperimentErrorLocation",
+ "traits": {
+ "smithy.api#documentation": "Context for the section of the experiment template that failed.
"
+ }
+ }
+ },
+ "traits": {
+ "smithy.api#documentation": "Describes the error when an experiment has failed
.
"
+ }
+ },
+ "com.amazonaws.fis#ExperimentErrorAccountId": {
+ "type": "string"
+ },
+ "com.amazonaws.fis#ExperimentErrorCode": {
+ "type": "string",
+ "traits": {
+ "smithy.api#length": {
+ "min": 0,
+ "max": 128
+ },
+ "smithy.api#pattern": "^[\\S]+$"
+ }
+ },
+ "com.amazonaws.fis#ExperimentErrorLocation": {
+ "type": "string"
+ },
"com.amazonaws.fis#ExperimentId": {
"type": "string",
"traits": {
@@ -1282,6 +1324,12 @@
"traits": {
"smithy.api#documentation": "The reason for the state.
"
}
+ },
+ "error": {
+ "target": "com.amazonaws.fis#ExperimentError",
+ "traits": {
+ "smithy.api#documentation": "The error information of the experiment when the action has failed
.
"
+ }
}
},
"traits": {
@@ -2338,7 +2386,7 @@
"name": "fis"
},
"aws.protocols#restJson1": {},
- "smithy.api#documentation": "Fault Injection Service is a managed service that enables you to perform fault injection \n experiments on your Amazon Web Services workloads. For more information, see the Fault Injection Service User Guide.
",
+ "smithy.api#documentation": "Amazon Web Services Fault Injection Service is a managed service that enables you to perform fault injection \n experiments on your Amazon Web Services workloads. For more information, see the Fault Injection Service User Guide.
",
"smithy.api#title": "AWS Fault Injection Simulator",
"smithy.rules#endpointRuleSet": {
"version": "1.0",