Enum DefaultAuthScheme
The default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database.
Namespace: Amazon.CDK.AWS.RDS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public enum DefaultAuthScheme
Syntax (vb)
Public Enum DefaultAuthScheme
Remarks
ExampleMetadata: infused
Examples
Vpc vpc;
var instance = new DatabaseInstance(this, "Database", new DatabaseInstanceProps {
Engine = DatabaseInstanceEngine.Postgres(new PostgresInstanceEngineProps {
Version = PostgresEngineVersion.VER_17_7
}),
Vpc = vpc,
IamAuthentication = true
});
var proxy = new DatabaseProxy(this, "Proxy", new DatabaseProxyProps {
ProxyTarget = ProxyTarget.FromInstance(instance),
Vpc = vpc,
DefaultAuthScheme = DefaultAuthScheme.IAM_AUTH
});
// Grant IAM permissions for database connection
var role = new Role(this, "DBRole", new RoleProps { AssumedBy = new AccountPrincipal(Account) });
proxy.GrantConnect(role, "database-user");
Synopsis
Fields
| IAM_AUTH | IAM authentication. |
| NONE | No default authentication. |
Fields
| Name | Description |
|---|---|
| IAM_AUTH | IAM authentication. |
| NONE | No default authentication. |