Class Iam (6.12.0)
Stay organized with collections
Save and categorize content based on your preferences.
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>;
getPolicy(options, callback)
getPolicy(options: GetPolicyOptions, callback: GetPolicyCallback): void;
Returns |
---|
Type | Description |
void | |
getPolicy(callback)
getPolicy(callback: GetPolicyCallback): void;
Returns |
---|
Type | Description |
void | |
setPolicy(policy, options)
setPolicy(policy: Policy, options?: SetPolicyOptions): Promise<SetPolicyResponse>;
setPolicy(policy, callback)
setPolicy(policy: Policy, callback: SetPolicyCallback): void;
Returns |
---|
Type | Description |
void | |
setPolicy(policy, options, callback)
setPolicy(policy: Policy, options: SetPolicyOptions, callback: SetPolicyCallback): void;
Returns |
---|
Type | Description |
void | |
testPermissions(permissions, options)
testPermissions(permissions: string | string[], options?: TestIamPermissionsOptions): Promise<TestIamPermissionsResponse>;
testPermissions(permissions, callback)
testPermissions(permissions: string | string[], callback: TestIamPermissionsCallback): void;
Returns |
---|
Type | Description |
void | |
testPermissions(permissions, options, callback)
testPermissions(permissions: string | string[], options: TestIamPermissionsOptions, callback: TestIamPermissionsCallback): void;
Returns |
---|
Type | Description |
void | |
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-03-16 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"
}]