Class: Google::Apis::ComputeAlpha::HealthSource

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

Overview

Represents a health source. A health source resource specifies the source resources and the health aggregation policy applied to the source resources to determine the aggregated health status.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ HealthSource

Returns a new instance of HealthSource.



18880
18881
18882
# File 'lib/google/apis/compute_alpha/classes.rb', line 18880

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

Instance Attribute Details

#creation_timestampString

[Output Only] Creation timestamp in RFC3339 text format. Corresponds to the JSON property creationTimestamp

Returns:

  • (String)


18798
18799
18800
# File 'lib/google/apis/compute_alpha/classes.rb', line 18798

def creation_timestamp
  @creation_timestamp
end

#descriptionString

An optional description of this resource. Provide this property when you create the resource. Corresponds to the JSON property description

Returns:

  • (String)


18804
18805
18806
# File 'lib/google/apis/compute_alpha/classes.rb', line 18804

def description
  @description
end

#fingerprintString

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthSource. An up-to-date fingerprint must be provided in order to patch the HealthSource; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthSource. Corresponds to the JSON property fingerprint NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


18815
18816
18817
# File 'lib/google/apis/compute_alpha/classes.rb', line 18815

def fingerprint
  @fingerprint
end

#health_aggregation_policyString

URL to the HealthAggregationPolicy resource. Must be set. Must be regional and in the same region as the HealthSource. Can be mutated. Corresponds to the JSON property healthAggregationPolicy

Returns:

  • (String)


18821
18822
18823
# File 'lib/google/apis/compute_alpha/classes.rb', line 18821

def health_aggregation_policy
  @health_aggregation_policy
end

#idFixnum

[Output Only] A unique identifier for this resource type. The server generates this identifier. Corresponds to the JSON property id

Returns:

  • (Fixnum)


18827
18828
18829
# File 'lib/google/apis/compute_alpha/classes.rb', line 18827

def id
  @id
end

#kindString

[Output Only] Type of the resource. Always compute#healthSource for health sources. Corresponds to the JSON property kind

Returns:

  • (String)


18833
18834
18835
# File 'lib/google/apis/compute_alpha/classes.rb', line 18833

def kind
  @kind
end

#nameString

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a- z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Corresponds to the JSON property name

Returns:

  • (String)


18843
18844
18845
# File 'lib/google/apis/compute_alpha/classes.rb', line 18843

def name
  @name
end

#regionString

[Output Only] URL of the region where the health source resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. Corresponds to the JSON property region

Returns:

  • (String)


18850
18851
18852
# File 'lib/google/apis/compute_alpha/classes.rb', line 18850

def region
  @region
end

[Output Only] Server-defined URL for the resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


18855
18856
18857
# File 'lib/google/apis/compute_alpha/classes.rb', line 18855

def self_link
  @self_link
end

[Output Only] Server-defined URL with id for the resource. Corresponds to the JSON property selfLinkWithId

Returns:

  • (String)


18860
18861
18862
# File 'lib/google/apis/compute_alpha/classes.rb', line 18860

def self_link_with_id
  @self_link_with_id
end

#source_typeString

Specifies the type of the HealthSource. The only allowed value is BACKEND_SERVICE. Must be specified when the HealthSource is created, and cannot be mutated. Corresponds to the JSON property sourceType

Returns:

  • (String)


18867
18868
18869
# File 'lib/google/apis/compute_alpha/classes.rb', line 18867

def source_type
  @source_type
end

#sourcesArray<String>

URLs to the source resources. Must be size 1. Must be a BackendService if the sourceType is BACKEND_SERVICE. The BackendService must have load balancing scheme INTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). The BackendService may use only IGs, MIGs, or NEGs of type GCE_VM_IP or GCE_VM_IP_PORT. The BackendService may not use haPolicy. Can be mutated. Corresponds to the JSON property sources

Returns:

  • (Array<String>)


18878
18879
18880
# File 'lib/google/apis/compute_alpha/classes.rb', line 18878

def sources
  @sources
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
# File 'lib/google/apis/compute_alpha/classes.rb', line 18885

def update!(**args)
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
  @description = args[:description] if args.key?(:description)
  @fingerprint = args[:fingerprint] if args.key?(:fingerprint)
  @health_aggregation_policy = args[:health_aggregation_policy] if args.key?(:health_aggregation_policy)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @region = args[:region] if args.key?(:region)
  @self_link = args[:self_link] if args.key?(:self_link)
  @self_link_with_id = args[:self_link_with_id] if args.key?(:self_link_with_id)
  @source_type = args[:source_type] if args.key?(:source_type)
  @sources = args[:sources] if args.key?(:sources)
end