Class: Google::Apis::NetworkservicesV1::EndpointPolicy

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

Overview

EndpointPolicy is a resource that helps apply desired configuration on the endpoints that match specific criteria. For example, this resource can be used to apply "authentication config" an all endpoints that serve on port 8080.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EndpointPolicy

Returns a new instance of EndpointPolicy.



363
364
365
# File 'lib/google/apis/networkservices_v1/classes.rb', line 363

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

Instance Attribute Details

#authorization_policyString

Optional. This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints. Refer to Authorization. If this field is not specified, authorization is disabled(no authz checks) for this endpoint. Corresponds to the JSON property authorizationPolicy

Returns:

  • (String)


298
299
300
# File 'lib/google/apis/networkservices_v1/classes.rb', line 298

def authorization_policy
  @authorization_policy
end

#client_tls_policyString

Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints. More specifically, it is applied to the outgoing traffic from the proxy to the endpoint. This is typically used for sidecar model where the proxy identifies itself as endpoint to the control plane, with the connection between sidecar and endpoint requiring authentication. If this field is not set, authentication is disabled(open). Applicable only when EndpointPolicyType is SIDECAR_PROXY. Corresponds to the JSON property clientTlsPolicy

Returns:

  • (String)


310
311
312
# File 'lib/google/apis/networkservices_v1/classes.rb', line 310

def client_tls_policy
  @client_tls_policy
end

#create_timeString

Output only. The timestamp when the resource was created. Corresponds to the JSON property createTime

Returns:

  • (String)


315
316
317
# File 'lib/google/apis/networkservices_v1/classes.rb', line 315

def create_time
  @create_time
end

#descriptionString

Optional. A free-text description of the resource. Max length 1024 characters. Corresponds to the JSON property description

Returns:

  • (String)


320
321
322
# File 'lib/google/apis/networkservices_v1/classes.rb', line 320

def description
  @description
end

#endpoint_matcherGoogle::Apis::NetworkservicesV1::EndpointMatcher

A definition of a matcher that selects endpoints to which the policies should be applied. Corresponds to the JSON property endpointMatcher



326
327
328
# File 'lib/google/apis/networkservices_v1/classes.rb', line 326

def endpoint_matcher
  @endpoint_matcher
end

#labelsHash<String,String>

Optional. Set of label tags associated with the EndpointPolicy resource. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


331
332
333
# File 'lib/google/apis/networkservices_v1/classes.rb', line 331

def labels
  @labels
end

#nameString

Required. Name of the EndpointPolicy resource. It matches pattern projects/ project/locations/global/endpointPolicies/endpoint_policy`. Corresponds to the JSON propertyname`

Returns:

  • (String)


337
338
339
# File 'lib/google/apis/networkservices_v1/classes.rb', line 337

def name
  @name
end

#server_tls_policyString

Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends. If this field is not set, authentication is disabled(open) for this endpoint. Corresponds to the JSON property serverTlsPolicy

Returns:

  • (String)


345
346
347
# File 'lib/google/apis/networkservices_v1/classes.rb', line 345

def server_tls_policy
  @server_tls_policy
end

#traffic_port_selectorGoogle::Apis::NetworkservicesV1::TrafficPortSelector

Specification of a port-based selector. Corresponds to the JSON property trafficPortSelector



350
351
352
# File 'lib/google/apis/networkservices_v1/classes.rb', line 350

def traffic_port_selector
  @traffic_port_selector
end

#typeString

Required. The type of endpoint policy. This is primarily used to validate the configuration. Corresponds to the JSON property type

Returns:

  • (String)


356
357
358
# File 'lib/google/apis/networkservices_v1/classes.rb', line 356

def type
  @type
end

#update_timeString

Output only. The timestamp when the resource was updated. Corresponds to the JSON property updateTime

Returns:

  • (String)


361
362
363
# File 'lib/google/apis/networkservices_v1/classes.rb', line 361

def update_time
  @update_time
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/google/apis/networkservices_v1/classes.rb', line 368

def update!(**args)
  @authorization_policy = args[:authorization_policy] if args.key?(:authorization_policy)
  @client_tls_policy = args[:client_tls_policy] if args.key?(:client_tls_policy)
  @create_time = args[:create_time] if args.key?(:create_time)
  @description = args[:description] if args.key?(:description)
  @endpoint_matcher = args[:endpoint_matcher] if args.key?(:endpoint_matcher)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @server_tls_policy = args[:server_tls_policy] if args.key?(:server_tls_policy)
  @traffic_port_selector = args[:traffic_port_selector] if args.key?(:traffic_port_selector)
  @type = args[:type] if args.key?(:type)
  @update_time = args[:update_time] if args.key?(:update_time)
end