1. Packages
  2. AWS
  3. API Docs
  4. sagemaker
  5. ModelCard
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
aws logo
AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi

    Manage an Amazon SageMaker Model Card.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.sagemaker.ModelCard("example", {
        modelCardName: "my-model-card",
        modelCardStatus: "Draft",
        content: `{
      \\"business_details\\": {
        \\"business_problem\\": \\"Quality\\"
      },
      \\"intended_uses\\": {
        \\"intended_uses\\": \\"Testing\\"
      },
      \\"additional_information\\": {
        \\"caveats_and_recommendations\\": \\"Use this\\"
      }
    }
    `,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.sagemaker.ModelCard("example",
        model_card_name="my-model-card",
        model_card_status="Draft",
        content="""{
      \"business_details\": {
        \"business_problem\": \"Quality\"
      },
      \"intended_uses\": {
        \"intended_uses\": \"Testing\"
      },
      \"additional_information\": {
        \"caveats_and_recommendations\": \"Use this\"
      }
    }
    """)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sagemaker"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sagemaker.NewModelCard(ctx, "example", &sagemaker.ModelCardArgs{
    			ModelCardName:   pulumi.String("my-model-card"),
    			ModelCardStatus: pulumi.String("Draft"),
    			Content: pulumi.String(`{
      \"business_details\": {
        \"business_problem\": \"Quality\"
      },
      \"intended_uses\": {
        \"intended_uses\": \"Testing\"
      },
      \"additional_information\": {
        \"caveats_and_recommendations\": \"Use this\"
      }
    }
    `),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Sagemaker.ModelCard("example", new()
        {
            ModelCardName = "my-model-card",
            ModelCardStatus = "Draft",
            Content = @"{
      \""business_details\"": {
        \""business_problem\"": \""Quality\""
      },
      \""intended_uses\"": {
        \""intended_uses\"": \""Testing\""
      },
      \""additional_information\"": {
        \""caveats_and_recommendations\"": \""Use this\""
      }
    }
    ",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sagemaker.ModelCard;
    import com.pulumi.aws.sagemaker.ModelCardArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ModelCard("example", ModelCardArgs.builder()
                .modelCardName("my-model-card")
                .modelCardStatus("Draft")
                .content("""
    {
      \"business_details\": {
        \"business_problem\": \"Quality\"
      },
      \"intended_uses\": {
        \"intended_uses\": \"Testing\"
      },
      \"additional_information\": {
        \"caveats_and_recommendations\": \"Use this\"
      }
    }
                """)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:sagemaker:ModelCard
        properties:
          modelCardName: my-model-card
          modelCardStatus: Draft
          content: |
            {
              \"business_details\": {
                \"business_problem\": \"Quality\"
              },
              \"intended_uses\": {
                \"intended_uses\": \"Testing\"
              },
              \"additional_information\": {
                \"caveats_and_recommendations\": \"Use this\"
              }
            }        
    

    Create ModelCard Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ModelCard(name: string, args: ModelCardArgs, opts?: CustomResourceOptions);
    @overload
    def ModelCard(resource_name: str,
                  args: ModelCardArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def ModelCard(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  content: Optional[str] = None,
                  model_card_name: Optional[str] = None,
                  model_card_status: Optional[str] = None,
                  region: Optional[str] = None,
                  security_config: Optional[ModelCardSecurityConfigArgs] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  timeouts: Optional[ModelCardTimeoutsArgs] = None)
    func NewModelCard(ctx *Context, name string, args ModelCardArgs, opts ...ResourceOption) (*ModelCard, error)
    public ModelCard(string name, ModelCardArgs args, CustomResourceOptions? opts = null)
    public ModelCard(String name, ModelCardArgs args)
    public ModelCard(String name, ModelCardArgs args, CustomResourceOptions options)
    
    type: aws:sagemaker:ModelCard
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ModelCardArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ModelCardArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ModelCardArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ModelCardArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ModelCardArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var modelCardResource = new Aws.Sagemaker.ModelCard("modelCardResource", new()
    {
        Content = "string",
        ModelCardName = "string",
        ModelCardStatus = "string",
        Region = "string",
        SecurityConfig = new Aws.Sagemaker.Inputs.ModelCardSecurityConfigArgs
        {
            KmsKeyId = "string",
        },
        Tags = 
        {
            { "string", "string" },
        },
        Timeouts = new Aws.Sagemaker.Inputs.ModelCardTimeoutsArgs
        {
            Delete = "string",
        },
    });
    
    example, err := sagemaker.NewModelCard(ctx, "modelCardResource", &sagemaker.ModelCardArgs{
    	Content:         pulumi.String("string"),
    	ModelCardName:   pulumi.String("string"),
    	ModelCardStatus: pulumi.String("string"),
    	Region:          pulumi.String("string"),
    	SecurityConfig: &sagemaker.ModelCardSecurityConfigArgs{
    		KmsKeyId: pulumi.String("string"),
    	},
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Timeouts: &sagemaker.ModelCardTimeoutsArgs{
    		Delete: pulumi.String("string"),
    	},
    })
    
    var modelCardResource = new ModelCard("modelCardResource", ModelCardArgs.builder()
        .content("string")
        .modelCardName("string")
        .modelCardStatus("string")
        .region("string")
        .securityConfig(ModelCardSecurityConfigArgs.builder()
            .kmsKeyId("string")
            .build())
        .tags(Map.of("string", "string"))
        .timeouts(ModelCardTimeoutsArgs.builder()
            .delete("string")
            .build())
        .build());
    
    model_card_resource = aws.sagemaker.ModelCard("modelCardResource",
        content="string",
        model_card_name="string",
        model_card_status="string",
        region="string",
        security_config={
            "kms_key_id": "string",
        },
        tags={
            "string": "string",
        },
        timeouts={
            "delete": "string",
        })
    
    const modelCardResource = new aws.sagemaker.ModelCard("modelCardResource", {
        content: "string",
        modelCardName: "string",
        modelCardStatus: "string",
        region: "string",
        securityConfig: {
            kmsKeyId: "string",
        },
        tags: {
            string: "string",
        },
        timeouts: {
            "delete": "string",
        },
    });
    
    type: aws:sagemaker:ModelCard
    properties:
        content: string
        modelCardName: string
        modelCardStatus: string
        region: string
        securityConfig:
            kmsKeyId: string
        tags:
            string: string
        timeouts:
            delete: string
    

    ModelCard Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ModelCard resource accepts the following input properties:

    Content string
    Content of the model card in model card JSON schema.
    ModelCardName string
    Name of the model card.
    ModelCardStatus string
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    SecurityConfig ModelCardSecurityConfig
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ModelCardTimeouts
    Content string
    Content of the model card in model card JSON schema.
    ModelCardName string
    Name of the model card.
    ModelCardStatus string
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    SecurityConfig ModelCardSecurityConfigArgs
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    Tags map[string]string
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    Timeouts ModelCardTimeoutsArgs
    content String
    Content of the model card in model card JSON schema.
    modelCardName String
    Name of the model card.
    modelCardStatus String
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    securityConfig ModelCardSecurityConfig
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    tags Map<String,String>
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ModelCardTimeouts
    content string
    Content of the model card in model card JSON schema.
    modelCardName string
    Name of the model card.
    modelCardStatus string
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    securityConfig ModelCardSecurityConfig
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ModelCardTimeouts
    content str
    Content of the model card in model card JSON schema.
    model_card_name str
    Name of the model card.
    model_card_status str
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    security_config ModelCardSecurityConfigArgs
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts ModelCardTimeoutsArgs
    content String
    Content of the model card in model card JSON schema.
    modelCardName String
    Name of the model card.
    modelCardStatus String
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    securityConfig Property Map
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    tags Map<String>
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ModelCard resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    ModelCardArn string
    The Amazon Resource Name (ARN) of the model card.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModelCardArn string
    The Amazon Resource Name (ARN) of the model card.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    id String
    The provider-assigned unique ID for this managed resource.
    modelCardArn String
    The Amazon Resource Name (ARN) of the model card.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    id string
    The provider-assigned unique ID for this managed resource.
    modelCardArn string
    The Amazon Resource Name (ARN) of the model card.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    id str
    The provider-assigned unique ID for this managed resource.
    model_card_arn str
    The Amazon Resource Name (ARN) of the model card.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    id String
    The provider-assigned unique ID for this managed resource.
    modelCardArn String
    The Amazon Resource Name (ARN) of the model card.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Look up Existing ModelCard Resource

    Get an existing ModelCard resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ModelCardState, opts?: CustomResourceOptions): ModelCard
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            content: Optional[str] = None,
            model_card_arn: Optional[str] = None,
            model_card_name: Optional[str] = None,
            model_card_status: Optional[str] = None,
            region: Optional[str] = None,
            security_config: Optional[ModelCardSecurityConfigArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            timeouts: Optional[ModelCardTimeoutsArgs] = None) -> ModelCard
    func GetModelCard(ctx *Context, name string, id IDInput, state *ModelCardState, opts ...ResourceOption) (*ModelCard, error)
    public static ModelCard Get(string name, Input<string> id, ModelCardState? state, CustomResourceOptions? opts = null)
    public static ModelCard get(String name, Output<String> id, ModelCardState state, CustomResourceOptions options)
    resources:  _:    type: aws:sagemaker:ModelCard    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Content string
    Content of the model card in model card JSON schema.
    ModelCardArn string
    The Amazon Resource Name (ARN) of the model card.
    ModelCardName string
    Name of the model card.
    ModelCardStatus string
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    SecurityConfig ModelCardSecurityConfig
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Timeouts ModelCardTimeouts
    Content string
    Content of the model card in model card JSON schema.
    ModelCardArn string
    The Amazon Resource Name (ARN) of the model card.
    ModelCardName string
    Name of the model card.
    ModelCardStatus string
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    Region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    SecurityConfig ModelCardSecurityConfigArgs
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    Tags map[string]string
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    Timeouts ModelCardTimeoutsArgs
    content String
    Content of the model card in model card JSON schema.
    modelCardArn String
    The Amazon Resource Name (ARN) of the model card.
    modelCardName String
    Name of the model card.
    modelCardStatus String
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    securityConfig ModelCardSecurityConfig
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    tags Map<String,String>
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    timeouts ModelCardTimeouts
    content string
    Content of the model card in model card JSON schema.
    modelCardArn string
    The Amazon Resource Name (ARN) of the model card.
    modelCardName string
    Name of the model card.
    modelCardStatus string
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    region string
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    securityConfig ModelCardSecurityConfig
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    timeouts ModelCardTimeouts
    content str
    Content of the model card in model card JSON schema.
    model_card_arn str
    The Amazon Resource Name (ARN) of the model card.
    model_card_name str
    Name of the model card.
    model_card_status str
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    region str
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    security_config ModelCardSecurityConfigArgs
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    timeouts ModelCardTimeoutsArgs
    content String
    Content of the model card in model card JSON schema.
    modelCardArn String
    The Amazon Resource Name (ARN) of the model card.
    modelCardName String
    Name of the model card.
    modelCardStatus String
    Approval status of the model card. Valid values: Draft, PendingReview, Approved, Archived.
    region String
    Region where this resource will be managed. Defaults to the Region set in the provider configuration.
    securityConfig Property Map
    KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
    tags Map<String>
    A mapping of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
    timeouts Property Map

    Supporting Types

    ModelCardSecurityConfig, ModelCardSecurityConfigArgs

    KmsKeyId string
    KMS key ARN.
    KmsKeyId string
    KMS key ARN.
    kmsKeyId String
    KMS key ARN.
    kmsKeyId string
    KMS key ARN.
    kms_key_id str
    KMS key ARN.
    kmsKeyId String
    KMS key ARN.

    ModelCardTimeouts, ModelCardTimeoutsArgs

    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    Delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    delete string
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    delete str
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
    delete String
    A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.

    Import

    Using pulumi import, import model cards using the model_card_name. For example:

    $ pulumi import aws:sagemaker/modelCard:ModelCard example my-model-card
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v7.19.0 published on Friday, Feb 6, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate