import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides a SageMaker AI Inference Component resource. An inference component is a SageMaker AI hosting object that you can use to deploy a model to an endpoint. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.sagemaker.InferenceComponent("example", { * specification: { * computeResourceRequirements: { * minMemoryRequiredInMb: 1024, * }, * modelName: exampleAwsSagemakerModel.name, * }, * runtimeConfig: { * copyCount: 1, * }, * name: "my-inference-component", * endpointName: exampleAwsSagemakerEndpoint.name, * variantName: "variant-1", * }); * ``` * * ### With Container Specification * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.sagemaker.InferenceComponent("example", { * specification: { * container: { * image: "123456789012.dkr.ecr.us-east-1.amazonaws.com/my-model:latest", * artifactUrl: "s3://my-bucket/model.tar.gz", * environment: { * MODEL_NAME: "my-model", * }, * }, * computeResourceRequirements: { * minMemoryRequiredInMb: 2048, * maxMemoryRequiredInMb: 4096, * numberOfCpuCoresRequired: 2, * numberOfAcceleratorDevicesRequired: 1, * }, * startupParameters: { * containerStartupHealthCheckTimeoutInSeconds: 300, * modelDataDownloadTimeoutInSeconds: 300, * }, * }, * runtimeConfig: { * copyCount: 2, * }, * name: "my-inference-component", * endpointName: exampleAwsSagemakerEndpoint.name, * variantName: "variant-1", * }); * ``` * * ### With Deployment Config * * `deploymentConfig` controls how *updates* to an existing inference component are rolled out; it has no effect on the initial create. Add it (or change it) on a subsequent apply to govern the rollout of a `specification` or `runtimeConfig` change. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.sagemaker.InferenceComponent("example", { * specification: { * computeResourceRequirements: { * minMemoryRequiredInMb: 1024, * }, * modelName: exampleAwsSagemakerModel.name, * }, * runtimeConfig: { * copyCount: 4, * }, * deploymentConfig: { * rollingUpdatePolicy: { * maximumBatchSize: { * type: "COPY_COUNT", * value: 1, * }, * waitIntervalInSeconds: 60, * }, * autoRollbackConfiguration: { * alarms: [{ * alarmName: exampleAwsCloudwatchMetricAlarm.alarmName, * }], * }, * }, * name: "my-inference-component", * endpointName: exampleAwsSagemakerEndpoint.name, * variantName: "variant-1", * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * * `name` (String) Name of the inference component. * * #### Optional * * * `accountId` (String) AWS Account where this resource is managed. * * `region` (String) Region where this resource is managed. * * Using `pulumi import`, import SageMaker AI Inference Components using the `name`. For example: * * ```sh * $ pulumi import aws:sagemaker/inferenceComponent:InferenceComponent example my-inference-component * ``` */ export declare class InferenceComponent extends pulumi.CustomResource { /** * Get an existing InferenceComponent 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, state?: InferenceComponentState, opts?: pulumi.CustomResourceOptions): InferenceComponent; /** * Check whether an existing InferenceComponent resource with the given ID exists. * * @param id The _unique_ provider ID of the resource to check. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static exists(id: pulumi.Input, state?: InferenceComponentState, opts?: pulumi.CustomResourceOptions): pulumi.Output; /** * Returns true if the given object is an instance of InferenceComponent. 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 InferenceComponent; /** * ARN of the inference component. */ readonly arn: pulumi.Output; /** * Time when the inference component was created. */ readonly creationTime: pulumi.Output; /** * Deployment configuration for the inference component, which controls the rollout strategy and rollback behavior. This directive applies only when the inference component is **updated** — the `CreateInferenceComponent` API does not accept it, so it has no effect on initial creation. It is not returned by the API and is therefore not refreshed into state or verified on import. See `deploymentConfig` Block. */ readonly deploymentConfig: pulumi.Output; /** * ARN of the endpoint that hosts the inference component. */ readonly endpointArn: pulumi.Output; /** * Name of an existing endpoint where you host the inference component. */ readonly endpointName: pulumi.Output; /** * If the inference component status is `Failed`, the reason for the failure. */ readonly failureReason: pulumi.Output; /** * Time when the inference component was last updated. */ readonly lastModifiedTime: pulumi.Output; /** * Unique name to assign to the inference component. */ readonly name: pulumi.Output; /** * 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; /** * Runtime settings for a model that is deployed with an inference component. See `runtimeConfig` Block. */ readonly runtimeConfig: pulumi.Output; /** * Details about the resources to deploy with this inference component. Exactly one of `specification` or `specifications` must be configured. See `specification` and `specifications` Block. */ readonly specification: pulumi.Output; /** * List of specification objects for the inference component, one per instance type. At least two blocks are required; configure `specification` instead to deploy to a single instance type. Exactly one of `specification` or `specifications` must be configured. See `specification` and `specifications` Block. */ readonly specifications: pulumi.Output; /** * Status of the inference component (e.g., `InService`, `Creating`, `Updating`, `Failed`, `Deleting`). */ readonly status: pulumi.Output; /** * 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>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; readonly timeouts: pulumi.Output; /** * Name of an existing production variant where you host the inference component. Required for a standard inference component; must be omitted for an adapter inference component (one that sets `baseInferenceComponentName`). */ readonly variantName: pulumi.Output; /** * Create a InferenceComponent 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: InferenceComponentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering InferenceComponent resources. */ export interface InferenceComponentState { /** * ARN of the inference component. */ arn?: pulumi.Input; /** * Time when the inference component was created. */ creationTime?: pulumi.Input; /** * Deployment configuration for the inference component, which controls the rollout strategy and rollback behavior. This directive applies only when the inference component is **updated** — the `CreateInferenceComponent` API does not accept it, so it has no effect on initial creation. It is not returned by the API and is therefore not refreshed into state or verified on import. See `deploymentConfig` Block. */ deploymentConfig?: pulumi.Input; /** * ARN of the endpoint that hosts the inference component. */ endpointArn?: pulumi.Input; /** * Name of an existing endpoint where you host the inference component. */ endpointName?: pulumi.Input; /** * If the inference component status is `Failed`, the reason for the failure. */ failureReason?: pulumi.Input; /** * Time when the inference component was last updated. */ lastModifiedTime?: pulumi.Input; /** * Unique name to assign to the inference component. */ name?: pulumi.Input; /** * 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; /** * Runtime settings for a model that is deployed with an inference component. See `runtimeConfig` Block. */ runtimeConfig?: pulumi.Input; /** * Details about the resources to deploy with this inference component. Exactly one of `specification` or `specifications` must be configured. See `specification` and `specifications` Block. */ specification?: pulumi.Input; /** * List of specification objects for the inference component, one per instance type. At least two blocks are required; configure `specification` instead to deploy to a single instance type. Exactly one of `specification` or `specifications` must be configured. See `specification` and `specifications` Block. */ specifications?: pulumi.Input[] | undefined>; /** * Status of the inference component (e.g., `InService`, `Creating`, `Updating`, `Failed`, `Deleting`). */ status?: pulumi.Input; /** * 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; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; timeouts?: pulumi.Input; /** * Name of an existing production variant where you host the inference component. Required for a standard inference component; must be omitted for an adapter inference component (one that sets `baseInferenceComponentName`). */ variantName?: pulumi.Input; } /** * The set of arguments for constructing a InferenceComponent resource. */ export interface InferenceComponentArgs { /** * Deployment configuration for the inference component, which controls the rollout strategy and rollback behavior. This directive applies only when the inference component is **updated** — the `CreateInferenceComponent` API does not accept it, so it has no effect on initial creation. It is not returned by the API and is therefore not refreshed into state or verified on import. See `deploymentConfig` Block. */ deploymentConfig?: pulumi.Input; /** * Name of an existing endpoint where you host the inference component. */ endpointName: pulumi.Input; /** * Unique name to assign to the inference component. */ name?: pulumi.Input; /** * 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; /** * Runtime settings for a model that is deployed with an inference component. See `runtimeConfig` Block. */ runtimeConfig?: pulumi.Input; /** * Details about the resources to deploy with this inference component. Exactly one of `specification` or `specifications` must be configured. See `specification` and `specifications` Block. */ specification?: pulumi.Input; /** * List of specification objects for the inference component, one per instance type. At least two blocks are required; configure `specification` instead to deploy to a single instance type. Exactly one of `specification` or `specifications` must be configured. See `specification` and `specifications` Block. */ specifications?: pulumi.Input[] | undefined>; /** * 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; } | undefined>; timeouts?: pulumi.Input; /** * Name of an existing production variant where you host the inference component. Required for a standard inference component; must be omitted for an adapter inference component (one that sets `baseInferenceComponentName`). */ variantName?: pulumi.Input; } //# sourceMappingURL=inferenceComponent.d.ts.map