@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
124 lines • 5.07 kB
JavaScript
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImageVersion = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a SageMaker AI Image Version resource.
*
* ## Example Usage
*
* ### Basic usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sagemaker.ImageVersion("example", {
* imageName: test.id,
* baseImage: "012345678912.dkr.ecr.us-west-2.amazonaws.com/image:latest",
* });
* ```
*
* ### With Aliases
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const test = new aws.sagemaker.ImageVersion("test", {
* imageName: testAwsSagemakerImage.id,
* baseImage: "012345678912.dkr.ecr.us-west-2.amazonaws.com/image:latest",
* aliases: [
* "latest",
* "stable",
* ],
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import SageMaker AI Image Versions using a comma-delimited string concatenating `image_name` and `version`. For example:
*
* ```sh
* $ pulumi import aws:sagemaker/imageVersion:ImageVersion example example-name,1
* ```
*/
class ImageVersion extends pulumi.CustomResource {
/**
* Get an existing ImageVersion 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, id, state, opts) {
return new ImageVersion(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of ImageVersion. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === ImageVersion.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["aliases"] = state?.aliases;
resourceInputs["arn"] = state?.arn;
resourceInputs["baseImage"] = state?.baseImage;
resourceInputs["containerImage"] = state?.containerImage;
resourceInputs["horovod"] = state?.horovod;
resourceInputs["imageArn"] = state?.imageArn;
resourceInputs["imageName"] = state?.imageName;
resourceInputs["jobType"] = state?.jobType;
resourceInputs["mlFramework"] = state?.mlFramework;
resourceInputs["processor"] = state?.processor;
resourceInputs["programmingLang"] = state?.programmingLang;
resourceInputs["region"] = state?.region;
resourceInputs["releaseNotes"] = state?.releaseNotes;
resourceInputs["vendorGuidance"] = state?.vendorGuidance;
resourceInputs["version"] = state?.version;
}
else {
const args = argsOrState;
if (args?.baseImage === undefined && !opts.urn) {
throw new Error("Missing required property 'baseImage'");
}
if (args?.imageName === undefined && !opts.urn) {
throw new Error("Missing required property 'imageName'");
}
resourceInputs["aliases"] = args?.aliases;
resourceInputs["baseImage"] = args?.baseImage;
resourceInputs["horovod"] = args?.horovod;
resourceInputs["imageName"] = args?.imageName;
resourceInputs["jobType"] = args?.jobType;
resourceInputs["mlFramework"] = args?.mlFramework;
resourceInputs["processor"] = args?.processor;
resourceInputs["programmingLang"] = args?.programmingLang;
resourceInputs["region"] = args?.region;
resourceInputs["releaseNotes"] = args?.releaseNotes;
resourceInputs["vendorGuidance"] = args?.vendorGuidance;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["containerImage"] = undefined /*out*/;
resourceInputs["imageArn"] = undefined /*out*/;
resourceInputs["version"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ImageVersion.__pulumiType, name, resourceInputs, opts);
}
}
exports.ImageVersion = ImageVersion;
/** @internal */
ImageVersion.__pulumiType = 'aws:sagemaker/imageVersion:ImageVersion';
//# sourceMappingURL=imageVersion.js.map
;