lib/ansible/modules/cloud/alicloud/ali_slb_lb.py [144:325]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    name: 'from-ansible'
    internet_charge_type: 'PayByBandwidth'
    bandwidth: 5
'''
RETURN = '''
load_balancer:
    description:
      - info about the server load balancer that was created or deleted.
    returned: on present
    type: complex
    contains:
        address:
            description: The IP address of the loal balancer
            returned: always
            type: str
            sample: "47.94.26.126"
        address_ipversion:
            description: The IP address version. IPV4 or IPV6.
            returned: always
            type: str
            sample: "ipv4"
        address_type:
            description: The load balancer internet type
            returned: always
            type: str
            sample: "internet"
        backend_servers:
            description: The load balancer's backend servers
            returned: always
            type: complex
            contains:
                server_id:
                    description: The backend server id
                    returned: always
                    type: str
                    sample: "i-vqunci342"
                weight:
                    description: The backend server weight
                    returned: always
                    type: int
                    sample: 100
                description:
                    description: The backend server description
                    returned: always
                    type: str
                    sample: ""
                type:
                    description: The backend server type, ecs or eni
                    returned: always
                    type: str
                    sample: "ecs"
        bandwidth:
            description: The load balancer internet bandwidth
            returned: always
            type: int
            sample: 5
        create_time:
            description: The time of the load balancer was created
            returned: always
            type: str
            sample: "2019-01-02T02:37:41Z"
        end_time:
            description: The time of the load balancer will be released
            returned: always
            type: str
            sample: "2999-09-08T16:00:00Z"
        id:
            description: The ID of the load balancer was created. Same as load_balancer_id.
            returned: always
            type: str
            sample: "lb-2zea9ohgtf"
        internet_charge_type:
            description: The load balancer internet charge type
            returned: always
            type: str
            sample: "PayByTraffic"
        listeners:
            description: The listeners of the load balancer.
            returned: always
            type: complex
            contains:
                listener_port:
                    description: The front-end port of the listener that is used to receive incoming traffic and
                     distribute the traffic to the backend servers.
                    returned: always
                    type: int
                    sample: 22
                listener_protocol:
                    description: The frontend protocol used by the SLB instance.
                    returned: always
                    type: str
                    sample: tcp
                listener_forward:
                    description: Whether to enable listener forwarding.
                    returned: always
                    type: str
                    sample: ""
                forward_port:
                    description: The destination listening port. It must be an existing HTTPS listening port.
                    returned: always
                    type: int
                    sample: 20
        load_balancer_id:
            description: The ID of the load balancer was created.
            returned: always
            type: str
            sample: "lb-2zea9ohgtf"
        load_balancer_name:
            description: The name of the load balancer was created.
            returned: always
            type: str
            sample: "ansible-ali_slb_lb"
        load_balancer_status:
            description: The load balancer current status.
            returned: always
            type: str
            sample: "active"
        master_zone_id:
            description: The ID of the primary zone.
            returned: always
            type: str
            sample: "cn-beijing-a"
        name:
            description: The name of the load balancer was created.
            returned: always
            type: str
            sample: "ansible-ali_slb_lb"
        network_type:
            description: The network type of the load balancer was created.
            returned: always
            type: str
            sample: "classic"
        pay_type:
            description: The load balancer instance charge type.
            returned: always
            type: str
            sample: "PostPaid"
        resource_group_id:
            description: The resource group of the load balancer belongs.
            returned: always
            type: str
            sample: "rg-acfmwvvtg5owavy"
        slave_zone_id:
            description: The ID of the backup zone
            returned: always
            type: str
            sample: "cn-beijing-d"
        tags:
            description: The load balancer tags
            returned: always
            type: dict
            sample: {}
        vpc_id:
            description: The vpc of the load balancer belongs.
            returned: always
            type: str
            sample: "vpc-fn3nc3"
        vswitch_id:
            description: The vswitch of the load balancer belongs.
            returned: always
            type: str
            sample: "vsw-c3nc3r"
'''

import time
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.alicloud_ecs import ecs_argument_spec, slb_connect


HAS_FOOTMARK = False

try:
    from footmark.exception import SLBResponseError

    HAS_FOOTMARK = True
except ImportError:
    HAS_FOOTMARK = False


def main():
    argument_spec = ecs_argument_spec()
    argument_spec.update(dict(
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



plugins/modules/ali_slb_lb.py [126:307]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    name: 'from-ansible'
    internet_charge_type: 'PayByBandwidth'
    bandwidth: 5
'''
RETURN = '''
load_balancer:
    description:
      - info about the server load balancer that was created or deleted.
    returned: on present
    type: complex
    contains:
        address:
            description: The IP address of the loal balancer
            returned: always
            type: str
            sample: "47.94.26.126"
        address_ipversion:
            description: The IP address version. IPV4 or IPV6.
            returned: always
            type: str
            sample: "ipv4"
        address_type:
            description: The load balancer internet type
            returned: always
            type: str
            sample: "internet"
        backend_servers:
            description: The load balancer's backend servers
            returned: always
            type: complex
            contains:
                server_id:
                    description: The backend server id
                    returned: always
                    type: str
                    sample: "i-vqunci342"
                weight:
                    description: The backend server weight
                    returned: always
                    type: int
                    sample: 100
                description:
                    description: The backend server description
                    returned: always
                    type: str
                    sample: ""
                type:
                    description: The backend server type, ecs or eni
                    returned: always
                    type: str
                    sample: "ecs"
        bandwidth:
            description: The load balancer internet bandwidth
            returned: always
            type: int
            sample: 5
        create_time:
            description: The time of the load balancer was created
            returned: always
            type: str
            sample: "2019-01-02T02:37:41Z"
        end_time:
            description: The time of the load balancer will be released
            returned: always
            type: str
            sample: "2999-09-08T16:00:00Z"
        id:
            description: The ID of the load balancer was created. Same as load_balancer_id.
            returned: always
            type: str
            sample: "lb-2zea9ohgtf"
        internet_charge_type:
            description: The load balancer internet charge type
            returned: always
            type: str
            sample: "PayByTraffic"
        listeners:
            description: The listeners of the load balancer.
            returned: always
            type: complex
            contains:
                listener_port:
                    description: The front-end port of the listener that is used to receive incoming traffic and
                     distribute the traffic to the backend servers.
                    returned: always
                    type: int
                    sample: 22
                listener_protocol:
                    description: The frontend protocol used by the SLB instance.
                    returned: always
                    type: str
                    sample: tcp
                listener_forward:
                    description: Whether to enable listener forwarding.
                    returned: always
                    type: str
                    sample: ""
                forward_port:
                    description: The destination listening port. It must be an existing HTTPS listening port.
                    returned: always
                    type: int
                    sample: 20
        load_balancer_id:
            description: The ID of the load balancer was created.
            returned: always
            type: str
            sample: "lb-2zea9ohgtf"
        load_balancer_name:
            description: The name of the load balancer was created.
            returned: always
            type: str
            sample: "ansible-ali_slb_lb"
        load_balancer_status:
            description: The load balancer current status.
            returned: always
            type: str
            sample: "active"
        master_zone_id:
            description: The ID of the primary zone.
            returned: always
            type: str
            sample: "cn-beijing-a"
        name:
            description: The name of the load balancer was created.
            returned: always
            type: str
            sample: "ansible-ali_slb_lb"
        network_type:
            description: The network type of the load balancer was created.
            returned: always
            type: str
            sample: "classic"
        pay_type:
            description: The load balancer instance charge type.
            returned: always
            type: str
            sample: "PostPaid"
        resource_group_id:
            description: The resource group of the load balancer belongs.
            returned: always
            type: str
            sample: "rg-acfmwvvtg5owavy"
        slave_zone_id:
            description: The ID of the backup zone
            returned: always
            type: str
            sample: "cn-beijing-d"
        tags:
            description: The load balancer tags
            returned: always
            type: dict
            sample: {}
        vpc_id:
            description: The vpc of the load balancer belongs.
            returned: always
            type: str
            sample: "vpc-fn3nc3"
        vswitch_id:
            description: The vswitch of the load balancer belongs.
            returned: always
            type: str
            sample: "vsw-c3nc3r"
'''

import time
from ansible.module_utils.basic import AnsibleModule
from ansible_collections.alibaba.alicloud.plugins.module_utils.alicloud_ecs import ecs_argument_spec, slb_connect


HAS_FOOTMARK = False

try:
    from footmark.exception import SLBResponseError

    HAS_FOOTMARK = True
except ImportError:
    HAS_FOOTMARK = False


def main():
    argument_spec = ecs_argument_spec()
    argument_spec.update(dict(
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



