@lbrlabs/pulumi-dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
90 lines • 4.19 kB
JavaScript
;
// *** 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.IamPermission = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* ## Dynatrace Documentation
*
* - Dynatrace IAM - https://www.dynatrace.com/support/help/how-to-use-dynatrace/user-management-and-sso/manage-groups-and-permissions
*
* - Settings API - https://www.dynatrace.com/support/help/how-to-use-dynatrace/user-management-and-sso/manage-groups-and-permissions/iam/iam-getting-started
*
* ## Prerequisites
*
* Using this resource requires an OAuth client to be configured within your account settings.
* The scopes of the OAuth Client need to include `account-idm-read`, `account-idm-write`, `account-env-read`, `account-env-write`, `iam-policies-management`, `iam:policies:write`, `iam:policies:read`, `iam:bindings:write`, `iam:bindings:read` and `iam:effective-permissions:read`.
*
* Finally the provider configuration requires the credentials for that OAuth Client.
* The configuration section of your provider needs to look like this.
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* ```
*
* ## Resource Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@lbrlabs/pulumi-dynatrace";
*
* const permA = new dynatrace.IamPermission("permA", {
* account: "023733f0-86d8-47d1-88bd-7f5cc2e22eb8",
* group: "74ec0a82-8010-4f11-8579-b29a5ba865f0",
* });
* ```
*/
class IamPermission extends pulumi.CustomResource {
/**
* Get an existing IamPermission 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 IamPermission(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of IamPermission. 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'] === IamPermission.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["account"] = state ? state.account : undefined;
resourceInputs["environment"] = state ? state.environment : undefined;
resourceInputs["group"] = state ? state.group : undefined;
resourceInputs["managementZone"] = state ? state.managementZone : undefined;
resourceInputs["name"] = state ? state.name : undefined;
}
else {
const args = argsOrState;
if ((!args || args.group === undefined) && !opts.urn) {
throw new Error("Missing required property 'group'");
}
resourceInputs["account"] = args ? args.account : undefined;
resourceInputs["environment"] = args ? args.environment : undefined;
resourceInputs["group"] = args ? args.group : undefined;
resourceInputs["managementZone"] = args ? args.managementZone : undefined;
resourceInputs["name"] = args ? args.name : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(IamPermission.__pulumiType, name, resourceInputs, opts);
}
}
exports.IamPermission = IamPermission;
/** @internal */
IamPermission.__pulumiType = 'dynatrace:index/iamPermission:IamPermission';
//# sourceMappingURL=iamPermission.js.map