@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
96 lines • 4.17 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.Project = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Provides a SageMaker AI Project resource.
*
* > Note: If you are trying to use SageMaker AI projects with SageMaker AI studio you will need to add a tag with the key `sagemaker:studio-visibility` with value `true`. For more on requirements to use projects and permission needed see [AWS Docs](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-projects-templates-custom.html).
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.sagemaker.Project("example", {
* projectName: "example",
* serviceCatalogProvisioningDetails: {
* productId: exampleAwsServicecatalogProduct.id,
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import SageMaker AI Projects using the `project_name`. For example:
*
* ```sh
* $ pulumi import aws:sagemaker/project:Project example example
* ```
*/
class Project extends pulumi.CustomResource {
/**
* Get an existing Project 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 Project(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of Project. 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'] === Project.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["arn"] = state?.arn;
resourceInputs["projectDescription"] = state?.projectDescription;
resourceInputs["projectId"] = state?.projectId;
resourceInputs["projectName"] = state?.projectName;
resourceInputs["region"] = state?.region;
resourceInputs["serviceCatalogProvisioningDetails"] = state?.serviceCatalogProvisioningDetails;
resourceInputs["tags"] = state?.tags;
resourceInputs["tagsAll"] = state?.tagsAll;
}
else {
const args = argsOrState;
if (args?.projectName === undefined && !opts.urn) {
throw new Error("Missing required property 'projectName'");
}
if (args?.serviceCatalogProvisioningDetails === undefined && !opts.urn) {
throw new Error("Missing required property 'serviceCatalogProvisioningDetails'");
}
resourceInputs["projectDescription"] = args?.projectDescription;
resourceInputs["projectName"] = args?.projectName;
resourceInputs["region"] = args?.region;
resourceInputs["serviceCatalogProvisioningDetails"] = args?.serviceCatalogProvisioningDetails;
resourceInputs["tags"] = args?.tags;
resourceInputs["arn"] = undefined /*out*/;
resourceInputs["projectId"] = undefined /*out*/;
resourceInputs["tagsAll"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Project.__pulumiType, name, resourceInputs, opts);
}
}
exports.Project = Project;
/** @internal */
Project.__pulumiType = 'aws:sagemaker/project:Project';
//# sourceMappingURL=project.js.map
;