-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(nested-clients): mark as internal
- Loading branch information
Showing
6 changed files
with
22 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,13 @@ | ||
# @aws-sdk/rds-signer | ||
|
||
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/rds-signer/latest.svg)](https://www.npmjs.com/package/@aws-sdk/rds-signer) | ||
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/rds-signer.svg)](https://www.npmjs.com/package/@aws-sdk/rds-signer) | ||
# @aws-sdk/nested-clients | ||
|
||
## Description | ||
|
||
This package provides utilities for interacting with RDS. | ||
|
||
## Installation | ||
|
||
```console | ||
npm install @aws-sdk/rds-signer | ||
``` | ||
|
||
## Getting Started | ||
|
||
### Import | ||
|
||
ES6 import | ||
|
||
```js | ||
import { Signer } from "@aws-sdk/rds-signer"; | ||
``` | ||
|
||
Or CommonJS import | ||
|
||
```js | ||
const { Signer } = require("@aws-sdk/rds-signer"); | ||
``` | ||
|
||
### Generate Authentication Token for RDS IAM Authentication | ||
|
||
```js | ||
const signer = new Signer({ | ||
/** | ||
* Required. The hostname of the database to connect to. | ||
*/ | ||
hostname: "db.us-east-1.rds.amazonaws.com", | ||
/** | ||
* Required. The port number the database is listening on. | ||
*/ | ||
port: 8000, | ||
/** | ||
* Required. The username to login as. | ||
*/ | ||
username: "user1", | ||
/** | ||
* Optional. The AWS credentials to sign requests with. Uses the default credential provider chain in not specified. | ||
*/ | ||
credentials: fromNodeCredentialProvider(), | ||
/** | ||
* Optional. The region the database is located in. Uses the region inferred from the runtime if omitted. | ||
*/ | ||
region: "us-east-1", | ||
/** | ||
* Optional. The SHA256 hasher constructor to sign the request. | ||
*/ | ||
sha256: HashCtor, | ||
}); | ||
This is an internal package. Do not install this as a direct dependency. | ||
|
||
const token = await signer.getAuthToken(); | ||
// Use this token as the password for connecting to your RDS instance | ||
``` | ||
This package contains separate internal implementations of the STS and SSO-OIDC AWS SDK clients | ||
to be used by the AWS SDK credential providers to break a cyclic dependency. | ||
|
||
For more details and examples, refer to the following resources. Usage is similar across DB engines. | ||
### Bundlers | ||
|
||
- [Connecting to your DB instance using IAM authentication](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.Connecting.html) | ||
- [IAM database authentication for MySQL and PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.IAMDBAuth.html) | ||
- [Using IAM authentication to connect with pgAdmin Amazon Aurora PostgreSQL or Amazon RDS for PostgreSQL](https://aws.amazon.com/blogs/database/using-iam-authentication-to-connect-with-pgadmin-amazon-aurora-postgresql-or-amazon-rds-for-postgresql/) | ||
- [Use IAM authentication to connect with SQL Workbench/J to Amazon Aurora MySQL or Amazon RDS for MySQL](https://aws.amazon.com/blogs/database/use-iam-authentication-to-connect-with-sql-workbenchj-to-amazon-aurora-mysql-or-amazon-rds-for-mysql/) | ||
- [AWS CLI v2 rds generate-db-auth-token Documentation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/generate-db-auth-token.html) | ||
This package may be marked as external if you do not use STS nor SSO-OIDC | ||
in your credential resolution process. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
/** | ||
* @internal | ||
*/ | ||
export { CreateTokenCommand, SSOOIDCClient } from "./nested-sso-oidc/index"; | ||
|
||
export type { SSOOIDCClientConfig, CreateTokenCommandInput } from "./nested-sso-oidc"; | ||
/** | ||
* @internal | ||
*/ | ||
export type { CreateTokenCommandInput, SSOOIDCClientConfig } from "./nested-sso-oidc"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export { | ||
AssumeRoleCommand, | ||
AssumeRoleWithWebIdentityCommand, | ||
STSClient, | ||
getDefaultRoleAssumer, | ||
getDefaultRoleAssumerWithWebIdentity, | ||
STSClient, | ||
} from "./nested-sts/index"; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export type { AssumeRoleCommandInput, STSClientConfig } from "./nested-sts"; |