@aws-cdk_aws-amplify-alpha.BasicAuth

class BasicAuth ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Amplify.Alpha.BasicAuth
Gogithub.com/aws/aws-cdk-go/awscdkamplifyalpha/v2#BasicAuth
Javasoftware.amazon.awscdk.services.amplify.alpha.BasicAuth
Pythonaws_cdk.aws_amplify_alpha.BasicAuth
TypeScript (source)@aws-cdk/aws-amplify-alpha ยป BasicAuth

Basic Auth configuration.

Example

const amplifyApp = new amplify.App(this, 'MyApp', {
  sourceCodeProvider: new amplify.GitHubSourceCodeProvider({
    owner: '<user>',
    repository: '<repo>',
    oauthToken: SecretValue.secretsManager('my-github-token'),
  }),
  basicAuth: amplify.BasicAuth.fromGeneratedPassword('username'),
});

Initializer

new BasicAuth(props: BasicAuthProps)

Parameters

  • props BasicAuthProps

Methods

NameDescription
bind(scope, id)๐Ÿ”นBinds this Basic Auth configuration to an App.
static fromCredentials(username, password)๐Ÿ”นCreates a Basic Auth configuration from a username and a password.
static fromGeneratedPassword(username, encryptionKey?)๐Ÿ”นCreates a Basic Auth configuration with a password generated in Secrets Manager.

bind(scope, id)๐Ÿ”น

public bind(scope: Construct, id: string): BasicAuthConfig

Parameters

  • scope Construct
  • id string

Returns

  • BasicAuthConfig

Binds this Basic Auth configuration to an App.


static fromCredentials(username, password)๐Ÿ”น

public static fromCredentials(username: string, password: SecretValue): BasicAuth

Parameters

  • username string โ€” The username.
  • password SecretValue โ€” The password.

Returns

  • BasicAuth

Creates a Basic Auth configuration from a username and a password.


static fromGeneratedPassword(username, encryptionKey?)๐Ÿ”น

public static fromGeneratedPassword(username: string, encryptionKey?: IKey): BasicAuth

Parameters

  • username string โ€” The username.
  • encryptionKey IKey โ€” The encryption key to use to encrypt the password in Secrets Manager.

Returns

  • BasicAuth

Creates a Basic Auth configuration with a password generated in Secrets Manager.