Skip to content

Commit

Permalink
feat(client-fis): This release adds support for additional error info…
Browse files Browse the repository at this point in the history
…rmation on experiment failure. It adds the error code, location, and account id on relevant failures to the GetExperiment and ListExperiment API responses.
  • Loading branch information
awstools committed Aug 13, 2024
1 parent 26788b9 commit d69b927
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clients/client-fis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

AWS SDK for JavaScript Fis Client for Node.js, Browser and React Native.

<p>Fault Injection Service is a managed service that enables you to perform fault injection
<p>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 <a href="https://docs.aws.amazon.com/fis/latest/userguide/">Fault Injection Service User Guide</a>.</p>

## Installing
Expand Down
2 changes: 1 addition & 1 deletion clients/client-fis/src/Fis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ export interface Fis {
}

/**
* <p>Fault Injection Service is a managed service that enables you to perform fault injection
* <p>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 <a href="https://docs.aws.amazon.com/fis/latest/userguide/">Fault Injection Service User Guide</a>.</p>
* @public
*/
Expand Down
2 changes: 1 addition & 1 deletion clients/client-fis/src/FisClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export type FisClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHa
export interface FisClientResolvedConfig extends FisClientResolvedConfigType {}

/**
* <p>Fault Injection Service is a managed service that enables you to perform fault injection
* <p>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 <a href="https://docs.aws.amazon.com/fis/latest/userguide/">Fault Injection Service User Guide</a>.</p>
* @public
*/
Expand Down
5 changes: 5 additions & 0 deletions clients/client-fis/src/commands/GetExperimentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
* // "<keys>": { // ExperimentTarget
Expand Down
5 changes: 5 additions & 0 deletions clients/client-fis/src/commands/ListExperimentsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions clients/client-fis/src/commands/StartExperimentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
* // "<keys>": { // ExperimentTarget
Expand Down
5 changes: 5 additions & 0 deletions clients/client-fis/src/commands/StopExperimentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
* // "<keys>": { // ExperimentTarget
Expand Down
2 changes: 1 addition & 1 deletion clients/client-fis/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// smithy-typescript generated code
/* eslint-disable */
/**
* <p>Fault Injection Service is a managed service that enables you to perform fault injection
* <p>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 <a href="https://docs.aws.amazon.com/fis/latest/userguide/">Fault Injection Service User Guide</a>.</p>
*
* @packageDocumentation
Expand Down
30 changes: 30 additions & 0 deletions clients/client-fis/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,30 @@ export interface ExperimentLogConfiguration {
logSchemaVersion?: number;
}

/**
* <p>Describes the error when an experiment has <code>failed</code>.</p>
* @public
*/
export interface ExperimentError {
/**
* <p>The Amazon Web Services Account ID where the experiment failure occurred.</p>
* @public
*/
accountId?: string;

/**
* <p>The error code for the failed experiment.</p>
* @public
*/
code?: string;

/**
* <p>Context for the section of the experiment template that failed.</p>
* @public
*/
location?: string;
}

/**
* @public
* @enum
Expand Down Expand Up @@ -1109,6 +1133,12 @@ export interface ExperimentState {
* @public
*/
reason?: string;

/**
* <p>The error information of the experiment when the action has <code>failed</code>.</p>
* @public
*/
error?: ExperimentError;
}

/**
Expand Down
2 changes: 2 additions & 0 deletions clients/client-fis/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,8 @@ const de_ExperimentActionMap = (output: any, context: __SerdeContext): Record<st

// de_ExperimentCloudWatchLogsLogConfiguration omitted.

// de_ExperimentError omitted.

// de_ExperimentLogConfiguration omitted.

// de_ExperimentOptions omitted.
Expand Down
50 changes: 49 additions & 1 deletion codegen/sdk-codegen/aws-models/fis.json
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,48 @@
"com.amazonaws.fis#ExperimentEndTime": {
"type": "timestamp"
},
"com.amazonaws.fis#ExperimentError": {
"type": "structure",
"members": {
"accountId": {
"target": "com.amazonaws.fis#ExperimentErrorAccountId",
"traits": {
"smithy.api#documentation": "<p>The Amazon Web Services Account ID where the experiment failure occurred.</p>"
}
},
"code": {
"target": "com.amazonaws.fis#ExperimentErrorCode",
"traits": {
"smithy.api#documentation": "<p>The error code for the failed experiment.</p>"
}
},
"location": {
"target": "com.amazonaws.fis#ExperimentErrorLocation",
"traits": {
"smithy.api#documentation": "<p>Context for the section of the experiment template that failed.</p>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>Describes the error when an experiment has <code>failed</code>.</p>"
}
},
"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": {
Expand Down Expand Up @@ -1282,6 +1324,12 @@
"traits": {
"smithy.api#documentation": "<p>The reason for the state.</p>"
}
},
"error": {
"target": "com.amazonaws.fis#ExperimentError",
"traits": {
"smithy.api#documentation": "<p>The error information of the experiment when the action has <code>failed</code>.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2338,7 +2386,7 @@
"name": "fis"
},
"aws.protocols#restJson1": {},
"smithy.api#documentation": "<p>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 <a href=\"https://docs.aws.amazon.com/fis/latest/userguide/\">Fault Injection Service User Guide</a>.</p>",
"smithy.api#documentation": "<p>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 <a href=\"https://docs.aws.amazon.com/fis/latest/userguide/\">Fault Injection Service User Guide</a>.</p>",
"smithy.api#title": "AWS Fault Injection Simulator",
"smithy.rules#endpointRuleSet": {
"version": "1.0",
Expand Down

0 comments on commit d69b927

Please sign in to comment.