Class: Google::Apis::ServiceusageV1beta1::ConsumerPolicy

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/serviceusage_v1beta1/classes.rb,
lib/google/apis/serviceusage_v1beta1/representations.rb,
lib/google/apis/serviceusage_v1beta1/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.



1143
1144
1145
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1143

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

Instance Attribute Details

#create_timeString

Output only. The time the policy was created. For singleton policies, this is the first touch of the policy. Corresponds to the JSON property createTime

Returns:

  • (String)


1117
1118
1119
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1117

def create_time
  @create_time
end

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

Enable rules define usable services and groups. There can currently be at most one EnableRule. This restriction will be lifted in later releases. Corresponds to the JSON property enableRules



1123
1124
1125
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1123

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)


1129
1130
1131
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1129

def etag
  @etag
end

#nameString

Output only. The resource name of the policy. Only the default policy is supported: projects/12345/consumerPolicies/default, folders/12345/ consumerPolicies/default, organizations/12345/consumerPolicies/default. Corresponds to the JSON property name

Returns:

  • (String)


1136
1137
1138
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1136

def name
  @name
end

#update_timeString

Output only. The time the policy was last updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


1141
1142
1143
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1141

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1148
1149
1150
1151
1152
1153
1154
# File 'lib/google/apis/serviceusage_v1beta1/classes.rb', line 1148

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @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