@pulumi/pulumiservice
Version:
[](https://slack.pulumi.com) [](https://www.npmjs.com/package/@pulumi/pulumiservice) [ || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Settings = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../../utilities"));
/**
* Creates or updates Pulumi Deployments settings for a stack using a merge operation. If no settings exist, they are created. If settings already exist, the request body is merged with the current settings using the following logic: for each property, start with the current value, remove it if the patch specifies null, or merge the new non-null value with the existing one. Non-object properties (strings, numbers, booleans) are replaced entirely. Settings include source context (git repository URL, branch, directory), operation context (environment variables, pre-run commands, OIDC configuration), executor context, GitHub integration settings, and cache options. Requires a Team Growth or higher subscription. Cannot be used to configure Pulumi Deployments for Terraform stacks.
*/
class Settings extends pulumi.CustomResource {
/**
* Get an existing Settings 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 opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, opts) {
return new Settings(name, undefined, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'pulumiservice:api/deployments:Settings';
/**
* Returns true if the given object is an instance of Settings. 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'] === Settings.__pulumiType;
}
/**
* Create a Settings 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, args, opts) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
if (args?.orgName === undefined && !opts.urn) {
throw new Error("Missing required property 'orgName'");
}
if (args?.projectName === undefined && !opts.urn) {
throw new Error("Missing required property 'projectName'");
}
if (args?.stackName === undefined && !opts.urn) {
throw new Error("Missing required property 'stackName'");
}
resourceInputs["agentPoolID"] = args?.agentPoolID;
resourceInputs["cacheOptions"] = args?.cacheOptions;
resourceInputs["executorContext"] = args?.executorContext;
resourceInputs["gitHub"] = args?.gitHub;
resourceInputs["operationContext"] = args?.operationContext;
resourceInputs["orgName"] = args?.orgName;
resourceInputs["projectName"] = args?.projectName;
resourceInputs["sourceContext"] = args?.sourceContext;
resourceInputs["stackName"] = args?.stackName;
resourceInputs["tag"] = args?.tag;
resourceInputs["vcs"] = args?.vcs;
resourceInputs["source"] = undefined /*out*/;
resourceInputs["version"] = undefined /*out*/;
}
else {
resourceInputs["agentPoolID"] = undefined /*out*/;
resourceInputs["cacheOptions"] = undefined /*out*/;
resourceInputs["executorContext"] = undefined /*out*/;
resourceInputs["gitHub"] = undefined /*out*/;
resourceInputs["operationContext"] = undefined /*out*/;
resourceInputs["source"] = undefined /*out*/;
resourceInputs["sourceContext"] = undefined /*out*/;
resourceInputs["tag"] = undefined /*out*/;
resourceInputs["vcs"] = undefined /*out*/;
resourceInputs["version"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Settings.__pulumiType, name, resourceInputs, opts);
}
}
exports.Settings = Settings;
//# sourceMappingURL=settings.js.map