Class: Google::Apis::ContainerV1::SetNetworkPolicyRequest

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

Overview

SetNetworkPolicyRequest enables/disables network policy for a cluster.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SetNetworkPolicyRequest

Returns a new instance of SetNetworkPolicyRequest.



5172
5173
5174
# File 'lib/google/apis/container_v1/classes.rb', line 5172

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

Instance Attribute Details

#cluster_idString

Deprecated. The name of the cluster. This field has been deprecated and replaced by the name field. Corresponds to the JSON property clusterId

Returns:

  • (String)


5144
5145
5146
# File 'lib/google/apis/container_v1/classes.rb', line 5144

def cluster_id
  @cluster_id
end

#nameString

The name (project, location, cluster name) of the cluster to set networking policy. Specified in the format projects/*/locations/*/clusters/*. Corresponds to the JSON property name

Returns:

  • (String)


5150
5151
5152
# File 'lib/google/apis/container_v1/classes.rb', line 5150

def name
  @name
end

#network_policyGoogle::Apis::ContainerV1::NetworkPolicy

Configuration options for the NetworkPolicy feature. https://kubernetes.io/ docs/concepts/services-networking/networkpolicies/ Corresponds to the JSON property networkPolicy



5156
5157
5158
# File 'lib/google/apis/container_v1/classes.rb', line 5156

def network_policy
  @network_policy
end

#project_idString

Deprecated. The Google Developers Console project ID or project number. This field has been deprecated and replaced by the name field. Corresponds to the JSON property projectId

Returns:

  • (String)


5163
5164
5165
# File 'lib/google/apis/container_v1/classes.rb', line 5163

def project_id
  @project_id
end

#zoneString

Deprecated. The name of the Google Compute Engine zone in which the cluster resides. This field has been deprecated and replaced by the name field. Corresponds to the JSON property zone

Returns:

  • (String)


5170
5171
5172
# File 'lib/google/apis/container_v1/classes.rb', line 5170

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5177
5178
5179
5180
5181
5182
5183
# File 'lib/google/apis/container_v1/classes.rb', line 5177

def update!(**args)
  @cluster_id = args[:cluster_id] if args.key?(:cluster_id)
  @name = args[:name] if args.key?(:name)
  @network_policy = args[:network_policy] if args.key?(:network_policy)
  @project_id = args[:project_id] if args.key?(:project_id)
  @zone = args[:zone] if args.key?(:zone)
end