Skip to content

Commit

Permalink
feat(client-mgn): This release adds support for Application and Wave …
Browse files Browse the repository at this point in the history
…management. We also now support custom post-launch actions.
  • Loading branch information
awstools committed Nov 28, 2022
1 parent 501931e commit e573378
Show file tree
Hide file tree
Showing 38 changed files with 11,308 additions and 1,513 deletions.
14 changes: 7 additions & 7 deletions clients/client-mgn/README.md
Expand Up @@ -26,16 +26,16 @@ using your favorite package manager:

The AWS SDK is modulized by clients and commands.
To send a request, you only need to import the `MgnClient` and
the commands you need, for example `ChangeServerLifeCycleStateCommand`:
the commands you need, for example `ArchiveApplicationCommand`:

```js
// ES5 example
const { MgnClient, ChangeServerLifeCycleStateCommand } = require("@aws-sdk/client-mgn");
const { MgnClient, ArchiveApplicationCommand } = require("@aws-sdk/client-mgn");
```

```ts
// ES6+ example
import { MgnClient, ChangeServerLifeCycleStateCommand } from "@aws-sdk/client-mgn";
import { MgnClient, ArchiveApplicationCommand } from "@aws-sdk/client-mgn";
```

### Usage
Expand All @@ -54,7 +54,7 @@ const client = new MgnClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new ChangeServerLifeCycleStateCommand(params);
const command = new ArchiveApplicationCommand(params);
```

#### Async/await
Expand Down Expand Up @@ -133,15 +133,15 @@ const client = new AWS.Mgn({ region: "REGION" });

// async/await.
try {
const data = await client.changeServerLifeCycleState(params);
const data = await client.archiveApplication(params);
// process data.
} catch (error) {
// error handling.
}

// Promises.
client
.changeServerLifeCycleState(params)
.archiveApplication(params)
.then((data) => {
// process data.
})
Expand All @@ -150,7 +150,7 @@ client
});

// callbacks.
client.changeServerLifeCycleState(params, (err, data) => {
client.archiveApplication(params, (err, data) => {
// process err and data.
});
```
Expand Down

0 comments on commit e573378

Please sign in to comment.