UNPKG

@pulumi/azuredevops

Version:

A Pulumi package for creating and managing Azure DevOps.

140 lines 6.25 kB
"use strict"; // *** 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 azuredevops from "@pulumi/azuredevops"; * import * as azurerm from "@pulumi/azurerm"; * * const example = new azuredevops.Project("example", {name: "example-project"}); * const exampleResourceGroup = new azurerm.index.ResourceGroup("example", { * name: "example-resources", * location: "West Europe", * }); * const exampleStorageAccount = new azurerm.index.StorageAccount("example", { * name: "servicehookexamplestacc", * resourceGroupName: exampleResourceGroup.name, * location: exampleResourceGroup.location, * accountTier: "Standard", * accountReplicationType: "LRS", * }); * const exampleStorageQueue = new azurerm.index.StorageQueue("example", { * name: "examplequeue", * storageAccountName: exampleStorageAccount.name, * }); * const exampleServicehookStorageQueuePipelines = new azuredevops.ServicehookStorageQueuePipelines("example", { * projectId: example.id, * accountName: exampleStorageAccount.name, * accountKey: exampleStorageAccount.primaryAccessKey, * queueName: exampleStorageQueue.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, { ...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?.accountKey; resourceInputs["accountName"] = state?.accountName; resourceInputs["projectId"] = state?.projectId; resourceInputs["queueName"] = state?.queueName; resourceInputs["runStateChangedEvent"] = state?.runStateChangedEvent; resourceInputs["stageStateChangedEvent"] = state?.stageStateChangedEvent; resourceInputs["ttl"] = state?.ttl; resourceInputs["visiTimeout"] = state?.visiTimeout; } else { const args = argsOrState; if (args?.accountKey === undefined && !opts.urn) { throw new Error("Missing required property 'accountKey'"); } if (args?.accountName === undefined && !opts.urn) { throw new Error("Missing required property 'accountName'"); } if (args?.projectId === undefined && !opts.urn) { throw new Error("Missing required property 'projectId'"); } if (args?.queueName === undefined && !opts.urn) { throw new Error("Missing required property 'queueName'"); } resourceInputs["accountKey"] = args?.accountKey ? pulumi.secret(args.accountKey) : undefined; resourceInputs["accountName"] = args?.accountName; resourceInputs["projectId"] = args?.projectId; resourceInputs["queueName"] = args?.queueName; resourceInputs["runStateChangedEvent"] = args?.runStateChangedEvent; resourceInputs["stageStateChangedEvent"] = args?.stageStateChangedEvent; resourceInputs["ttl"] = args?.ttl; resourceInputs["visiTimeout"] = args?.visiTimeout; } 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