Class: Google::Apis::ConnectorsV1::MaintenancePolicy

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

Overview

Defines policies to service maintenance events.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MaintenancePolicy

Returns a new instance of MaintenancePolicy.



4042
4043
4044
# File 'lib/google/apis/connectors_v1/classes.rb', line 4042

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

Instance Attribute Details

#create_timeString

Output only. The time when the resource was created. Corresponds to the JSON property createTime

Returns:

  • (String)


4003
4004
4005
# File 'lib/google/apis/connectors_v1/classes.rb', line 4003

def create_time
  @create_time
end

#descriptionString

Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512. Corresponds to the JSON property description

Returns:

  • (String)


4009
4010
4011
# File 'lib/google/apis/connectors_v1/classes.rb', line 4009

def description
  @description
end

#labelsHash<String,String>

Optional. Resource labels to represent user provided metadata. Each label is a key-value pair, where both the key and the value are arbitrary strings provided by the user. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


4016
4017
4018
# File 'lib/google/apis/connectors_v1/classes.rb', line 4016

def labels
  @labels
end

#nameString

Required. MaintenancePolicy name using the form: projects/project_id/ locations/location_id/maintenancePolicies/maintenance_policy_id`where project_idrefers to a GCP consumer project ID,location_idrefers to a GCP region/zone,maintenance_policy_idmust be 1-63 characters long and match the regular expressiona-z0-9?. Corresponds to the JSON propertyname`

Returns:

  • (String)


4025
4026
4027
# File 'lib/google/apis/connectors_v1/classes.rb', line 4025

def name
  @name
end

#stateString

Optional. The state of the policy. Corresponds to the JSON property state

Returns:

  • (String)


4030
4031
4032
# File 'lib/google/apis/connectors_v1/classes.rb', line 4030

def state
  @state
end

#update_policyGoogle::Apis::ConnectorsV1::UpdatePolicy

Maintenance policy applicable to instance updates. Corresponds to the JSON property updatePolicy



4035
4036
4037
# File 'lib/google/apis/connectors_v1/classes.rb', line 4035

def update_policy
  @update_policy
end

#update_timeString

Output only. The time when the resource was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


4040
4041
4042
# File 'lib/google/apis/connectors_v1/classes.rb', line 4040

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4047
4048
4049
4050
4051
4052
4053
4054
4055
# File 'lib/google/apis/connectors_v1/classes.rb', line 4047

def update!(**args)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @state = args[:state] if args.key?(:state)
  @update_policy = args[:update_policy] if args.key?(:update_policy)
  @update_time = args[:update_time] if args.key?(:update_time)
end