# DynamoProjectionExpression

Class to generate projection expression.

Returned by: DynamoProjectionExpression.atIndex, DynamoProjectionExpression.withAttribute

- Source: [`aws-stepfunctions-tasks/lib/dynamodb/shared-types.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-stepfunctions-tasks/lib/dynamodb/shared-types.ts#L75)

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';
const dynamoProjectionExpression = new stepfunctions_tasks.DynamoProjectionExpression();
```

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_stepfunctions_tasks as stepfunctions_tasks

dynamo_projection_expression = stepfunctions_tasks.DynamoProjectionExpression()
```

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

DynamoProjectionExpression dynamoProjectionExpression = new DynamoProjectionExpression();
```

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.StepFunctions.Tasks;

var dynamoProjectionExpression = new DynamoProjectionExpression();
```

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"

dynamoProjectionExpression := awscdk.Aws_stepfunctions_tasks.NewDynamoProjectionExpression()
```

## Initializer

TypeScript:

```ts
new DynamoProjectionExpression()
```

Python:

```python
DynamoProjectionExpression()
```

Java:

```java
new DynamoProjectionExpression()
```

C# / .NET:

```csharp
new DynamoProjectionExpression()
```

Golang:

```go
NewDynamoProjectionExpression()
```

## Methods

- `atIndex(index: number): DynamoProjectionExpression // chainable` — Adds the array literal access for passed index.

  **Parameters**

  - `index` — array index.

- `toString(): string` — converts and return the string expression.

- `withAttribute(attr: string): DynamoProjectionExpression // chainable` — Adds the passed attribute to the chain.

  **Parameters**

  - `attr` — Attribute name.
