@pulumi/harness
Version:
A Pulumi package for creating and managing Harness resources.
228 lines (227 loc) • 7.13 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Resource for managing a Harness Chaos Security Governance Rule
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as harness from "@pulumi/harness";
*
* // K8s Rule
* const example = new harness.chaos.SecurityGovernanceRule("example", {
* orgId: "<org_id>",
* projectId: "<project_id>",
* name: "<name>",
* description: "<description>",
* isEnabled: true,
* conditionIds: ["<condition_id>"],
* userGroupIds: ["_project_all_users"],
* tags: [
* "<tag1>",
* "<tag2>",
* ],
* timeWindows: [{
* timeZone: "UTC",
* startTime: 1711238400000,
* duration: "24h",
* recurrence: {
* type: "Daily",
* until: -1,
* },
* }],
* });
* // Linux Rule
* const linuxRule = new harness.chaos.SecurityGovernanceRule("linux_rule", {
* orgId: "<org_id>",
* projectId: "<project_id>",
* name: "<name>",
* description: "<description>",
* isEnabled: true,
* conditionIds: ["<condition_id>"],
* userGroupIds: ["_project_all_users"],
* tags: [
* "<tag1>",
* "<tag2>",
* ],
* timeWindows: [{
* timeZone: "UTC",
* startTime: 1711238400000,
* duration: "24h",
* recurrence: {
* type: "Daily",
* until: -1,
* },
* }],
* });
* // Windows Rule
* const windowsRule = new harness.chaos.SecurityGovernanceRule("windows_rule", {
* orgId: "<org_id>",
* projectId: "<project_id>",
* name: "<name>",
* description: "<description>",
* isEnabled: true,
* conditionIds: ["<condition_id>"],
* userGroupIds: ["_project_all_users"],
* tags: [
* "<tag1>",
* "<tag2>",
* ],
* timeWindows: [{
* timeZone: "UTC",
* startTime: 1711238400000,
* duration: "24h",
* recurrence: {
* type: "Daily",
* until: -1,
* },
* }],
* });
* ```
*
* ## Import
*
* The `pulumi import` command can be used, for example:
*
* Import Project level Chaos Security Governance Rule
*
* ```sh
* $ pulumi import harness:chaos/securityGovernanceRule:SecurityGovernanceRule example org_id/project_id/rule_id
* ```
*/
export declare class SecurityGovernanceRule extends pulumi.CustomResource {
/**
* Get an existing SecurityGovernanceRule 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?: SecurityGovernanceRuleState, opts?: pulumi.CustomResourceOptions): SecurityGovernanceRule;
/**
* Returns true if the given object is an instance of SecurityGovernanceRule. 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 SecurityGovernanceRule;
/**
* List of condition IDs associated with this rule
*/
readonly conditionIds: pulumi.Output<string[]>;
/**
* Description of the security governance rule
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Whether the rule is enabled
*/
readonly isEnabled: pulumi.Output<boolean | undefined>;
/**
* Name of the security governance rule
*/
readonly name: pulumi.Output<string>;
/**
* The organization ID of the security governance rule
*/
readonly orgId: pulumi.Output<string>;
/**
* The project ID of the security governance rule
*/
readonly projectId: pulumi.Output<string>;
/**
* Tags for the security governance rule
*/
readonly tags: pulumi.Output<string[] | undefined>;
readonly timeWindows: pulumi.Output<outputs.chaos.SecurityGovernanceRuleTimeWindow[]>;
/**
* List of user group IDs associated with this rule
*/
readonly userGroupIds: pulumi.Output<string[] | undefined>;
/**
* Create a SecurityGovernanceRule 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: SecurityGovernanceRuleArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering SecurityGovernanceRule resources.
*/
export interface SecurityGovernanceRuleState {
/**
* List of condition IDs associated with this rule
*/
conditionIds?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Description of the security governance rule
*/
description?: pulumi.Input<string>;
/**
* Whether the rule is enabled
*/
isEnabled?: pulumi.Input<boolean>;
/**
* Name of the security governance rule
*/
name?: pulumi.Input<string>;
/**
* The organization ID of the security governance rule
*/
orgId?: pulumi.Input<string>;
/**
* The project ID of the security governance rule
*/
projectId?: pulumi.Input<string>;
/**
* Tags for the security governance rule
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
timeWindows?: pulumi.Input<pulumi.Input<inputs.chaos.SecurityGovernanceRuleTimeWindow>[]>;
/**
* List of user group IDs associated with this rule
*/
userGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a SecurityGovernanceRule resource.
*/
export interface SecurityGovernanceRuleArgs {
/**
* List of condition IDs associated with this rule
*/
conditionIds: pulumi.Input<pulumi.Input<string>[]>;
/**
* Description of the security governance rule
*/
description?: pulumi.Input<string>;
/**
* Whether the rule is enabled
*/
isEnabled?: pulumi.Input<boolean>;
/**
* Name of the security governance rule
*/
name?: pulumi.Input<string>;
/**
* The organization ID of the security governance rule
*/
orgId: pulumi.Input<string>;
/**
* The project ID of the security governance rule
*/
projectId: pulumi.Input<string>;
/**
* Tags for the security governance rule
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
timeWindows: pulumi.Input<pulumi.Input<inputs.chaos.SecurityGovernanceRuleTimeWindow>[]>;
/**
* List of user group IDs associated with this rule
*/
userGroupIds?: pulumi.Input<pulumi.Input<string>[]>;
}