LoadBalancer¶
- class oci.load_balancer.models.LoadBalancer(**kwargs)¶
Bases:
objectThe properties that define a load balancer. For more information, see Managing a Load Balancer.
To use any of the API operations, you must be authorized in an IAM policy. If you’re not authorized, talk to an administrator. If you’re an administrator who needs to write policies to give users access, see Getting Started with Policies.
For information about endpoints and signing API requests, see About the API. For information about available SDKs and tools, see SDKS and Other Tools.
Attributes:
A constant which can be used with the ip_mode property of a LoadBalancer.
A constant which can be used with the ip_mode property of a LoadBalancer.
A constant which can be used with the lifecycle_state property of a LoadBalancer.
A constant which can be used with the lifecycle_state property of a LoadBalancer.
A constant which can be used with the lifecycle_state property of a LoadBalancer.
A constant which can be used with the lifecycle_state property of a LoadBalancer.
A constant which can be used with the lifecycle_state property of a LoadBalancer.
Gets the backend_sets of this LoadBalancer.
Gets the certificates of this LoadBalancer.
[Required] Gets the compartment_id of this LoadBalancer.
Gets the defined_tags of this LoadBalancer.
[Required] Gets the display_name of this LoadBalancer.
Gets the freeform_tags of this LoadBalancer.
Gets the hostnames of this LoadBalancer.
[Required] Gets the id of this LoadBalancer.
Gets the ip_addresses of this LoadBalancer.
Gets the ip_mode of this LoadBalancer.
Gets the is_delete_protection_enabled of this LoadBalancer.
Gets the is_private of this LoadBalancer.
Gets the is_request_id_enabled of this LoadBalancer.
[Required] Gets the lifecycle_state of this LoadBalancer.
Gets the listeners of this LoadBalancer.
Gets the network_security_group_ids of this LoadBalancer.
Gets the path_route_sets of this LoadBalancer.
Gets the request_id_header of this LoadBalancer.
Gets the routing_policies of this LoadBalancer.
Gets the rule_sets of this LoadBalancer.
Gets the security_attributes of this LoadBalancer.
Gets the shape_details of this LoadBalancer.
[Required] Gets the shape_name of this LoadBalancer.
Gets the ssl_cipher_suites of this LoadBalancer.
Gets the subnet_ids of this LoadBalancer.
Gets the system_tags of this LoadBalancer.
[Required] Gets the time_created of this LoadBalancer.
Methods:
__init__(**kwargs)Initializes a new LoadBalancer object with values from keyword arguments.
- IP_MODE_IPV4 = 'IPV4'¶
A constant which can be used with the ip_mode property of a LoadBalancer. This constant has a value of “IPV4”
- IP_MODE_IPV6 = 'IPV6'¶
A constant which can be used with the ip_mode property of a LoadBalancer. This constant has a value of “IPV6”
- LIFECYCLE_STATE_ACTIVE = 'ACTIVE'¶
A constant which can be used with the lifecycle_state property of a LoadBalancer. This constant has a value of “ACTIVE”
- LIFECYCLE_STATE_CREATING = 'CREATING'¶
A constant which can be used with the lifecycle_state property of a LoadBalancer. This constant has a value of “CREATING”
- LIFECYCLE_STATE_DELETED = 'DELETED'¶
A constant which can be used with the lifecycle_state property of a LoadBalancer. This constant has a value of “DELETED”
- LIFECYCLE_STATE_DELETING = 'DELETING'¶
A constant which can be used with the lifecycle_state property of a LoadBalancer. This constant has a value of “DELETING”
- LIFECYCLE_STATE_FAILED = 'FAILED'¶
A constant which can be used with the lifecycle_state property of a LoadBalancer. This constant has a value of “FAILED”
- __init__(**kwargs)¶
Initializes a new LoadBalancer object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):
- Parameters
id (str) – The value to assign to the id property of this LoadBalancer.
compartment_id (str) – The value to assign to the compartment_id property of this LoadBalancer.
display_name (str) – The value to assign to the display_name property of this LoadBalancer.
lifecycle_state (str) – The value to assign to the lifecycle_state property of this LoadBalancer. Allowed values for this property are: “CREATING”, “FAILED”, “ACTIVE”, “DELETING”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
time_created (datetime) – The value to assign to the time_created property of this LoadBalancer.
ip_addresses (list[oci.load_balancer.models.IpAddress]) – The value to assign to the ip_addresses property of this LoadBalancer.
shape_name (str) – The value to assign to the shape_name property of this LoadBalancer.
shape_details (oci.load_balancer.models.ShapeDetails) – The value to assign to the shape_details property of this LoadBalancer.
is_private (bool) – The value to assign to the is_private property of this LoadBalancer.
is_delete_protection_enabled (bool) – The value to assign to the is_delete_protection_enabled property of this LoadBalancer.
is_request_id_enabled (bool) – The value to assign to the is_request_id_enabled property of this LoadBalancer.
request_id_header (str) – The value to assign to the request_id_header property of this LoadBalancer.
subnet_ids (list[str]) – The value to assign to the subnet_ids property of this LoadBalancer.
network_security_group_ids (list[str]) – The value to assign to the network_security_group_ids property of this LoadBalancer.
listeners (dict(str, Listener)) – The value to assign to the listeners property of this LoadBalancer.
hostnames (dict(str, Hostname)) – The value to assign to the hostnames property of this LoadBalancer.
ssl_cipher_suites (dict(str, SSLCipherSuite)) – The value to assign to the ssl_cipher_suites property of this LoadBalancer.
certificates (dict(str, Certificate)) – The value to assign to the certificates property of this LoadBalancer.
backend_sets (dict(str, BackendSet)) – The value to assign to the backend_sets property of this LoadBalancer.
path_route_sets (dict(str, PathRouteSet)) – The value to assign to the path_route_sets property of this LoadBalancer.
freeform_tags (dict(str, str)) – The value to assign to the freeform_tags property of this LoadBalancer.
defined_tags (dict(str, dict(str, object))) – The value to assign to the defined_tags property of this LoadBalancer.
security_attributes (dict(str, dict(str, object))) – The value to assign to the security_attributes property of this LoadBalancer.
system_tags (dict(str, dict(str, object))) – The value to assign to the system_tags property of this LoadBalancer.
rule_sets (dict(str, RuleSet)) – The value to assign to the rule_sets property of this LoadBalancer.
routing_policies (dict(str, RoutingPolicy)) – The value to assign to the routing_policies property of this LoadBalancer.
ip_mode (str) – The value to assign to the ip_mode property of this LoadBalancer. Allowed values for this property are: “IPV4”, “IPV6”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- property backend_sets¶
Gets the backend_sets of this LoadBalancer.
- Returns
The backend_sets of this LoadBalancer.
- Return type
dict(str, BackendSet)
- property certificates¶
Gets the certificates of this LoadBalancer.
- Returns
The certificates of this LoadBalancer.
- Return type
dict(str, Certificate)
- property compartment_id¶
[Required] Gets the compartment_id of this LoadBalancer. The OCID of the compartment containing the load balancer.
- Returns
The compartment_id of this LoadBalancer.
- Return type
str
- property defined_tags¶
Gets the defined_tags of this LoadBalancer. Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {“Operations”: {“CostCenter”: “42”}}
- Returns
The defined_tags of this LoadBalancer.
- Return type
dict(str, dict(str, object))
- property display_name¶
[Required] Gets the display_name of this LoadBalancer. A user-friendly name. It does not have to be unique, and it is changeable.
Example: example_load_balancer
- Returns
The display_name of this LoadBalancer.
- Return type
str
- property freeform_tags¶
Gets the freeform_tags of this LoadBalancer. Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {“Department”: “Finance”}
- Returns
The freeform_tags of this LoadBalancer.
- Return type
dict(str, str)
- property hostnames¶
Gets the hostnames of this LoadBalancer.
- Returns
The hostnames of this LoadBalancer.
- Return type
dict(str, Hostname)
- property id¶
[Required] Gets the id of this LoadBalancer. The OCID of the load balancer.
- Returns
The id of this LoadBalancer.
- Return type
str
- property ip_addresses¶
Gets the ip_addresses of this LoadBalancer. An array of IP addresses.
- Returns
The ip_addresses of this LoadBalancer.
- Return type
- property ip_mode¶
Gets the ip_mode of this LoadBalancer. Whether the load balancer has an IPv4 or IPv6 IP address.
If “IPV4”, the service assigns an IPv4 address and the load balancer supports IPv4 traffic.
If “IPV6”, the service assigns an IPv6 address and the load balancer supports IPv6 traffic.
Example: “ipMode”:”IPV6”
Allowed values for this property are: “IPV4”, “IPV6”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The ip_mode of this LoadBalancer.
- Return type
str
- property is_delete_protection_enabled¶
Gets the is_delete_protection_enabled of this LoadBalancer. Whether or not the load balancer has delete protection enabled.
If “true”, the loadbalancer will be protected against deletion if configured to accept traffic.
If “false”, the loadbalancer will not be protected against deletion.
Delete protection is not be enabled unless this field is set to “true”. Example: true
- Returns
The is_delete_protection_enabled of this LoadBalancer.
- Return type
bool
- property is_private¶
Gets the is_private of this LoadBalancer. Whether the load balancer has a VCN-local (private) IP address.
If “true”, the service assigns a private IP address to the load balancer.
If “false”, the service assigns a public IP address to the load balancer.
A public load balancer is accessible from the internet, depending on your VCN’s security list rules. For more information about public and private load balancers, see How Load Balancing Works.
Example: true
- Returns
The is_private of this LoadBalancer.
- Return type
bool
- property is_request_id_enabled¶
Gets the is_request_id_enabled of this LoadBalancer. Whether or not the load balancer has the Request Id feature enabled for HTTP listeners.
If “true”, the load balancer will attach a unique request id header to every request passed through from the load balancer to load balancer backends. This same request id header also will be added to the response the lb received from the backend handling the request before the load balancer returns the response to the requestor. The name of the unique request id header is set the by value of requestIdHeader.
If “false”, the loadbalancer not add this unique request id header to either the request passed through to the load balancer backends nor to the reponse returned to the user.
Example: true
- Returns
The is_request_id_enabled of this LoadBalancer.
- Return type
bool
- property lifecycle_state¶
[Required] Gets the lifecycle_state of this LoadBalancer. The current state of the load balancer.
Allowed values for this property are: “CREATING”, “FAILED”, “ACTIVE”, “DELETING”, “DELETED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The lifecycle_state of this LoadBalancer.
- Return type
str
- property listeners¶
Gets the listeners of this LoadBalancer.
- Returns
The listeners of this LoadBalancer.
- Return type
dict(str, Listener)
- property network_security_group_ids¶
Gets the network_security_group_ids of this LoadBalancer. An array of NSG OCIDs associated with the load balancer.
During the load balancer’s creation, the service adds the new load balancer to the specified NSGs.
The benefits of associating the load balancer with NSGs include:
NSGs define network security rules to govern ingress and egress traffic for the load balancer.
The network security rules of other resources can reference the NSGs associated with the load balancer to ensure access.
Example: [“ocid1.nsg.oc1.phx.unique_ID”]
- Returns
The network_security_group_ids of this LoadBalancer.
- Return type
list[str]
- property path_route_sets¶
Gets the path_route_sets of this LoadBalancer.
- Returns
The path_route_sets of this LoadBalancer.
- Return type
dict(str, PathRouteSet)
- property request_id_header¶
Gets the request_id_header of this LoadBalancer. If isRequestIdEnabled is true then this field contains the name of the header field that contains the unique request id that is attached to every request from the load balancer to the load balancer backends and to every response from the load balancer.
If a request to the load balancer already contains a header with same name as specified in requestIdHeader then the load balancer will not change the value of that field.
If this field is set to “” this field defaults to X-Request-Id.
- Returns
The request_id_header of this LoadBalancer.
- Return type
str
- property routing_policies¶
Gets the routing_policies of this LoadBalancer.
- Returns
The routing_policies of this LoadBalancer.
- Return type
dict(str, RoutingPolicy)
- property rule_sets¶
Gets the rule_sets of this LoadBalancer.
- Returns
The rule_sets of this LoadBalancer.
- Return type
dict(str, RuleSet)
- property security_attributes¶
Gets the security_attributes of this LoadBalancer. Extended Defined tags for ZPR for this resource. Each key is predefined and scoped to a namespace.
Example: {“Oracle-ZPR”: {“MaxEgressCount”: {“value”:”42”,”mode”:”audit”, “usagetype” : “zpr”}}}
- Returns
The security_attributes of this LoadBalancer.
- Return type
dict(str, dict(str, object))
- property shape_details¶
Gets the shape_details of this LoadBalancer.
- Returns
The shape_details of this LoadBalancer.
- Return type
- property shape_name¶
[Required] Gets the shape_name of this LoadBalancer. A template that determines the total pre-provisioned bandwidth (ingress plus egress). To get a list of available shapes, use the
list_shapes()operation.Example: 100Mbps
- Returns
The shape_name of this LoadBalancer.
- Return type
str
- property ssl_cipher_suites¶
Gets the ssl_cipher_suites of this LoadBalancer.
- Returns
The ssl_cipher_suites of this LoadBalancer.
- Return type
dict(str, SSLCipherSuite)
- property subnet_ids¶
Gets the subnet_ids of this LoadBalancer. An array of subnet OCIDs.
- Returns
The subnet_ids of this LoadBalancer.
- Return type
list[str]
- property system_tags¶
Gets the system_tags of this LoadBalancer. System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. System tags can be viewed by users, but can only be created by the system.
Example: {“orcl-cloud”: {“free-tier-retained”: “true”}}
- Returns
The system_tags of this LoadBalancer.
- Return type
dict(str, dict(str, object))
- property time_created¶
[Required] Gets the time_created of this LoadBalancer. The date and time the load balancer was created, in the format defined by RFC3339.
Example: 2016-08-25T21:10:29.600Z
- Returns
The time_created of this LoadBalancer.
- Return type
datetime