Class CfnMetricAttribution

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, IEnvironmentAware, IMetricAttributionRef, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.139.0 (build 26a6b54)", date="2026-09-02T11:03:14.940Z") @Stability(Stable) public class CfnMetricAttribution extends CfnResource implements IInspectable, IMetricAttributionRef
Creates a metric attribution for reporting on recommendation impact in Amazon Personalize.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.personalize.*;
 CfnMetricAttribution cfnMetricAttribution = CfnMetricAttribution.Builder.create(this, "MyCfnMetricAttribution")
         .datasetGroupArn("datasetGroupArn")
         .metrics(List.of(MetricAttributeProperty.builder()
                 .eventType("eventType")
                 .expression("expression")
                 .metricName("metricName")
                 .build()))
         .metricsOutputConfig(MetricsOutputConfigProperty.builder()
                 .roleArn("roleArn")
                 // the properties below are optional
                 .s3DataDestination(S3DataDestinationProperty.builder()
                         .path("path")
                         // the properties below are optional
                         .kmsKeyArn("kmsKeyArn")
                         .build())
                 .build())
         .name("name")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnMetricAttribution

      protected CfnMetricAttribution(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnMetricAttribution

      protected CfnMetricAttribution(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnMetricAttribution

      @Stability(Stable) public CfnMetricAttribution(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnMetricAttributionProps props)
      Create a new AWS::Personalize::MetricAttribution.

      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • arnForMetricAttribution

      @Stability(Stable) @NotNull public static String arnForMetricAttribution(@NotNull IMetricAttributionRef resource)
      Parameters:
      resource - This parameter is required.
    • isCfnMetricAttribution

      @Stability(Stable) @NotNull public static Boolean isCfnMetricAttribution(@NotNull Object x)
      Checks whether the given object is a CfnMetricAttribution.

      Parameters:
      x - This parameter is required.
    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrMetricAttributionArn

      @Stability(Stable) @NotNull public String getAttrMetricAttributionArn()
      The ARN of the metric attribution.
    • getAttrStatus

      @Stability(Stable) @NotNull public String getAttrStatus()
      The status of the metric attribution.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getCfnPropertyNames

      @Stability(Stable) @NotNull protected Map<String,String> getCfnPropertyNames()
      Overrides:
      getCfnPropertyNames in class CfnResource
    • getMetricAttributionRef

      @Stability(Stable) @NotNull public MetricAttributionReference getMetricAttributionRef()
      A reference to a MetricAttribution resource.
      Specified by:
      getMetricAttributionRef in interface IMetricAttributionRef
    • getDatasetGroupArn

      @Stability(Stable) @NotNull public String getDatasetGroupArn()
      The ARN of the destination dataset group.
    • setDatasetGroupArn

      @Stability(Stable) public void setDatasetGroupArn(@NotNull String value)
      The ARN of the destination dataset group.
    • getMetrics

      @Stability(Stable) @NotNull public Object getMetrics()
      A list of metric attributes for the metric attribution.

      Returns union: either IResolvable or Listinvalid input: '<'either IResolvable or CfnMetricAttribution.MetricAttributeProperty>

    • setMetrics

      @Stability(Stable) public void setMetrics(@NotNull IResolvable value)
      A list of metric attributes for the metric attribution.
    • setMetrics

      @Stability(Stable) public void setMetrics(@NotNull List<Object> value)
      A list of metric attributes for the metric attribution.
    • getMetricsOutputConfig

      @Stability(Stable) @NotNull public Object getMetricsOutputConfig()
      The output configuration details for the metric attribution.

      Returns union: either IResolvable or CfnMetricAttribution.MetricsOutputConfigProperty

    • setMetricsOutputConfig

      @Stability(Stable) public void setMetricsOutputConfig(@NotNull IResolvable value)
      The output configuration details for the metric attribution.
    • setMetricsOutputConfig

      @Stability(Stable) public void setMetricsOutputConfig(@NotNull CfnMetricAttribution.MetricsOutputConfigProperty value)
      The output configuration details for the metric attribution.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of the metric attribution.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the metric attribution.