Send feedback
Class Role (2.3.5)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.3.5 keyboard_arrow_down
public final class Role implements Serializable
A role in a IAM Policy . Project owners can grant access to team members to access
project's resources and APIs by granting IAM roles to team members.
Methods
editor()
public static Role editor()
Returns the editor role. Encapsulates all viewer's permissions and permissions for actions that
modify the state of a resource.
Returns
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getValue()
Returns the string identifier for this role. For example, "roles/viewer"
,
"roles/editor"
, or "roles/owner"
.
Returns
hashCode()
Returns
Overrides
of(String value)
public static Role of(String value)
Returns a new role given its string value.
If the value contains no slash character ('/'
), the prefix "roles/""
is
prepended. This slightly simplifies usage for predefined roles . For custom roles , call this
method with the fully-qualified name, eg "projects/XXX/roles/YYY"
.
Parameter
Name Description value String
the string value for the role
Returns
owner()
public static Role owner()
Returns the owner role. Encapsulates all editor's permissions and permissions to manage access
control for a resource or manage the billing options for a project.
Returns
toString()
Returns
Overrides
viewer()
public static Role viewer()
Returns the viewer role. Encapsulates the permission for read-only actions that preserve state
of a resource.
Returns
Send feedback
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 2024-04-03 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?