Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.24.0 published on Tuesday, May 17, 2022 by Pulumi

AccessLevels

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:

Example Usage

Access Context Manager Access Levels Basic

using Pulumi;
using Gcp = Pulumi.Gcp;

class MyStack : Stack
{
    public MyStack()
    {
        var access_policy = new Gcp.AccessContextManager.AccessPolicy("access-policy", new Gcp.AccessContextManager.AccessPolicyArgs
        {
            Parent = "organizations/123456789",
            Title = "my policy",
        });
        var access_levels = new Gcp.AccessContextManager.AccessLevels("access-levels", new Gcp.AccessContextManager.AccessLevelsArgs
        {
            AccessLevels = 
            {
                new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelArgs
                {
                    Basic = new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelBasicArgs
                    {
                        Conditions = 
                        {
                            new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelBasicConditionArgs
                            {
                                DevicePolicy = new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelBasicConditionDevicePolicyArgs
                                {
                                    OsConstraints = 
                                    {
                                        new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs
                                        {
                                            OsType = "DESKTOP_CHROME_OS",
                                        },
                                    },
                                    RequireScreenLock = true,
                                },
                                Regions = 
                                {
                                    "CH",
                                    "IT",
                                    "US",
                                },
                            },
                        },
                    },
                    Name = access_policy.Name.Apply(name => $"accessPolicies/{name}/accessLevels/chromeos_no_lock"),
                    Title = "chromeos_no_lock",
                },
                new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelArgs
                {
                    Basic = new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelBasicArgs
                    {
                        Conditions = 
                        {
                            new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelBasicConditionArgs
                            {
                                DevicePolicy = new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelBasicConditionDevicePolicyArgs
                                {
                                    OsConstraints = 
                                    {
                                        new Gcp.AccessContextManager.Inputs.AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs
                                        {
                                            OsType = "DESKTOP_MAC",
                                        },
                                    },
                                    RequireScreenLock = true,
                                },
                                Regions = 
                                {
                                    "CH",
                                    "IT",
                                    "US",
                                },
                            },
                        },
                    },
                    Name = access_policy.Name.Apply(name => $"accessPolicies/{name}/accessLevels/mac_no_lock"),
                    Title = "mac_no_lock",
                },
            },
            Parent = access_policy.Name.Apply(name => $"accessPolicies/{name}"),
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/accesscontextmanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := accesscontextmanager.NewAccessPolicy(ctx, "access-policy", &accesscontextmanager.AccessPolicyArgs{
			Parent: pulumi.String("organizations/123456789"),
			Title:  pulumi.String("my policy"),
		})
		if err != nil {
			return err
		}
		_, err = accesscontextmanager.NewAccessLevels(ctx, "access-levels", &accesscontextmanager.AccessLevelsArgs{
			AccessLevels: accesscontextmanager.AccessLevelsAccessLevelArray{
				&accesscontextmanager.AccessLevelsAccessLevelArgs{
					Basic: &accesscontextmanager.AccessLevelsAccessLevelBasicArgs{
						Conditions: accesscontextmanager.AccessLevelsAccessLevelBasicConditionArray{
							&accesscontextmanager.AccessLevelsAccessLevelBasicConditionArgs{
								DevicePolicy: &accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyArgs{
									OsConstraints: accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArray{
										&accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs{
											OsType: pulumi.String("DESKTOP_CHROME_OS"),
										},
									},
									RequireScreenLock: pulumi.Bool(true),
								},
								Regions: pulumi.StringArray{
									pulumi.String("CH"),
									pulumi.String("IT"),
									pulumi.String("US"),
								},
							},
						},
					},
					Name: access_policy.Name.ApplyT(func(name string) (string, error) {
						return fmt.Sprintf("%v%v%v", "accessPolicies/", name, "/accessLevels/chromeos_no_lock"), nil
					}).(pulumi.StringOutput),
					Title: pulumi.String("chromeos_no_lock"),
				},
				&accesscontextmanager.AccessLevelsAccessLevelArgs{
					Basic: &accesscontextmanager.AccessLevelsAccessLevelBasicArgs{
						Conditions: accesscontextmanager.AccessLevelsAccessLevelBasicConditionArray{
							&accesscontextmanager.AccessLevelsAccessLevelBasicConditionArgs{
								DevicePolicy: &accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyArgs{
									OsConstraints: accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArray{
										&accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs{
											OsType: pulumi.String("DESKTOP_MAC"),
										},
									},
									RequireScreenLock: pulumi.Bool(true),
								},
								Regions: pulumi.StringArray{
									pulumi.String("CH"),
									pulumi.String("IT"),
									pulumi.String("US"),
								},
							},
						},
					},
					Name: access_policy.Name.ApplyT(func(name string) (string, error) {
						return fmt.Sprintf("%v%v%v", "accessPolicies/", name, "/accessLevels/mac_no_lock"), nil
					}).(pulumi.StringOutput),
					Title: pulumi.String("mac_no_lock"),
				},
			},
			Parent: access_policy.Name.ApplyT(func(name string) (string, error) {
				return fmt.Sprintf("%v%v", "accessPolicies/", name), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var access_policy = new AccessPolicy("access-policy", AccessPolicyArgs.builder()        
            .parent("organizations/123456789")
            .title("my policy")
            .build());

        var access_levels = new AccessLevels("access-levels", AccessLevelsArgs.builder()        
            .accessLevels(            
                AccessLevelsAccessLevel.builder()
                    .basic(AccessLevelsAccessLevelBasic.builder()
                        .conditions(AccessLevelsAccessLevelBasicCondition.builder()
                            .devicePolicy(AccessLevelsAccessLevelBasicConditionDevicePolicy.builder()
                                .osConstraints(AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraint.builder()
                                    .osType("DESKTOP_CHROME_OS")
                                    .build())
                                .requireScreenLock(true)
                                .build())
                            .regions(                            
                                "CH",
                                "IT",
                                "US")
                            .build())
                        .build())
                    .name(access_policy.getName().apply(name -> String.format("accessPolicies/%s/accessLevels/chromeos_no_lock", name)))
                    .title("chromeos_no_lock")
                    .build(),
                AccessLevelsAccessLevel.builder()
                    .basic(AccessLevelsAccessLevelBasic.builder()
                        .conditions(AccessLevelsAccessLevelBasicCondition.builder()
                            .devicePolicy(AccessLevelsAccessLevelBasicConditionDevicePolicy.builder()
                                .osConstraints(AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraint.builder()
                                    .osType("DESKTOP_MAC")
                                    .build())
                                .requireScreenLock(true)
                                .build())
                            .regions(                            
                                "CH",
                                "IT",
                                "US")
                            .build())
                        .build())
                    .name(access_policy.getName().apply(name -> String.format("accessPolicies/%s/accessLevels/mac_no_lock", name)))
                    .title("mac_no_lock")
                    .build())
            .parent(access_policy.getName().apply(name -> String.format("accessPolicies/%s", name)))
            .build());

        }
}
import pulumi
import pulumi_gcp as gcp

access_policy = gcp.accesscontextmanager.AccessPolicy("access-policy",
    parent="organizations/123456789",
    title="my policy")
access_levels = gcp.accesscontextmanager.AccessLevels("access-levels",
    access_levels=[
        gcp.accesscontextmanager.AccessLevelsAccessLevelArgs(
            basic=gcp.accesscontextmanager.AccessLevelsAccessLevelBasicArgs(
                conditions=[gcp.accesscontextmanager.AccessLevelsAccessLevelBasicConditionArgs(
                    device_policy=gcp.accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyArgs(
                        os_constraints=[gcp.accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs(
                            os_type="DESKTOP_CHROME_OS",
                        )],
                        require_screen_lock=True,
                    ),
                    regions=[
                        "CH",
                        "IT",
                        "US",
                    ],
                )],
            ),
            name=access_policy.name.apply(lambda name: f"accessPolicies/{name}/accessLevels/chromeos_no_lock"),
            title="chromeos_no_lock",
        ),
        gcp.accesscontextmanager.AccessLevelsAccessLevelArgs(
            basic=gcp.accesscontextmanager.AccessLevelsAccessLevelBasicArgs(
                conditions=[gcp.accesscontextmanager.AccessLevelsAccessLevelBasicConditionArgs(
                    device_policy=gcp.accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyArgs(
                        os_constraints=[gcp.accesscontextmanager.AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraintArgs(
                            os_type="DESKTOP_MAC",
                        )],
                        require_screen_lock=True,
                    ),
                    regions=[
                        "CH",
                        "IT",
                        "US",
                    ],
                )],
            ),
            name=access_policy.name.apply(lambda name: f"accessPolicies/{name}/accessLevels/mac_no_lock"),
            title="mac_no_lock",
        ),
    ],
    parent=access_policy.name.apply(lambda name: f"accessPolicies/{name}"))
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", {
    accessLevels: [
        {
            basic: {
                conditions: [{
                    devicePolicy: {
                        osConstraints: [{
                            osType: "DESKTOP_CHROME_OS",
                        }],
                        requireScreenLock: true,
                    },
                    regions: [
                        "CH",
                        "IT",
                        "US",
                    ],
                }],
            },
            name: pulumi.interpolate`accessPolicies/${access_policy.name}/accessLevels/chromeos_no_lock`,
            title: "chromeos_no_lock",
        },
        {
            basic: {
                conditions: [{
                    devicePolicy: {
                        osConstraints: [{
                            osType: "DESKTOP_MAC",
                        }],
                        requireScreenLock: true,
                    },
                    regions: [
                        "CH",
                        "IT",
                        "US",
                    ],
                }],
            },
            name: pulumi.interpolate`accessPolicies/${access_policy.name}/accessLevels/mac_no_lock`,
            title: "mac_no_lock",
        },
    ],
    parent: pulumi.interpolate`accessPolicies/${access_policy.name}`,
});
resources:
  access-levels:
    type: gcp:accesscontextmanager:AccessLevels
    properties:
      accessLevels:
        - basic:
            conditions:
              - devicePolicy:
                  osConstraints:
                    - osType: DESKTOP_CHROME_OS
                  requireScreenLock: true
                regions:
                  - CH
                  - IT
                  - US
          name: accessPolicies/${["access-policy"].name}/accessLevels/chromeos_no_lock
          title: chromeos_no_lock
        - basic:
            conditions:
              - devicePolicy:
                  osConstraints:
                    - osType: DESKTOP_MAC
                  requireScreenLock: true
                regions:
                  - CH
                  - IT
                  - US
          name: accessPolicies/${["access-policy"].name}/accessLevels/mac_no_lock
          title: mac_no_lock
      parent: accessPolicies/${["access-policy"].name}
  access-policy:
    type: gcp:accesscontextmanager:AccessPolicy
    properties:
      parent: organizations/123456789
      title: my policy

Create a AccessLevels Resource

new AccessLevels(name: string, args: AccessLevelsArgs, opts?: CustomResourceOptions);
@overload
def AccessLevels(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 access_levels: Optional[Sequence[AccessLevelsAccessLevelArgs]] = None,
                 parent: Optional[str] = None)
@overload
def AccessLevels(resource_name: str,
                 args: AccessLevelsArgs,
                 opts: Optional[ResourceOptions] = None)
func NewAccessLevels(ctx *Context, name string, args AccessLevelsArgs, opts ...ResourceOption) (*AccessLevels, error)
public AccessLevels(string name, AccessLevelsArgs args, CustomResourceOptions? opts = null)
public AccessLevels(String name, AccessLevelsArgs args)
public AccessLevels(String name, AccessLevelsArgs args, CustomResourceOptions options)
type: gcp:accesscontextmanager:AccessLevels
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AccessLevelsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args AccessLevelsArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AccessLevelsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AccessLevelsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AccessLevelsArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AccessLevels Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The AccessLevels resource accepts the following input properties:

Parent string

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

AccessLevelDetails List<AccessLevelsAccessLevelArgs>

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

Parent string

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

AccessLevels []AccessLevelsAccessLevelArgs

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

parent String

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

accessLevels ListLevelsAccessLevelArgs>

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

parent string

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

accessLevels AccessLevelsAccessLevelArgs[]

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

parent str

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

access_levels Sequence[AccessLevelsAccessLevelArgs]

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

parent String

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

accessLevels List

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

Outputs

All input properties are implicitly available as output properties. Additionally, the AccessLevels resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing AccessLevels Resource

Get an existing AccessLevels resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AccessLevelsState, opts?: CustomResourceOptions): AccessLevels
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_levels: Optional[Sequence[AccessLevelsAccessLevelArgs]] = None,
        parent: Optional[str] = None) -> AccessLevels
func GetAccessLevels(ctx *Context, name string, id IDInput, state *AccessLevelsState, opts ...ResourceOption) (*AccessLevels, error)
public static AccessLevels Get(string name, Input<string> id, AccessLevelsState? state, CustomResourceOptions? opts = null)
public static AccessLevels get(String name, Output<String> id, AccessLevelsState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessLevelDetails List<AccessLevelsAccessLevelArgs>

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

Parent string

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

AccessLevels []AccessLevelsAccessLevelArgs

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

Parent string

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

accessLevels ListLevelsAccessLevelArgs>

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

parent String

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

accessLevels AccessLevelsAccessLevelArgs[]

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

parent string

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

access_levels Sequence[AccessLevelsAccessLevelArgs]

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

parent str

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

accessLevels List

The desired Access Levels that should replace all existing Access Levels in the Access Policy. Structure is documented below.

parent String

The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}

Supporting Types

AccessLevelsAccessLevel

Name string

Resource name for the Access Level. The short_name component must begin with a letter and only include alphanumeric and '_'. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

Title string

Title for the expression, i.e. a short string describing its purpose.

Basic AccessLevelsAccessLevelBasic

A set of predefined conditions for the access level and a combining function. Structure is documented below.

Custom AccessLevelsAccessLevelCustom

Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec. Structure is documented below.

Description string

Description of the expression

Name string

Resource name for the Access Level. The short_name component must begin with a letter and only include alphanumeric and '_'. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

Title string

Title for the expression, i.e. a short string describing its purpose.

Basic AccessLevelsAccessLevelBasic

A set of predefined conditions for the access level and a combining function. Structure is documented below.

Custom AccessLevelsAccessLevelCustom

Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec. Structure is documented below.

Description string

Description of the expression

name String

Resource name for the Access Level. The short_name component must begin with a letter and only include alphanumeric and '_'. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

title String

Title for the expression, i.e. a short string describing its purpose.

basic AccessLevelsAccessLevelBasic

A set of predefined conditions for the access level and a combining function. Structure is documented below.

custom AccessLevelsAccessLevelCustom

Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec. Structure is documented below.

description String

Description of the expression

name string

Resource name for the Access Level. The short_name component must begin with a letter and only include alphanumeric and '_'. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

title string

Title for the expression, i.e. a short string describing its purpose.

basic AccessLevelsAccessLevelBasic

A set of predefined conditions for the access level and a combining function. Structure is documented below.

custom AccessLevelsAccessLevelCustom

Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec. Structure is documented below.

description string

Description of the expression

name str

Resource name for the Access Level. The short_name component must begin with a letter and only include alphanumeric and '_'. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

title str

Title for the expression, i.e. a short string describing its purpose.

basic AccessLevelsAccessLevelBasic

A set of predefined conditions for the access level and a combining function. Structure is documented below.

custom AccessLevelsAccessLevelCustom

Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec. Structure is documented below.

description str

Description of the expression

name String

Resource name for the Access Level. The short_name component must begin with a letter and only include alphanumeric and '_'. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

title String

Title for the expression, i.e. a short string describing its purpose.

basic Property Map

A set of predefined conditions for the access level and a combining function. Structure is documented below.

custom Property Map

Custom access level conditions are set using the Cloud Common Expression Language to represent the necessary conditions for the level to apply to a request. See CEL spec at: https://github.com/google/cel-spec. Structure is documented below.

description String

Description of the expression

AccessLevelsAccessLevelBasic

Conditions List<AccessLevelsAccessLevelBasicCondition>

A set of requirements for the AccessLevel to be granted. Structure is documented below.

CombiningFunction string

How the conditions list should be combined to determine if a request is granted this AccessLevel. If AND is used, each Condition in conditions must be satisfied for the AccessLevel to be applied. If OR is used, at least one Condition in conditions must be satisfied for the AccessLevel to be applied. Default value is AND. Possible values are AND and OR.

Conditions []AccessLevelsAccessLevelBasicCondition

A set of requirements for the AccessLevel to be granted. Structure is documented below.

CombiningFunction string

How the conditions list should be combined to determine if a request is granted this AccessLevel. If AND is used, each Condition in conditions must be satisfied for the AccessLevel to be applied. If OR is used, at least one Condition in conditions must be satisfied for the AccessLevel to be applied. Default value is AND. Possible values are AND and OR.

conditions ListLevelsAccessLevelBasicCondition>

A set of requirements for the AccessLevel to be granted. Structure is documented below.

combiningFunction String

How the conditions list should be combined to determine if a request is granted this AccessLevel. If AND is used, each Condition in conditions must be satisfied for the AccessLevel to be applied. If OR is used, at least one Condition in conditions must be satisfied for the AccessLevel to be applied. Default value is AND. Possible values are AND and OR.

conditions AccessLevelsAccessLevelBasicCondition[]

A set of requirements for the AccessLevel to be granted. Structure is documented below.

combiningFunction string

How the conditions list should be combined to determine if a request is granted this AccessLevel. If AND is used, each Condition in conditions must be satisfied for the AccessLevel to be applied. If OR is used, at least one Condition in conditions must be satisfied for the AccessLevel to be applied. Default value is AND. Possible values are AND and OR.

conditions Sequence[AccessLevelsAccessLevelBasicCondition]

A set of requirements for the AccessLevel to be granted. Structure is documented below.

combining_function str

How the conditions list should be combined to determine if a request is granted this AccessLevel. If AND is used, each Condition in conditions must be satisfied for the AccessLevel to be applied. If OR is used, at least one Condition in conditions must be satisfied for the AccessLevel to be applied. Default value is AND. Possible values are AND and OR.

conditions List

A set of requirements for the AccessLevel to be granted. Structure is documented below.

combiningFunction String

How the conditions list should be combined to determine if a request is granted this AccessLevel. If AND is used, each Condition in conditions must be satisfied for the AccessLevel to be applied. If OR is used, at least one Condition in conditions must be satisfied for the AccessLevel to be applied. Default value is AND. Possible values are AND and OR.

AccessLevelsAccessLevelBasicCondition

DevicePolicy AccessLevelsAccessLevelBasicConditionDevicePolicy

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. Structure is documented below.

IpSubnetworks List<string>

A list of CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

Members List<string>

An allowed list of members (users, service accounts). Using groups is not supported yet. The signed-in user originating the request must be a part of one of the provided members. If not specified, a request may come from any user (logged in/not logged in, not present in any groups, etc.). Formats: user:{emailid}, serviceAccount:{emailid}

Negate bool

Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to false.

Regions List<string>

The request must originate from one of the provided countries/regions. Format: A valid ISO 3166-1 alpha-2 code.

RequiredAccessLevels List<string>

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

DevicePolicy AccessLevelsAccessLevelBasicConditionDevicePolicy

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. Structure is documented below.

IpSubnetworks []string

A list of CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

Members []string

An allowed list of members (users, service accounts). Using groups is not supported yet. The signed-in user originating the request must be a part of one of the provided members. If not specified, a request may come from any user (logged in/not logged in, not present in any groups, etc.). Formats: user:{emailid}, serviceAccount:{emailid}

Negate bool

Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to false.

Regions []string

The request must originate from one of the provided countries/regions. Format: A valid ISO 3166-1 alpha-2 code.

RequiredAccessLevels []string

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

devicePolicy AccessLevelsAccessLevelBasicConditionDevicePolicy

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. Structure is documented below.

ipSubnetworks List

A list of CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

members List

An allowed list of members (users, service accounts). Using groups is not supported yet. The signed-in user originating the request must be a part of one of the provided members. If not specified, a request may come from any user (logged in/not logged in, not present in any groups, etc.). Formats: user:{emailid}, serviceAccount:{emailid}

negate Boolean

Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to false.

regions List

The request must originate from one of the provided countries/regions. Format: A valid ISO 3166-1 alpha-2 code.

requiredAccessLevels List

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

devicePolicy AccessLevelsAccessLevelBasicConditionDevicePolicy

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. Structure is documented below.

ipSubnetworks string[]

A list of CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

members string[]

An allowed list of members (users, service accounts). Using groups is not supported yet. The signed-in user originating the request must be a part of one of the provided members. If not specified, a request may come from any user (logged in/not logged in, not present in any groups, etc.). Formats: user:{emailid}, serviceAccount:{emailid}

negate boolean

Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to false.

regions string[]

The request must originate from one of the provided countries/regions. Format: A valid ISO 3166-1 alpha-2 code.

requiredAccessLevels string[]

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

device_policy AccessLevelsAccessLevelBasicConditionDevicePolicy

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. Structure is documented below.

ip_subnetworks Sequence[str]

A list of CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

members Sequence[str]

An allowed list of members (users, service accounts). Using groups is not supported yet. The signed-in user originating the request must be a part of one of the provided members. If not specified, a request may come from any user (logged in/not logged in, not present in any groups, etc.). Formats: user:{emailid}, serviceAccount:{emailid}

negate bool

Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to false.

regions Sequence[str]

The request must originate from one of the provided countries/regions. Format: A valid ISO 3166-1 alpha-2 code.

required_access_levels Sequence[str]

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

devicePolicy Property Map

Device specific restrictions, all restrictions must hold for the Condition to be true. If not specified, all devices are allowed. Structure is documented below.

ipSubnetworks List

A list of CIDR block IP subnetwork specification. May be IPv4 or IPv6. Note that for a CIDR IP address block, the specified IP address portion must be properly truncated (i.e. all the host bits must be zero) or the input is considered malformed. For example, "192.0.2.0/24" is accepted but "192.0.2.1/24" is not. Similarly, for IPv6, "2001:db8::/32" is accepted whereas "2001:db8::1/32" is not. The originating IP of a request must be in one of the listed subnets in order for this Condition to be true. If empty, all IP addresses are allowed.

members List

An allowed list of members (users, service accounts). Using groups is not supported yet. The signed-in user originating the request must be a part of one of the provided members. If not specified, a request may come from any user (logged in/not logged in, not present in any groups, etc.). Formats: user:{emailid}, serviceAccount:{emailid}

negate Boolean

Whether to negate the Condition. If true, the Condition becomes a NAND over its non-empty fields, each field must be false for the Condition overall to be satisfied. Defaults to false.

regions List

The request must originate from one of the provided countries/regions. Format: A valid ISO 3166-1 alpha-2 code.

requiredAccessLevels List

A list of other access levels defined in the same Policy, referenced by resource name. Referencing an AccessLevel which does not exist is an error. All access levels listed must be granted for the Condition to be true. Format: accessPolicies/{policy_id}/accessLevels/{short_name}

AccessLevelsAccessLevelBasicConditionDevicePolicy

AllowedDeviceManagementLevels List<string>

A list of allowed device management levels. An empty list allows all management levels. Each value may be one of MANAGEMENT_UNSPECIFIED, NONE, BASIC, and COMPLETE.

AllowedEncryptionStatuses List<string>

A list of allowed encryptions statuses. An empty list allows all statuses. Each value may be one of ENCRYPTION_UNSPECIFIED, ENCRYPTION_UNSUPPORTED, UNENCRYPTED, and ENCRYPTED.

OsConstraints List<AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraint>

A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.

RequireAdminApproval bool

Whether the device needs to be approved by the customer admin.

RequireCorpOwned bool

Whether the device needs to be corp owned.

RequireScreenLock bool

Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.

AllowedDeviceManagementLevels []string

A list of allowed device management levels. An empty list allows all management levels. Each value may be one of MANAGEMENT_UNSPECIFIED, NONE, BASIC, and COMPLETE.

AllowedEncryptionStatuses []string

A list of allowed encryptions statuses. An empty list allows all statuses. Each value may be one of ENCRYPTION_UNSPECIFIED, ENCRYPTION_UNSUPPORTED, UNENCRYPTED, and ENCRYPTED.

OsConstraints []AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraint

A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.

RequireAdminApproval bool

Whether the device needs to be approved by the customer admin.

RequireCorpOwned bool

Whether the device needs to be corp owned.

RequireScreenLock bool

Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.

allowedDeviceManagementLevels List

A list of allowed device management levels. An empty list allows all management levels. Each value may be one of MANAGEMENT_UNSPECIFIED, NONE, BASIC, and COMPLETE.

allowedEncryptionStatuses List

A list of allowed encryptions statuses. An empty list allows all statuses. Each value may be one of ENCRYPTION_UNSPECIFIED, ENCRYPTION_UNSUPPORTED, UNENCRYPTED, and ENCRYPTED.

osConstraints ListLevelsAccessLevelBasicConditionDevicePolicyOsConstraint>

A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.

requireAdminApproval Boolean

Whether the device needs to be approved by the customer admin.

requireCorpOwned Boolean

Whether the device needs to be corp owned.

requireScreenLock Boolean

Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.

allowedDeviceManagementLevels string[]

A list of allowed device management levels. An empty list allows all management levels. Each value may be one of MANAGEMENT_UNSPECIFIED, NONE, BASIC, and COMPLETE.

allowedEncryptionStatuses string[]

A list of allowed encryptions statuses. An empty list allows all statuses. Each value may be one of ENCRYPTION_UNSPECIFIED, ENCRYPTION_UNSUPPORTED, UNENCRYPTED, and ENCRYPTED.

osConstraints AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraint[]

A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.

requireAdminApproval boolean

Whether the device needs to be approved by the customer admin.

requireCorpOwned boolean

Whether the device needs to be corp owned.

requireScreenLock boolean

Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.

allowed_device_management_levels Sequence[str]

A list of allowed device management levels. An empty list allows all management levels. Each value may be one of MANAGEMENT_UNSPECIFIED, NONE, BASIC, and COMPLETE.

allowed_encryption_statuses Sequence[str]

A list of allowed encryptions statuses. An empty list allows all statuses. Each value may be one of ENCRYPTION_UNSPECIFIED, ENCRYPTION_UNSUPPORTED, UNENCRYPTED, and ENCRYPTED.

os_constraints Sequence[AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraint]

A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.

require_admin_approval bool

Whether the device needs to be approved by the customer admin.

require_corp_owned bool

Whether the device needs to be corp owned.

require_screen_lock bool

Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.

allowedDeviceManagementLevels List

A list of allowed device management levels. An empty list allows all management levels. Each value may be one of MANAGEMENT_UNSPECIFIED, NONE, BASIC, and COMPLETE.

allowedEncryptionStatuses List

A list of allowed encryptions statuses. An empty list allows all statuses. Each value may be one of ENCRYPTION_UNSPECIFIED, ENCRYPTION_UNSUPPORTED, UNENCRYPTED, and ENCRYPTED.

osConstraints List

A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.

requireAdminApproval Boolean

Whether the device needs to be approved by the customer admin.

requireCorpOwned Boolean

Whether the device needs to be corp owned.

requireScreenLock Boolean

Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.

AccessLevelsAccessLevelBasicConditionDevicePolicyOsConstraint

OsType string

The operating system type of the device. Possible values are OS_UNSPECIFIED, DESKTOP_MAC, DESKTOP_WINDOWS, DESKTOP_LINUX, DESKTOP_CHROME_OS, ANDROID, and IOS.

MinimumVersion string

The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: "major.minor.patch" such as "10.5.301", "9.2.1".

OsType string

The operating system type of the device. Possible values are OS_UNSPECIFIED, DESKTOP_MAC, DESKTOP_WINDOWS, DESKTOP_LINUX, DESKTOP_CHROME_OS, ANDROID, and IOS.

MinimumVersion string

The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: "major.minor.patch" such as "10.5.301", "9.2.1".

osType String

The operating system type of the device. Possible values are OS_UNSPECIFIED, DESKTOP_MAC, DESKTOP_WINDOWS, DESKTOP_LINUX, DESKTOP_CHROME_OS, ANDROID, and IOS.

minimumVersion String

The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: "major.minor.patch" such as "10.5.301", "9.2.1".

osType string

The operating system type of the device. Possible values are OS_UNSPECIFIED, DESKTOP_MAC, DESKTOP_WINDOWS, DESKTOP_LINUX, DESKTOP_CHROME_OS, ANDROID, and IOS.

minimumVersion string

The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: "major.minor.patch" such as "10.5.301", "9.2.1".

os_type str

The operating system type of the device. Possible values are OS_UNSPECIFIED, DESKTOP_MAC, DESKTOP_WINDOWS, DESKTOP_LINUX, DESKTOP_CHROME_OS, ANDROID, and IOS.

minimum_version str

The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: "major.minor.patch" such as "10.5.301", "9.2.1".

osType String

The operating system type of the device. Possible values are OS_UNSPECIFIED, DESKTOP_MAC, DESKTOP_WINDOWS, DESKTOP_LINUX, DESKTOP_CHROME_OS, ANDROID, and IOS.

minimumVersion String

The minimum allowed OS version. If not set, any version of this OS satisfies the constraint. Format: "major.minor.patch" such as "10.5.301", "9.2.1".

AccessLevelsAccessLevelCustom

Expr AccessLevelsAccessLevelCustomExpr

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. Structure is documented below.

Expr AccessLevelsAccessLevelCustomExpr

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. Structure is documented below.

expr AccessLevelsAccessLevelCustomExpr

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. Structure is documented below.

expr AccessLevelsAccessLevelCustomExpr

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. Structure is documented below.

expr AccessLevelsAccessLevelCustomExpr

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. Structure is documented below.

expr Property Map

Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. This page details the objects and attributes that are used to the build the CEL expressions for custom access levels - https://cloud.google.com/access-context-manager/docs/custom-access-level-spec. Structure is documented below.

AccessLevelsAccessLevelCustomExpr

Expression string

Textual representation of an expression in Common Expression Language syntax.

Description string

Description of the expression

Location string

String indicating the location of the expression for error reporting, e.g. a file name and a position in the file

Title string

Title for the expression, i.e. a short string describing its purpose.

Expression string

Textual representation of an expression in Common Expression Language syntax.

Description string

Description of the expression

Location string

String indicating the location of the expression for error reporting, e.g. a file name and a position in the file

Title string

Title for the expression, i.e. a short string describing its purpose.

expression String

Textual representation of an expression in Common Expression Language syntax.

description String

Description of the expression

location String

String indicating the location of the expression for error reporting, e.g. a file name and a position in the file

title String

Title for the expression, i.e. a short string describing its purpose.

expression string

Textual representation of an expression in Common Expression Language syntax.

description string

Description of the expression

location string

String indicating the location of the expression for error reporting, e.g. a file name and a position in the file

title string

Title for the expression, i.e. a short string describing its purpose.

expression str

Textual representation of an expression in Common Expression Language syntax.

description str

Description of the expression

location str

String indicating the location of the expression for error reporting, e.g. a file name and a position in the file

title str

Title for the expression, i.e. a short string describing its purpose.

expression String

Textual representation of an expression in Common Expression Language syntax.

description String

Description of the expression

location String

String indicating the location of the expression for error reporting, e.g. a file name and a position in the file

title String

Title for the expression, i.e. a short string describing its purpose.

Import

AccessLevels can be imported using any of these accepted formats

 $ pulumi import gcp:accesscontextmanager/accessLevels:AccessLevels default {{parent}}/accessLevels
 $ pulumi import gcp:accesscontextmanager/accessLevels:AccessLevels default {{parent}}

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.