# VpcConfigProperty

`VpcConfig` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that enable AWS CodeBuild to access resources in an Amazon VPC. For more information, see [Use AWS CodeBuild with Amazon Virtual Private Cloud](https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html) in the *AWS CodeBuild User Guide* .

- 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 vpcConfigProperty: codebuild.CfnProject.VpcConfigProperty = {
  securityGroupIds: ['securityGroupIds'],
  subnets: ['subnets'],
  vpcId: 'vpcId',
};
```

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

vpc_config_property = codebuild.CfnProject.VpcConfigProperty(
    security_group_ids=["securityGroupIds"],
    subnets=["subnets"],
    vpc_id="vpcId"
)
```

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

VpcConfigProperty vpcConfigProperty = VpcConfigProperty.builder()
        .securityGroupIds(List.of("securityGroupIds"))
        .subnets(List.of("subnets"))
        .vpcId("vpcId")
        .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 vpcConfigProperty = new VpcConfigProperty {
    SecurityGroupIds = new [] { "securityGroupIds" },
    Subnets = new [] { "subnets" },
    VpcId = "vpcId"
};
```

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"

vpcConfigProperty := &VpcConfigProperty{
	SecurityGroupIds: []*string{
		jsii.String("securityGroupIds"),
	},
	Subnets: []*string{
		jsii.String("subnets"),
	},
	VpcId: jsii.String("vpcId"),
}
```

## Properties

- `securityGroupIds`: string[] — A list of one or more security groups IDs in your Amazon VPC.

  The maximum count is 5.

- `subnets`: string[] — A list of one or more subnet IDs in your Amazon VPC.

  The maximum count is 16.

- `vpcId`: string — The ID of the Amazon VPC.
