# CodeProperty

Struct · External

Object represents source code from zip file.

- Source: Generated at build time
- Type last changed: v2.224.0 · 13 Nov 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_bedrockagentcore as bedrockagentcore } from 'aws-cdk-lib';
const codeProperty: bedrockagentcore.CfnRuntime.CodeProperty = {
  s3: {
    bucket: 'bucket',
    prefix: 'prefix',

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

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_bedrockagentcore as bedrockagentcore

code_property = bedrockagentcore.CfnRuntime.CodeProperty(
    s3=bedrockagentcore.CfnRuntime.S3LocationProperty(
        bucket="bucket",
        prefix="prefix",

        # the properties below are optional
        version_id="versionId"
    )
)
```

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

CodeProperty codeProperty = CodeProperty.builder()
        .s3(S3LocationProperty.builder()
                .bucket("bucket")
                .prefix("prefix")

                // the properties below are optional
                .versionId("versionId")
                .build())
        .build();
```

C#:

```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.BedrockAgentCore;

var codeProperty = new CodeProperty {
    S3 = new S3LocationProperty {
        Bucket = "bucket",
        Prefix = "prefix",

        // the properties below are optional
        VersionId = "versionId"
    }
};
```

Go:

```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"

codeProperty := &CodeProperty{
	S3: &S3LocationProperty{
		Bucket: jsii.String("bucket"),
		Prefix: jsii.String("prefix"),

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

## Properties

- `s3`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnRuntime.S3LocationProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_bedrockagentcore.CfnRuntime.S3LocationProperty.html) — S3 Location Configuration.
