Class: Google::Apis::ComputeAlpha::NetworkPeering

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

A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ NetworkPeering

Returns a new instance of NetworkPeering.



29177
29178
29179
# File 'lib/google/apis/compute_alpha/classes.rb', line 29177

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

Instance Attribute Details

Whether Cloud Routers in this network can automatically advertise subnets from the peer network. Corresponds to the JSON property advertisePeerSubnetsViaRouters

Returns:

  • (Boolean)


29085
29086
29087
# File 'lib/google/apis/compute_alpha/classes.rb', line 29085

def advertise_peer_subnets_via_routers
  @advertise_peer_subnets_via_routers
end

#auto_create_routesBoolean Also known as: auto_create_routes?

This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. Corresponds to the JSON property autoCreateRoutes

Returns:

  • (Boolean)


29095
29096
29097
# File 'lib/google/apis/compute_alpha/classes.rb', line 29095

def auto_create_routes
  @auto_create_routes
end

#exchange_subnet_routesBoolean Also known as: exchange_subnet_routes?

Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE. Corresponds to the JSON property exchangeSubnetRoutes

Returns:

  • (Boolean)


29104
29105
29106
# File 'lib/google/apis/compute_alpha/classes.rb', line 29104

def exchange_subnet_routes
  @exchange_subnet_routes
end

#export_custom_routesBoolean Also known as: export_custom_routes?

Whether to export the custom routes to peer network. The default value is false. Corresponds to the JSON property exportCustomRoutes

Returns:

  • (Boolean)


29111
29112
29113
# File 'lib/google/apis/compute_alpha/classes.rb', line 29111

def export_custom_routes
  @export_custom_routes
end

#export_subnet_routes_with_public_ipBoolean Also known as: export_subnet_routes_with_public_ip?

Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field. Corresponds to the JSON property exportSubnetRoutesWithPublicIp

Returns:

  • (Boolean)


29119
29120
29121
# File 'lib/google/apis/compute_alpha/classes.rb', line 29119

def export_subnet_routes_with_public_ip
  @export_subnet_routes_with_public_ip
end

#import_custom_routesBoolean Also known as: import_custom_routes?

Whether to import the custom routes from peer network. The default value is false. Corresponds to the JSON property importCustomRoutes

Returns:

  • (Boolean)


29126
29127
29128
# File 'lib/google/apis/compute_alpha/classes.rb', line 29126

def import_custom_routes
  @import_custom_routes
end

#import_subnet_routes_with_public_ipBoolean Also known as: import_subnet_routes_with_public_ip?

Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field. Corresponds to the JSON property importSubnetRoutesWithPublicIp

Returns:

  • (Boolean)


29134
29135
29136
# File 'lib/google/apis/compute_alpha/classes.rb', line 29134

def import_subnet_routes_with_public_ip
  @import_subnet_routes_with_public_ip
end

#nameString

Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression [a-z]([-a-z0-9]*[a-z0-9])?. The first character must be a lowercase letter, and all the 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)


29145
29146
29147
# File 'lib/google/apis/compute_alpha/classes.rb', line 29145

def name
  @name
end

#networkString

The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network. Corresponds to the JSON property network

Returns:

  • (String)


29153
29154
29155
# File 'lib/google/apis/compute_alpha/classes.rb', line 29153

def network
  @network
end

#peer_mtuFixnum

Maximum Transmission Unit in bytes. Corresponds to the JSON property peerMtu

Returns:

  • (Fixnum)


29158
29159
29160
# File 'lib/google/apis/compute_alpha/classes.rb', line 29158

def peer_mtu
  @peer_mtu
end

#stack_typeString

Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Corresponds to the JSON property stackType

Returns:

  • (String)


29164
29165
29166
# File 'lib/google/apis/compute_alpha/classes.rb', line 29164

def stack_type
  @stack_type
end

#stateString

[Output Only] State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there's a matching configuration in the peer network. Corresponds to the JSON property state

Returns:

  • (String)


29170
29171
29172
# File 'lib/google/apis/compute_alpha/classes.rb', line 29170

def state
  @state
end

#state_detailsString

[Output Only] Details about the current state of the peering. Corresponds to the JSON property stateDetails

Returns:

  • (String)


29175
29176
29177
# File 'lib/google/apis/compute_alpha/classes.rb', line 29175

def state_details
  @state_details
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
# File 'lib/google/apis/compute_alpha/classes.rb', line 29182

def update!(**args)
  @advertise_peer_subnets_via_routers = args[:advertise_peer_subnets_via_routers] if args.key?(:advertise_peer_subnets_via_routers)
  @auto_create_routes = args[:auto_create_routes] if args.key?(:auto_create_routes)
  @exchange_subnet_routes = args[:exchange_subnet_routes] if args.key?(:exchange_subnet_routes)
  @export_custom_routes = args[:export_custom_routes] if args.key?(:export_custom_routes)
  @export_subnet_routes_with_public_ip = args[:export_subnet_routes_with_public_ip] if args.key?(:export_subnet_routes_with_public_ip)
  @import_custom_routes = args[:import_custom_routes] if args.key?(:import_custom_routes)
  @import_subnet_routes_with_public_ip = args[:import_subnet_routes_with_public_ip] if args.key?(:import_subnet_routes_with_public_ip)
  @name = args[:name] if args.key?(:name)
  @network = args[:network] if args.key?(:network)
  @peer_mtu = args[:peer_mtu] if args.key?(:peer_mtu)
  @stack_type = args[:stack_type] if args.key?(:stack_type)
  @state = args[:state] if args.key?(:state)
  @state_details = args[:state_details] if args.key?(:state_details)
end