import * as pulumi from "@pulumi/pulumi"; import * as enums from "../../types/enums"; /** * Creates a custom constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the organization does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the constraint already exists on the given organization. */ export declare class CustomConstraint extends pulumi.CustomResource { /** * Get an existing CustomConstraint 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 opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): CustomConstraint; /** * Returns true if the given object is an instance of CustomConstraint. 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 CustomConstraint; /** * Allow or deny type. */ readonly actionType: pulumi.Output; /** * Org policy condition/expression. For example: `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters. */ readonly condition: pulumi.Output; /** * Detailed information about this custom policy constraint. The max length of the description is 2000 characters. */ readonly description: pulumi.Output; /** * One line display name for the UI. The max length of the display_name is 200 characters. */ readonly displayName: pulumi.Output; /** * All the operations being applied for this constraint. */ readonly methodTypes: pulumi.Output; /** * Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted. */ readonly name: pulumi.Output; readonly organizationId: pulumi.Output; /** * Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`. */ readonly resourceTypes: pulumi.Output; /** * The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called */ readonly updateTime: pulumi.Output; /** * Create a CustomConstraint 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: CustomConstraintArgs, opts?: pulumi.CustomResourceOptions); } /** * The set of arguments for constructing a CustomConstraint resource. */ export interface CustomConstraintArgs { /** * Allow or deny type. */ actionType?: pulumi.Input; /** * Org policy condition/expression. For example: `resource.instanceName.matches("[production|test]_.*_(\d)+")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters. */ condition?: pulumi.Input; /** * Detailed information about this custom policy constraint. The max length of the description is 2000 characters. */ description?: pulumi.Input; /** * One line display name for the UI. The max length of the display_name is 200 characters. */ displayName?: pulumi.Input; /** * All the operations being applied for this constraint. */ methodTypes?: pulumi.Input[]>; /** * Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted. */ name?: pulumi.Input; organizationId: pulumi.Input; /** * Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`. */ resourceTypes?: pulumi.Input[]>; }