# BasicAuthConfigProperty

Use the BasicAuthConfig property type to set password protection for a specific branch.

- Source: Generated at build time
- Type last changed: v2.93.0 · 23 Aug 2023

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_amplify as amplify } from 'aws-cdk-lib';
const basicAuthConfigProperty: amplify.CfnBranch.BasicAuthConfigProperty = {
  password: 'password',
  username: 'username',

  // the properties below are optional
  enableBasicAuth: false,
};
```

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_amplify as amplify

basic_auth_config_property = amplify.CfnBranch.BasicAuthConfigProperty(
    password="password",
    username="username",

    # the properties below are optional
    enable_basic_auth=False
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.amplify.*;

BasicAuthConfigProperty basicAuthConfigProperty = BasicAuthConfigProperty.builder()
        .password("password")
        .username("username")

        // the properties below are optional
        .enableBasicAuth(false)
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Amplify;

var basicAuthConfigProperty = new BasicAuthConfigProperty {
    Password = "password",
    Username = "username",

    // the properties below are optional
    EnableBasicAuth = false
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

basicAuthConfigProperty := &BasicAuthConfigProperty{
	Password: jsii.String("password"),
	Username: jsii.String("username"),

	// the properties below are optional
	EnableBasicAuth: jsii.Boolean(false),
}
```

## Properties

- `enableBasicAuth`: boolean | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Enables basic authorization for the branch.

- `password`: string (required) — The password for basic authorization.

- `username`: string (required)
