Skip to content
v2.277.0

AsyncInferenceConfigProperty Struct ​

Specifies configuration for how an endpoint performs asynchronous inference.

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 asyncInferenceConfigProperty: sagemaker.CfnEndpointConfig.AsyncInferenceConfigProperty = {
  outputConfig: {
    kmsKeyId: 'kmsKeyId',
    notificationConfig: {
      errorTopic: 'errorTopic',
      includeInferenceResponseIn: ['includeInferenceResponseIn'],
      successTopic: 'successTopic',
    },
    s3FailurePath: 's3FailurePath',
    s3OutputPath: 's3OutputPath',
  },

  // the properties below are optional
  clientConfig: {
    maxConcurrentInvocationsPerInstance: 123,
  },
};
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

async_inference_config_property = sagemaker.CfnEndpointConfig.AsyncInferenceConfigProperty(
    output_config=sagemaker.CfnEndpointConfig.AsyncInferenceOutputConfigProperty(
        kms_key_id="kmsKeyId",
        notification_config=sagemaker.CfnEndpointConfig.AsyncInferenceNotificationConfigProperty(
            error_topic="errorTopic",
            include_inference_response_in=["includeInferenceResponseIn"],
            success_topic="successTopic"
        ),
        s3_failure_path="s3FailurePath",
        s3_output_path="s3OutputPath"
    ),

    # the properties below are optional
    client_config=sagemaker.CfnEndpointConfig.AsyncInferenceClientConfigProperty(
        max_concurrent_invocations_per_instance=123
    )
)
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.*;

AsyncInferenceConfigProperty asyncInferenceConfigProperty = AsyncInferenceConfigProperty.builder()
        .outputConfig(AsyncInferenceOutputConfigProperty.builder()
                .kmsKeyId("kmsKeyId")
                .notificationConfig(AsyncInferenceNotificationConfigProperty.builder()
                        .errorTopic("errorTopic")
                        .includeInferenceResponseIn(List.of("includeInferenceResponseIn"))
                        .successTopic("successTopic")
                        .build())
                .s3FailurePath("s3FailurePath")
                .s3OutputPath("s3OutputPath")
                .build())

        // the properties below are optional
        .clientConfig(AsyncInferenceClientConfigProperty.builder()
                .maxConcurrentInvocationsPerInstance(123)
                .build())
        .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 asyncInferenceConfigProperty = new AsyncInferenceConfigProperty {
    OutputConfig = new AsyncInferenceOutputConfigProperty {
        KmsKeyId = "kmsKeyId",
        NotificationConfig = new AsyncInferenceNotificationConfigProperty {
            ErrorTopic = "errorTopic",
            IncludeInferenceResponseIn = new [] { "includeInferenceResponseIn" },
            SuccessTopic = "successTopic"
        },
        S3FailurePath = "s3FailurePath",
        S3OutputPath = "s3OutputPath"
    },

    // the properties below are optional
    ClientConfig = new AsyncInferenceClientConfigProperty {
        MaxConcurrentInvocationsPerInstance = 123
    }
};
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"

asyncInferenceConfigProperty := &AsyncInferenceConfigProperty{
	OutputConfig: &AsyncInferenceOutputConfigProperty{
		KmsKeyId: jsii.String("kmsKeyId"),
		NotificationConfig: &AsyncInferenceNotificationConfigProperty{
			ErrorTopic: jsii.String("errorTopic"),
			IncludeInferenceResponseIn: []*string{
				jsii.String("includeInferenceResponseIn"),
			},
			SuccessTopic: jsii.String("successTopic"),
		},
		S3FailurePath: jsii.String("s3FailurePath"),
		S3OutputPath: jsii.String("s3OutputPath"),
	},

	// the properties below are optional
	ClientConfig: &AsyncInferenceClientConfigProperty{
		MaxConcurrentInvocationsPerInstance: jsii.Number(123),
	},
}

Properties ​

clientConfigoptionalIResolvable | CfnEndpointConfig.AsyncInferenceClientConfigPropertyclient_configoptionaltyping.Union[IResolvable, AsyncInferenceClientConfigProperty]clientConfigoptionalIResolvableClientConfigoptionalIResolvableClientConfigoptionalinterface{}#
Configures the behavior of the client used by SageMaker to interact with the model container during asynchronous inference.
outputConfigIResolvable | CfnEndpointConfig.AsyncInferenceOutputConfigPropertyoutput_configtyping.Union[IResolvable, AsyncInferenceOutputConfigProperty]outputConfigIResolvableOutputConfigIResolvableOutputConfiginterface{}required#
Specifies the configuration for asynchronous inference invocation outputs.