Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use heuristic to select sample operation #5262

Merged
merged 2 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions clients/client-accessanalyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,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 `AccessAnalyzerClient` and
the commands you need, for example `ApplyArchiveRuleCommand`:
the commands you need, for example `ListAnalyzersCommand`:

```js
// ES5 example
const { AccessAnalyzerClient, ApplyArchiveRuleCommand } = require("@aws-sdk/client-accessanalyzer");
const { AccessAnalyzerClient, ListAnalyzersCommand } = require("@aws-sdk/client-accessanalyzer");
```

```ts
// ES6+ example
import { AccessAnalyzerClient, ApplyArchiveRuleCommand } from "@aws-sdk/client-accessanalyzer";
import { AccessAnalyzerClient, ListAnalyzersCommand } from "@aws-sdk/client-accessanalyzer";
```

### Usage
Expand All @@ -59,7 +59,7 @@ const client = new AccessAnalyzerClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new ApplyArchiveRuleCommand(params);
const command = new ListAnalyzersCommand(params);
```

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

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

// Promises.
client
.applyArchiveRule(params)
.listAnalyzers(params)
.then((data) => {
// process data.
})
Expand All @@ -155,7 +155,7 @@ client
});

// callbacks.
client.applyArchiveRule(params, (err, data) => {
client.listAnalyzers(params, (err, data) => {
// process err and data.
});
```
Expand Down
14 changes: 7 additions & 7 deletions clients/client-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,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 `AccountClient` and
the commands you need, for example `DeleteAlternateContactCommand`:
the commands you need, for example `ListRegionsCommand`:

```js
// ES5 example
const { AccountClient, DeleteAlternateContactCommand } = require("@aws-sdk/client-account");
const { AccountClient, ListRegionsCommand } = require("@aws-sdk/client-account");
```

```ts
// ES6+ example
import { AccountClient, DeleteAlternateContactCommand } from "@aws-sdk/client-account";
import { AccountClient, ListRegionsCommand } from "@aws-sdk/client-account";
```

### Usage
Expand All @@ -51,7 +51,7 @@ const client = new AccountClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new DeleteAlternateContactCommand(params);
const command = new ListRegionsCommand(params);
```

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

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

// Promises.
client
.deleteAlternateContact(params)
.listRegions(params)
.then((data) => {
// process data.
})
Expand All @@ -147,7 +147,7 @@ client
});

// callbacks.
client.deleteAlternateContact(params, (err, data) => {
client.listRegions(params, (err, data) => {
// process err and data.
});
```
Expand Down
14 changes: 7 additions & 7 deletions clients/client-acm-pca/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,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 `ACMPCAClient` and
the commands you need, for example `CreateCertificateAuthorityCommand`:
the commands you need, for example `ListTagsCommand`:

```js
// ES5 example
const { ACMPCAClient, CreateCertificateAuthorityCommand } = require("@aws-sdk/client-acm-pca");
const { ACMPCAClient, ListTagsCommand } = require("@aws-sdk/client-acm-pca");
```

```ts
// ES6+ example
import { ACMPCAClient, CreateCertificateAuthorityCommand } from "@aws-sdk/client-acm-pca";
import { ACMPCAClient, ListTagsCommand } from "@aws-sdk/client-acm-pca";
```

### Usage
Expand All @@ -66,7 +66,7 @@ const client = new ACMPCAClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new CreateCertificateAuthorityCommand(params);
const command = new ListTagsCommand(params);
```

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

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

// Promises.
client
.createCertificateAuthority(params)
.listTags(params)
.then((data) => {
// process data.
})
Expand All @@ -162,7 +162,7 @@ client
});

// callbacks.
client.createCertificateAuthority(params, (err, data) => {
client.listTags(params, (err, data) => {
// process err and data.
});
```
Expand Down
14 changes: 7 additions & 7 deletions clients/client-acm/README.md
Original file line number Diff line number Diff line change
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 `ACMClient` and
the commands you need, for example `AddTagsToCertificateCommand`:
the commands you need, for example `ListCertificatesCommand`:

```js
// ES5 example
const { ACMClient, AddTagsToCertificateCommand } = require("@aws-sdk/client-acm");
const { ACMClient, ListCertificatesCommand } = require("@aws-sdk/client-acm");
```

```ts
// ES6+ example
import { ACMClient, AddTagsToCertificateCommand } from "@aws-sdk/client-acm";
import { ACMClient, ListCertificatesCommand } from "@aws-sdk/client-acm";
```

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

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

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

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

// callbacks.
client.addTagsToCertificate(params, (err, data) => {
client.listCertificates(params, (err, data) => {
// process err and data.
});
```
Expand Down
14 changes: 7 additions & 7 deletions clients/client-alexa-for-business/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,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 `AlexaForBusinessClient` and
the commands you need, for example `ApproveSkillCommand`:
the commands you need, for example `ListSkillsCommand`:

```js
// ES5 example
const { AlexaForBusinessClient, ApproveSkillCommand } = require("@aws-sdk/client-alexa-for-business");
const { AlexaForBusinessClient, ListSkillsCommand } = require("@aws-sdk/client-alexa-for-business");
```

```ts
// ES6+ example
import { AlexaForBusinessClient, ApproveSkillCommand } from "@aws-sdk/client-alexa-for-business";
import { AlexaForBusinessClient, ListSkillsCommand } from "@aws-sdk/client-alexa-for-business";
```

### Usage
Expand All @@ -51,7 +51,7 @@ const client = new AlexaForBusinessClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new ApproveSkillCommand(params);
const command = new ListSkillsCommand(params);
```

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

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

// Promises.
client
.approveSkill(params)
.listSkills(params)
.then((data) => {
// process data.
})
Expand All @@ -147,7 +147,7 @@ client
});

// callbacks.
client.approveSkill(params, (err, data) => {
client.listSkills(params, (err, data) => {
// process err and data.
});
```
Expand Down
14 changes: 7 additions & 7 deletions clients/client-amp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,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 `AmpClient` and
the commands you need, for example `CreateAlertManagerDefinitionCommand`:
the commands you need, for example `ListWorkspacesCommand`:

```js
// ES5 example
const { AmpClient, CreateAlertManagerDefinitionCommand } = require("@aws-sdk/client-amp");
const { AmpClient, ListWorkspacesCommand } = require("@aws-sdk/client-amp");
```

```ts
// ES6+ example
import { AmpClient, CreateAlertManagerDefinitionCommand } from "@aws-sdk/client-amp";
import { AmpClient, ListWorkspacesCommand } from "@aws-sdk/client-amp";
```

### Usage
Expand All @@ -51,7 +51,7 @@ const client = new AmpClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new CreateAlertManagerDefinitionCommand(params);
const command = new ListWorkspacesCommand(params);
```

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

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

// Promises.
client
.createAlertManagerDefinition(params)
.listWorkspaces(params)
.then((data) => {
// process data.
})
Expand All @@ -147,7 +147,7 @@ client
});

// callbacks.
client.createAlertManagerDefinition(params, (err, data) => {
client.listWorkspaces(params, (err, data) => {
// process err and data.
});
```
Expand Down
14 changes: 7 additions & 7 deletions clients/client-amplify/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,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 `AmplifyClient` and
the commands you need, for example `CreateAppCommand`:
the commands you need, for example `ListAppsCommand`:

```js
// ES5 example
const { AmplifyClient, CreateAppCommand } = require("@aws-sdk/client-amplify");
const { AmplifyClient, ListAppsCommand } = require("@aws-sdk/client-amplify");
```

```ts
// ES6+ example
import { AmplifyClient, CreateAppCommand } from "@aws-sdk/client-amplify";
import { AmplifyClient, ListAppsCommand } from "@aws-sdk/client-amplify";
```

### Usage
Expand All @@ -56,7 +56,7 @@ const client = new AmplifyClient({ region: "REGION" });
const params = {
/** input parameters */
};
const command = new CreateAppCommand(params);
const command = new ListAppsCommand(params);
```

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

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

// Promises.
client
.createApp(params)
.listApps(params)
.then((data) => {
// process data.
})
Expand All @@ -152,7 +152,7 @@ client
});

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