Class: Google::Apis::StorageV1::Policy

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Policy

Returns a new instance of Policy.



2612
2613
2614
# File 'lib/google/apis/storage_v1/classes.rb', line 2612

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#bindingsArray<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



2583
2584
2585
# File 'lib/google/apis/storage_v1/classes.rb', line 2583

def bindings
  @bindings
end

#etagString

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.

Returns:

  • (String)


2589
2590
2591
# File 'lib/google/apis/storage_v1/classes.rb', line 2589

def etag
  @etag
end

#kindString

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

Returns:

  • (String)


2595
2596
2597
# File 'lib/google/apis/storage_v1/classes.rb', line 2595

def kind
  @kind
end

#resource_idString

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

Returns:

  • (String)


2605
2606
2607
# File 'lib/google/apis/storage_v1/classes.rb', line 2605

def resource_id
  @resource_id
end

#versionFixnum

The IAM policy format version. Corresponds to the JSON property version

Returns:

  • (Fixnum)


2610
2611
2612
# File 'lib/google/apis/storage_v1/classes.rb', line 2610

def version
  @version
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2617
2618
2619
2620
2621
2622
2623
# File 'lib/google/apis/storage_v1/classes.rb', line 2617

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