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.
- Model
Card stringName - Name of the model card.
- Model
Card stringStatus - 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.
- Security
Config ModelCard Security Config - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- Dictionary<string, string>
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Timeouts
Model
Card Timeouts
- Content string
- Content of the model card in model card JSON schema.
- Model
Card stringName - Name of the model card.
- Model
Card stringStatus - 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.
- Security
Config ModelCard Security Config Args - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- map[string]string
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Timeouts
Model
Card Timeouts Args
- content String
- Content of the model card in model card JSON schema.
- model
Card StringName - Name of the model card.
- model
Card StringStatus - 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.
- security
Config ModelCard Security Config - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- Map<String,String>
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts
Model
Card Timeouts
- content string
- Content of the model card in model card JSON schema.
- model
Card stringName - Name of the model card.
- model
Card stringStatus - 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.
- security
Config ModelCard Security Config - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- {[key: string]: string}
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts
Model
Card Timeouts
- content str
- Content of the model card in model card JSON schema.
- model_
card_ strname - Name of the model card.
- model_
card_ strstatus - 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 ModelCard Security Config Args - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- Mapping[str, str]
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - timeouts
Model
Card Timeouts Args
- content String
- Content of the model card in model card JSON schema.
- model
Card StringName - Name of the model card.
- model
Card StringStatus - 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.
- security
Config Property Map - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- Map<String>
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration 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.
- Model
Card stringArn - The Amazon Resource Name (ARN) of the model card.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- Id string
- The provider-assigned unique ID for this managed resource.
- Model
Card stringArn - The Amazon Resource Name (ARN) of the model card.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- id String
- The provider-assigned unique ID for this managed resource.
- model
Card StringArn - The Amazon Resource Name (ARN) of the model card.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- id string
- The provider-assigned unique ID for this managed resource.
- model
Card stringArn - The Amazon Resource Name (ARN) of the model card.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- id str
- The provider-assigned unique ID for this managed resource.
- model_
card_ strarn - The Amazon Resource Name (ARN) of the model card.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block.
- id String
- The provider-assigned unique ID for this managed resource.
- model
Card StringArn - The Amazon Resource Name (ARN) of the model card.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration 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) -> ModelCardfunc 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.
- Content string
- Content of the model card in model card JSON schema.
- Model
Card stringArn - The Amazon Resource Name (ARN) of the model card.
- Model
Card stringName - Name of the model card.
- Model
Card stringStatus - 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.
- Security
Config ModelCard Security Config - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- Dictionary<string, string>
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - Timeouts
Model
Card Timeouts
- Content string
- Content of the model card in model card JSON schema.
- Model
Card stringArn - The Amazon Resource Name (ARN) of the model card.
- Model
Card stringName - Name of the model card.
- Model
Card stringStatus - 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.
- Security
Config ModelCard Security Config Args - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- map[string]string
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - Timeouts
Model
Card Timeouts Args
- content String
- Content of the model card in model card JSON schema.
- model
Card StringArn - The Amazon Resource Name (ARN) of the model card.
- model
Card StringName - Name of the model card.
- model
Card StringStatus - 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.
- security
Config ModelCard Security Config - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- Map<String,String>
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - timeouts
Model
Card Timeouts
- content string
- Content of the model card in model card JSON schema.
- model
Card stringArn - The Amazon Resource Name (ARN) of the model card.
- model
Card stringName - Name of the model card.
- model
Card stringStatus - 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.
- security
Config ModelCard Security Config - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- {[key: string]: string}
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - timeouts
Model
Card Timeouts
- content str
- Content of the model card in model card JSON schema.
- model_
card_ strarn - The Amazon Resource Name (ARN) of the model card.
- model_
card_ strname - Name of the model card.
- model_
card_ strstatus - 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 ModelCard Security Config Args - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- Mapping[str, str]
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - timeouts
Model
Card Timeouts Args
- content String
- Content of the model card in model card JSON schema.
- model
Card StringArn - The Amazon Resource Name (ARN) of the model card.
- model
Card StringName - Name of the model card.
- model
Card StringStatus - 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.
- security
Config Property Map - KMS key to encrypt, decrypt, and re-encrypt model card content. Fields are documented below.
- Map<String>
- A mapping of tags to assign to the resource. If configured with a provider
default_tagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tagsconfiguration block. - timeouts Property Map
Supporting Types
ModelCardSecurityConfig, ModelCardSecurityConfigArgs
- Kms
Key stringId - KMS key ARN.
- Kms
Key stringId - KMS key ARN.
- kms
Key StringId - KMS key ARN.
- kms
Key stringId - KMS key ARN.
- kms_
key_ strid - KMS key ARN.
- kms
Key StringId - 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
awsTerraform Provider.
