Class Condition (3.37.0)

Condition(
 expression: str,
 title: typing.Optional[str] = None,
 description: typing.Optional[str] = None,
)

Represents a textual expression in the Common Expression Language (CEL) syntax.

Typically used for filtering or policy rules, such as in IAM Conditions or BigQuery row/column access policies.

See: https://cloud.google.com/iam/docs/reference/rest/Shared.Types/Expr https://github.com/google/cel-spec

Parameters

Name Description
expression str

The condition expression string using CEL syntax. This is required. Example: resource.type == "compute.googleapis.com/Instance"

title Optional[str]

An optional title for the condition, providing a short summary. Example: "Request is for a GCE instance"

description Optional[str]

An optional description of the condition, providing a detailed explanation. Example: "This condition checks whether the resource is a GCE instance."

Properties

description

Optional[str]: The description for the condition.

expression

str: The expression string for the condition.

title

Optional[str]: The title for the condition.

Methods

__eq__

__eq__(other: object) -> bool

Check for equality based on expression, title, and description.

__hash__

__hash__() -> int

Generate a hash based on expression, title, and description.

__ne__

__ne__(other: object) -> bool

Check for inequality.

__repr__

__repr__() -> str

Return a string representation of the Condition object.

from_api_repr

from_api_repr(
 resource: typing.Dict[str, typing.Any],
) -> google.cloud.bigquery.dataset.Condition

Factory: construct a Condition instance given its API representation.

to_api_repr

to_api_repr() -> typing.Dict[str, typing.Any]

Construct the API resource representation of this Condition.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.