-
Notifications
You must be signed in to change notification settings - Fork 543
/
GetExperimentCommand.ts
168 lines (165 loc) · 6.15 KB
/
GetExperimentCommand.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
// smithy-typescript generated code
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
import { getSerdePlugin } from "@smithy/middleware-serde";
import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
import { commonParams } from "../endpoint/EndpointParameters";
import { FisClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../FisClient";
import { GetExperimentRequest, GetExperimentResponse } from "../models/models_0";
import { de_GetExperimentCommand, se_GetExperimentCommand } from "../protocols/Aws_restJson1";
/**
* @public
*/
export { __MetadataBearer, $Command };
/**
* @public
*
* The input for {@link GetExperimentCommand}.
*/
export interface GetExperimentCommandInput extends GetExperimentRequest {}
/**
* @public
*
* The output of {@link GetExperimentCommand}.
*/
export interface GetExperimentCommandOutput extends GetExperimentResponse, __MetadataBearer {}
/**
* @public
* <p>Gets information about the specified experiment.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { FisClient, GetExperimentCommand } from "@aws-sdk/client-fis"; // ES Modules import
* // const { FisClient, GetExperimentCommand } = require("@aws-sdk/client-fis"); // CommonJS import
* const client = new FisClient(config);
* const input = { // GetExperimentRequest
* id: "STRING_VALUE", // required
* };
* const command = new GetExperimentCommand(input);
* const response = await client.send(command);
* // { // GetExperimentResponse
* // experiment: { // Experiment
* // id: "STRING_VALUE",
* // arn: "STRING_VALUE",
* // experimentTemplateId: "STRING_VALUE",
* // roleArn: "STRING_VALUE",
* // state: { // ExperimentState
* // status: "pending" || "initiating" || "running" || "completed" || "stopping" || "stopped" || "failed",
* // reason: "STRING_VALUE",
* // },
* // targets: { // ExperimentTargetMap
* // "<keys>": { // ExperimentTarget
* // resourceType: "STRING_VALUE",
* // resourceArns: [ // ResourceArnList
* // "STRING_VALUE",
* // ],
* // resourceTags: { // TagMap
* // "<keys>": "STRING_VALUE",
* // },
* // filters: [ // ExperimentTargetFilterList
* // { // ExperimentTargetFilter
* // path: "STRING_VALUE",
* // values: [ // ExperimentTargetFilterValues
* // "STRING_VALUE",
* // ],
* // },
* // ],
* // selectionMode: "STRING_VALUE",
* // parameters: { // ExperimentTargetParameterMap
* // "<keys>": "STRING_VALUE",
* // },
* // },
* // },
* // actions: { // ExperimentActionMap
* // "<keys>": { // ExperimentAction
* // actionId: "STRING_VALUE",
* // description: "STRING_VALUE",
* // parameters: { // ExperimentActionParameterMap
* // "<keys>": "STRING_VALUE",
* // },
* // targets: { // ExperimentActionTargetMap
* // "<keys>": "STRING_VALUE",
* // },
* // startAfter: [ // ExperimentActionStartAfterList
* // "STRING_VALUE",
* // ],
* // state: { // ExperimentActionState
* // status: "pending" || "initiating" || "running" || "completed" || "cancelled" || "stopping" || "stopped" || "failed" || "skipped",
* // reason: "STRING_VALUE",
* // },
* // startTime: new Date("TIMESTAMP"),
* // endTime: new Date("TIMESTAMP"),
* // },
* // },
* // stopConditions: [ // ExperimentStopConditionList
* // { // ExperimentStopCondition
* // source: "STRING_VALUE",
* // value: "STRING_VALUE",
* // },
* // ],
* // creationTime: new Date("TIMESTAMP"),
* // startTime: new Date("TIMESTAMP"),
* // endTime: new Date("TIMESTAMP"),
* // tags: {
* // "<keys>": "STRING_VALUE",
* // },
* // logConfiguration: { // ExperimentLogConfiguration
* // cloudWatchLogsConfiguration: { // ExperimentCloudWatchLogsLogConfiguration
* // logGroupArn: "STRING_VALUE",
* // },
* // s3Configuration: { // ExperimentS3LogConfiguration
* // bucketName: "STRING_VALUE",
* // prefix: "STRING_VALUE",
* // },
* // logSchemaVersion: Number("int"),
* // },
* // experimentOptions: { // ExperimentOptions
* // accountTargeting: "single-account" || "multi-account",
* // emptyTargetResolutionMode: "fail" || "skip",
* // actionsMode: "skip-all" || "run-all",
* // },
* // targetAccountConfigurationsCount: Number("long"),
* // },
* // };
*
* ```
*
* @param GetExperimentCommandInput - {@link GetExperimentCommandInput}
* @returns {@link GetExperimentCommandOutput}
* @see {@link GetExperimentCommandInput} for command's `input` shape.
* @see {@link GetExperimentCommandOutput} for command's `response` shape.
* @see {@link FisClientResolvedConfig | config} for FisClient's `config` shape.
*
* @throws {@link ResourceNotFoundException} (client fault)
* <p>The specified resource cannot be found.</p>
*
* @throws {@link ValidationException} (client fault)
* <p>The specified input is not valid, or fails to satisfy the constraints for the request.</p>
*
* @throws {@link FisServiceException}
* <p>Base exception class for all service exceptions from Fis service.</p>
*
*/
export class GetExperimentCommand extends $Command
.classBuilder<
GetExperimentCommandInput,
GetExperimentCommandOutput,
FisClientResolvedConfig,
ServiceInputTypes,
ServiceOutputTypes
>()
.ep({
...commonParams,
})
.m(function (this: any, Command: any, cs: any, config: FisClientResolvedConfig, o: any) {
return [
getSerdePlugin(config, this.serialize, this.deserialize),
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
];
})
.s("FaultInjectionSimulator", "GetExperiment", {})
.n("FisClient", "GetExperimentCommand")
.f(void 0, void 0)
.ser(se_GetExperimentCommand)
.de(de_GetExperimentCommand)
.build() {}