Class CfnModelCard

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

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:13.469Z") @Stability(Stable) public class CfnModelCard extends CfnResource implements IInspectable, ITaggable
Creates an Amazon SageMaker Model Card.

For information about how to use model cards, see Amazon SageMaker Model Card .

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.sagemaker.*;
 Object value;
 CfnModelCard cfnModelCard = CfnModelCard.Builder.create(this, "MyCfnModelCard")
         .content(ContentProperty.builder()
                 .additionalInformation(AdditionalInformationProperty.builder()
                         .caveatsAndRecommendations("caveatsAndRecommendations")
                         .customDetails(Map.of(
                                 "customDetailsKey", "customDetails"))
                         .ethicalConsiderations("ethicalConsiderations")
                         .build())
                 .businessDetails(BusinessDetailsProperty.builder()
                         .businessProblem("businessProblem")
                         .businessStakeholders("businessStakeholders")
                         .lineOfBusiness("lineOfBusiness")
                         .build())
                 .evaluationDetails(List.of(EvaluationDetailProperty.builder()
                         .name("name")
                         // the properties below are optional
                         .datasets(List.of("datasets"))
                         .evaluationJobArn("evaluationJobArn")
                         .evaluationObservation("evaluationObservation")
                         .metadata(Map.of(
                                 "metadataKey", "metadata"))
                         .metricGroups(List.of(MetricGroupProperty.builder()
                                 .metricData(List.of(MetricDataItemsProperty.builder()
                                         .name("name")
                                         .type("type")
                                         .value(value)
                                         // the properties below are optional
                                         .notes("notes")
                                         .xAxisName(List.of("xAxisName"))
                                         .yAxisName(List.of("yAxisName"))
                                         .build()))
                                 .name("name")
                                 .build()))
                         .build()))
                 .intendedUses(IntendedUsesProperty.builder()
                         .explanationsForRiskRating("explanationsForRiskRating")
                         .factorsAffectingModelEfficiency("factorsAffectingModelEfficiency")
                         .intendedUses("intendedUses")
                         .purposeOfModel("purposeOfModel")
                         .riskRating("riskRating")
                         .build())
                 .modelOverview(ModelOverviewProperty.builder()
                         .algorithmType("algorithmType")
                         .inferenceEnvironment(InferenceEnvironmentProperty.builder()
                                 .containerImage(List.of("containerImage"))
                                 .build())
                         .modelArtifact(List.of("modelArtifact"))
                         .modelCreator("modelCreator")
                         .modelDescription("modelDescription")
                         .modelId("modelId")
                         .modelName("modelName")
                         .modelOwner("modelOwner")
                         .modelVersion(123)
                         .problemType("problemType")
                         .build())
                 .modelPackageDetails(ModelPackageDetailsProperty.builder()
                         .approvalDescription("approvalDescription")
                         .createdBy(ModelPackageCreatorProperty.builder()
                                 .userProfileName("userProfileName")
                                 .build())
                         .domain("domain")
                         .inferenceSpecification(InferenceSpecificationProperty.builder()
                                 .containers(List.of(ContainerProperty.builder()
                                         .image("image")
                                         // the properties below are optional
                                         .modelDataUrl("modelDataUrl")
                                         .nearestModelName("nearestModelName")
                                         .build()))
                                 .build())
                         .modelApprovalStatus("modelApprovalStatus")
                         .modelPackageArn("modelPackageArn")
                         .modelPackageDescription("modelPackageDescription")
                         .modelPackageGroupName("modelPackageGroupName")
                         .modelPackageName("modelPackageName")
                         .modelPackageStatus("modelPackageStatus")
                         .modelPackageVersion(123)
                         .sourceAlgorithms(List.of(SourceAlgorithmProperty.builder()
                                 .algorithmName("algorithmName")
                                 // the properties below are optional
                                 .modelDataUrl("modelDataUrl")
                                 .build()))
                         .task("task")
                         .build())
                 .trainingDetails(TrainingDetailsProperty.builder()
                         .objectiveFunction(ObjectiveFunctionProperty.builder()
                                 .function(FunctionProperty.builder()
                                         .condition("condition")
                                         .facet("facet")
                                         .function("function")
                                         .build())
                                 .notes("notes")
                                 .build())
                         .trainingJobDetails(TrainingJobDetailsProperty.builder()
                                 .hyperParameters(List.of(TrainingHyperParameterProperty.builder()
                                         .name("name")
                                         .value("value")
                                         .build()))
                                 .trainingArn("trainingArn")
                                 .trainingDatasets(List.of("trainingDatasets"))
                                 .trainingEnvironment(TrainingEnvironmentProperty.builder()
                                         .containerImage(List.of("containerImage"))
                                         .build())
                                 .trainingMetrics(List.of(TrainingMetricProperty.builder()
                                         .name("name")
                                         .value(123)
                                         // the properties below are optional
                                         .notes("notes")
                                         .build()))
                                 .userProvidedHyperParameters(List.of(TrainingHyperParameterProperty.builder()
                                         .name("name")
                                         .value("value")
                                         .build()))
                                 .userProvidedTrainingMetrics(List.of(TrainingMetricProperty.builder()
                                         .name("name")
                                         .value(123)
                                         // the properties below are optional
                                         .notes("notes")
                                         .build()))
                                 .build())
                         .trainingObservations("trainingObservations")
                         .build())
                 .build())
         .modelCardName("modelCardName")
         .modelCardStatus("modelCardStatus")
         // the properties below are optional
         .createdBy(UserContextProperty.builder()
                 .domainId("domainId")
                 .userProfileArn("userProfileArn")
                 .userProfileName("userProfileName")
                 .build())
         .lastModifiedBy(UserContextProperty.builder()
                 .domainId("domainId")
                 .userProfileArn("userProfileArn")
                 .userProfileName("userProfileName")
                 .build())
         .securityConfig(SecurityConfigProperty.builder()
                 .kmsKeyId("kmsKeyId")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .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

    • CfnModelCard

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

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

      @Stability(Stable) public CfnModelCard(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnModelCardProps props)
      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

    • 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.
    • getAttrCreatedByDomainId

      @Stability(Stable) @NotNull public String getAttrCreatedByDomainId()
      The domain associated with the user.
    • getAttrCreatedByUserProfileArn

      @Stability(Stable) @NotNull public String getAttrCreatedByUserProfileArn()
      The Amazon Resource Name (ARN) of the user's profile.
    • getAttrCreatedByUserProfileName

      @Stability(Stable) @NotNull public String getAttrCreatedByUserProfileName()
      The name of the user's profile.
    • getAttrCreationTime

      @Stability(Stable) @NotNull public String getAttrCreationTime()
      The date and time the model card was created.
    • getAttrLastModifiedByDomainId

      @Stability(Stable) @NotNull public String getAttrLastModifiedByDomainId()
      The domain associated with the user.
    • getAttrLastModifiedByUserProfileArn

      @Stability(Stable) @NotNull public String getAttrLastModifiedByUserProfileArn()
      The Amazon Resource Name (ARN) of the user's profile.
    • getAttrLastModifiedByUserProfileName

      @Stability(Stable) @NotNull public String getAttrLastModifiedByUserProfileName()
      The name of the user's profile.
    • getAttrLastModifiedTime

      @Stability(Stable) @NotNull public String getAttrLastModifiedTime()
      The date and time the model card was last modified.
    • getAttrModelCardArn

      @Stability(Stable) @NotNull public String getAttrModelCardArn()
      The Amazon Resource Number (ARN) of the model card.

      For example, arn:aws:sagemaker:us-west-2:012345678901:modelcard/examplemodelcard .

    • getAttrModelCardProcessingStatus

      @Stability(Stable) @NotNull public String getAttrModelCardProcessingStatus()
      The processing status of model card deletion.

      The ModelCardProcessingStatus updates throughout the different deletion steps.

    • getAttrModelCardVersion

      @Stability(Stable) @NotNull public Number getAttrModelCardVersion()
      A version of the model card.
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getContent

      @Stability(Stable) @NotNull public Object getContent()
      The content of the model card.
    • setContent

      @Stability(Stable) public void setContent(@NotNull IResolvable value)
      The content of the model card.
    • setContent

      @Stability(Stable) public void setContent(@NotNull CfnModelCard.ContentProperty value)
      The content of the model card.
    • getModelCardName

      @Stability(Stable) @NotNull public String getModelCardName()
      The unique name of the model card.
    • setModelCardName

      @Stability(Stable) public void setModelCardName(@NotNull String value)
      The unique name of the model card.
    • getModelCardStatus

      @Stability(Stable) @NotNull public String getModelCardStatus()
      The approval status of the model card within your organization.
    • setModelCardStatus

      @Stability(Stable) public void setModelCardStatus(@NotNull String value)
      The approval status of the model card within your organization.
    • getCreatedBy

      @Stability(Stable) @Nullable public Object getCreatedBy()
      Information about the user who created or modified one or more of the following:.
    • setCreatedBy

      @Stability(Stable) public void setCreatedBy(@Nullable IResolvable value)
      Information about the user who created or modified one or more of the following:.
    • setCreatedBy

      @Stability(Stable) public void setCreatedBy(@Nullable CfnModelCard.UserContextProperty value)
      Information about the user who created or modified one or more of the following:.
    • getLastModifiedBy

      @Stability(Stable) @Nullable public Object getLastModifiedBy()
      Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.
    • setLastModifiedBy

      @Stability(Stable) public void setLastModifiedBy(@Nullable IResolvable value)
      Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.
    • setLastModifiedBy

      @Stability(Stable) public void setLastModifiedBy(@Nullable CfnModelCard.UserContextProperty value)
      Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.
    • getSecurityConfig

      @Stability(Stable) @Nullable public Object getSecurityConfig()
      The security configuration used to protect model card data.
    • setSecurityConfig

      @Stability(Stable) public void setSecurityConfig(@Nullable IResolvable value)
      The security configuration used to protect model card data.
    • setSecurityConfig

      @Stability(Stable) public void setSecurityConfig(@Nullable CfnModelCard.SecurityConfigProperty value)
      The security configuration used to protect model card data.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      Key-value pairs used to manage metadata for the model card.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      Key-value pairs used to manage metadata for the model card.