# MatchCapture

Information about a value captured during match.

Used as argument in: [MatchResult.recordCapture](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.assertions.MatchResult.html#recordcapture)

- Source: [`matching/lib/matcher.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/matching/lib/matcher.ts#L63)
- Type last changed: v2.1.0 · 8 Dec 2021

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { assertions } from 'aws-cdk-lib';

declare const capture: assertions.Capture;
declare const value: any;
const matchCapture: assertions.MatchCapture = {
  capture: capture,
  value: value,
};
```

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 assertions

# capture: assertions.Capture
# value: Any

match_capture = assertions.MatchCapture(
    capture=capture,
    value=value
)
```

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

Capture capture;
Object value;

MatchCapture matchCapture = MatchCapture.builder()
        .capture(capture)
        .value(value)
        .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.Assertions;

Capture capture;
var value;

var matchCapture = new MatchCapture {
    Capture = capture,
    Value = value
};
```

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"

var capture Capture
var value interface{}

matchCapture := &MatchCapture{
	Capture: capture,
	Value: value,
}
```

## Properties

- `capture`: [Capture](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.assertions.Capture.html) (required) — The instance of Capture class to which this capture is associated with.

- `value`: any (required) — The value that was captured.
