@pulumi/azuredevops
Version:
A Pulumi package for creating and managing Azure DevOps.
140 lines • 6.58 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.ServicehookStorageQueuePipelines = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* Manages a Storage Queue Pipelines Service Hook .
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.Project("example", {name: "example-project"});
* const exampleResourceGroup = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleAccount = new azure.storage.Account("example", {
* name: "servicehookexamplestacc",
* resourceGroupName: exampleResourceGroup.name,
* location: exampleResourceGroup.location,
* accountTier: "Standard",
* accountReplicationType: "LRS",
* });
* const exampleQueue = new azure.storage.Queue("example", {
* name: "examplequeue",
* storageAccountName: exampleAccount.name,
* });
* const exampleServicehookStorageQueuePipelines = new azuredevops.ServicehookStorageQueuePipelines("example", {
* projectId: example.id,
* accountName: exampleAccount.name,
* accountKey: exampleAccount.primaryAccessKey,
* queueName: exampleQueue.name,
* visiTimeout: 30,
* runStateChangedEvent: {
* runStateFilter: "Completed",
* runResultFilter: "Succeeded",
* },
* });
* ```
*
* An empty configuration block will occur in all events triggering the associated action.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azuredevops from "@pulumi/azuredevops";
*
* const example = new azuredevops.ServicehookStorageQueuePipelines("example", {
* projectId: exampleAzuredevopsProject.id,
* accountName: exampleAzurermStorageAccount.name,
* accountKey: exampleAzurermStorageAccount.primaryAccessKey,
* queueName: exampleAzurermStorageQueue.name,
* visiTimeout: 30,
* runStateChangedEvent: {},
* });
* ```
*
* ## Import
*
* Storage Queue Pipelines Service Hook can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azuredevops:index/servicehookStorageQueuePipelines:ServicehookStorageQueuePipelines example 00000000-0000-0000-0000-000000000000
* ```
*/
class ServicehookStorageQueuePipelines extends pulumi.CustomResource {
/**
* Get an existing ServicehookStorageQueuePipelines 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 ServicehookStorageQueuePipelines(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ServicehookStorageQueuePipelines. 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'] === ServicehookStorageQueuePipelines.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["accountKey"] = state ? state.accountKey : undefined;
resourceInputs["accountName"] = state ? state.accountName : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["queueName"] = state ? state.queueName : undefined;
resourceInputs["runStateChangedEvent"] = state ? state.runStateChangedEvent : undefined;
resourceInputs["stageStateChangedEvent"] = state ? state.stageStateChangedEvent : undefined;
resourceInputs["ttl"] = state ? state.ttl : undefined;
resourceInputs["visiTimeout"] = state ? state.visiTimeout : undefined;
}
else {
const args = argsOrState;
if ((!args || args.accountKey === undefined) && !opts.urn) {
throw new Error("Missing required property 'accountKey'");
}
if ((!args || args.accountName === undefined) && !opts.urn) {
throw new Error("Missing required property 'accountName'");
}
if ((!args || args.projectId === undefined) && !opts.urn) {
throw new Error("Missing required property 'projectId'");
}
if ((!args || args.queueName === undefined) && !opts.urn) {
throw new Error("Missing required property 'queueName'");
}
resourceInputs["accountKey"] = (args === null || args === void 0 ? void 0 : args.accountKey) ? pulumi.secret(args.accountKey) : undefined;
resourceInputs["accountName"] = args ? args.accountName : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["queueName"] = args ? args.queueName : undefined;
resourceInputs["runStateChangedEvent"] = args ? args.runStateChangedEvent : undefined;
resourceInputs["stageStateChangedEvent"] = args ? args.stageStateChangedEvent : undefined;
resourceInputs["ttl"] = args ? args.ttl : undefined;
resourceInputs["visiTimeout"] = args ? args.visiTimeout : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["accountKey"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(ServicehookStorageQueuePipelines.__pulumiType, name, resourceInputs, opts);
}
}
exports.ServicehookStorageQueuePipelines = ServicehookStorageQueuePipelines;
/** @internal */
ServicehookStorageQueuePipelines.__pulumiType = 'azuredevops:index/servicehookStorageQueuePipelines:ServicehookStorageQueuePipelines';
//# sourceMappingURL=servicehookStorageQueuePipelines.js.map