VirtualServiceTrafficRuleTarget¶
-
class
oci.service_mesh.models.
VirtualServiceTrafficRuleTarget
(**kwargs)¶ Bases:
oci.service_mesh.models.traffic_rule_target.TrafficRuleTarget
Traffic router target for an ingress gateway.
Attributes
TYPE_VIRTUAL_DEPLOYMENT
str(object=’’) -> str TYPE_VIRTUAL_SERVICE
str(object=’’) -> str port
Gets the port of this VirtualServiceTrafficRuleTarget. type
[Required] Gets the type of this TrafficRuleTarget. virtual_service_id
Gets the virtual_service_id of this VirtualServiceTrafficRuleTarget. weight
Gets the weight of this VirtualServiceTrafficRuleTarget. Methods
__init__
(**kwargs)Initializes a new VirtualServiceTrafficRuleTarget object with values from keyword arguments. get_subtype
(object_dictionary)Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype. -
TYPE_VIRTUAL_DEPLOYMENT
= 'VIRTUAL_DEPLOYMENT'¶
-
TYPE_VIRTUAL_SERVICE
= 'VIRTUAL_SERVICE'¶
-
__init__
(**kwargs)¶ Initializes a new VirtualServiceTrafficRuleTarget object with values from keyword arguments. The default value of the
type
attribute of this class isVIRTUAL_SERVICE
and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):Parameters: - type (str) – The value to assign to the type property of this VirtualServiceTrafficRuleTarget. Allowed values for this property are: “VIRTUAL_DEPLOYMENT”, “VIRTUAL_SERVICE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- virtual_service_id (str) – The value to assign to the virtual_service_id property of this VirtualServiceTrafficRuleTarget.
- port (int) – The value to assign to the port property of this VirtualServiceTrafficRuleTarget.
- weight (int) – The value to assign to the weight property of this VirtualServiceTrafficRuleTarget.
-
static
get_subtype
(object_dictionary)¶ Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
-
port
¶ Gets the port of this VirtualServiceTrafficRuleTarget. The port on the virtual service to target. Mandatory if the virtual deployments are listening on multiple ports.
Returns: The port of this VirtualServiceTrafficRuleTarget. Return type: int
-
type
¶ [Required] Gets the type of this TrafficRuleTarget. Type of the traffic target.
Allowed values for this property are: “VIRTUAL_DEPLOYMENT”, “VIRTUAL_SERVICE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
Returns: The type of this TrafficRuleTarget. Return type: str
-
virtual_service_id
¶ Gets the virtual_service_id of this VirtualServiceTrafficRuleTarget. The OCID of the virtual service where the request will be routed.
Returns: The virtual_service_id of this VirtualServiceTrafficRuleTarget. Return type: str
-
weight
¶ Gets the weight of this VirtualServiceTrafficRuleTarget. Weight of traffic target.
Returns: The weight of this VirtualServiceTrafficRuleTarget. Return type: int
-