@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
124 lines • 5.6 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, Object.assign(Object.assign({}, 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 ? state.aliases : undefined;
resourceInputs["arn"] = state ? state.arn : undefined;
resourceInputs["baseImage"] = state ? state.baseImage : undefined;
resourceInputs["containerImage"] = state ? state.containerImage : undefined;
resourceInputs["horovod"] = state ? state.horovod : undefined;
resourceInputs["imageArn"] = state ? state.imageArn : undefined;
resourceInputs["imageName"] = state ? state.imageName : undefined;
resourceInputs["jobType"] = state ? state.jobType : undefined;
resourceInputs["mlFramework"] = state ? state.mlFramework : undefined;
resourceInputs["processor"] = state ? state.processor : undefined;
resourceInputs["programmingLang"] = state ? state.programmingLang : undefined;
resourceInputs["region"] = state ? state.region : undefined;
resourceInputs["releaseNotes"] = state ? state.releaseNotes : undefined;
resourceInputs["vendorGuidance"] = state ? state.vendorGuidance : undefined;
resourceInputs["version"] = state ? state.version : undefined;
}
else {
const args = argsOrState;
if ((!args || args.baseImage === undefined) && !opts.urn) {
throw new Error("Missing required property 'baseImage'");
}
if ((!args || args.imageName === undefined) && !opts.urn) {
throw new Error("Missing required property 'imageName'");
}
resourceInputs["aliases"] = args ? args.aliases : undefined;
resourceInputs["baseImage"] = args ? args.baseImage : undefined;
resourceInputs["horovod"] = args ? args.horovod : undefined;
resourceInputs["imageName"] = args ? args.imageName : undefined;
resourceInputs["jobType"] = args ? args.jobType : undefined;
resourceInputs["mlFramework"] = args ? args.mlFramework : undefined;
resourceInputs["processor"] = args ? args.processor : undefined;
resourceInputs["programmingLang"] = args ? args.programmingLang : undefined;
resourceInputs["region"] = args ? args.region : undefined;
resourceInputs["releaseNotes"] = args ? args.releaseNotes : undefined;
resourceInputs["vendorGuidance"] = args ? args.vendorGuidance : undefined;
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