CfnResourceMetricsConfigurationProps Struct
Properties for defining a CfnResourceMetricsConfiguration.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudwatch as cloudwatch } from 'aws-cdk-lib';
const cfnResourceMetricsConfigurationProps: cloudwatch.CfnResourceMetricsConfigurationProps = {
resourceArn: 'resourceArn',
// the properties below are optional
metricSelections: [{
includeMetrics: ['includeMetrics'],
}],
};
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_cloudwatch as cloudwatch
cfn_resource_metrics_configuration_props = cloudwatch.CfnResourceMetricsConfigurationProps(
resource_arn="resourceArn",
# the properties below are optional
metric_selections=[cloudwatch.CfnResourceMetricsConfiguration.ResourceMetricSelectionProperty(
include_metrics=["includeMetrics"]
)]
)
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.cloudwatch.*;
CfnResourceMetricsConfigurationProps cfnResourceMetricsConfigurationProps = CfnResourceMetricsConfigurationProps.builder()
.resourceArn("resourceArn")
// the properties below are optional
.metricSelections(List.of(ResourceMetricSelectionProperty.builder()
.includeMetrics(List.of("includeMetrics"))
.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.CloudWatch;
var cfnResourceMetricsConfigurationProps = new CfnResourceMetricsConfigurationProps {
ResourceArn = "resourceArn",
// the properties below are optional
MetricSelections = new [] { new ResourceMetricSelectionProperty {
IncludeMetrics = new [] { "includeMetrics" }
} }
};
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"
cfnResourceMetricsConfigurationProps := &CfnResourceMetricsConfigurationProps{
ResourceArn: jsii.String("resourceArn"),
// the properties below are optional
MetricSelections: []interface{}{
&ResourceMetricSelectionProperty{
IncludeMetrics: []*string{
jsii.String("includeMetrics"),
},
},
},
}
Properties
metricSelectionsoptionalIResolvable | IResolvable | CfnResourceMetricsConfiguration.metric_selectionsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, ResourceMetricSelectionProperty]]]metricSelectionsoptionalIResolvableMetricSelectionsoptionalIResolvableMetricSelectionsoptionalinterface{} #The metric selections that define which metrics are enabled for detailed monitoring on the resource.
The Amazon Resource Name (ARN) of the resource for which the detailed monitoring metrics configuration is managed.