Reference documentation and code samples for the Common Protos for Google Cloud APIs Client class AuthorizationInfo.
Authorization information for the operation.
Generated from protobuf messagegoogle.cloud.audit.AuthorizationInfo
Namespace
Google \ Cloud \ Audit
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ resource
string
The resource being accessed, as a REST-style or cloud resource string. For example: bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or projects/PROJECTID/datasets/DATASETID
↳ permission
string
The required IAM permission.
↳ granted
bool
Whether or not authorization forresourceandpermissionwas granted.
Resource attributes used in IAM condition evaluation. This field contains resource attributes like resource type and resource name. To get the whole view of the attributes used in IAM condition evaluation, the user must also look intoAuditLog.request_metadata.request_attributes.
↳ permission_type
int
The type of the permission that was checked. For data access audit logs this corresponds with the permission type that must be enabled in the project/folder/organization IAM policy in order for the log to be written.
getResource
The resource being accessed, as a REST-style or cloud resource string.
For example:
bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID
or
projects/PROJECTID/datasets/DATASETID
Returns
Type
Description
string
setResource
The resource being accessed, as a REST-style or cloud resource string.
For example:
bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID
or
projects/PROJECTID/datasets/DATASETID
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getPermission
The required IAM permission.
Returns
Type
Description
string
setPermission
The required IAM permission.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getGranted
Whether or not authorization forresourceandpermissionwas granted.
Returns
Type
Description
bool
setGranted
Whether or not authorization forresourceandpermissionwas granted.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getResourceAttributes
Resource attributes used in IAM condition evaluation. This field contains
resource attributes like resource type and resource name.
To get the whole view of the attributes used in IAM
condition evaluation, the user must also look intoAuditLog.request_metadata.request_attributes.
The type of the permission that was checked. For data access audit logs
this corresponds with the permission type that must be enabled in the
project/folder/organization IAM policy in order for the log to be written.
Returns
Type
Description
int
setPermissionType
The type of the permission that was checked. For data access audit logs
this corresponds with the permission type that must be enabled in the
project/folder/organization IAM policy in order for the log to be written.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Common Protos for Google Cloud APIs Client - Class AuthorizationInfo (0.8.2)\n\nVersion latestkeyboard_arrow_down\n\n- [0.8.2 (latest)](/php/docs/reference/cloud-common-protos/latest/Audit.AuthorizationInfo)\n- [0.8.1](/php/docs/reference/cloud-common-protos/0.8.1/Audit.AuthorizationInfo)\n- [0.7.0](/php/docs/reference/cloud-common-protos/0.7.0/Audit.AuthorizationInfo)\n- [0.6.0](/php/docs/reference/cloud-common-protos/0.6.0/Audit.AuthorizationInfo)\n- [0.5.2](/php/docs/reference/cloud-common-protos/0.5.2/Audit.AuthorizationInfo)\n- [0.4.2](/php/docs/reference/cloud-common-protos/0.4.2/Audit.AuthorizationInfo)\n- [0.3.8](/php/docs/reference/cloud-common-protos/0.3.8/Audit.AuthorizationInfo) \nReference documentation and code samples for the Common Protos for Google Cloud APIs Client class AuthorizationInfo.\n\nAuthorization information for the operation.\n\nGenerated from protobuf message `google.cloud.audit.AuthorizationInfo`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ Audit\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getResource\n\nThe resource being accessed, as a REST-style or cloud resource string.\n\nFor example:\nbigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID\nor\nprojects/PROJECTID/datasets/DATASETID\n\n### setResource\n\nThe resource being accessed, as a REST-style or cloud resource string.\n\nFor example:\nbigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID\nor\nprojects/PROJECTID/datasets/DATASETID\n\n### getPermission\n\nThe required IAM permission.\n\n### setPermission\n\nThe required IAM permission.\n\n### getGranted\n\nWhether or not authorization for `resource` and `permission`\nwas granted.\n\n### setGranted\n\nWhether or not authorization for `resource` and `permission`\nwas granted.\n\n### getResourceAttributes\n\nResource attributes used in IAM condition evaluation. This field contains\nresource attributes like resource type and resource name.\n\nTo get the whole view of the attributes used in IAM\ncondition evaluation, the user must also look into\n`AuditLog.request_metadata.request_attributes`.\n\n### hasResourceAttributes\n\n### clearResourceAttributes\n\n### setResourceAttributes\n\nResource attributes used in IAM condition evaluation. This field contains\nresource attributes like resource type and resource name.\n\nTo get the whole view of the attributes used in IAM\ncondition evaluation, the user must also look into\n`AuditLog.request_metadata.request_attributes`.\n\n### getPermissionType\n\nThe type of the permission that was checked. For data access audit logs\nthis corresponds with the permission type that must be enabled in the\nproject/folder/organization IAM policy in order for the log to be written.\n\n### setPermissionType\n\nThe type of the permission that was checked. For data access audit logs\nthis corresponds with the permission type that must be enabled in the\nproject/folder/organization IAM policy in order for the log to be written."]]