UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

132 lines 4.82 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.UrlList = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * UrlList proto helps users to set reusable, independently manageable lists of hosts, host patterns, URLs, URL patterns. * * To get more information about UrlLists, see: * * * [API documentation](https://cloud.google.com/secure-web-proxy/docs/reference/network-security/rest/v1/projects.locations.urlLists) * * How-to Guides * * Use UrlLists * * ## Example Usage * * ### Network Security Url Lists Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.networksecurity.UrlList("default", { * name: "my-url-lists", * location: "us-central1", * values: ["www.example.com"], * }); * ``` * ### Network Security Url Lists Advanced * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const _default = new gcp.networksecurity.UrlList("default", { * name: "my-url-lists", * location: "us-central1", * description: "my description", * values: [ * "www.example.com", * "about.example.com", * "github.com/example-org/*", * ], * }); * ``` * * ## Import * * UrlLists can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/{{location}}/urlLists/{{name}}` * * * `{{project}}/{{location}}/{{name}}` * * * `{{location}}/{{name}}` * * When using the `pulumi import` command, UrlLists can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:networksecurity/urlList:UrlList default projects/{{project}}/locations/{{location}}/urlLists/{{name}} * ``` * * ```sh * $ pulumi import gcp:networksecurity/urlList:UrlList default {{project}}/{{location}}/{{name}} * ``` * * ```sh * $ pulumi import gcp:networksecurity/urlList:UrlList default {{location}}/{{name}} * ``` */ class UrlList extends pulumi.CustomResource { /** * Get an existing UrlList 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 UrlList(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of UrlList. 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'] === UrlList.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["createTime"] = state?.createTime; resourceInputs["description"] = state?.description; resourceInputs["location"] = state?.location; resourceInputs["name"] = state?.name; resourceInputs["project"] = state?.project; resourceInputs["updateTime"] = state?.updateTime; resourceInputs["values"] = state?.values; } else { const args = argsOrState; if (args?.location === undefined && !opts.urn) { throw new Error("Missing required property 'location'"); } if (args?.values === undefined && !opts.urn) { throw new Error("Missing required property 'values'"); } resourceInputs["description"] = args?.description; resourceInputs["location"] = args?.location; resourceInputs["name"] = args?.name; resourceInputs["project"] = args?.project; resourceInputs["values"] = args?.values; resourceInputs["createTime"] = undefined /*out*/; resourceInputs["updateTime"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(UrlList.__pulumiType, name, resourceInputs, opts); } } exports.UrlList = UrlList; /** @internal */ UrlList.__pulumiType = 'gcp:networksecurity/urlList:UrlList'; //# sourceMappingURL=urlList.js.map