@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
92 lines • 3.9 kB
JavaScript
;
// *** 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.ScimConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* **Note:** This resource is available only with Grafana Enterprise.
*
* * [Official documentation](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-scim-provisioning/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const _default = new grafana.enterprise.ScimConfig("default", {
* enableUserSync: true,
* enableGroupSync: false,
* allowNonProvisionedUsers: false,
* });
* ```
*
* ## Import
*
* ```sh
* $ pulumi import grafana:enterprise/scimConfig:ScimConfig name ""
* ```
*
* ```sh
* $ pulumi import grafana:enterprise/scimConfig:ScimConfig name "{{ orgID }}"
* ```
*/
class ScimConfig extends pulumi.CustomResource {
/**
* Get an existing ScimConfig 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 ScimConfig(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of ScimConfig. 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'] === ScimConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["allowNonProvisionedUsers"] = state ? state.allowNonProvisionedUsers : undefined;
resourceInputs["enableGroupSync"] = state ? state.enableGroupSync : undefined;
resourceInputs["enableUserSync"] = state ? state.enableUserSync : undefined;
resourceInputs["orgId"] = state ? state.orgId : undefined;
}
else {
const args = argsOrState;
if ((!args || args.allowNonProvisionedUsers === undefined) && !opts.urn) {
throw new Error("Missing required property 'allowNonProvisionedUsers'");
}
if ((!args || args.enableGroupSync === undefined) && !opts.urn) {
throw new Error("Missing required property 'enableGroupSync'");
}
if ((!args || args.enableUserSync === undefined) && !opts.urn) {
throw new Error("Missing required property 'enableUserSync'");
}
resourceInputs["allowNonProvisionedUsers"] = args ? args.allowNonProvisionedUsers : undefined;
resourceInputs["enableGroupSync"] = args ? args.enableGroupSync : undefined;
resourceInputs["enableUserSync"] = args ? args.enableUserSync : undefined;
resourceInputs["orgId"] = args ? args.orgId : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ScimConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.ScimConfig = ScimConfig;
/** @internal */
ScimConfig.__pulumiType = 'grafana:enterprise/scimConfig:ScimConfig';
//# sourceMappingURL=scimConfig.js.map