google.cloud.forseti.common.gcp_type.forwarding_rule module

A Compute Forwarding Rule.

See: https://cloud.google.com/compute/docs/reference/latest/forwardingRules

class ForwardingRule(project_id, resource_id, full_name, creation_timestamp, name, description, region, ip_address, ip_protocol, port_range, ports, target, self_link, load_balancing_scheme, subnetwork, network, backend_service, raw_json)[source]

Bases: object

Represents ForwardRule resource.

__hash__()[source]

Return hash of properties.

Returns:The hash of the class properties.
Return type:hash
__repr__()[source]

String representation. :returns: Json string. :rtype: str

classmethod from_dict(project_id, full_name, forwarding_rule)[source]

Returns a new ForwardingRule object from dict.

Parameters:
  • project_id (str) – The project id.
  • full_name (str) – The full resource name and ancestory.
  • forwarding_rule (dict) – The forwarding rule.
Returns:

A new ForwardingRule object.

Return type:

ForwardingRule

static from_json(project_id, full_name, forwarding_rule_data)[source]

Returns a new ForwardingRule object from json data.

Parameters:
  • project_id (str) – the project id.
  • full_name (str) – The full resource name and ancestory.
  • forwarding_rule_data (str) – The json data representing the forwarding rule.
Returns:

A new ForwardingRule object.

Return type:

ForwardingRule