Class IamPolicyAnalysisQuery (3.5.0)

IamPolicyAnalysisQuery(mapping=None, *, ignore_unknown_fields=False, **kwargs)

IAM policy analysis query message.

.. attribute:: scope

Required. The relative name of the root asset. Only resources and IAM policies within the scope will be analyzed.

This can only be an organization number (such as "organizations/123"), a folder number (such as "folders/123"), a project ID (such as "projects/my-project-id"), or a project number (such as "projects/12345").

To know how to get organization id, visit here <https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id>__.

To know how to get folder or project id, visit here <https://cloud.google.com/resource-manager/docs/creating-managing-folders#viewing_or_listing_folders_and_projects>__.

:type: str

Attributes

NameDescription
resource_selector google.cloud.asset_v1.types.IamPolicyAnalysisQuery.ResourceSelector
Optional. Specifies a resource for analysis.
identity_selector google.cloud.asset_v1.types.IamPolicyAnalysisQuery.IdentitySelector
Optional. Specifies an identity for analysis.
access_selector google.cloud.asset_v1.types.IamPolicyAnalysisQuery.AccessSelector
Optional. Specifies roles or permissions for analysis. This is optional.
options google.cloud.asset_v1.types.IamPolicyAnalysisQuery.Options
Optional. The query options.
condition_context google.cloud.asset_v1.types.IamPolicyAnalysisQuery.ConditionContext
Optional. The hypothetical context for IAM conditions evaluation.

Classes

AccessSelector

AccessSelector(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specifies roles and/or permissions to analyze, to determine both the identities possessing them and the resources they control. If multiple values are specified, results will include roles or permissions matching any of them. The total number of roles and permissions should be equal or less than 10.

ConditionContext

ConditionContext(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The IAM conditions context. .. attribute:: access_time

The hypothetical access timestamp to evaluate IAM conditions. Note that this value must not be earlier than the current time; otherwise, an INVALID_ARGUMENT error will be returned.

:type: google.protobuf.timestamp_pb2.Timestamp

IdentitySelector

IdentitySelector(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specifies an identity for which to determine resource access, based on roles assigned either directly to them or to the groups they belong to, directly or indirectly.

Options

Options(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Contains query options. .. attribute:: expand_groups

Optional. If true, the identities section of the result will expand any Google groups appearing in an IAM policy binding.

If IamPolicyAnalysisQuery.identity_selector is specified, the identity in the result will be determined by the selector, and this flag is not allowed to set.

Default is false.

:type: bool

ResourceSelector

ResourceSelector(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Specifies the resource to analyze for access policies, which may be set directly on the resource, or on ancestors such as organizations, folders or projects.