UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

80 lines 5.5 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.DetectorModel = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * The AWS::IoTEvents::DetectorModel resource creates a detector model. You create a *detector model* (a model of your equipment or process) using *states*. For each state, you define conditional (Boolean) logic that evaluates the incoming inputs to detect significant events. When an event is detected, it can change the state or trigger custom-built or predefined actions using other AWS services. You can define additional events that trigger actions when entering or exiting a state and, optionally, when a condition is met. For more information, see [How to Use](https://docs.aws.amazon.com/iotevents/latest/developerguide/how-to-use-iotevents.html) in the *Developer Guide*. * When you successfully update a detector model (using the ITE console, ITE API or CLI commands, or CFN) all detector instances created by the model are reset to their initial states. (The detector's ``state``, and the values of any variables and timers are reset.) * When you successfully update a detector model (using the ITE console, ITE API or CLI commands, or CFN) the version number of the detector model is incremented. (A detector model with version number 1 before the update has version number 2 after the update succeeds.) * If you attempt to update a detector model using CFN and the update does not succeed, the system may, in some cases, restore the original detector model. When this occurs, the detector model's version is incremented twice (for example, from version 1 to version 3) and the detector instances are reset. * Also, be aware that if you attempt to update several detector models at once using CFN, some updates may succeed and others fail. In this case, the effects on each detector model's detector instances and version number depend on whether the update succeeded or failed, with the results as stated. */ class DetectorModel extends pulumi.CustomResource { /** * Get an existing DetectorModel 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 DetectorModel(name, undefined, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of DetectorModel. 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'] === DetectorModel.__pulumiType; } /** * Create a DetectorModel 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 || args.detectorModelDefinition === undefined) && !opts.urn) { throw new Error("Missing required property 'detectorModelDefinition'"); } if ((!args || args.roleArn === undefined) && !opts.urn) { throw new Error("Missing required property 'roleArn'"); } resourceInputs["detectorModelDefinition"] = args ? args.detectorModelDefinition : undefined; resourceInputs["detectorModelDescription"] = args ? args.detectorModelDescription : undefined; resourceInputs["detectorModelName"] = args ? args.detectorModelName : undefined; resourceInputs["evaluationMethod"] = args ? args.evaluationMethod : undefined; resourceInputs["key"] = args ? args.key : undefined; resourceInputs["roleArn"] = args ? args.roleArn : undefined; resourceInputs["tags"] = args ? args.tags : undefined; } else { resourceInputs["detectorModelDefinition"] = undefined /*out*/; resourceInputs["detectorModelDescription"] = undefined /*out*/; resourceInputs["detectorModelName"] = undefined /*out*/; resourceInputs["evaluationMethod"] = undefined /*out*/; resourceInputs["key"] = undefined /*out*/; resourceInputs["roleArn"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["detectorModelName", "key"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(DetectorModel.__pulumiType, name, resourceInputs, opts); } } exports.DetectorModel = DetectorModel; /** @internal */ DetectorModel.__pulumiType = 'aws-native:iotevents:DetectorModel'; //# sourceMappingURL=detectorModel.js.map