# SourceAuthProperty

`SourceAuth` is a property of the [AWS CodeBuild Project Source](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html) property type that specifies authorization settings for AWS CodeBuild to access the source code to be built.

- 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_codebuild as codebuild } from 'aws-cdk-lib';
const sourceAuthProperty: codebuild.CfnProject.SourceAuthProperty = {
  type: 'type',

  // the properties below are optional
  resource: 'resource',
};
```

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_codebuild as codebuild

source_auth_property = codebuild.CfnProject.SourceAuthProperty(
    type="type",

    # the properties below are optional
    resource="resource"
)
```

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

SourceAuthProperty sourceAuthProperty = SourceAuthProperty.builder()
        .type("type")

        // the properties below are optional
        .resource("resource")
        .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.CodeBuild;

var sourceAuthProperty = new SourceAuthProperty {
    Type = "type",

    // the properties below are optional
    Resource = "resource"
};
```

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"

sourceAuthProperty := &SourceAuthProperty{
	Type: jsii.String("type"),

	// the properties below are optional
	Resource: jsii.String("resource"),
}
```

## Properties

- `resource`: string — The resource value that applies to the specified authorization type.

- `type`: string (required) — The authorization type to use.

  Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER.
