Manage an Amazon SageMaker Model Card export job.
Example Usage
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.sagemaker.ModelCardExportJob("example", {
modelCardExportJobName: "my-model-card-export-job",
modelCardName: exampleAwsSagemakerModelCard.modelCardName,
outputConfig: {
s3OutputPath: `s3://${test.example}/`,
},
});
import pulumi
import pulumi_aws as aws
example = aws.sagemaker.ModelCardExportJob("example",
model_card_export_job_name="my-model-card-export-job",
model_card_name=example_aws_sagemaker_model_card["modelCardName"],
output_config={
"s3_output_path": f"s3://{test['example']}/",
})
package main
import (
"fmt"
"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.NewModelCardExportJob(ctx, "example", &sagemaker.ModelCardExportJobArgs{
ModelCardExportJobName: pulumi.String("my-model-card-export-job"),
ModelCardName: pulumi.Any(exampleAwsSagemakerModelCard.ModelCardName),
OutputConfig: &sagemaker.ModelCardExportJobOutputConfigArgs{
S3OutputPath: pulumi.Sprintf("s3://%v/", test.Example),
},
})
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.ModelCardExportJob("example", new()
{
ModelCardExportJobName = "my-model-card-export-job",
ModelCardName = exampleAwsSagemakerModelCard.ModelCardName,
OutputConfig = new Aws.Sagemaker.Inputs.ModelCardExportJobOutputConfigArgs
{
S3OutputPath = $"s3://{test.Example}/",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sagemaker.ModelCardExportJob;
import com.pulumi.aws.sagemaker.ModelCardExportJobArgs;
import com.pulumi.aws.sagemaker.inputs.ModelCardExportJobOutputConfigArgs;
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 ModelCardExportJob("example", ModelCardExportJobArgs.builder()
.modelCardExportJobName("my-model-card-export-job")
.modelCardName(exampleAwsSagemakerModelCard.modelCardName())
.outputConfig(ModelCardExportJobOutputConfigArgs.builder()
.s3OutputPath(String.format("s3://%s/", test.example()))
.build())
.build());
}
}
resources:
example:
type: aws:sagemaker:ModelCardExportJob
properties:
modelCardExportJobName: my-model-card-export-job
modelCardName: ${exampleAwsSagemakerModelCard.modelCardName}
outputConfig:
s3OutputPath: s3://${test.example}/
Create ModelCardExportJob Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ModelCardExportJob(name: string, args: ModelCardExportJobArgs, opts?: CustomResourceOptions);@overload
def ModelCardExportJob(resource_name: str,
args: ModelCardExportJobArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ModelCardExportJob(resource_name: str,
opts: Optional[ResourceOptions] = None,
model_card_export_job_name: Optional[str] = None,
model_card_name: Optional[str] = None,
output_config: Optional[ModelCardExportJobOutputConfigArgs] = None,
model_card_version: Optional[int] = None,
region: Optional[str] = None,
timeouts: Optional[ModelCardExportJobTimeoutsArgs] = None)func NewModelCardExportJob(ctx *Context, name string, args ModelCardExportJobArgs, opts ...ResourceOption) (*ModelCardExportJob, error)public ModelCardExportJob(string name, ModelCardExportJobArgs args, CustomResourceOptions? opts = null)
public ModelCardExportJob(String name, ModelCardExportJobArgs args)
public ModelCardExportJob(String name, ModelCardExportJobArgs args, CustomResourceOptions options)
type: aws:sagemaker:ModelCardExportJob
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 ModelCardExportJobArgs
- 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 ModelCardExportJobArgs
- 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 ModelCardExportJobArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ModelCardExportJobArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ModelCardExportJobArgs
- 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 modelCardExportJobResource = new Aws.Sagemaker.ModelCardExportJob("modelCardExportJobResource", new()
{
ModelCardExportJobName = "string",
ModelCardName = "string",
OutputConfig = new Aws.Sagemaker.Inputs.ModelCardExportJobOutputConfigArgs
{
S3OutputPath = "string",
},
ModelCardVersion = 0,
Region = "string",
Timeouts = new Aws.Sagemaker.Inputs.ModelCardExportJobTimeoutsArgs
{
Create = "string",
},
});
example, err := sagemaker.NewModelCardExportJob(ctx, "modelCardExportJobResource", &sagemaker.ModelCardExportJobArgs{
ModelCardExportJobName: pulumi.String("string"),
ModelCardName: pulumi.String("string"),
OutputConfig: &sagemaker.ModelCardExportJobOutputConfigArgs{
S3OutputPath: pulumi.String("string"),
},
ModelCardVersion: pulumi.Int(0),
Region: pulumi.String("string"),
Timeouts: &sagemaker.ModelCardExportJobTimeoutsArgs{
Create: pulumi.String("string"),
},
})
var modelCardExportJobResource = new ModelCardExportJob("modelCardExportJobResource", ModelCardExportJobArgs.builder()
.modelCardExportJobName("string")
.modelCardName("string")
.outputConfig(ModelCardExportJobOutputConfigArgs.builder()
.s3OutputPath("string")
.build())
.modelCardVersion(0)
.region("string")
.timeouts(ModelCardExportJobTimeoutsArgs.builder()
.create("string")
.build())
.build());
model_card_export_job_resource = aws.sagemaker.ModelCardExportJob("modelCardExportJobResource",
model_card_export_job_name="string",
model_card_name="string",
output_config={
"s3_output_path": "string",
},
model_card_version=0,
region="string",
timeouts={
"create": "string",
})
const modelCardExportJobResource = new aws.sagemaker.ModelCardExportJob("modelCardExportJobResource", {
modelCardExportJobName: "string",
modelCardName: "string",
outputConfig: {
s3OutputPath: "string",
},
modelCardVersion: 0,
region: "string",
timeouts: {
create: "string",
},
});
type: aws:sagemaker:ModelCardExportJob
properties:
modelCardExportJobName: string
modelCardName: string
modelCardVersion: 0
outputConfig:
s3OutputPath: string
region: string
timeouts:
create: string
ModelCardExportJob 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 ModelCardExportJob resource accepts the following input properties:
- Model
Card stringExport Job Name - Name of the model card export job.
- Model
Card stringName - Name of the model card.
- Output
Config ModelCard Export Job Output Config - Export output details. Fields are documented below.
- Model
Card intVersion - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- Timeouts
Model
Card Export Job Timeouts
- Model
Card stringExport Job Name - Name of the model card export job.
- Model
Card stringName - Name of the model card.
- Output
Config ModelCard Export Job Output Config Args - Export output details. Fields are documented below.
- Model
Card intVersion - Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- Timeouts
Model
Card Export Job Timeouts Args
- model
Card StringExport Job Name - Name of the model card export job.
- model
Card StringName - Name of the model card.
- output
Config ModelCard Export Job Output Config - Export output details. Fields are documented below.
- model
Card IntegerVersion - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- timeouts
Model
Card Export Job Timeouts
- model
Card stringExport Job Name - Name of the model card export job.
- model
Card stringName - Name of the model card.
- output
Config ModelCard Export Job Output Config - Export output details. Fields are documented below.
- model
Card numberVersion - region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- timeouts
Model
Card Export Job Timeouts
- model_
card_ strexport_ job_ name - Name of the model card export job.
- model_
card_ strname - Name of the model card.
- output_
config ModelCard Export Job Output Config Args - Export output details. Fields are documented below.
- model_
card_ intversion - region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- timeouts
Model
Card Export Job Timeouts Args
- model
Card StringExport Job Name - Name of the model card export job.
- model
Card StringName - Name of the model card.
- output
Config Property Map - Export output details. Fields are documented below.
- model
Card NumberVersion - region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ModelCardExportJob resource produces the following output properties:
- Export
Artifacts List<ModelCard Export Job Export Artifact> - Exported model card artifacts.
- Id string
- The provider-assigned unique ID for this managed resource.
- Model
Card stringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
- Export
Artifacts []ModelCard Export Job Export Artifact - Exported model card artifacts.
- Id string
- The provider-assigned unique ID for this managed resource.
- Model
Card stringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
- export
Artifacts List<ModelCard Export Job Export Artifact> - Exported model card artifacts.
- id String
- The provider-assigned unique ID for this managed resource.
- model
Card StringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
- export
Artifacts ModelCard Export Job Export Artifact[] - Exported model card artifacts.
- id string
- The provider-assigned unique ID for this managed resource.
- model
Card stringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
- export_
artifacts Sequence[ModelCard Export Job Export Artifact] - Exported model card artifacts.
- id str
- The provider-assigned unique ID for this managed resource.
- model_
card_ strexport_ job_ arn - The Amazon Resource Name (ARN) of the model card export job.
- export
Artifacts List<Property Map> - Exported model card artifacts.
- id String
- The provider-assigned unique ID for this managed resource.
- model
Card StringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
Look up Existing ModelCardExportJob Resource
Get an existing ModelCardExportJob 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?: ModelCardExportJobState, opts?: CustomResourceOptions): ModelCardExportJob@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
export_artifacts: Optional[Sequence[ModelCardExportJobExportArtifactArgs]] = None,
model_card_export_job_arn: Optional[str] = None,
model_card_export_job_name: Optional[str] = None,
model_card_name: Optional[str] = None,
model_card_version: Optional[int] = None,
output_config: Optional[ModelCardExportJobOutputConfigArgs] = None,
region: Optional[str] = None,
timeouts: Optional[ModelCardExportJobTimeoutsArgs] = None) -> ModelCardExportJobfunc GetModelCardExportJob(ctx *Context, name string, id IDInput, state *ModelCardExportJobState, opts ...ResourceOption) (*ModelCardExportJob, error)public static ModelCardExportJob Get(string name, Input<string> id, ModelCardExportJobState? state, CustomResourceOptions? opts = null)public static ModelCardExportJob get(String name, Output<String> id, ModelCardExportJobState state, CustomResourceOptions options)resources: _: type: aws:sagemaker:ModelCardExportJob 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.
- Export
Artifacts List<ModelCard Export Job Export Artifact> - Exported model card artifacts.
- Model
Card stringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
- Model
Card stringExport Job Name - Name of the model card export job.
- Model
Card stringName - Name of the model card.
- Model
Card intVersion - Output
Config ModelCard Export Job Output Config - Export output details. Fields are documented below.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- Timeouts
Model
Card Export Job Timeouts
- Export
Artifacts []ModelCard Export Job Export Artifact Args - Exported model card artifacts.
- Model
Card stringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
- Model
Card stringExport Job Name - Name of the model card export job.
- Model
Card stringName - Name of the model card.
- Model
Card intVersion - Output
Config ModelCard Export Job Output Config Args - Export output details. Fields are documented below.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- Timeouts
Model
Card Export Job Timeouts Args
- export
Artifacts List<ModelCard Export Job Export Artifact> - Exported model card artifacts.
- model
Card StringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
- model
Card StringExport Job Name - Name of the model card export job.
- model
Card StringName - Name of the model card.
- model
Card IntegerVersion - output
Config ModelCard Export Job Output Config - Export output details. Fields are documented below.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- timeouts
Model
Card Export Job Timeouts
- export
Artifacts ModelCard Export Job Export Artifact[] - Exported model card artifacts.
- model
Card stringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
- model
Card stringExport Job Name - Name of the model card export job.
- model
Card stringName - Name of the model card.
- model
Card numberVersion - output
Config ModelCard Export Job Output Config - Export output details. Fields are documented below.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- timeouts
Model
Card Export Job Timeouts
- export_
artifacts Sequence[ModelCard Export Job Export Artifact Args] - Exported model card artifacts.
- model_
card_ strexport_ job_ arn - The Amazon Resource Name (ARN) of the model card export job.
- model_
card_ strexport_ job_ name - Name of the model card export job.
- model_
card_ strname - Name of the model card.
- model_
card_ intversion - output_
config ModelCard Export Job Output Config Args - Export output details. Fields are documented below.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- timeouts
Model
Card Export Job Timeouts Args
- export
Artifacts List<Property Map> - Exported model card artifacts.
- model
Card StringExport Job Arn - The Amazon Resource Name (ARN) of the model card export job.
- model
Card StringExport Job Name - Name of the model card export job.
- model
Card StringName - Name of the model card.
- model
Card NumberVersion - output
Config Property Map - Export output details. Fields are documented below.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration
- timeouts Property Map
Supporting Types
ModelCardExportJobExportArtifact, ModelCardExportJobExportArtifactArgs
- S3Export
Artifacts string - Amazon S3 URI of the exported model artifacts.
- S3Export
Artifacts string - Amazon S3 URI of the exported model artifacts.
- s3Export
Artifacts String - Amazon S3 URI of the exported model artifacts.
- s3Export
Artifacts string - Amazon S3 URI of the exported model artifacts.
- s3_
export_ strartifacts - Amazon S3 URI of the exported model artifacts.
- s3Export
Artifacts String - Amazon S3 URI of the exported model artifacts.
ModelCardExportJobOutputConfig, ModelCardExportJobOutputConfigArgs
- S3Output
Path string - Amazon S3 output path.
- S3Output
Path string - Amazon S3 output path.
- s3Output
Path String - Amazon S3 output path.
- s3Output
Path string - Amazon S3 output path.
- s3_
output_ strpath - Amazon S3 output path.
- s3Output
Path String - Amazon S3 output path.
ModelCardExportJobTimeouts, ModelCardExportJobTimeoutsArgs
- Create 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).
- Create 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).
- create 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).
- create 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).
- create 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).
- create 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).
Import
Using pulumi import, import model card export jobs using the model_card_export_job_arn. For example:
$ pulumi import aws:sagemaker/modelCardExportJob:ModelCardExportJob example arn:aws:sagemaker:us-west-2:123456789012:model-card/my-model-card/export-job/my-model-card-export-job
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.
