BasicAuth

class aws_cdk.aws_amplify_alpha.BasicAuth(*, username, encryption_key=None, password=None)

Bases: object

(experimental) Basic Auth configuration.

Stability:

experimental

ExampleMetadata:

infused

Example:

amplify_app = amplify.App(self, "MyApp",
    source_code_provider=amplify.GitHubSourceCodeProvider(
        owner="<user>",
        repository="<repo>",
        oauth_token=SecretValue.secrets_manager("my-github-token")
    ),
    basic_auth=amplify.BasicAuth.from_generated_password("username")
)
Parameters:
  • username (str) – (experimental) The username.

  • encryption_key (Optional[IKey]) – (experimental) The encryption key to use to encrypt the password when it’s generated in Secrets Manager. Default: - default master key

  • password (Optional[SecretValue]) – (experimental) The password. Default: - A Secrets Manager generated password

Stability:

experimental

Methods

bind(scope, id)

(experimental) Binds this Basic Auth configuration to an App.

Parameters:
Stability:

experimental

Return type:

BasicAuthConfig

Static Methods

classmethod from_credentials(username, password)

(experimental) Creates a Basic Auth configuration from a username and a password.

Parameters:
  • username (str) – The username.

  • password (SecretValue) – The password.

Stability:

experimental

Return type:

BasicAuth

classmethod from_generated_password(username, encryption_key=None)

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

Parameters:
  • username (str) – The username.

  • encryption_key (Optional[IKey]) – The encryption key to use to encrypt the password in Secrets Manager.

Stability:

experimental

Return type:

BasicAuth