UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

218 lines (217 loc) • 9.67 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a SageMaker AI model resource. * * ## Example Usage * * Basic usage: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const assumeRole = aws.iam.getPolicyDocument({ * statements: [{ * actions: ["sts:AssumeRole"], * principals: [{ * type: "Service", * identifiers: ["sagemaker.amazonaws.com"], * }], * }], * }); * const exampleRole = new aws.iam.Role("example", {assumeRolePolicy: assumeRole.then(assumeRole => assumeRole.json)}); * const test = aws.sagemaker.getPrebuiltEcrImage({ * repositoryName: "kmeans", * }); * const example = new aws.sagemaker.Model("example", { * name: "my-model", * executionRoleArn: exampleRole.arn, * primaryContainer: { * image: test.then(test => test.registryPath), * }, * }); * ``` * * ## Inference Execution Config * * * `mode` - (Required) How containers in a multi-container are run. The following values are valid `Serial` and `Direct`. * * ## Import * * Using `pulumi import`, import models using the `name`. For example: * * ```sh * $ pulumi import aws:sagemaker/model:Model test_model model-foo * ``` */ export declare class Model extends pulumi.CustomResource { /** * Get an existing Model resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ModelState, opts?: pulumi.CustomResourceOptions): Model; /** * Returns true if the given object is an instance of Model. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Model; /** * The Amazon Resource Name (ARN) assigned by AWS to this model. */ readonly arn: pulumi.Output<string>; /** * Specifies containers in the inference pipeline. If not specified, the `primaryContainer` argument is required. Fields are documented below. */ readonly containers: pulumi.Output<outputs.sagemaker.ModelContainer[] | undefined>; /** * Isolates the model container. No inbound or outbound network calls can be made to or from the model container. */ readonly enableNetworkIsolation: pulumi.Output<boolean | undefined>; /** * A role that SageMaker AI can assume to access model artifacts and docker images for deployment. */ readonly executionRoleArn: pulumi.Output<string>; /** * Specifies details of how containers in a multi-container endpoint are called. see Inference Execution Config. */ readonly inferenceExecutionConfig: pulumi.Output<outputs.sagemaker.ModelInferenceExecutionConfig>; /** * The name of the model (must be unique). If omitted, this provider will assign a random, unique name. */ readonly name: pulumi.Output<string>; /** * 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. */ readonly primaryContainer: pulumi.Output<outputs.sagemaker.ModelPrimaryContainer | undefined>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output<string>; /** * A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform. */ readonly vpcConfig: pulumi.Output<outputs.sagemaker.ModelVpcConfig | undefined>; /** * Create a Model resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ModelArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Model resources. */ export interface ModelState { /** * The Amazon Resource Name (ARN) assigned by AWS to this model. */ arn?: pulumi.Input<string>; /** * Specifies containers in the inference pipeline. If not specified, the `primaryContainer` argument is required. Fields are documented below. */ containers?: pulumi.Input<pulumi.Input<inputs.sagemaker.ModelContainer>[]>; /** * Isolates the model container. No inbound or outbound network calls can be made to or from the model container. */ enableNetworkIsolation?: pulumi.Input<boolean>; /** * A role that SageMaker AI can assume to access model artifacts and docker images for deployment. */ executionRoleArn?: pulumi.Input<string>; /** * Specifies details of how containers in a multi-container endpoint are called. see Inference Execution Config. */ inferenceExecutionConfig?: pulumi.Input<inputs.sagemaker.ModelInferenceExecutionConfig>; /** * The name of the model (must be unique). If omitted, this provider will assign a random, unique name. */ name?: pulumi.Input<string>; /** * 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. */ primaryContainer?: pulumi.Input<inputs.sagemaker.ModelPrimaryContainer>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform. */ vpcConfig?: pulumi.Input<inputs.sagemaker.ModelVpcConfig>; } /** * The set of arguments for constructing a Model resource. */ export interface ModelArgs { /** * Specifies containers in the inference pipeline. If not specified, the `primaryContainer` argument is required. Fields are documented below. */ containers?: pulumi.Input<pulumi.Input<inputs.sagemaker.ModelContainer>[]>; /** * Isolates the model container. No inbound or outbound network calls can be made to or from the model container. */ enableNetworkIsolation?: pulumi.Input<boolean>; /** * A role that SageMaker AI can assume to access model artifacts and docker images for deployment. */ executionRoleArn: pulumi.Input<string>; /** * Specifies details of how containers in a multi-container endpoint are called. see Inference Execution Config. */ inferenceExecutionConfig?: pulumi.Input<inputs.sagemaker.ModelInferenceExecutionConfig>; /** * The name of the model (must be unique). If omitted, this provider will assign a random, unique name. */ name?: pulumi.Input<string>; /** * 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. */ primaryContainer?: pulumi.Input<inputs.sagemaker.ModelPrimaryContainer>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; /** * A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input<string>; }>; /** * Specifies the VPC that you want your model to connect to. VpcConfig is used in hosting services and in batch transform. */ vpcConfig?: pulumi.Input<inputs.sagemaker.ModelVpcConfig>; }