Class: Google::Apis::ContainerV1::MasterAuthorizedNetworksConfig

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

Overview

Configuration options for the master authorized networks feature. Enabled master authorized networks will disallow all external traffic to access Kubernetes master through HTTPS except traffic from the given CIDR blocks, Google Compute Engine Public IPs and Google Prod IPs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ MasterAuthorizedNetworksConfig

Returns a new instance of MasterAuthorizedNetworksConfig



1234
1235
1236
# File 'generated/google/apis/container_v1/classes.rb', line 1234

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

Instance Attribute Details

#cidr_blocksArray<Google::Apis::ContainerV1::CidrBlock>

cidr_blocks define up to 10 external networks that could access Kubernetes master through HTTPS. Corresponds to the JSON property cidrBlocks



1226
1227
1228
# File 'generated/google/apis/container_v1/classes.rb', line 1226

def cidr_blocks
  @cidr_blocks
end

#enabledBoolean Also known as: enabled?

Whether or not master authorized networks is enabled. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


1231
1232
1233
# File 'generated/google/apis/container_v1/classes.rb', line 1231

def enabled
  @enabled
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1239
1240
1241
1242
# File 'generated/google/apis/container_v1/classes.rb', line 1239

def update!(**args)
  @cidr_blocks = args[:cidr_blocks] if args.key?(:cidr_blocks)
  @enabled = args[:enabled] if args.key?(:enabled)
end