Class List Method List File List

# Class: Com::Vmware::Appliance::Techpreview::Networking::Firewall::Addr::Inbound

Inherits:
  VAPI::Bindings::VapiService
  - Object
  - VAPI::Bindings::VapiService
  - Com::Vmware::Appliance::Techpreview::Networking::Firewall::Addr::Inbound
  show all
Defined in:
  /build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/networking/firewall/addr.rb

## Overview

``Com::Vmware::Appliance::Techpreview::Networking::Firewall::Addr::Inbound`` class provides methods Operations for Firewall rules.

## Defined Under Namespace

Classes: DeleteFirewallRule, FirewallAddressRule, FirewallRulePolicy

## Instance Method Summary (collapse)

- - (Void) add(pos, rule)

  Add a firewall rule to allow or deny traffic from incoming IP address.

- - (Void) delete(config)

  Delete specific rule at a given position or delete all rules.

- - (Inbound) initialize(config) constructor

  Constructs a new instance.

- - (Array<Com::Vmware::Appliance::Techpreview::Networking::Firewall::Addr::Inbound::FirewallAddressRule>) list

  Get ordered list of inbound IP addresses that are allowed or denied by firewall.

- - (Void) set(rules)

  Set list of inbound IP addresses to allow or deny by firewall.

## Constructor Details

### - (`Inbound`) initialize(config)

Constructs a new instance.

Parameters:

- config (`VAPI::Bindings::StubConfig`) —

  A hash with the api provider details.

    95
    96
    97
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/networking/firewall/addr.rb', line 95

    def initialize(config)
        super(config, @@service_info)
    end

## Instance Method Details

### - (`Void`) add(pos, rule)

Add a firewall rule to allow or deny traffic from incoming IP address.

Parameters:

- pos (`Fixnum`) —

  Position before which to insert the rule (zero-based). If you try to insert the rule in a position whose number is greater than the number of rules, the firewall rule is inserted at the end of the list.

- rule (`Com::Vmware::Appliance::Techpreview::Networking::Firewall::Addr::Inbound::FirewallAddressRule`) —

  Firewall IP-based rule.

Returns:

- (`Void`)

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  Generic error

    109
    110
    111
    112
    113
    114
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/networking/firewall/addr.rb', line 109

    def add(pos, rule)
        invoke_with_info(@@add_info, {
            'pos' => pos,
            'rule' => rule,
        })
    end

### - (`Void`) delete(config)

Delete specific rule at a given position or delete all rules.

Parameters:

- config (`Com::Vmware::Appliance::Techpreview::Networking::Firewall::Addr::Inbound::DeleteFirewallRule`) —

  Delete a firewall rule

Returns:

- (`Void`)

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  Generic error

    149
    150
    151
    152
    153
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/networking/firewall/addr.rb', line 149

    def delete(config)
        invoke_with_info(@@delete_info, {
            'config' => config,
        })
    end

### - (`Array<Com::Vmware::Appliance::Techpreview::Networking::Firewall::Addr::Inbound::FirewallAddressRule>`) list

Get ordered list of inbound IP addresses that are allowed or denied by firewall.

Returns:

- (`Array<Com::Vmware::Appliance::Techpreview::Networking::Firewall::Addr::Inbound::FirewallAddressRule>`) —

  List of address-based firewall rules.

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  Generic error

    137
    138
    139
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/networking/firewall/addr.rb', line 137

    def list()
        invoke_with_info(@@list_info)
    end

### - (`Void`) set(rules)

Set list of inbound IP addresses to allow or deny by firewall. This replaces all existing rules. Firewall rules have no impact on closed ports because these ports are closed for all traffic.

Parameters:

- rules (`Array<Com::Vmware::Appliance::Techpreview::Networking::Firewall::Addr::Inbound::FirewallAddressRule>`) —

  List of address-based firewall rules.

Returns:

- (`Void`)

Raises:

- (`Com::Vmware::Vapi::Std::Errors::Error`) —

  Generic error

    124
    125
    126
    127
    128
    # File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/appliance/techpreview/networking/firewall/addr.rb', line 124

    def set(rules)
        invoke_with_info(@@set_info, {
            'rules' => rules,
        })
    end