Class: Google::Apis::ComputeV1::ServiceAttachment

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

Overview

Represents a ServiceAttachment resource. A service attachment represents a service that a producer has exposed. It encapsulates the load balancer which fronts the service runs and a list of NAT IP ranges that the producers uses to represent the consumers connecting to the service.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ServiceAttachment

Returns a new instance of ServiceAttachment.



38511
38512
38513
# File 'lib/google/apis/compute_v1/classes.rb', line 38511

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

Instance Attribute Details

#connected_endpointsArray<Google::Apis::ComputeV1::ServiceAttachmentConnectedEndpoint>

[Output Only] An array of connections for all the consumers connected to this service attachment. Corresponds to the JSON property connectedEndpoints



38375
38376
38377
# File 'lib/google/apis/compute_v1/classes.rb', line 38375

def connected_endpoints
  @connected_endpoints
end

#connection_preferenceString

The connection preference of service attachment. The value can be set to ACCEPT_AUTOMATIC. An ACCEPT_AUTOMATIC service attachment is one that always accepts the connection from consumer forwarding rules. Corresponds to the JSON property connectionPreference

Returns:

  • (String)


38382
38383
38384
# File 'lib/google/apis/compute_v1/classes.rb', line 38382

def connection_preference
  @connection_preference
end

#consumer_accept_listsArray<Google::Apis::ComputeV1::ServiceAttachmentConsumerProjectLimit>

Specifies which consumer projects or networks are allowed to connect to the service attachment. Each project or network has a connection limit. A given service attachment can manage connections at either the project or network level. Therefore, both the accept and reject lists for a given service attachment must contain either only projects or only networks. Corresponds to the JSON property consumerAcceptLists



38391
38392
38393
# File 'lib/google/apis/compute_v1/classes.rb', line 38391

def consumer_accept_lists
  @consumer_accept_lists
end

#consumer_reject_listsArray<String>

Specifies a list of projects or networks that are not allowed to connect to this service attachment. The project can be specified using its project ID or project number and the network can be specified using its URL. A given service attachment can manage connections at either the project or network level. Therefore, both the reject and accept lists for a given service attachment must contain either only projects or only networks. Corresponds to the JSON property consumerRejectLists

Returns:

  • (Array<String>)


38401
38402
38403
# File 'lib/google/apis/compute_v1/classes.rb', line 38401

def consumer_reject_lists
  @consumer_reject_lists
end

#creation_timestampString

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

Returns:

  • (String)


38406
38407
38408
# File 'lib/google/apis/compute_v1/classes.rb', line 38406

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)


38412
38413
38414
# File 'lib/google/apis/compute_v1/classes.rb', line 38412

def description
  @description
end

#domain_namesArray<String>

If specified, the domain name will be used during the integration between the PSC connected endpoints and the Cloud DNS. For example, this is a valid domain name: "p.mycompany.com.". Current max number of domain names supported is 1. Corresponds to the JSON property domainNames

Returns:

  • (Array<String>)


38419
38420
38421
# File 'lib/google/apis/compute_v1/classes.rb', line 38419

def domain_names
  @domain_names
end

#enable_proxy_protocolBoolean Also known as: enable_proxy_protocol?

If true, enable the proxy protocol which is for supplying client TCP/IP address data in TCP connections that traverse proxies on their way to destination servers. Corresponds to the JSON property enableProxyProtocol

Returns:

  • (Boolean)


38426
38427
38428
# File 'lib/google/apis/compute_v1/classes.rb', line 38426

def enable_proxy_protocol
  @enable_proxy_protocol
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 ServiceAttachment. An up-to-date fingerprint must be provided in order to patch/update the ServiceAttachment; otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the ServiceAttachment. Corresponds to the JSON property fingerprint NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


38438
38439
38440
# File 'lib/google/apis/compute_v1/classes.rb', line 38438

def fingerprint
  @fingerprint
end

#idFixnum

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

Returns:

  • (Fixnum)


38444
38445
38446
# File 'lib/google/apis/compute_v1/classes.rb', line 38444

def id
  @id
end

#kindString

[Output Only] Type of the resource. Always compute#serviceAttachment for service attachments. Corresponds to the JSON property kind

Returns:

  • (String)


38450
38451
38452
# File 'lib/google/apis/compute_v1/classes.rb', line 38450

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)


38460
38461
38462
# File 'lib/google/apis/compute_v1/classes.rb', line 38460

def name
  @name
end

#nat_subnetsArray<String>

An array of URLs where each entry is the URL of a subnet provided by the service producer to use for NAT in this service attachment. Corresponds to the JSON property natSubnets

Returns:

  • (Array<String>)


38466
38467
38468
# File 'lib/google/apis/compute_v1/classes.rb', line 38466

def nat_subnets
  @nat_subnets
end

#producer_forwarding_ruleString

The URL of a forwarding rule with loadBalancingScheme INTERNAL* that is serving the endpoint identified by this service attachment. Corresponds to the JSON property producerForwardingRule

Returns:

  • (String)


38472
38473
38474
# File 'lib/google/apis/compute_v1/classes.rb', line 38472

def producer_forwarding_rule
  @producer_forwarding_rule
end

#psc_service_attachment_idGoogle::Apis::ComputeV1::Uint128

[Output Only] An 128-bit global unique ID of the PSC service attachment. Corresponds to the JSON property pscServiceAttachmentId



38477
38478
38479
# File 'lib/google/apis/compute_v1/classes.rb', line 38477

def psc_service_attachment_id
  @psc_service_attachment_id
end

#reconcile_connectionsBoolean Also known as: reconcile_connections?

This flag determines whether a consumer accept/reject list change can reconcile the statuses of existing ACCEPTED or REJECTED PSC endpoints. - If false, connection policy update will only affect existing PENDING PSC endpoints. Existing ACCEPTED/REJECTED endpoints will remain untouched regardless how the connection policy is modified . - If true, update will affect both PENDING and ACCEPTED/REJECTED PSC endpoints. For example, an ACCEPTED PSC endpoint will be moved to REJECTED if its project is added to the reject list. For newly created service attachment, this boolean defaults to false. Corresponds to the JSON property reconcileConnections

Returns:

  • (Boolean)


38490
38491
38492
# File 'lib/google/apis/compute_v1/classes.rb', line 38490

def reconcile_connections
  @reconcile_connections
end

#regionString

[Output Only] URL of the region where the service attachment resides. This field applies only to the region 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)


38498
38499
38500
# File 'lib/google/apis/compute_v1/classes.rb', line 38498

def region
  @region
end

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

Returns:

  • (String)


38503
38504
38505
# File 'lib/google/apis/compute_v1/classes.rb', line 38503

def self_link
  @self_link
end

#target_serviceString

The URL of a service serving the endpoint identified by this service attachment. Corresponds to the JSON property targetService

Returns:

  • (String)


38509
38510
38511
# File 'lib/google/apis/compute_v1/classes.rb', line 38509

def target_service
  @target_service
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



38516
38517
38518
38519
38520
38521
38522
38523
38524
38525
38526
38527
38528
38529
38530
38531
38532
38533
38534
38535
38536
# File 'lib/google/apis/compute_v1/classes.rb', line 38516

def update!(**args)
  @connected_endpoints = args[:connected_endpoints] if args.key?(:connected_endpoints)
  @connection_preference = args[:connection_preference] if args.key?(:connection_preference)
  @consumer_accept_lists = args[:consumer_accept_lists] if args.key?(:consumer_accept_lists)
  @consumer_reject_lists = args[:consumer_reject_lists] if args.key?(:consumer_reject_lists)
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
  @description = args[:description] if args.key?(:description)
  @domain_names = args[:domain_names] if args.key?(:domain_names)
  @enable_proxy_protocol = args[:enable_proxy_protocol] if args.key?(:enable_proxy_protocol)
  @fingerprint = args[:fingerprint] if args.key?(:fingerprint)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @nat_subnets = args[:nat_subnets] if args.key?(:nat_subnets)
  @producer_forwarding_rule = args[:producer_forwarding_rule] if args.key?(:producer_forwarding_rule)
  @psc_service_attachment_id = args[:psc_service_attachment_id] if args.key?(:psc_service_attachment_id)
  @reconcile_connections = args[:reconcile_connections] if args.key?(:reconcile_connections)
  @region = args[:region] if args.key?(:region)
  @self_link = args[:self_link] if args.key?(:self_link)
  @target_service = args[:target_service] if args.key?(:target_service)
end