vCD Edge Gateway NatRule Service - vmware-archive/ansible-module-vcloud-director GitHub Wiki

vCD Edge Gateway NatRule Service Example Usage

  1. NatRule Service States

    • Create NatRule Service
     
         - name: create vCD edge gateway nat rule
           vcd_gateway_services:
             vdc: ACME_PAYG
             gateway: edge-gateway
             service: nat_rule
             service_params:
                - action: snat
                  original_address: 10.172.17.11
                  translated_address: 192.168.11.1
             state: present
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc - (Required) name of vdc
    • gateway - (Required) name of gateway
    • service - (Required) name of service e.g "firewall/nat_rule"
    • service_params - (Required) required arguments to create gateway service
      • action - action having values snat/dnat
      • original_address - original IP address
      • translated_address - translated IP address
      • description - nat rule description
      • protocol - protocol such as tcp/udp/icmp
      • original_port - port no. such as FTP(21)
      • translated_port - port no. such as HTTP(80)
      • access_type - nat rule type. Default: User
      • icmp_type - icmp type such as "Echo-request"
      • logging_enabled - true if logging has to be enabled
      • enabled - true if rule has to be enabled
      • vnic - interface of gateway
    • state - (Required) "present" to create vCD Edge gateway service

    • Update NatRule Services
     
         - name: update vCD edge gateway nat rule
           vcd_gateway_services:
             vdc: ACME_PAYG
             gateway: edge-gateway
             service: nat_rule
             service_params:
                - nat_rule_id: 1925000
                  original_address: 10.172.17.20
                  translated_address: 192.168.11.50
             state: update
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc - (Required) name of vdc
    • gateway - (Required) name of gateway
    • service - (Required) name of service e.g "firewall/nat_rule"
    • service_params - (Required) required arguments to update gateway service
      • nat_rule_id - nat rule id to update
      • original_address - original IP address
      • translated_address - translated IP address
      • description - nat rule description
      • protocol - protocol such as tcp/udp/icmp
      • original_port - port no. such as FTP(21)
      • translated_port - port no. such as HTTP(80)
      • access_type - nat rule type. Default: User
      • icmp_type - icmp type such as "Echo-request"
      • logging_enabled - true if logging has to be enabled
      • enabled - true if rule has to be enabled
      • vnic - interface of gateway
    • state - (Required) "update" to update vCD Edge gateway service

    • Delete NatRule Services
     
         - name: delete vCD edge gateway nat rule
           vcd_gateway_services:
             vdc: ACME_PAYG
             gateway: edge-gateway
             service: nat_rule
             service_params:
                - nat_rule_id: 19250000
             state: absent
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc - (Required) name of vdc
    • gateway - (Required) name of gateway
    • service - (Required) name of service e.g "firewall/nat_rule"
    • service_params - (Required) required arguments to delete gateway service
      • nat_rule_id - nat rule id to delete nat rule
    • state - (Required) "absent" to delete vCD Edge gateway service

  2. NatRule Service Operations

    • List Nat rules
     
         - name: list vCD edge gateway nat rules
           vcd_gateway_services:
             vdc: ACME_PAYG
             gateway: edge-gateway
             service: nat_rule
             operation: list
     
     
    Argument Reference
    • user - (Optional) - vCloud Director user name
    • password - (Optional) - vCloud Director password
    • org - (Optional) - vCloud Director org name to log into
    • host - (Optional) - vCloud Director host name
    • api_version - (Optional) - Pyvcloud API version
    • verify_ssl_certs - (Optional) - true to enforce to verify ssl certificate for each requests else false
    • vdc - (Required) name of vdc
    • gateway - (Required) name of gateway
    • service - (Required) name of service e.g "firewall/nat_rule"
    • operation - (Required) "list" to list all available edge gateway firewalls
⚠️ **GitHub.com Fallback** ⚠️