@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
103 lines • 4.09 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.App = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a SageMaker AI App resource.
*
* ## Example Usage
*
* ### Basic usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sagemaker.App("example", {
* domainId: exampleAwsSagemakerDomain.id,
* userProfileName: exampleAwsSagemakerUserProfile.userProfileName,
* appName: "example",
* appType: "JupyterServer",
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import SageMaker AI Apps using the `id`. For example:
*
* ```sh
* $ pulumi import aws:sagemaker/app:App example arn:aws:sagemaker:us-west-2:012345678912:app/domain-id/user-profile-name/app-type/app-name
* ```
*/
class App extends pulumi.CustomResource {
/**
* Get an existing App 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 App(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of App. 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'] === App.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["appName"] = state?.appName;
resourceInputs["appType"] = state?.appType;
resourceInputs["arn"] = state?.arn;
resourceInputs["domainId"] = state?.domainId;
resourceInputs["region"] = state?.region;
resourceInputs["resourceSpec"] = state?.resourceSpec;
resourceInputs["spaceName"] = state?.spaceName;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
resourceInputs["userProfileName"] = state?.userProfileName;
}
else {
const args = argsOrState;
if (args?.appName === undefined && !opts.urn) {
throw new Error("Missing required property 'appName'");
}
if (args?.appType === undefined && !opts.urn) {
throw new Error("Missing required property 'appType'");
}
if (args?.domainId === undefined && !opts.urn) {
throw new Error("Missing required property 'domainId'");
}
resourceInputs["appName"] = args?.appName;
resourceInputs["appType"] = args?.appType;
resourceInputs["domainId"] = args?.domainId;
resourceInputs["region"] = args?.region;
resourceInputs["resourceSpec"] = args?.resourceSpec;
resourceInputs["spaceName"] = args?.spaceName;
resourceInputs["tags"] = args?.tags;
resourceInputs["userProfileName"] = args?.userProfileName;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(App.__pulumiType, name, resourceInputs, opts);
}
}
exports.App = App;
/** @internal */
App.__pulumiType = 'aws:sagemaker/app:App';
//# sourceMappingURL=app.js.map
;