Class: Google::Apis::ServiceusageV1::ConsumerPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/serviceusage_v1/classes.rb,
lib/google/apis/serviceusage_v1/representations.rb,
lib/google/apis/serviceusage_v1/representations.rb

Overview

Consumer Policy is a set of rules that define what services or service groups can be used for a cloud resource hierarchy.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConsumerPolicy

Returns a new instance of ConsumerPolicy.



1139
1140
1141
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1139

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

Instance Attribute Details

#annotationsHash<String,String>

Optional. Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. AIP- 128 Corresponds to the JSON property annotations

Returns:

  • (Hash<String,String>)


1113
1114
1115
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1113

def annotations
  @annotations
end

#enable_rulesArray<Google::Apis::ServiceusageV1::EnableRule>

Enable rules define usable services and service groups. Corresponds to the JSON property enableRules



1118
1119
1120
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1118

def enable_rules
  @enable_rules
end

#etagString

An opaque tag indicating the current version of the policy, used for concurrency control. Corresponds to the JSON property etag

Returns:

  • (String)


1124
1125
1126
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1124

def etag
  @etag
end

#nameString

Output only. The resource name of the policy. We only allow consumer policy name as default for now: projects/12345/consumerPolicies/default, folders/ 12345/consumerPolicies/default, organizations/12345/consumerPolicies/default . Corresponds to the JSON property name

Returns:

  • (String)


1132
1133
1134
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1132

def name
  @name
end

#update_timeString

The last-modified time. Corresponds to the JSON property updateTime

Returns:

  • (String)


1137
1138
1139
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1137

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1144
1145
1146
1147
1148
1149
1150
# File 'lib/google/apis/serviceusage_v1/classes.rb', line 1144

def update!(**args)
  @annotations = args[:annotations] if args.key?(:annotations)
  @enable_rules = args[:enable_rules] if args.key?(:enable_rules)
  @etag = args[:etag] if args.key?(:etag)
  @name = args[:name] if args.key?(:name)
  @update_time = args[:update_time] if args.key?(:update_time)
end