@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
212 lines • 7.42 kB
JavaScript
"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.HttpHeaderProfile = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* HttpHeaderProfile resource
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* const scmHttpHeaderProfile1 = new scm.HttpHeaderProfile("scm_http_header_profile_1", {
* folder: "All",
* name: "base_http_header_profile_1",
* });
* const scmHttpHeaderProfile2 = new scm.HttpHeaderProfile("scm_http_header_profile_2", {
* folder: "All",
* name: "simple_http_header_profile_2",
* httpHeaderInsertions: [{
* name: "header_one",
* type: [{
* name: "Google Apps Access Control",
* domains: ["*.google.com"],
* headers: [{
* name: "X-GooGAppls-Allowed-Domains",
* header: "X-GooGAppls-Allowed-Domains",
* value: "user-allowed",
* }],
* }],
* }],
* });
* const scmHttpHeaderProfile3 = new scm.HttpHeaderProfile("scm_http_header_profile_3", {
* folder: "All",
* name: "complete_http_header_profile_3",
* httpHeaderInsertions: [
* {
* name: "header_insertion_one",
* type: [{
* name: "Dropbox Network Control",
* domains: [
* "*.db.tt",
* "*.dropbox.com",
* "dropboxformum.com",
* ],
* headers: [
* {
* name: "X-Dropbox-allowed-Team-Ids",
* header: "X-Dropbox-allowed-Team-Ids",
* value: "dropbox-users",
* },
* {
* name: "custom_header",
* header: "custom_header",
* value: "10-header",
* },
* ],
* }],
* },
* {
* name: "header_insertion_two",
* type: [{
* name: "Microsoft Office365 Tenant Restrictions",
* domains: [
* "login.mircosoft.com",
* "login.mircosoftonline.com",
* "login.windows.net",
* ],
* headers: [
* {
* name: "Restrict-Access-Context",
* header: "Restrict-Access-Context",
* value: "denied-context",
* },
* {
* name: "Restrict-Access-To-Tenants",
* header: "Restrict-Access-To-Tenants",
* value: "denied-tenants",
* },
* ],
* }],
* },
* {
* name: "header_insertion_three",
* type: [{
* name: "Dynamic Fields",
* domains: ["custom_domain"],
* headers: [{
* name: "Authorization",
* header: "Authorization",
* value: "auth",
* }],
* }],
* },
* {
* name: "header_insertion_four",
* type: [{
* name: "Youtube Safe Search",
* domains: [
* "m.youtube.com",
* "www.youtube.com",
* ],
* headers: [{
* name: "Youtube-Restrict",
* header: "Youtube-Restrict",
* value: "denied-youtube",
* }],
* }],
* },
* {
* name: "header_insertion_five",
* type: [{
* name: "Custom",
* domains: [
* "custom_1",
* "custom_2",
* ],
* headers: [{
* name: "custom_header",
* header: "custom_header",
* value: "custom",
* }],
* }],
* },
* ],
* });
* ```
*
* ## Import
*
* The following command can be used to import a resource not managed by Terraform:
*
* bash
*
* ```sh
* $ pulumi import scm:index/httpHeaderProfile:HttpHeaderProfile example folder:::id
* ```
*
* or
*
* bash
*
* ```sh
* $ pulumi import scm:index/httpHeaderProfile:HttpHeaderProfile example :snippet::id
* ```
*
* or
*
* bash
*
* ```sh
* $ pulumi import scm:index/httpHeaderProfile:HttpHeaderProfile example ::device:id
* ```
*/
class HttpHeaderProfile extends pulumi.CustomResource {
/**
* Get an existing HttpHeaderProfile 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 HttpHeaderProfile(name, state, { ...opts, id: id });
}
/**
* Returns true if the given object is an instance of HttpHeaderProfile. 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'] === HttpHeaderProfile.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["description"] = state?.description;
resourceInputs["device"] = state?.device;
resourceInputs["folder"] = state?.folder;
resourceInputs["httpHeaderInsertions"] = state?.httpHeaderInsertions;
resourceInputs["name"] = state?.name;
resourceInputs["snippet"] = state?.snippet;
resourceInputs["tfid"] = state?.tfid;
}
else {
const args = argsOrState;
resourceInputs["description"] = args?.description;
resourceInputs["device"] = args?.device;
resourceInputs["folder"] = args?.folder;
resourceInputs["httpHeaderInsertions"] = args?.httpHeaderInsertions;
resourceInputs["name"] = args?.name;
resourceInputs["snippet"] = args?.snippet;
resourceInputs["tfid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(HttpHeaderProfile.__pulumiType, name, resourceInputs, opts);
}
}
exports.HttpHeaderProfile = HttpHeaderProfile;
/** @internal */
HttpHeaderProfile.__pulumiType = 'scm:index/httpHeaderProfile:HttpHeaderProfile';
//# sourceMappingURL=httpHeaderProfile.js.map