Show / Hide Table of Contents

Class Model

Provides a SageMaker model resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var model = new Aws.Sagemaker.Model("model", new Aws.Sagemaker.ModelArgs
    {
        ExecutionRoleArn = aws_iam_role.Foo.Arn,
        PrimaryContainer = new Aws.Sagemaker.Inputs.ModelPrimaryContainerArgs
        {
            Image = "174872318107.dkr.ecr.us-west-2.amazonaws.com/kmeans:1",
        },
    });
    var assumeRole = Output.Create(Aws.Iam.GetPolicyDocument.InvokeAsync(new Aws.Iam.GetPolicyDocumentArgs
    {
        Statements = 
        {
            new Aws.Iam.Inputs.GetPolicyDocumentStatementArgs
            {
                Actions = 
                {
                    "sts:AssumeRole",
                },
                Principals = 
                {
                    new Aws.Iam.Inputs.GetPolicyDocumentStatementPrincipalArgs
                    {
                        Identifiers = 
                        {
                            "sagemaker.amazonaws.com",
                        },
                        Type = "Service",
                    },
                },
            },
        },
    }));
    var role = new Aws.Iam.Role("role", new Aws.Iam.RoleArgs
    {
        AssumeRolePolicy = assumeRole.Apply(assumeRole => assumeRole.Json),
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Model
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Sagemaker
Assembly: Pulumi.Aws.dll
Syntax
public class Model : CustomResource

Constructors

View Source

Model(String, ModelArgs, CustomResourceOptions)

Create a Model resource with the given unique name, arguments, and options.

Declaration
public Model(string name, ModelArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ModelArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Arn

The Amazon Resource Name (ARN) assigned by AWS to this model.

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

Containers

Specifies containers in the inference pipeline. If not specified, the primary_container argument is required. Fields are documented below.

Declaration
public Output<ImmutableArray<ModelContainer>> Containers { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ModelContainer>>
View Source

EnableNetworkIsolation

Isolates the model container. No inbound or outbound network calls can be made to or from the model container.

Declaration
public Output<bool?> EnableNetworkIsolation { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

ExecutionRoleArn

A role that SageMaker can assume to access model artifacts and docker images for deployment.

Declaration
public Output<string> ExecutionRoleArn { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name of the model (must be unique). If omitted, this provider will assign a random, unique name.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

PrimaryContainer

The primary docker image containing inference code that is used when the model is deployed for predictions. If not specified, the container argument is required. Fields are documented below.

Declaration
public Output<ModelPrimaryContainer> PrimaryContainer { get; }
Property Value
Type Description
Output<ModelPrimaryContainer>
View Source

Tags

A map of tags to assign to the resource.

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

VpcConfig

Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform.

Declaration
public Output<ModelVpcConfig> VpcConfig { get; }
Property Value
Type Description
Output<ModelVpcConfig>

Methods

View Source

Get(String, Input<String>, ModelState, CustomResourceOptions)

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

Declaration
public static Model Get(string name, Input<string> id, ModelState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ModelState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Model
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.