Skip to content

Commit

Permalink
docs: fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanZhengYP committed Aug 18, 2021
1 parent a0ea3c6 commit 8462240
Show file tree
Hide file tree
Showing 13 changed files with 258 additions and 226 deletions.
14 changes: 7 additions & 7 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Load credentials from Cognito Identity service, normally used in browsers.
const client = new FooClient({
region: "us-east-1",
credentials: fromCognitoIdentityPool({
clientConfig: cognitoIdentityClientConfig // Optional
clientConfig: cognitoIdentityClientConfig, // Optional
identityPoolId: "us-east-1:1699ebc0-7900-4099-b910-2df94f52a030",
customRoleArn: "arn:aws:iam::1234567890:role/MYAPP-CognitoIdentity", // Optional
logins: {
Expand Down Expand Up @@ -401,10 +401,10 @@ Retrieves credentials using OIDC token from a file on disk. It's commonly used i

const client = new FooClient({
credentials: fromTokenFile({
roleArn: "arn:xxxx" // Optional. Otherwise read from `AWS_ROLE_ARN` environmental variable
roleArn: "arn:xxxx", // Optional. Otherwise read from `AWS_ROLE_ARN` environmental variable
roleSessionName: "session:a", // Optional. Otherwise read from `AWS_ROLE_SESSION_NAME` environmental variable
clientConfig: { region } // // Optional. STS client config to make the assume role request.
})
clientConfig: { region }, // // Optional. STS client config to make the assume role request.
}),
});
```

Expand All @@ -421,10 +421,10 @@ Retrieves credentials from STS web identity federation support.

const client = new FooClient({
credentials: fromWebToken({
roleArn: "arn:xxxx" // Otherwise read from `AWS_ROLE_ARN` environmental variable
roleArn: "arn:xxxx", // Otherwise read from `AWS_ROLE_ARN` environmental variable
roleSessionName: "session:a", // Otherwise read from `AWS_ROLE_SESSION_NAME` environmental variable
clientConfig: { region } // // Optional. STS client config to make the assume role request.
})
clientConfig: { region }, // // Optional. STS client config to make the assume role request.
}),
});
```

Expand Down
426 changes: 229 additions & 197 deletions packages/credential-providers/README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromCognitoIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export type CognitoIdentityCredentialProvider = _CognitoIdentityCredentialProvid
* Results from this function call are not cached internally.
*
* ```javascript
* import { fromCognitoIdentity } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromCognitoIdentity } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromCognitoIdentity } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromCognitoIdentity } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* region,
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromCognitoIdentityPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export interface FromCognitoIdentityPoolParameters extends Omit<_FromCognitoIden
* Results from `GetId` are cached internally, but results from `GetCredentialsForIdentity` are not.
*
* ```javascript
* import { fromCognitoIdentityPool } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromCognitoIdentityPool } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromCognitoIdentityPool } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromCognitoIdentityPool } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* region,
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromContainerMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export interface RemoteProviderInit extends _RemoteProviderInit {}
* Create a credential provider function that reads from ECS container metadata service.
*
* ```javascript
* import { fromContainerMetadata } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromContainerMetadata } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromContainerMetadata } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromContainerMetadata } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const foo = new FooClient({
* credentials: fromInstanceMetadata({
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { CredentialProvider } from "@aws-sdk/types";
* value, the promise returned by the `fromEnv` function will be rejected.
*
* ```javascript
* import { fromEnv } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromEnv } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromEnv } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromEnv } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new DynamoDBClient({
* credentials: fromEnv(),
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromIni.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export interface FromIniInit extends _FromIniInit {
* given precedence over the profile found in the config file.
*
* ```javascript
* import { fromIni } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromIni } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromIni } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromIni } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* credentials: fromIni({
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromInstanceMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { CredentialProvider } from "@aws-sdk/types";
* Creates a credential provider function that reads from the EC2 instance metadata service.
*
* ```javascript
* import { fromInstanceMetadata } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromInstanceMetadata } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromInstanceMetadata } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromInstanceMetadata } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new DynamoDBClient({
* credentials: fromInstanceMetadata({
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export interface FromProcessInit extends _FromProcessInit {}
* receive a JSON payload containing the credentials.
*
* ```javascript
* import { fromProcess } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromProcess } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromProcess } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromProcess } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* credentials: fromProcess({
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromSSO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export interface FromSSOInit extends Omit<_FromSSOInit, "client"> {
* Profiles in the `credentials` file are given precedence over profiles in the `config` file.
*
* ```javascript
* import { fromSSO } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromSSO } = require(@aws-sdk/credential-providers") // CommonJS example
* import { fromSSO } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromSSO } = require(@aws-sdk/credential-providers") // CommonJS import
*
* const client = new FooClient({
* credentials: fromSSO({
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromTemporaryCredentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export interface FromTemporaryCredentialsOptions {
* Creates a credential provider function that retrieves temporary credentials from STS AssumeRole API.
*
* ```javascript
* import { fromTemporaryCredentials } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromTemporaryCredentials } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromTemporaryCredentials } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromTemporaryCredentials } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* region,
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromTokenFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export interface FromTokenFileInit extends _FromTokenFileInit {
* - Calls sts:AssumeRoleWithWebIdentity via `roleAssumerWithWebIdentity` option to get credentials.
*
* ```javascript
* import { fromTokenFile } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromTokenFile } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromTokenFile } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromTokenFile } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const client = new FooClient({
* credentials: fromTokenFile({
Expand Down
4 changes: 2 additions & 2 deletions packages/credential-providers/src/fromWebToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export interface FromWebTokenInit extends _FromWebTokenInit {
* AssumeRoleWithWebIdentity API.
*
* ```javascript
* import { fromWebToken } from "@aws-sdk/credential-providers"; // ES6 example
* // const { fromWebToken } = require("@aws-sdk/credential-providers"); // CommonJS example
* import { fromWebToken } from "@aws-sdk/credential-providers"; // ES6 import
* // const { fromWebToken } = require("@aws-sdk/credential-providers"); // CommonJS import
*
* const dynamodb = new DynamoDBClient({
* region,
Expand Down

0 comments on commit 8462240

Please sign in to comment.