Class: Google::Apis::ConnectorsV1::Instance

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

Instance represents the interface for SLM services to actuate the state of control plane resources. Example Instance in JSON, where consumer-project- number=123456, producer-project-id=cloud-sql: json Instance: ` "name": " projects/123456/locations/us-east1/instances/prod-instance", "create_time": ` " seconds": 1526406431, `, "labels": ` "env": "prod", "foo": "bar" `, "state": READY, "software_versions": ` "software_update": "cloud-sql-09-28-2018", `, " maintenance_policy_names": ` "UpdatePolicy": "projects/123456/locations/us- east1/maintenancePolicies/prod-update-policy", ` "tenant_project_id": "cloud- sql-test-tenant", "producer_metadata": ` "cloud-sql-tier": "basic", "cloud-sql- instance-size": "1G", `, "provisioned_resources": [ ` "resource-type": " compute-instance", "resource-url": "https://www.googleapis.com/compute/v1/ projects/cloud-sql/zones/us-east1-b/instances/vm-1", ` ], " maintenance_schedules": ` "csa_rollout": ` "start_time": ` "seconds": 1526406431, `, "end_time": ` "seconds": 1535406431, `, `, "ncsa_rollout": ` " start_time": ` "seconds": 1526406431, `, "end_time": ` "seconds": 1535406431, ` , ` `, "consumer_defined_name": "my-sql-instance1", ` LINT.IfChange

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Instance

Returns a new instance of Instance.



3233
3234
3235
# File 'lib/google/apis/connectors_v1/classes.rb', line 3233

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

Instance Attribute Details

#consumer_defined_nameString

consumer_defined_name is the name of the instance set by the service consumers. Generally this is different from the name field which reperesents the system-assigned id of the instance which the service consumers do not recognize. This is a required field for tenants onboarding to Maintenance Window notifications (go/slm-rollout-maintenance-policies#prerequisites). Corresponds to the JSON property consumerDefinedName

Returns:

  • (String)


3122
3123
3124
# File 'lib/google/apis/connectors_v1/classes.rb', line 3122

def consumer_defined_name
  @consumer_defined_name
end

#create_timeString

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

Returns:

  • (String)


3127
3128
3129
# File 'lib/google/apis/connectors_v1/classes.rb', line 3127

def create_time
  @create_time
end

#instance_typeString

Optional. The instance_type of this instance of format: projects/ project_number/locations/location_id/instanceTypes/instance_type_id. Instance Type represents a high-level tier or SKU of the service that this instance belong to. When enabled(eg: Maintenance Rollout), Rollout uses ' instance_type' along with 'software_versions' to determine whether instance needs an update or not. Corresponds to the JSON property instanceType

Returns:

  • (String)


3137
3138
3139
# File 'lib/google/apis/connectors_v1/classes.rb', line 3137

def instance_type
  @instance_type
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>)


3144
3145
3146
# File 'lib/google/apis/connectors_v1/classes.rb', line 3144

def labels
  @labels
end

#maintenance_policy_namesHash<String,String>

Optional. The MaintenancePolicies that have been attached to the instance. The key must be of the type name of the oneof policy name defined in MaintenancePolicy, and the referenced policy must define the same policy type. For details, please refer to go/mr-user-guide. Should not be set if maintenance_settings.maintenance_policies is set. Corresponds to the JSON property maintenancePolicyNames

Returns:

  • (Hash<String,String>)


3153
3154
3155
# File 'lib/google/apis/connectors_v1/classes.rb', line 3153

def maintenance_policy_names
  @maintenance_policy_names
end

#maintenance_schedulesHash<String,Google::Apis::ConnectorsV1::MaintenanceSchedule>

The MaintenanceSchedule contains the scheduling information of published maintenance schedule with same key as software_versions. Corresponds to the JSON property maintenanceSchedules



3159
3160
3161
# File 'lib/google/apis/connectors_v1/classes.rb', line 3159

def maintenance_schedules
  @maintenance_schedules
end

#maintenance_settingsGoogle::Apis::ConnectorsV1::MaintenanceSettings

Maintenance settings associated with instance. Allows service producers and end users to assign settings that controls maintenance on this instance. Corresponds to the JSON property maintenanceSettings



3165
3166
3167
# File 'lib/google/apis/connectors_v1/classes.rb', line 3165

def maintenance_settings
  @maintenance_settings
end

#nameString

Unique name of the resource. It uses the form: projects/project_number/ locations/location_id/instances/instance_id`Note: This name is passed, stored and logged across the rollout system. So use of consumer project_id or any other consumer PII in the name is strongly discouraged for wipeout (go/ wipeout) compliance. See go/elysium/project_ids#storage-guidance for more details. Corresponds to the JSON propertyname`

Returns:

  • (String)


3175
3176
3177
# File 'lib/google/apis/connectors_v1/classes.rb', line 3175

def name
  @name
end

#notification_parametersHash<String,Google::Apis::ConnectorsV1::NotificationParameter>

Optional. notification_parameter are information that service producers may like to include that is not relevant to Rollout. This parameter will only be passed to Gamma and Cloud Logging for notification/logging purpose. Corresponds to the JSON property notificationParameters



3182
3183
3184
# File 'lib/google/apis/connectors_v1/classes.rb', line 3182

def notification_parameters
  @notification_parameters
end

#producer_metadataHash<String,String>

Output only. Custom string attributes used primarily to expose producer- specific information in monitoring dashboards. See go/get-instance-metadata. Corresponds to the JSON property producerMetadata

Returns:

  • (Hash<String,String>)


3188
3189
3190
# File 'lib/google/apis/connectors_v1/classes.rb', line 3188

def 
  @producer_metadata
end

#provisioned_resourcesArray<Google::Apis::ConnectorsV1::ProvisionedResource>

Output only. The list of data plane resources provisioned for this instance, e. g. compute VMs. See go/get-instance-metadata. Corresponds to the JSON property provisionedResources



3194
3195
3196
# File 'lib/google/apis/connectors_v1/classes.rb', line 3194

def provisioned_resources
  @provisioned_resources
end

#slm_instance_templateString

Link to the SLM instance template. Only populated when updating SLM instances via SSA's Actuation service adaptor. Service producers with custom control plane (e.g. Cloud SQL) doesn't need to populate this field. Instead they should use software_versions. Corresponds to the JSON property slmInstanceTemplate

Returns:

  • (String)


3202
3203
3204
# File 'lib/google/apis/connectors_v1/classes.rb', line 3202

def slm_instance_template
  @slm_instance_template
end

#slo_metadataGoogle::Apis::ConnectorsV1::SloMetadata

SloMetadata contains resources required for proper SLO classification of the instance. Corresponds to the JSON property sloMetadata



3208
3209
3210
# File 'lib/google/apis/connectors_v1/classes.rb', line 3208

def 
  @slo_metadata
end

#software_versionsHash<String,String>

Software versions that are used to deploy this instance. This can be mutated by rollout services. Corresponds to the JSON property softwareVersions

Returns:

  • (Hash<String,String>)


3214
3215
3216
# File 'lib/google/apis/connectors_v1/classes.rb', line 3214

def software_versions
  @software_versions
end

#stateString

Output only. Current lifecycle state of the resource (e.g. if it's being created or ready to use). Corresponds to the JSON property state

Returns:

  • (String)


3220
3221
3222
# File 'lib/google/apis/connectors_v1/classes.rb', line 3220

def state
  @state
end

#tenant_project_idString

Output only. ID of the associated GCP tenant project. See go/get-instance- metadata. Corresponds to the JSON property tenantProjectId

Returns:

  • (String)


3226
3227
3228
# File 'lib/google/apis/connectors_v1/classes.rb', line 3226

def tenant_project_id
  @tenant_project_id
end

#update_timeString

Output only. Timestamp when the resource was last modified. Corresponds to the JSON property updateTime

Returns:

  • (String)


3231
3232
3233
# File 'lib/google/apis/connectors_v1/classes.rb', line 3231

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
# File 'lib/google/apis/connectors_v1/classes.rb', line 3238

def update!(**args)
  @consumer_defined_name = args[:consumer_defined_name] if args.key?(:consumer_defined_name)
  @create_time = args[:create_time] if args.key?(:create_time)
  @instance_type = args[:instance_type] if args.key?(:instance_type)
  @labels = args[:labels] if args.key?(:labels)
  @maintenance_policy_names = args[:maintenance_policy_names] if args.key?(:maintenance_policy_names)
  @maintenance_schedules = args[:maintenance_schedules] if args.key?(:maintenance_schedules)
  @maintenance_settings = args[:maintenance_settings] if args.key?(:maintenance_settings)
  @name = args[:name] if args.key?(:name)
  @notification_parameters = args[:notification_parameters] if args.key?(:notification_parameters)
  @producer_metadata = args[:producer_metadata] if args.key?(:producer_metadata)
  @provisioned_resources = args[:provisioned_resources] if args.key?(:provisioned_resources)
  @slm_instance_template = args[:slm_instance_template] if args.key?(:slm_instance_template)
  @slo_metadata = args[:slo_metadata] if args.key?(:slo_metadata)
  @software_versions = args[:software_versions] if args.key?(:software_versions)
  @state = args[:state] if args.key?(:state)
  @tenant_project_id = args[:tenant_project_id] if args.key?(:tenant_project_id)
  @update_time = args[:update_time] if args.key?(:update_time)
end