@pulumi/databricks
Version:
A Pulumi package for creating and managing databricks cloud resources.
177 lines (176 loc) • 8.03 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* [](https://docs.databricks.com/aws/en/release-notes/release-types)
*
* Retrieves information about a specific ABAC (Attribute-Based Access Control) policy in Unity Catalog. Use this data source to query details of an existing policy by its securable type, securable name, and policy name.
*
* ABAC policies provide governance for enforcing compliance through data attributes, allowing flexible and comprehensive access control based on conditions rather than specific resources.
*
* ## Example Usage
*
* ### Get Policy Information
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const piiPolicy = databricks.getPolicyInfo({
* onSecurableType: "catalog",
* onSecurableFullname: "main",
* name: "pii_data_policy",
* });
* ```
*/
export declare function getPolicyInfo(args: GetPolicyInfoArgs, opts?: pulumi.InvokeOptions): Promise<GetPolicyInfoResult>;
/**
* A collection of arguments for invoking getPolicyInfo.
*/
export interface GetPolicyInfoArgs {
/**
* Name of the policy. Required on create and optional on update.
* To rename the policy, set `name` to a different value on update
*/
name: string;
/**
* Full name of the securable on which the policy is defined.
* Required on create and ignored on update
*/
onSecurableFullname: string;
/**
* Type of the securable on which the policy is defined.
* Only `CATALOG`, `SCHEMA` and `TABLE` are supported at this moment.
* Required on create and ignored on update. Possible values are: `CATALOG`, `CLEAN_ROOM`, `CONNECTION`, `CREDENTIAL`, `EXTERNAL_LOCATION`, `EXTERNAL_METADATA`, `FUNCTION`, `METASTORE`, `PIPELINE`, `PROVIDER`, `RECIPIENT`, `SCHEMA`, `SHARE`, `STAGING_TABLE`, `STORAGE_CREDENTIAL`, `TABLE`, `VOLUME`
*/
onSecurableType: string;
}
/**
* A collection of values returned by getPolicyInfo.
*/
export interface GetPolicyInfoResult {
/**
* (ColumnMaskOptions) - Options for column mask policies. Valid only if `policyType` is `POLICY_TYPE_COLUMN_MASK`.
* Required on create and optional on update. When specified on update,
* the new options will replace the existing options as a whole
*/
readonly columnMask: outputs.GetPolicyInfoColumnMask;
/**
* (string) - Optional description of the policy
*/
readonly comment: string;
/**
* (integer) - Time at which the policy was created, in epoch milliseconds. Output only
*/
readonly createdAt: number;
/**
* (string) - Username of the user who created the policy. Output only
*/
readonly createdBy: string;
/**
* (list of string) - Optional list of user or group names that should be excluded from the policy
*/
readonly exceptPrincipals: string[];
/**
* (string) - Type of securables that the policy should take effect on.
* Only `TABLE` is supported at this moment.
* Required on create and optional on update. Possible values are: `CATALOG`, `CLEAN_ROOM`, `CONNECTION`, `CREDENTIAL`, `EXTERNAL_LOCATION`, `EXTERNAL_METADATA`, `FUNCTION`, `METASTORE`, `PIPELINE`, `PROVIDER`, `RECIPIENT`, `SCHEMA`, `SHARE`, `STAGING_TABLE`, `STORAGE_CREDENTIAL`, `TABLE`, `VOLUME`
*/
readonly forSecurableType: string;
/**
* (string) - Unique identifier of the policy. This field is output only and is generated by the system
*/
readonly id: string;
/**
* (list of MatchColumn) - Optional list of condition expressions used to match table columns.
* Only valid when `forSecurableType` is `TABLE`.
* When specified, the policy only applies to tables whose columns satisfy all match conditions
*/
readonly matchColumns: outputs.GetPolicyInfoMatchColumn[];
/**
* (string) - Name of the policy. Required on create and optional on update.
* To rename the policy, set `name` to a different value on update
*/
readonly name: string;
/**
* (string) - Full name of the securable on which the policy is defined.
* Required on create and ignored on update
*/
readonly onSecurableFullname: string;
/**
* (string) - Type of the securable on which the policy is defined.
* Only `CATALOG`, `SCHEMA` and `TABLE` are supported at this moment.
* Required on create and ignored on update. Possible values are: `CATALOG`, `CLEAN_ROOM`, `CONNECTION`, `CREDENTIAL`, `EXTERNAL_LOCATION`, `EXTERNAL_METADATA`, `FUNCTION`, `METASTORE`, `PIPELINE`, `PROVIDER`, `RECIPIENT`, `SCHEMA`, `SHARE`, `STAGING_TABLE`, `STORAGE_CREDENTIAL`, `TABLE`, `VOLUME`
*/
readonly onSecurableType: string;
/**
* (string) - Type of the policy. Required on create and ignored on update. Possible values are: `POLICY_TYPE_COLUMN_MASK`, `POLICY_TYPE_ROW_FILTER`
*/
readonly policyType: string;
/**
* (RowFilterOptions) - Options for row filter policies. Valid only if `policyType` is `POLICY_TYPE_ROW_FILTER`.
* Required on create and optional on update. When specified on update,
* the new options will replace the existing options as a whole
*/
readonly rowFilter: outputs.GetPolicyInfoRowFilter;
/**
* (list of string) - List of user or group names that the policy applies to.
* Required on create and optional on update
*/
readonly toPrincipals: string[];
/**
* (integer) - Time at which the policy was last modified, in epoch milliseconds. Output only
*/
readonly updatedAt: number;
/**
* (string) - Username of the user who last modified the policy. Output only
*/
readonly updatedBy: string;
/**
* (string) - Optional condition when the policy should take effect
*/
readonly whenCondition: string;
}
/**
* [](https://docs.databricks.com/aws/en/release-notes/release-types)
*
* Retrieves information about a specific ABAC (Attribute-Based Access Control) policy in Unity Catalog. Use this data source to query details of an existing policy by its securable type, securable name, and policy name.
*
* ABAC policies provide governance for enforcing compliance through data attributes, allowing flexible and comprehensive access control based on conditions rather than specific resources.
*
* ## Example Usage
*
* ### Get Policy Information
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as databricks from "@pulumi/databricks";
*
* const piiPolicy = databricks.getPolicyInfo({
* onSecurableType: "catalog",
* onSecurableFullname: "main",
* name: "pii_data_policy",
* });
* ```
*/
export declare function getPolicyInfoOutput(args: GetPolicyInfoOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetPolicyInfoResult>;
/**
* A collection of arguments for invoking getPolicyInfo.
*/
export interface GetPolicyInfoOutputArgs {
/**
* Name of the policy. Required on create and optional on update.
* To rename the policy, set `name` to a different value on update
*/
name: pulumi.Input<string>;
/**
* Full name of the securable on which the policy is defined.
* Required on create and ignored on update
*/
onSecurableFullname: pulumi.Input<string>;
/**
* Type of the securable on which the policy is defined.
* Only `CATALOG`, `SCHEMA` and `TABLE` are supported at this moment.
* Required on create and ignored on update. Possible values are: `CATALOG`, `CLEAN_ROOM`, `CONNECTION`, `CREDENTIAL`, `EXTERNAL_LOCATION`, `EXTERNAL_METADATA`, `FUNCTION`, `METASTORE`, `PIPELINE`, `PROVIDER`, `RECIPIENT`, `SCHEMA`, `SHARE`, `STAGING_TABLE`, `STORAGE_CREDENTIAL`, `TABLE`, `VOLUME`
*/
onSecurableType: pulumi.Input<string>;
}