@@ -26,16 +26,16 @@ using your favorite package manager:
26
26
27
27
The AWS SDK is modulized by clients and commands.
28
28
To send a request, you only need to import the ` MgnClient ` and
29
- the commands you need, for example ` ChangeServerLifeCycleStateCommand ` :
29
+ the commands you need, for example ` ArchiveApplicationCommand ` :
30
30
31
31
``` js
32
32
// ES5 example
33
- const { MgnClient , ChangeServerLifeCycleStateCommand } = require (" @aws-sdk/client-mgn" );
33
+ const { MgnClient , ArchiveApplicationCommand } = require (" @aws-sdk/client-mgn" );
34
34
```
35
35
36
36
``` ts
37
37
// ES6+ example
38
- import { MgnClient , ChangeServerLifeCycleStateCommand } from " @aws-sdk/client-mgn" ;
38
+ import { MgnClient , ArchiveApplicationCommand } from " @aws-sdk/client-mgn" ;
39
39
```
40
40
41
41
### Usage
@@ -54,7 +54,7 @@ const client = new MgnClient({ region: "REGION" });
54
54
const params = {
55
55
/** input parameters */
56
56
};
57
- const command = new ChangeServerLifeCycleStateCommand (params);
57
+ const command = new ArchiveApplicationCommand (params);
58
58
```
59
59
60
60
#### Async/await
@@ -133,15 +133,15 @@ const client = new AWS.Mgn({ region: "REGION" });
133
133
134
134
// async/await.
135
135
try {
136
- const data = await client .changeServerLifeCycleState (params );
136
+ const data = await client .archiveApplication (params );
137
137
// process data.
138
138
} catch (error ) {
139
139
// error handling.
140
140
}
141
141
142
142
// Promises.
143
143
client
144
- .changeServerLifeCycleState (params )
144
+ .archiveApplication (params )
145
145
.then ((data ) => {
146
146
// process data.
147
147
})
@@ -150,7 +150,7 @@ client
150
150
});
151
151
152
152
// callbacks.
153
- client .changeServerLifeCycleState (params , (err , data ) => {
153
+ client .archiveApplication (params , (err , data ) => {
154
154
// process err and data.
155
155
});
156
156
```
0 commit comments