Class CfnModelCard
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.sagemaker.CfnModelCard
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IModelCardRef,ITaggable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.121.0 (build d7af9b9)",
date="2025-12-18T18:20:17.456Z")
@Stability(Stable)
public class CfnModelCard
extends CfnResource
implements IInspectable, IModelCardRef, 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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAdditional information about the model.static final classA fluent builder forCfnModelCard.static interfaceInformation about how the model supports business goals.static interfaceExample:static interfaceThe content of the model card.static interfaceThe evaluation details of the model.static interfaceFunction details.static interfaceAn overview of a model's inference environment.static interfaceDefines how to perform inference generation after a training job is run.static interfaceThe intended uses of a model.static interfaceMetric data.static interfaceA group of metric data that you use to initialize a metric group object.static interfaceAn overview about the model.static interfaceExample:static interfaceMetadata information related to model package version.static interfaceThe function that is optimized during model training.static interfaceThe security configuration used to protect model card data.static interfaceSpecifies an algorithm that was used to create the model package.static interfaceThe training details of the model.static interfaceSageMaker AI training image.static interfaceA hyper parameter that was configured in training the model.static interfaceThe overview of a training job.static interfaceA result from a SageMaker AI training job.static interfaceInformation about the user who created or modified a SageMaker resource.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.sagemaker.IModelCardRef
IModelCardRef.Jsii$Default, IModelCardRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnModelCard(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnModelCard(software.amazon.jsii.JsiiObjectRef objRef) CfnModelCard(software.constructs.Construct scope, String id, CfnModelCardProps props) Create a newAWS::SageMaker::ModelCard. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForModelCard(IModelCardRef resource) static IModelCardReffromModelCardArn(software.constructs.Construct scope, String id, String arn) Creates a new IModelCardRef from an ARN.static IModelCardReffromModelCardName(software.constructs.Construct scope, String id, String modelCardName) Creates a new IModelCardRef from a modelCardName.The domain associated with the user.The Amazon Resource Name (ARN) of the user's profile.The name of the user's profile.The date and time the model card was created.The domain associated with the user.The Amazon Resource Name (ARN) of the user's profile.The name of the user's profile.The date and time the model card was last modified.The Amazon Resource Number (ARN) of the model card.The processing status of model card deletion.A version of the model card.The content of the model card.Information about the user who created or modified one or more of the following:.Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.The unique name of the model card.A reference to a ModelCard resource.The approval status of the model card within your organization.The security configuration used to protect model card data.getTags()Tag Manager which manages the tags for this resource.Key-value pairs used to manage metadata for the model card.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnModelCard.renderProperties(Map<String, Object> props) voidsetContent(IResolvable value) The content of the model card.voidThe content of the model card.voidsetCreatedBy(IResolvable value) Information about the user who created or modified one or more of the following:.voidInformation about the user who created or modified one or more of the following:.voidsetLastModifiedBy(IResolvable value) Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.voidInformation about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.voidsetModelCardName(String value) The unique name of the model card.voidsetModelCardStatus(String value) The approval status of the model card within your organization.voidsetSecurityConfig(IResolvable value) The security configuration used to protect model card data.voidThe security configuration used to protect model card data.voidsetTagsRaw(List<CfnTag> value) Key-value pairs used to manage metadata for the model card.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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) Create a newAWS::SageMaker::ModelCard.- 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
-
arnForModelCard
- Parameters:
resource- This parameter is required.
-
fromModelCardArn
@Stability(Stable) @NotNull public static IModelCardRef fromModelCardArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new IModelCardRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromModelCardName
@Stability(Stable) @NotNull public static IModelCardRef fromModelCardName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String modelCardName) Creates a new IModelCardRef from a modelCardName.- Parameters:
scope- This parameter is required.id- This parameter is required.modelCardName- This parameter is required.
-
isCfnModelCard
Checks whether the given object is a CfnModelCard.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrCreatedByDomainId
The domain associated with the user. -
getAttrCreatedByUserProfileArn
The Amazon Resource Name (ARN) of the user's profile. -
getAttrCreatedByUserProfileName
The name of the user's profile. -
getAttrCreationTime
The date and time the model card was created. -
getAttrLastModifiedByDomainId
The domain associated with the user. -
getAttrLastModifiedByUserProfileArn
The Amazon Resource Name (ARN) of the user's profile. -
getAttrLastModifiedByUserProfileName
The name of the user's profile. -
getAttrLastModifiedTime
The date and time the model card was last modified. -
getAttrModelCardArn
The Amazon Resource Number (ARN) of the model card.For example,
arn:aws:sagemaker:us-west-2:012345678901:modelcard/examplemodelcard. -
getAttrModelCardProcessingStatus
The processing status of model card deletion.The ModelCardProcessingStatus updates throughout the different deletion steps.
-
getAttrModelCardVersion
A version of the model card. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getModelCardRef
A reference to a ModelCard resource.- Specified by:
getModelCardRefin interfaceIModelCardRef
-
getTags
Tag Manager which manages the tags for this resource. -
getContent
The content of the model card.Returns union: either
IResolvableorCfnModelCard.ContentProperty -
setContent
The content of the model card. -
setContent
The content of the model card. -
getModelCardName
The unique name of the model card. -
setModelCardName
The unique name of the model card. -
getModelCardStatus
The approval status of the model card within your organization. -
setModelCardStatus
The approval status of the model card within your organization. -
getCreatedBy
Information about the user who created or modified one or more of the following:.Returns union: either
IResolvableorCfnModelCard.UserContextProperty -
setCreatedBy
Information about the user who created or modified one or more of the following:. -
setCreatedBy
Information about the user who created or modified one or more of the following:. -
getLastModifiedBy
Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.Returns union: either
IResolvableorCfnModelCard.UserContextProperty -
setLastModifiedBy
Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card. -
setLastModifiedBy
Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card. -
getSecurityConfig
The security configuration used to protect model card data.Returns union: either
IResolvableorCfnModelCard.SecurityConfigProperty -
setSecurityConfig
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
Key-value pairs used to manage metadata for the model card. -
setTagsRaw
Key-value pairs used to manage metadata for the model card.
-