Class Iam (5.17.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 5.17.0keyboard_arrow_down
Package
@google-cloud/storage
Example
const { Storage } = require ( '@google-cloud/storage ' );
const storage = new Storage ();
const bucket = storage . bucket ( 'my-bucket' );
// bucket.iam
Constructors
(constructor)(bucket)
constructor ( bucket : Bucket );
Constructs a new instance of the Iam
class
Parameter
Name
Description
bucket
Bucket
Methods
getPolicy(options)
getPolicy ( options ?: GetPolicyOptions ) : Promise<GetPolicyResponse> ;
Parameter
Returns
getPolicy(options, callback)
getPolicy ( options : GetPolicyOptions , callback : GetPolicyCallback ) : void ;
Parameters
Returns
getPolicy(callback)
getPolicy ( callback : GetPolicyCallback ) : void ;
Parameter
Returns
setPolicy(policy, options)
setPolicy ( policy : Policy , options ?: SetPolicyOptions ) : Promise<SetPolicyResponse> ;
Parameters
Returns
setPolicy(policy, callback)
setPolicy ( policy : Policy , callback : SetPolicyCallback ) : void ;
Parameters
Returns
setPolicy(policy, options, callback)
setPolicy ( policy : Policy , options : SetPolicyOptions , callback : SetPolicyCallback ) : void ;
Parameters
Returns
testPermissions(permissions, options)
testPermissions ( permissions : string | string [], options ?: TestIamPermissionsOptions ) : Promise<TestIamPermissionsResponse> ;
Parameters
Returns
testPermissions(permissions, callback)
testPermissions ( permissions : string | string [], callback : TestIamPermissionsCallback ) : void ;
Parameters
Returns
testPermissions(permissions, options, callback)
testPermissions ( permissions : string | string [], options : TestIamPermissionsOptions , callback : TestIamPermissionsCallback ) : void ;
Parameters
Returns
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-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,[]]