UNPKG

@huaweicloudos/pulumi

Version:

A Pulumi package for creating and managing Huaweicloud cloud resources.

105 lines 4.41 kB
"use strict"; // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Acl = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * !> **WARNING:** It has been deprecated, use `huaweicloud.Vpc.NetworkAcl` instead. * * Manages a network ACL resource within HuaweiCloud. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as huaweicloud from "@pulumi/huaweicloud"; * import * as pulumi from "@huaweicloudos/pulumi"; * * const subnet = huaweicloud.Vpc.getSubnet({ * name: "subnet-default", * }); * const rule1 = new huaweicloud.networkacl.AclRule("rule1", { * description: "drop TELNET traffic", * action: "deny", * protocol: "tcp", * destinationPort: "23", * enabled: true, * }); * const rule2 = new huaweicloud.networkacl.AclRule("rule2", { * description: "drop NTP traffic", * action: "deny", * protocol: "udp", * destinationPort: "123", * enabled: false, * }); * const fwAcl = new huaweicloud.networkacl.Acl("fwAcl", { * subnets: [subnet.then(subnet => subnet.id)], * inboundRules: [ * rule1.id, * rule2.id, * ], * }); * ``` */ class Acl extends pulumi.CustomResource { /** * Get an existing Acl 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 Acl(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of Acl. 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'] === Acl.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["inboundPolicyId"] = state ? state.inboundPolicyId : undefined; resourceInputs["inboundRules"] = state ? state.inboundRules : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["outboundPolicyId"] = state ? state.outboundPolicyId : undefined; resourceInputs["outboundRules"] = state ? state.outboundRules : undefined; resourceInputs["ports"] = state ? state.ports : undefined; resourceInputs["region"] = state ? state.region : undefined; resourceInputs["status"] = state ? state.status : undefined; resourceInputs["subnets"] = state ? state.subnets : undefined; } else { const args = argsOrState; resourceInputs["description"] = args ? args.description : undefined; resourceInputs["inboundRules"] = args ? args.inboundRules : undefined; resourceInputs["name"] = args ? args.name : undefined; resourceInputs["outboundRules"] = args ? args.outboundRules : undefined; resourceInputs["region"] = args ? args.region : undefined; resourceInputs["subnets"] = args ? args.subnets : undefined; resourceInputs["inboundPolicyId"] = undefined /*out*/; resourceInputs["outboundPolicyId"] = undefined /*out*/; resourceInputs["ports"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Acl.__pulumiType, name, resourceInputs, opts); } } exports.Acl = Acl; /** @internal */ Acl.__pulumiType = 'huaweicloud:NetworkAcl/acl:Acl'; //# sourceMappingURL=acl.js.map