@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
223 lines • 9.5 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Denotes one policy tag in a taxonomy.
*
* To get more information about PolicyTag, see:
*
* * [API documentation](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.taxonomies.policyTags)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/data-catalog/docs)
*
* ## Example Usage
*
* ### Data Catalog Taxonomies Policy Tag Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myTaxonomy = new gcp.datacatalog.Taxonomy("my_taxonomy", {
* displayName: "taxonomy_display_name",
* description: "A collection of policy tags",
* activatedPolicyTypes: ["FINE_GRAINED_ACCESS_CONTROL"],
* });
* const basicPolicyTag = new gcp.datacatalog.PolicyTag("basic_policy_tag", {
* taxonomy: myTaxonomy.id,
* displayName: "Low security",
* description: "A policy tag normally associated with low security items",
* });
* ```
* ### Data Catalog Taxonomies Policy Tag Child Policies
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const myTaxonomy = new gcp.datacatalog.Taxonomy("my_taxonomy", {
* displayName: "taxonomy_display_name",
* description: "A collection of policy tags",
* activatedPolicyTypes: ["FINE_GRAINED_ACCESS_CONTROL"],
* });
* const parentPolicy = new gcp.datacatalog.PolicyTag("parent_policy", {
* taxonomy: myTaxonomy.id,
* displayName: "High",
* description: "A policy tag category used for high security access",
* });
* const childPolicy = new gcp.datacatalog.PolicyTag("child_policy", {
* taxonomy: myTaxonomy.id,
* displayName: "ssn",
* description: "A hash of the users ssn",
* parentPolicyTag: parentPolicy.id,
* });
* const childPolicy2 = new gcp.datacatalog.PolicyTag("child_policy2", {
* taxonomy: myTaxonomy.id,
* displayName: "dob",
* description: "The users date of birth",
* parentPolicyTag: parentPolicy.id,
* }, {
* dependsOn: [childPolicy],
* });
* ```
*
* ## Import
*
* PolicyTag can be imported using any of these accepted formats:
*
* * `{{name}}`
*
* When using the `pulumi import` command, PolicyTag can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:datacatalog/policyTag:PolicyTag default {{name}}
* ```
*/
export declare class PolicyTag extends pulumi.CustomResource {
/**
* Get an existing PolicyTag 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?: PolicyTagState, opts?: pulumi.CustomResourceOptions): PolicyTag;
/**
* Returns true if the given object is an instance of PolicyTag. 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 PolicyTag;
/**
* Resource names of child policy tags of this policy tag.
*/
readonly childPolicyTags: 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>;
/**
* Description of this policy tag. It must: contain only unicode characters, tabs,
* newlines, carriage returns and page breaks; and be at most 2000 bytes long when
* encoded in UTF-8. If not set, defaults to an empty description.
* If not set, defaults to an empty description.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* User defined name of this policy tag. It must: be unique within the parent
* taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces;
* not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.
*/
readonly displayName: pulumi.Output<string>;
/**
* Resource name of this policy tag, whose format is:
* "projects/{project}/locations/{region}/taxonomies/{taxonomy}/policyTags/{policytag}"
*/
readonly name: pulumi.Output<string>;
/**
* Resource name of this policy tag's parent policy tag.
* If empty, it means this policy tag is a top level policy tag.
* If not set, defaults to an empty string.
*/
readonly parentPolicyTag: pulumi.Output<string | undefined>;
/**
* Taxonomy the policy tag is associated with
*/
readonly taxonomy: pulumi.Output<string>;
/**
* Create a PolicyTag 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: PolicyTagArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering PolicyTag resources.
*/
export interface PolicyTagState {
/**
* Resource names of child policy tags of this policy tag.
*/
childPolicyTags?: pulumi.Input<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>;
/**
* Description of this policy tag. It must: contain only unicode characters, tabs,
* newlines, carriage returns and page breaks; and be at most 2000 bytes long when
* encoded in UTF-8. If not set, defaults to an empty description.
* If not set, defaults to an empty description.
*/
description?: pulumi.Input<string | undefined>;
/**
* User defined name of this policy tag. It must: be unique within the parent
* taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces;
* not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.
*/
displayName?: pulumi.Input<string | undefined>;
/**
* Resource name of this policy tag, whose format is:
* "projects/{project}/locations/{region}/taxonomies/{taxonomy}/policyTags/{policytag}"
*/
name?: pulumi.Input<string | undefined>;
/**
* Resource name of this policy tag's parent policy tag.
* If empty, it means this policy tag is a top level policy tag.
* If not set, defaults to an empty string.
*/
parentPolicyTag?: pulumi.Input<string | undefined>;
/**
* Taxonomy the policy tag is associated with
*/
taxonomy?: pulumi.Input<string | undefined>;
}
/**
* The set of arguments for constructing a PolicyTag resource.
*/
export interface PolicyTagArgs {
/**
* 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>;
/**
* Description of this policy tag. It must: contain only unicode characters, tabs,
* newlines, carriage returns and page breaks; and be at most 2000 bytes long when
* encoded in UTF-8. If not set, defaults to an empty description.
* If not set, defaults to an empty description.
*/
description?: pulumi.Input<string | undefined>;
/**
* User defined name of this policy tag. It must: be unique within the parent
* taxonomy; contain only unicode letters, numbers, underscores, dashes and spaces;
* not start or end with spaces; and be at most 200 bytes long when encoded in UTF-8.
*/
displayName: pulumi.Input<string>;
/**
* Resource name of this policy tag's parent policy tag.
* If empty, it means this policy tag is a top level policy tag.
* If not set, defaults to an empty string.
*/
parentPolicyTag?: pulumi.Input<string | undefined>;
/**
* Taxonomy the policy tag is associated with
*/
taxonomy: pulumi.Input<string>;
}
//# sourceMappingURL=policyTag.d.ts.map