UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

167 lines 6.62 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * A Cloud Identity Policy binds a Setting to a PolicyQuery for a Google Workspace / Cloud Identity customer. * * > **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider. * See Provider Versions for more details on beta resources. * * To get more information about Policy, see: * * * [API documentation](https://cloud.google.com/identity/docs/reference/rest/v1beta1/policies) * * How-to Guides * * [Policy API overview](https://docs.cloud.google.com/identity/docs/concepts/overview-policies) * * > **Note:** This is available only in beta * ## Example Usage * * ### Cloudidentity Policy Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const primary = new gcp.cloudidentity.Policy("primary", { * customer: "customers/C01234567", * policyQuery: { * orgUnit: "orgUnits/03abcxyz", * group: "groups/0123456789", * query: "true", * }, * setting: { * type: "something.googleapis.com/SettingType", * valueJson: JSON.stringify({ * enabled: true, * }), * }, * }); * ``` * * ## Import * * Policy can be imported using any of these accepted formats: * * * `policies/{{name}}` * * `{{name}}` * * When using the `pulumi import` command, Policy can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:cloudidentity/policy:Policy default policies/{{name}} * $ pulumi import gcp:cloudidentity/policy:Policy default {{name}} * ``` */ export declare class Policy extends pulumi.CustomResource { /** * Get an existing Policy 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?: PolicyState, opts?: pulumi.CustomResourceOptions): Policy; /** * Returns true if the given object is an instance of Policy. 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 Policy; /** * The customer that the Policy belongs to. Format: `customers/{customer_id}`. */ readonly customer: pulumi.Output<string>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ readonly deletionPolicy: pulumi.Output<string>; /** * The resource name of the Policy. Format: `policies/{policy_id}`. */ readonly name: pulumi.Output<string>; /** * The PolicyQuery the Setting applies to. * Structure is documented below. */ readonly policyQuery: pulumi.Output<outputs.cloudidentity.PolicyPolicyQuery>; /** * The Setting configured by this Policy. * Structure is documented below. */ readonly setting: pulumi.Output<outputs.cloudidentity.PolicySetting>; /** * Create a Policy 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: PolicyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Policy resources. */ export interface PolicyState { /** * The customer that the Policy belongs to. Format: `customers/{customer_id}`. */ customer?: pulumi.Input<string | undefined>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * The resource name of the Policy. Format: `policies/{policy_id}`. */ name?: pulumi.Input<string | undefined>; /** * The PolicyQuery the Setting applies to. * Structure is documented below. */ policyQuery?: pulumi.Input<inputs.cloudidentity.PolicyPolicyQuery | undefined>; /** * The Setting configured by this Policy. * Structure is documented below. */ setting?: pulumi.Input<inputs.cloudidentity.PolicySetting | undefined>; } /** * The set of arguments for constructing a Policy resource. */ export interface PolicyArgs { /** * The customer that the Policy belongs to. Format: `customers/{customer_id}`. */ customer: pulumi.Input<string>; /** * Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. * When a 'terraform destroy' or 'pulumi up' would delete the resource, * the command will fail if this field is set to "PREVENT" in Terraform state. * When set to "ABANDON", the command will remove the resource from Terraform * management without updating or deleting the resource in the API. * When set to "DELETE", deleting the resource is allowed. */ deletionPolicy?: pulumi.Input<string | undefined>; /** * The PolicyQuery the Setting applies to. * Structure is documented below. */ policyQuery: pulumi.Input<inputs.cloudidentity.PolicyPolicyQuery>; /** * The Setting configured by this Policy. * Structure is documented below. */ setting: pulumi.Input<inputs.cloudidentity.PolicySetting>; } //# sourceMappingURL=policy.d.ts.map