Class: Google::Apis::NetworkservicesV1beta1::GrpcRouteFaultInjectionPolicyAbort

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

Overview

Specification of how client requests are aborted as part of fault injection before being sent to a destination.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GrpcRouteFaultInjectionPolicyAbort

Returns a new instance of GrpcRouteFaultInjectionPolicyAbort.



1200
1201
1202
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1200

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

Instance Attribute Details

#http_statusFixnum

The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. Corresponds to the JSON property httpStatus

Returns:

  • (Fixnum)


1192
1193
1194
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1192

def http_status
  @http_status
end

#percentageFixnum

The percentage of traffic which will be aborted. The value must be between [0, 100] Corresponds to the JSON property percentage

Returns:

  • (Fixnum)


1198
1199
1200
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1198

def percentage
  @percentage
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1205
1206
1207
1208
# File 'lib/google/apis/networkservices_v1beta1/classes.rb', line 1205

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