@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
74 lines • 3.78 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.IamPolicyBindings = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > **Dynatrace SaaS only**
*
* > To utilize this resource, please define the environment variables `DT_CLIENT_ID`, `DT_CLIENT_SECRET`, `DT_ACCOUNT_ID` with an OAuth client including the following permissions: **Allow IAM policy configuration for environments** (`iam-policies-management`) and **View environments** (`account-env-read`).
*
* > This resource is excluded by default in the export utility, please explicitly specify the resource to retrieve existing configuration.
*
* ## Dynatrace Documentation
*
* - Dynatrace IAM Group Permissions - https://docs.dynatrace.com/docs/manage/identity-access-management/permission-management/manage-user-permissions-policies
*
* - Settings API - https://www.dynatrace.com/support/help/how-to-use-dynatrace/user-management-and-sso/manage-groups-and-permissions/iam/iam-getting-started
*/
class IamPolicyBindings extends pulumi.CustomResource {
/**
* Get an existing IamPolicyBindings 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 IamPolicyBindings(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of IamPolicyBindings. 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'] === IamPolicyBindings.__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["policies"] = state ? state.policies : undefined;
}
else {
const args = argsOrState;
if ((!args || args.group === undefined) && !opts.urn) {
throw new Error("Missing required property 'group'");
}
if ((!args || args.policies === undefined) && !opts.urn) {
throw new Error("Missing required property 'policies'");
}
resourceInputs["account"] = args ? args.account : undefined;
resourceInputs["environment"] = args ? args.environment : undefined;
resourceInputs["group"] = args ? args.group : undefined;
resourceInputs["policies"] = args ? args.policies : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(IamPolicyBindings.__pulumiType, name, resourceInputs, opts);
}
}
exports.IamPolicyBindings = IamPolicyBindings;
/** @internal */
IamPolicyBindings.__pulumiType = 'dynatrace:index/iamPolicyBindings:IamPolicyBindings';
//# sourceMappingURL=iamPolicyBindings.js.map