# AttributeDefinitionProperty

Represents an attribute for describing the schema for the table and indexes.

- 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_dynamodb as dynamodb } from 'aws-cdk-lib';
const attributeDefinitionProperty: dynamodb.CfnTable.AttributeDefinitionProperty = {
  attributeName: 'attributeName',
  attributeType: 'attributeType',
};
```

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_dynamodb as dynamodb

attribute_definition_property = dynamodb.CfnTable.AttributeDefinitionProperty(
    attribute_name="attributeName",
    attribute_type="attributeType"
)
```

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

AttributeDefinitionProperty attributeDefinitionProperty = AttributeDefinitionProperty.builder()
        .attributeName("attributeName")
        .attributeType("attributeType")
        .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.DynamoDB;

var attributeDefinitionProperty = new AttributeDefinitionProperty {
    AttributeName = "attributeName",
    AttributeType = "attributeType"
};
```

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"

attributeDefinitionProperty := &AttributeDefinitionProperty{
	AttributeName: jsii.String("attributeName"),
	AttributeType: jsii.String("attributeType"),
}
```

## Properties

- `attributeName`: string (required) — A name for the attribute.

- `attributeType`: string (required) — The data type for the attribute, where:.

  - `S` - the attribute is of type String
  - `N` - the attribute is of type Number
  - `B` - the attribute is of type Binary
