import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Replace all existing Access Levels in an Access Policy with the Access Levels provided. This is done atomically. * This is a bulk edit of all Access Levels and may override existing Access Levels created by `gcp.accesscontextmanager.AccessLevel`, * thus causing a permadiff if used alongside `gcp.accesscontextmanager.AccessLevel` on the same parent. * * To get more information about AccessLevels, see: * * * [API documentation](https://cloud.google.com/access-context-manager/docs/reference/rest/v1/accessPolicies.accessLevels) * * How-to Guides * * [Access Policy Quickstart](https://cloud.google.com/access-context-manager/docs/quickstart) * * > **Warning:** This resource is authoritative over the access levels under an access policy. Due to a limitation in Terraform, * it will overwrite all preexisting access levels during a create opration without displaying the old values on * the left side of plan. To prevent this, we recommend importing the resource before applying it if overwriting * preexisting rules, as the plan will correctly display the complete changes to your access policy if the * resource is present in state. * * ## Example Usage * * ### Access Context Manager Access Levels Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const access_policy = new gcp.accesscontextmanager.AccessPolicy("access-policy", { * parent: "organizations/123456789", * title: "my policy", * }); * const access_levels = new gcp.accesscontextmanager.AccessLevels("access-levels", { * parent: pulumi.interpolate`accessPolicies/${access_policy.name}`, * accessLevels: [ * { * name: pulumi.interpolate`accessPolicies/${access_policy.name}/accessLevels/chromeos_no_lock`, * title: "chromeos_no_lock", * basic: { * conditions: [{ * devicePolicy: { * requireScreenLock: true, * osConstraints: [{ * osType: "DESKTOP_CHROME_OS", * }], * }, * regions: [ * "CH", * "IT", * "US", * ], * }], * }, * }, * { * name: pulumi.interpolate`accessPolicies/${access_policy.name}/accessLevels/mac_no_lock`, * title: "mac_no_lock", * basic: { * conditions: [{ * devicePolicy: { * requireScreenLock: true, * osConstraints: [{ * osType: "DESKTOP_MAC", * }], * }, * regions: [ * "CH", * "IT", * "US", * ], * }], * }, * }, * ], * }); * ``` * * ## Import * * AccessLevels can be imported using any of these accepted formats: * * * `{{parent}}/accessLevels` * * `{{parent}}` * * When using the `pulumi import` command, AccessLevels can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:accesscontextmanager/accessLevels:AccessLevels default {{parent}}/accessLevels * $ pulumi import gcp:accesscontextmanager/accessLevels:AccessLevels default {{parent}} * ``` */ export declare class AccessLevels extends pulumi.CustomResource { /** * Get an existing AccessLevels 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, state?: AccessLevelsState, opts?: pulumi.CustomResourceOptions): AccessLevels; /** * Returns true if the given object is an instance of AccessLevels. 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 AccessLevels; /** * The desired Access Levels that should replace all existing Access Levels in the Access Policy. * Structure is documented below. */ readonly accessLevels: pulumi.Output; /** * The AccessPolicy this AccessLevel lives in. * Format: accessPolicies/{policy_id} */ readonly parent: pulumi.Output; /** * Create a AccessLevels 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: AccessLevelsArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AccessLevels resources. */ export interface AccessLevelsState { /** * The desired Access Levels that should replace all existing Access Levels in the Access Policy. * Structure is documented below. */ accessLevels?: pulumi.Input[]>; /** * The AccessPolicy this AccessLevel lives in. * Format: accessPolicies/{policy_id} */ parent?: pulumi.Input; } /** * The set of arguments for constructing a AccessLevels resource. */ export interface AccessLevelsArgs { /** * The desired Access Levels that should replace all existing Access Levels in the Access Policy. * Structure is documented below. */ accessLevels?: pulumi.Input[]>; /** * The AccessPolicy this AccessLevel lives in. * Format: accessPolicies/{policy_id} */ parent: pulumi.Input; }