Send feedback
Class IAM (2.16.6)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.16.6 keyboard_arrow_down
[IAM (Identity and Access Management)](https://cloud.google.com/pubsub/access_control) allows you to set permissions on individual resources and offers a wider range of roles: editor, owner, publisher, subscriber, and viewer. This gives you greater flexibility and allows you to set more fine-grained access control.
For example: * Grant access on a per-topic or per-subscription basis, rather than for the whole Cloud project. * Grant access with limited capabilities, such as to only publish messages to a topic, or to only to consume messages from a subscription, but not to delete the topic or subscription.
*The IAM access control features described in this document are Beta, including the API methods to get and set IAM policies, and to test IAM permissions. Cloud Pub/Sub's use of IAM features is not covered by any SLA or deprecation policy, and may be subject to backward-incompatible changes.*
Package
@google-cloud/pubsub!
Constructors
(constructor)(pubsub, id)
constructor ( pubsub : PubSub , id : string );
Constructs a new instance of the IAM
class
Parameters
Name Description pubsub
PubSub
id
string
Properties
id
Property Value
pubsub
Property Value
request
request : typeof PubSub . prototype . request ;
Property Value
Type Description typeof PubSub#request
Methods
getPolicy(gaxOpts)
getPolicy(gaxOpts?: CallOptions): Promise<GetPolicyResponse>;
Parameter
Name Description gaxOpts
CallOptions
Returns
Type Description Promise <GetPolicyResponse >
getPolicy(callback)
getPolicy ( callback : GetPolicyCallback ): void ;
Parameter
Name Description callback
GetPolicyCallback
Returns
getPolicy(gaxOpts, callback)
getPolicy ( gaxOpts : CallOptions , callback : GetPolicyCallback ): void ;
Parameters
Name Description gaxOpts
CallOptions
callback
GetPolicyCallback
Returns
setPolicy(policy, gaxOpts)
setPolicy ( policy : Policy , gaxOpts ?: CallOptions ): Promise<SetPolicyResponse> ;
Parameters
Name Description policy
Policy
gaxOpts
CallOptions
Returns
Type Description Promise <SetPolicyResponse >
setPolicy(policy, gaxOpts, callback)
setPolicy ( policy : Policy , gaxOpts : CallOptions , callback : SetPolicyCallback ): void ;
Parameters
Name Description policy
Policy
gaxOpts
CallOptions
callback
SetPolicyCallback
Returns
setPolicy(policy, callback)
setPolicy ( policy : Policy , callback : SetPolicyCallback ): void ;
Parameters
Name Description policy
Policy
callback
SetPolicyCallback
Returns
testPermissions(permissions, gaxOpts)
testPermissions ( permissions : string | string [] , gaxOpts ?: CallOptions ): Promise<TestIamPermissionsResponse> ;
Parameters
Name Description permissions
string | string[]
gaxOpts
CallOptions
Returns
Type Description Promise <TestIamPermissionsResponse >
testPermissions(permissions, gaxOpts, callback)
testPermissions ( permissions : string | string [] , gaxOpts : CallOptions , callback : TestIamPermissionsCallback ): void ;
Parameters
Name Description permissions
string | string[]
gaxOpts
CallOptions
callback
TestIamPermissionsCallback
Returns
testPermissions(permissions, callback)
testPermissions ( permissions : string | string [] , callback : TestIamPermissionsCallback ): void ;
Parameters
Name Description permissions
string | string[]
callback
TestIamPermissionsCallback
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-09-05 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?
{
"lastModified": "Last updated 2024-09-05 UTC.",
"confidential": False
}