LoadBalancer

class oci.load_balancer.models.LoadBalancer(**kwargs)

Bases: object

The 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.

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[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.
  • is_private (bool) -- The value to assign to the is_private 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.
  • 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.
  • 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.
backend_sets

Gets the backend_sets of this LoadBalancer.

Returns:The backend_sets of this LoadBalancer.
Return type:dict(str, BackendSet)
certificates

Gets the certificates of this LoadBalancer.

Returns:The certificates of this LoadBalancer.
Return type:dict(str, Certificate)
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
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))
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
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)
hostnames

Gets the hostnames of this LoadBalancer.

Returns:The hostnames of this LoadBalancer.
Return type:dict(str, Hostname)
id

[Required] Gets the id of this LoadBalancer. The OCID of the load balancer.

Returns:The id of this LoadBalancer.
Return type:str
ip_addresses

Gets the ip_addresses of this LoadBalancer. An array of IP addresses.

Returns:The ip_addresses of this LoadBalancer.
Return type:list[IpAddress]
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
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
listeners

Gets the listeners of this LoadBalancer.

Returns:The listeners of this LoadBalancer.
Return type:dict(str, Listener)
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]
path_route_sets

Gets the path_route_sets of this LoadBalancer.

Returns:The path_route_sets of this LoadBalancer.
Return type:dict(str, PathRouteSet)
rule_sets

Gets the rule_sets of this LoadBalancer.

Returns:The rule_sets of this LoadBalancer.
Return type:dict(str, RuleSet)
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
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]
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))
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