@pulumiverse/dynatrace
Version:
A Pulumi package for creating and managing Dynatrace cloud resources.
158 lines (157 loc) • 6.62 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* > **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 Policy Management - 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
*
* ## Resource Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const policy = new dynatrace.IamPolicy("policy", {
* environment: "siz654##",
* statementQuery: "ALLOW settings:objects:read, settings:schemas:read WHERE settings:schemaId = \"string\";",
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as dynatrace from "@pulumiverse/dynatrace";
*
* const policy = new dynatrace.IamPolicy("policy", {
* account: "########-####-####-####-############",
* statementQuery: "ALLOW settings:objects:read, settings:schemas:read WHERE settings:schemaId = \"string\";",
* });
* ```
*/
export declare class IamPolicy extends pulumi.CustomResource {
/**
* Get an existing IamPolicy 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: string, id: pulumi.Input<pulumi.ID>, state?: IamPolicyState, opts?: pulumi.CustomResourceOptions): IamPolicy;
/**
* Returns true if the given object is an instance of IamPolicy. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is IamPolicy;
/**
* The UUID of the account (`urn:dtaccount:<account-uuid>`) in case the policy should be applied to all environments of this account. The prefix `urn:dtaccount:` MUST be omitted here.
*/
readonly account: pulumi.Output<string | undefined>;
/**
* An optional description text for the policy
*/
readonly description: pulumi.Output<string | undefined>;
/**
* The ID of the environment (https://\n\n.live.dynatrace.com) if the policy should be applied to a specific environment
*
* @deprecated Configuring policies on environment level has been deprecated by Dynatrace. Please consider creating an account wide policy instead
*/
readonly environment: pulumi.Output<string | undefined>;
/**
* The name of the policy
*/
readonly name: pulumi.Output<string>;
/**
* The Statement Query of the policy
*/
readonly statementQuery: pulumi.Output<string>;
/**
* Tags for this policy
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The ID of this resource is a concatenation of multiple pieces of information (policy UUID, accountID, environmentID, ...). There are use cases where you JUST need the UUID of the Policy, though
*/
readonly uuid: pulumi.Output<string>;
/**
* Create a IamPolicy resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: IamPolicyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering IamPolicy resources.
*/
export interface IamPolicyState {
/**
* The UUID of the account (`urn:dtaccount:<account-uuid>`) in case the policy should be applied to all environments of this account. The prefix `urn:dtaccount:` MUST be omitted here.
*/
account?: pulumi.Input<string>;
/**
* An optional description text for the policy
*/
description?: pulumi.Input<string>;
/**
* The ID of the environment (https://\n\n.live.dynatrace.com) if the policy should be applied to a specific environment
*
* @deprecated Configuring policies on environment level has been deprecated by Dynatrace. Please consider creating an account wide policy instead
*/
environment?: pulumi.Input<string>;
/**
* The name of the policy
*/
name?: pulumi.Input<string>;
/**
* The Statement Query of the policy
*/
statementQuery?: pulumi.Input<string>;
/**
* Tags for this policy
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The ID of this resource is a concatenation of multiple pieces of information (policy UUID, accountID, environmentID, ...). There are use cases where you JUST need the UUID of the Policy, though
*/
uuid?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a IamPolicy resource.
*/
export interface IamPolicyArgs {
/**
* The UUID of the account (`urn:dtaccount:<account-uuid>`) in case the policy should be applied to all environments of this account. The prefix `urn:dtaccount:` MUST be omitted here.
*/
account?: pulumi.Input<string>;
/**
* An optional description text for the policy
*/
description?: pulumi.Input<string>;
/**
* The ID of the environment (https://\n\n.live.dynatrace.com) if the policy should be applied to a specific environment
*
* @deprecated Configuring policies on environment level has been deprecated by Dynatrace. Please consider creating an account wide policy instead
*/
environment?: pulumi.Input<string>;
/**
* The name of the policy
*/
name?: pulumi.Input<string>;
/**
* The Statement Query of the policy
*/
statementQuery: pulumi.Input<string>;
/**
* Tags for this policy
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
}