Skip to content
v2.278.0

DataCaptureConfigProperty Struct ​

Specifies the configuration of your endpoint for model monitor data capture.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const dataCaptureConfigProperty: sagemaker.CfnEndpointConfig.DataCaptureConfigProperty = {
  captureOptions: [{
    captureMode: 'captureMode',
  }],
  destinationS3Uri: 'destinationS3Uri',
  initialSamplingPercentage: 123,

  // the properties below are optional
  captureContentTypeHeader: {
    csvContentTypes: ['csvContentTypes'],
    jsonContentTypes: ['jsonContentTypes'],
  },
  enableCapture: false,
  kmsKeyId: 'kmsKeyId',
};
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_sagemaker as sagemaker

data_capture_config_property = sagemaker.CfnEndpointConfig.DataCaptureConfigProperty(
    capture_options=[sagemaker.CfnEndpointConfig.CaptureOptionProperty(
        capture_mode="captureMode"
    )],
    destination_s3_uri="destinationS3Uri",
    initial_sampling_percentage=123,

    # the properties below are optional
    capture_content_type_header=sagemaker.CfnEndpointConfig.CaptureContentTypeHeaderProperty(
        csv_content_types=["csvContentTypes"],
        json_content_types=["jsonContentTypes"]
    ),
    enable_capture=False,
    kms_key_id="kmsKeyId"
)
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.sagemaker.*;

DataCaptureConfigProperty dataCaptureConfigProperty = DataCaptureConfigProperty.builder()
        .captureOptions(List.of(CaptureOptionProperty.builder()
                .captureMode("captureMode")
                .build()))
        .destinationS3Uri("destinationS3Uri")
        .initialSamplingPercentage(123)

        // the properties below are optional
        .captureContentTypeHeader(CaptureContentTypeHeaderProperty.builder()
                .csvContentTypes(List.of("csvContentTypes"))
                .jsonContentTypes(List.of("jsonContentTypes"))
                .build())
        .enableCapture(false)
        .kmsKeyId("kmsKeyId")
        .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.AWS.Sagemaker;

var dataCaptureConfigProperty = new DataCaptureConfigProperty {
    CaptureOptions = new [] { new CaptureOptionProperty {
        CaptureMode = "captureMode"
    } },
    DestinationS3Uri = "destinationS3Uri",
    InitialSamplingPercentage = 123,

    // the properties below are optional
    CaptureContentTypeHeader = new CaptureContentTypeHeaderProperty {
        CsvContentTypes = new [] { "csvContentTypes" },
        JsonContentTypes = new [] { "jsonContentTypes" }
    },
    EnableCapture = false,
    KmsKeyId = "kmsKeyId"
};
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"

dataCaptureConfigProperty := &DataCaptureConfigProperty{
	CaptureOptions: []interface{}{
		&CaptureOptionProperty{
			CaptureMode: jsii.String("captureMode"),
		},
	},
	DestinationS3Uri: jsii.String("destinationS3Uri"),
	InitialSamplingPercentage: jsii.Number(123),

	// the properties below are optional
	CaptureContentTypeHeader: &CaptureContentTypeHeaderProperty{
		CsvContentTypes: []*string{
			jsii.String("csvContentTypes"),
		},
		JsonContentTypes: []*string{
			jsii.String("jsonContentTypes"),
		},
	},
	EnableCapture: jsii.Boolean(false),
	KmsKeyId: jsii.String("kmsKeyId"),
}

Properties ​

captureContentTypeHeaderoptionalIResolvable | CfnEndpointConfig.CaptureContentTypeHeaderPropertycapture_content_type_headeroptionaltyping.Union[IResolvable, CaptureContentTypeHeaderProperty]captureContentTypeHeaderoptionalIResolvableCaptureContentTypeHeaderoptionalIResolvableCaptureContentTypeHeaderoptionalinterface{} #
A list of the JSON and CSV content type that the endpoint captures.
captureOptionsIResolvable | IResolvable | CfnEndpointConfig.CaptureOptionProperty[]capture_optionstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CaptureOptionProperty]]]captureOptionsIResolvableCaptureOptionsIResolvableCaptureOptionsinterface{} required #
Specifies whether the endpoint captures input data to your model, output data from your model, or both.
destinationS3Uristringdestination_s3_uristrdestinationS3UriStringDestinationS3UristringDestinationS3Uri*string required #
The S3 bucket where model monitor stores captured data.
enableCaptureoptionalboolean | IResolvableenable_captureoptionaltyping.Union[bool, IResolvable]enableCaptureoptionalBooleanEnableCaptureoptionalboolEnableCaptureoptionalinterface{} #
Set to `True` to enable data capture.
initialSamplingPercentagenumberinitial_sampling_percentageint | floatinitialSamplingPercentageNumberInitialSamplingPercentagedoubleInitialSamplingPercentage*float64 required #
The percentage of data to capture.
kmsKeyIdoptionalstringkms_key_idoptionalstrkmsKeyIdoptionalStringKmsKeyIdoptionalstringKmsKeyIdoptional*string #
The AWS Key Management Service ( AWS KMS) key that Amazon SageMaker uses to encrypt the captured data at rest using Amazon S3 server-side encryption.
notes

The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias If you don't provide a KMS key ID, Amazon SageMaker uses the default KMS key for Amazon S3 for your role's account. For more information, see KMS-Managed Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html) in the Amazon Simple Storage Service Developer Guide. The KMS key policy must grant permission to the IAM role that you specify in your CreateModel (https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html) request. For more information, see Using Key Policies in AWS KMS (http://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) in the AWS Key Management Service Developer Guide.