Class: Google::Apis::StorageV1::Policy
- Inherits:
-
Object
- Object
- Google::Apis::StorageV1::Policy
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/storage_v1/classes.rb,
lib/google/apis/storage_v1/representations.rb,
lib/google/apis/storage_v1/representations.rb
Overview
A bucket/object/managedFolder IAM policy.
Defined Under Namespace
Classes: Binding
Instance Attribute Summary collapse
-
#bindings ⇒ Array<Google::Apis::StorageV1::Policy::Binding>
An association between a role, which comes with a set of permissions, and members who may assume that role.
-
#etag ⇒ String
HTTP 1.1 Entity tag for the policy.
-
#kind ⇒ String
The kind of item this is.
-
#resource_id ⇒ String
The ID of the resource to which this policy belongs.
-
#version ⇒ Fixnum
The IAM policy format version.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Policy
constructor
A new instance of Policy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Policy
Returns a new instance of Policy.
2845 2846 2847 |
# File 'lib/google/apis/storage_v1/classes.rb', line 2845 def initialize(**args) update!(**args) end |
Instance Attribute Details
#bindings ⇒ Array<Google::Apis::StorageV1::Policy::Binding>
An association between a role, which comes with a set of permissions, and
members who may assume that role.
Corresponds to the JSON property bindings
2816 2817 2818 |
# File 'lib/google/apis/storage_v1/classes.rb', line 2816 def bindings @bindings end |
#etag ⇒ String
HTTP 1.1 Entity tag for the policy.
Corresponds to the JSON property etag
NOTE: Values are automatically base64 encoded/decoded in the client library.
2822 2823 2824 |
# File 'lib/google/apis/storage_v1/classes.rb', line 2822 def etag @etag end |
#kind ⇒ String
The kind of item this is. For policies, this is always storage#policy. This
field is ignored on input.
Corresponds to the JSON property kind
2828 2829 2830 |
# File 'lib/google/apis/storage_v1/classes.rb', line 2828 def kind @kind end |
#resource_id ⇒ String
The ID of the resource to which this policy belongs. Will be of the form
projects//buckets/bucket for buckets, projects//buckets/bucket/objects/
object for objects, and projects//buckets/bucket/managedFolders/managedFolder.
A specific generation may be specified by appending #generationNumber to the
end of the object name, e.g. projects//buckets/my-bucket/objects/data.txt#17.
The current generation can be denoted with #0. This field is ignored on input.
Corresponds to the JSON property resourceId
2838 2839 2840 |
# File 'lib/google/apis/storage_v1/classes.rb', line 2838 def resource_id @resource_id end |
#version ⇒ Fixnum
The IAM policy format version.
Corresponds to the JSON property version
2843 2844 2845 |
# File 'lib/google/apis/storage_v1/classes.rb', line 2843 def version @version end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2850 2851 2852 2853 2854 2855 2856 |
# File 'lib/google/apis/storage_v1/classes.rb', line 2850 def update!(**args) @bindings = args[:bindings] if args.key?(:bindings) @etag = args[:etag] if args.key?(:etag) @kind = args[:kind] if args.key?(:kind) @resource_id = args[:resource_id] if args.key?(:resource_id) @version = args[:version] if args.key?(:version) end |