UNPKG

@pulumi/cloudngfwaws

Version:

A Pulumi package for creating and managing Cloud NGFW for AWS resources.

106 lines 4.01 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.Certificate = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("./utilities"); /** * Resource for certificate manipulation. * * ## Admin Permission Type * * * `Rulestack` (for `scope="Local"`) * * `Global Rulestack` (for `scope="Global"`) * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as cloudngfwaws from "@pulumi/cloudngfwaws"; * * const r = new cloudngfwaws.Rulestack("r", { * name: "terraform-rulestack", * scope: "Local", * accountId: "123456789", * description: "Made by Pulumi", * profileConfig: { * antiSpyware: "BestPractice", * }, * }); * const example = new cloudngfwaws.Certificate("example", { * rulestack: r.name, * name: "tf-cert", * description: "Also configured by Terraform", * selfSigned: true, * auditComment: "initial config", * }); * ``` * * ## Import * * import name is <scope>:<rulestack>:<certificate_name> * * ```sh * $ pulumi import cloudngfwaws:index/certificate:Certificate example Local:terraform-rulestack:tf-cert * ``` */ class Certificate extends pulumi.CustomResource { /** * Get an existing Certificate 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 Certificate(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Certificate. 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'] === Certificate.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["auditComment"] = state?.auditComment; resourceInputs["description"] = state?.description; resourceInputs["name"] = state?.name; resourceInputs["rulestack"] = state?.rulestack; resourceInputs["scope"] = state?.scope; resourceInputs["selfSigned"] = state?.selfSigned; resourceInputs["signerArn"] = state?.signerArn; resourceInputs["updateToken"] = state?.updateToken; } else { const args = argsOrState; if (args?.rulestack === undefined && !opts.urn) { throw new Error("Missing required property 'rulestack'"); } resourceInputs["auditComment"] = args?.auditComment; resourceInputs["description"] = args?.description; resourceInputs["name"] = args?.name; resourceInputs["rulestack"] = args?.rulestack; resourceInputs["scope"] = args?.scope; resourceInputs["selfSigned"] = args?.selfSigned; resourceInputs["signerArn"] = args?.signerArn; resourceInputs["updateToken"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Certificate.__pulumiType, name, resourceInputs, opts); } } exports.Certificate = Certificate; /** @internal */ Certificate.__pulumiType = 'cloudngfwaws:index/certificate:Certificate'; //# sourceMappingURL=certificate.js.map