# SourceAccessConfigurationType

The type of authentication protocol or the VPC components for your event source's SourceAccessConfiguration.

Obtainable from: SourceAccessConfigurationType.BASIC_AUTH, SourceAccessConfigurationType.CLIENT_CERTIFICATE_TLS_AUTH, SourceAccessConfigurationType.SASL_SCRAM_256_AUTH, SourceAccessConfigurationType.SASL_SCRAM_512_AUTH, SourceAccessConfigurationType.SERVER_ROOT_CA_CERTIFICATE, SourceAccessConfigurationType.VIRTUAL_HOST, SourceAccessConfigurationType.VPC_SECURITY_GROUP, SourceAccessConfigurationType.VPC_SUBNET, SourceAccessConfigurationType.of

- Source: [`aws-lambda/lib/event-source-mapping.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-lambda/lib/event-source-mapping.ts#L19)
- Type last changed: v2.183.0 · 12 Mar 2025

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const sourceAccessConfigurationType = lambda.SourceAccessConfigurationType.BASIC_AUTH;
```

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_lambda as lambda_

source_access_configuration_type = lambda_.SourceAccessConfigurationType.BASIC_AUTH
```

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.lambda.*;

SourceAccessConfigurationType sourceAccessConfigurationType = SourceAccessConfigurationType.BASIC_AUTH;
```

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.Lambda;

var sourceAccessConfigurationType = SourceAccessConfigurationType.BASIC_AUTH;
```

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"

sourceAccessConfigurationType := awscdk.Aws_lambda.SourceAccessConfigurationType_BASIC_AUTH()
```

## Properties

- `BASIC_AUTH`: [SourceAccessConfigurationType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SourceAccessConfigurationType.html) (static) — (MQ) The Secrets Manager secret that stores your broker credentials.

- `CLIENT_CERTIFICATE_TLS_AUTH`: [SourceAccessConfigurationType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SourceAccessConfigurationType.html) (static) — The Secrets Manager ARN of your secret key containing the certificate chain (X.509 PEM), private key (PKCS#8 PEM), and private key password (optional) used for mutual TLS authentication of your MSK/Apache Kafka brokers.

- `SASL_SCRAM_256_AUTH`: [SourceAccessConfigurationType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SourceAccessConfigurationType.html) (static) — The Secrets Manager ARN of your secret key used for SASL SCRAM-256 authentication of your Self-Managed Apache Kafka brokers.

- `SASL_SCRAM_512_AUTH`: [SourceAccessConfigurationType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SourceAccessConfigurationType.html) (static) — The Secrets Manager ARN of your secret key used for SASL SCRAM-512 authentication of your Self-Managed Apache Kafka brokers.

- `SERVER_ROOT_CA_CERTIFICATE`: [SourceAccessConfigurationType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SourceAccessConfigurationType.html) (static) — The Secrets Manager ARN of your secret key containing the root CA certificate (X.509 PEM) used for TLS encryption of your Apache Kafka brokers.

- `type`: string — The key to use in `SourceAccessConfigurationProperty.Type` property in CloudFormation.

- `VIRTUAL_HOST`: [SourceAccessConfigurationType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SourceAccessConfigurationType.html) (static) — The name of the virtual host in your RabbitMQ broker.

  Lambda uses this RabbitMQ host as the event source.

- `VPC_SECURITY_GROUP`: [SourceAccessConfigurationType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SourceAccessConfigurationType.html) (static) — The VPC security group used to manage access to your Self-Managed Apache Kafka brokers.

- `VPC_SUBNET`: [SourceAccessConfigurationType](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.SourceAccessConfigurationType.html) (static) — The subnets associated with your VPC.

  Lambda connects to these subnets to fetch data from your Self-Managed Apache Kafka cluster.

## Methods

- `of(name: string): SourceAccessConfigurationType // chainable` (static) — A custom source access configuration property.
