AccessLevel
An AccessLevel is a label that can be applied to requests to GCP services, along with a list of requirements necessary for the label to be applied.
To get more information about AccessLevel, see:
- API documentation
- How-to Guides
Create a AccessLevel Resource
new AccessLevel(name: string, args: AccessLevelArgs, opts?: CustomResourceOptions);def AccessLevel(resource_name, opts=None, basic=None, custom=None, description=None, name=None, parent=None, title=None, __props__=None);func NewAccessLevel(ctx *Context, name string, args AccessLevelArgs, opts ...ResourceOption) (*AccessLevel, error)public AccessLevel(string name, AccessLevelArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args AccessLevelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccessLevelArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessLevelArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
AccessLevel Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The AccessLevel resource accepts the following input properties:
- Parent string
The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}
- Title string
Title for the expression, i.e. a short string describing its purpose.
- Basic
Access
Level Basic Args A set of predefined conditions for the access level and a combining function. Structure is documented below.
- Custom
Access
Level Custom Args 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 shortname component must begin with a letter and only include alphanumeric and ‘’. Format: accessPolicies/{policy_id}/accessLevels/{short_name}
- Parent string
The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}
- Title string
Title for the expression, i.e. a short string describing its purpose.
- Basic
Access
Level Basic A set of predefined conditions for the access level and a combining function. Structure is documented below.
- Custom
Access
Level Custom 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 shortname component must begin with a letter and only include alphanumeric and ‘’. Format: accessPolicies/{policy_id}/accessLevels/{short_name}
- parent string
The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}
- title string
Title for the expression, i.e. a short string describing its purpose.
- basic
Access
Level Basic A set of predefined conditions for the access level and a combining function. Structure is documented below.
- custom
Access
Level Custom 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 shortname component must begin with a letter and only include alphanumeric and ‘’. Format: accessPolicies/{policy_id}/accessLevels/{short_name}
- parent str
The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}
- title str
Title for the expression, i.e. a short string describing its purpose.
- basic
Dict[Access
Level Basic] A set of predefined conditions for the access level and a combining function. Structure is documented below.
- custom
Dict[Access
Level Custom] 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 str
Resource name for the Access Level. The shortname component must begin with a letter and only include alphanumeric and ‘’. Format: accessPolicies/{policy_id}/accessLevels/{short_name}
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessLevel resource produces the following output properties:
Look up an Existing AccessLevel Resource
Get an existing AccessLevel 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?: AccessLevelState, opts?: CustomResourceOptions): AccessLevelstatic get(resource_name, id, opts=None, basic=None, custom=None, description=None, name=None, parent=None, title=None, __props__=None);func GetAccessLevel(ctx *Context, name string, id IDInput, state *AccessLevelState, opts ...ResourceOption) (*AccessLevel, error)public static AccessLevel Get(string name, Input<string> id, AccessLevelState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Basic
Access
Level Basic Args A set of predefined conditions for the access level and a combining function. Structure is documented below.
- Custom
Access
Level Custom Args 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 shortname component must begin with a letter and only include alphanumeric and ‘’. Format: accessPolicies/{policy_id}/accessLevels/{short_name}
- Parent string
The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}
- Title string
Title for the expression, i.e. a short string describing its purpose.
- Basic
Access
Level Basic A set of predefined conditions for the access level and a combining function. Structure is documented below.
- Custom
Access
Level Custom 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 shortname component must begin with a letter and only include alphanumeric and ‘’. Format: accessPolicies/{policy_id}/accessLevels/{short_name}
- Parent string
The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}
- Title string
Title for the expression, i.e. a short string describing its purpose.
- basic
Access
Level Basic A set of predefined conditions for the access level and a combining function. Structure is documented below.
- custom
Access
Level Custom 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 shortname component must begin with a letter and only include alphanumeric and ‘’. Format: accessPolicies/{policy_id}/accessLevels/{short_name}
- parent string
The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}
- title string
Title for the expression, i.e. a short string describing its purpose.
- basic
Dict[Access
Level Basic] A set of predefined conditions for the access level and a combining function. Structure is documented below.
- custom
Dict[Access
Level Custom] 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 str
Resource name for the Access Level. The shortname component must begin with a letter and only include alphanumeric and ‘’. Format: accessPolicies/{policy_id}/accessLevels/{short_name}
- parent str
The AccessPolicy this AccessLevel lives in. Format: accessPolicies/{policy_id}
- title str
Title for the expression, i.e. a short string describing its purpose.
Supporting Types
AccessLevelBasic
- Conditions
List<Access
Level Basic Condition Args> A set of requirements for the AccessLevel to be granted. Structure is documented below.
- Combining
Function 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.
- Conditions
[]Access
Level Basic Condition A set of requirements for the AccessLevel to be granted. Structure is documented below.
- Combining
Function 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.
- conditions
Access
Level Basic Condition[] A set of requirements for the AccessLevel to be granted. Structure is documented below.
- combining
Function 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.
- conditions
List[Access
Level Basic Condition] 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.
AccessLevelBasicCondition
- Device
Policy AccessLevel Basic Condition Device Policy Args 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 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.
- Required
Access List<string>Levels 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 AccessLevel Basic Condition Device Policy 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 []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.
- Required
Access []stringLevels 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 AccessLevel Basic Condition Device Policy 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 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.
- required
Access string[]Levels 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 Dict[AccessLevel Basic Condition Device Policy] 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 List[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 List[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 List[str]
The request must originate from one of the provided countries/regions. Format: A valid ISO 3166-1 alpha-2 code.
- required
Access List[str]Levels 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}
AccessLevelBasicConditionDevicePolicy
- Allowed
Device List<string>Management Levels A list of allowed device management levels. An empty list allows all management levels.
- Allowed
Encryption List<string>Statuses A list of allowed encryptions statuses. An empty list allows all statuses.
- Os
Constraints List<AccessLevel Basic Condition Device Policy Os Constraint Args> A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.
- Require
Admin boolApproval Whether the device needs to be approved by the customer admin.
- Require
Corp boolOwned Whether the device needs to be corp owned.
- Require
Screen boolLock Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.
- Allowed
Device []stringManagement Levels A list of allowed device management levels. An empty list allows all management levels.
- Allowed
Encryption []stringStatuses A list of allowed encryptions statuses. An empty list allows all statuses.
- Os
Constraints []AccessLevel Basic Condition Device Policy Os Constraint A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.
- Require
Admin boolApproval Whether the device needs to be approved by the customer admin.
- Require
Corp boolOwned Whether the device needs to be corp owned.
- Require
Screen boolLock Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.
- allowed
Device string[]Management Levels A list of allowed device management levels. An empty list allows all management levels.
- allowed
Encryption string[]Statuses A list of allowed encryptions statuses. An empty list allows all statuses.
- os
Constraints AccessLevel Basic Condition Device Policy Os Constraint[] A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.
- require
Admin booleanApproval Whether the device needs to be approved by the customer admin.
- require
Corp booleanOwned Whether the device needs to be corp owned.
- require
Screen booleanLock Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.
- allowed
Device List[str]Management Levels A list of allowed device management levels. An empty list allows all management levels.
- allowed
Encryption List[str]Statuses A list of allowed encryptions statuses. An empty list allows all statuses.
- os
Constraints List[AccessLevel Basic Condition Device Policy Os Constraint] A list of allowed OS versions. An empty list allows all types and all versions. Structure is documented below.
- require
Admin boolApproval Whether the device needs to be approved by the customer admin.
- require
Corp boolOwned Whether the device needs to be corp owned.
- require
Screen boolLock Whether or not screenlock is required for the DevicePolicy to be true. Defaults to false.
AccessLevelBasicConditionDevicePolicyOsConstraint
- Os
Type string The operating system type of the device.
- Minimum
Version 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 string The operating system type of the device.
- Minimum
Version 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 string The operating system type of the device.
- minimum
Version 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.
- 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”.
AccessLevelCustom
- Expr
Access
Level Custom Expr Args 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
Access
Level Custom Expr 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
Access
Level Custom Expr 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
Dict[Access
Level Custom Expr] 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.
AccessLevelCustomExpr
- 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.