Skip to content
v2.278.0

InferenceComponentContainerSpecificationProperty Struct ​

Defines a container that provides the runtime environment for a model that you deploy with an inference component.

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 inferenceComponentContainerSpecificationProperty: sagemaker.CfnInferenceComponent.InferenceComponentContainerSpecificationProperty = {
  artifactUrl: 'artifactUrl',
  containerMetricsConfig: {
    metricsEndpoints: [{
      metricsEndpointPath: 'metricsEndpointPath',

      // the properties below are optional
      metricPublishFrequencyInSeconds: 123,
    }],
  },
  deployedImage: {
    resolutionTime: 'resolutionTime',
    resolvedImage: 'resolvedImage',
    specifiedImage: 'specifiedImage',
  },
  environment: {
    environmentKey: 'environment',
  },
  image: 'image',
};
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

inference_component_container_specification_property = sagemaker.CfnInferenceComponent.InferenceComponentContainerSpecificationProperty(
    artifact_url="artifactUrl",
    container_metrics_config=sagemaker.CfnInferenceComponent.ContainerMetricsConfigProperty(
        metrics_endpoints=[sagemaker.CfnInferenceComponent.MetricsEndpointProperty(
            metrics_endpoint_path="metricsEndpointPath",

            # the properties below are optional
            metric_publish_frequency_in_seconds=123
        )]
    ),
    deployed_image=sagemaker.CfnInferenceComponent.DeployedImageProperty(
        resolution_time="resolutionTime",
        resolved_image="resolvedImage",
        specified_image="specifiedImage"
    ),
    environment={
        "environment_key": "environment"
    },
    image="image"
)
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.*;

InferenceComponentContainerSpecificationProperty inferenceComponentContainerSpecificationProperty = InferenceComponentContainerSpecificationProperty.builder()
        .artifactUrl("artifactUrl")
        .containerMetricsConfig(ContainerMetricsConfigProperty.builder()
                .metricsEndpoints(List.of(MetricsEndpointProperty.builder()
                        .metricsEndpointPath("metricsEndpointPath")

                        // the properties below are optional
                        .metricPublishFrequencyInSeconds(123)
                        .build()))
                .build())
        .deployedImage(DeployedImageProperty.builder()
                .resolutionTime("resolutionTime")
                .resolvedImage("resolvedImage")
                .specifiedImage("specifiedImage")
                .build())
        .environment(Map.of(
                "environmentKey", "environment"))
        .image("image")
        .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 inferenceComponentContainerSpecificationProperty = new InferenceComponentContainerSpecificationProperty {
    ArtifactUrl = "artifactUrl",
    ContainerMetricsConfig = new ContainerMetricsConfigProperty {
        MetricsEndpoints = new [] { new MetricsEndpointProperty {
            MetricsEndpointPath = "metricsEndpointPath",

            // the properties below are optional
            MetricPublishFrequencyInSeconds = 123
        } }
    },
    DeployedImage = new DeployedImageProperty {
        ResolutionTime = "resolutionTime",
        ResolvedImage = "resolvedImage",
        SpecifiedImage = "specifiedImage"
    },
    Environment = new Dictionary<string, string> {
        { "environmentKey", "environment" }
    },
    Image = "image"
};
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"

inferenceComponentContainerSpecificationProperty := &InferenceComponentContainerSpecificationProperty{
	ArtifactUrl: jsii.String("artifactUrl"),
	ContainerMetricsConfig: &ContainerMetricsConfigProperty{
		MetricsEndpoints: []interface{}{
			&MetricsEndpointProperty{
				MetricsEndpointPath: jsii.String("metricsEndpointPath"),

				// the properties below are optional
				MetricPublishFrequencyInSeconds: jsii.Number(123),
			},
		},
	},
	DeployedImage: &DeployedImageProperty{
		ResolutionTime: jsii.String("resolutionTime"),
		ResolvedImage: jsii.String("resolvedImage"),
		SpecifiedImage: jsii.String("specifiedImage"),
	},
	Environment: map[string]*string{
		"environmentKey": jsii.String("environment"),
	},
	Image: jsii.String("image"),
}

Properties ​

artifactUrloptionalstringartifact_urloptionalstrartifactUrloptionalStringArtifactUrloptionalstringArtifactUrloptional*string #
The Amazon S3 path where the model artifacts, which result from model training, are stored.

This path must point to a single gzip compressed tar archive (.tar.gz suffix).

containerMetricsConfigoptionalIResolvable | CfnInferenceComponent.ContainerMetricsConfigPropertycontainer_metrics_configoptionaltyping.Union[IResolvable, ContainerMetricsConfigProperty]containerMetricsConfigoptionalIResolvableContainerMetricsConfigoptionalIResolvableContainerMetricsConfigoptionalinterface{} #
The configuration for container metrics scraping.
deployedImageoptionalIResolvable | CfnInferenceComponent.DeployedImagePropertydeployed_imageoptionaltyping.Union[IResolvable, DeployedImageProperty]deployedImageoptionalIResolvableDeployedImageoptionalIResolvableDeployedImageoptionalinterface{} #
environmentoptionalIResolvable | { [key: string]: string }environmentoptionaltyping.Union[IResolvable, typing.Mapping[str, str]]environmentoptionalIResolvableEnvironmentoptionalIResolvableEnvironmentoptionalinterface{} #
The environment variables to set in the Docker container.

Each key and value in the Environment string-to-string map can have length of up to 1024. We support up to 16 entries in the map.

imageoptionalstringimageoptionalstrimageoptionalStringImageoptionalstringImageoptional*string #
The Amazon Elastic Container Registry (Amazon ECR) path where the Docker image for the model is stored.