Skip to content
v2.278.0

MatchCapture Struct ​

Information about a value captured during match.

Example ​

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
# 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
// 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();
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
};
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 ​

captureCapturecaptureCapturecaptureCaptureCaptureCaptureCaptureCapture required #
The instance of Capture class to which this capture is associated with.
valueanyvalueAnyvalueObjectValueobjectValueinterface{} required #
The value that was captured.