# ContainerMetricsConfigProperty

The configuration for container metrics scraping.

- Source: Generated at build time
- Type last changed: v2.268.0 · 2 Sep 2026

## Example

TypeScript:

```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 containerMetricsConfigProperty: sagemaker.CfnInferenceComponent.ContainerMetricsConfigProperty = {
  metricsEndpoints: [{
    metricsEndpointPath: 'metricsEndpointPath',

    // the properties below are optional
    metricPublishFrequencyInSeconds: 123,
  }],
};
```

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 aws_sagemaker as sagemaker

container_metrics_config_property = sagemaker.CfnInferenceComponent.ContainerMetricsConfigProperty(
    metrics_endpoints=[sagemaker.CfnInferenceComponent.MetricsEndpointProperty(
        metrics_endpoint_path="metricsEndpointPath",

        # the properties below are optional
        metric_publish_frequency_in_seconds=123
    )]
)
```

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.services.sagemaker.*;

ContainerMetricsConfigProperty containerMetricsConfigProperty = ContainerMetricsConfigProperty.builder()
        .metricsEndpoints(List.of(MetricsEndpointProperty.builder()
                .metricsEndpointPath("metricsEndpointPath")

                // the properties below are optional
                .metricPublishFrequencyInSeconds(123)
                .build()))
        .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.AWS.Sagemaker;

var containerMetricsConfigProperty = new ContainerMetricsConfigProperty {
    MetricsEndpoints = new [] { new MetricsEndpointProperty {
        MetricsEndpointPath = "metricsEndpointPath",

        // the properties below are optional
        MetricPublishFrequencyInSeconds = 123
    } }
};
```

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"

containerMetricsConfigProperty := &ContainerMetricsConfigProperty{
	MetricsEndpoints: []interface{}{
		&MetricsEndpointProperty{
			MetricsEndpointPath: jsii.String("metricsEndpointPath"),

			// the properties below are optional
			MetricPublishFrequencyInSeconds: jsii.Number(123),
		},
	},
}
```

## Properties

- `metricsEndpoints`: [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [IResolvable](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInferenceComponent.MetricsEndpointProperty](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnInferenceComponent.MetricsEndpointProperty.html)[] (required)
