community / community.general / 8.5.0 / module / hwc_vpc_eip Creates a resource of Vpc/EIP in Huawei Cloud | "added in version" 0.2.0 of community.general" Authors: Huawei Inc. (@huaweicloud)community.general.hwc_vpc_eip (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
elastic ip management.
# create an eip and bind it to a port - name: Create vpc hwc_network_vpc: cidr: "192.168.100.0/24" name: "ansible_network_vpc_test" register: vpc
- name: Create subnet hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" dhcp_enable: true vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" register: subnet
- name: Create a port hwc_vpc_port: subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33" register: port
- name: Create an eip and bind it to a port community.general.hwc_vpc_eip: type: "5_bgp" dedicated_bandwidth: charge_mode: "traffic" name: "ansible_test_dedicated_bandwidth" size: 1 port_id: "{{ port.id }}"
id: description: - The ID of resource to be managed. type: str type: description: - Specifies the EIP type. required: true type: str user: description: - The user name to login with. - Currently only user names are supported, and not user IDs. required: true type: str state: choices: - present - absent default: present description: - Whether the given object should exist in Huawei Cloud. type: str domain: description: - The name of the Domain to scope to (Identity v3). - Currently only domain names are supported, and not domain IDs. required: true type: str region: description: - The region to which the project belongs. type: str port_id: description: - Specifies the port ID. This parameter is returned only when a private IP address is bound with the EIP. required: false type: str project: description: - The name of the Tenant (Identity v2) or Project (Identity v3). - Currently only project names are supported, and not project IDs. required: true type: str password: description: - The password to login with. required: true type: str timeouts: default: {} description: - The timeouts for each operations. suboptions: create: default: 5m description: - The timeouts for create operation. type: str update: default: 5m description: - The timeouts for update operation. type: str type: dict ip_version: description: - The value can be 4 (IPv4 address) or 6 (IPv6 address). If this parameter is left blank, an IPv4 address will be assigned. required: false type: int ipv4_address: description: - Specifies the obtained IPv4 EIP. The system automatically assigns an EIP if you do not specify it. required: false type: str identity_endpoint: description: - The Identity authentication URL. required: true type: str dedicated_bandwidth: description: - Specifies the dedicated bandwidth object. required: false suboptions: charge_mode: description: - Specifies whether the bandwidth is billed by traffic or by bandwidth size. The value can be bandwidth or traffic. If this parameter is left blank or is null character string, default value bandwidth is used. For IPv6 addresses, the default parameter value is bandwidth outside China and is traffic in China. required: true type: str name: description: - Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (V(_)), hyphens (V(-)), and periods (V(.)). required: true type: str size: description: - Specifies the bandwidth size. The value ranges from 1 Mbit/s to 2000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the bandwidth range of each region on the management console.) The minimum unit for bandwidth adjustment varies depending on the bandwidth range. The details are as follows. - The minimum unit is 1 Mbit/s if the allowed bandwidth size ranges from 0 to 300 Mbit/s (with 300 Mbit/s included). - The minimum unit is 50 Mbit/s if the allowed bandwidth size ranges 300 Mbit/s to 1000 Mbit/s (with 1000 Mbit/s included). - The minimum unit is 500 Mbit/s if the allowed bandwidth size is greater than 1000 Mbit/s. required: true type: int type: dict shared_bandwidth_id: description: - Specifies the ID of shared bandwidth. required: false type: str enterprise_project_id: description: - Specifies the enterprise project ID. required: false type: str
create_time: description: - Specifies the time (UTC time) when the EIP was assigned. returned: success type: str dedicated_bandwidth: contains: charge_mode: description: - Specifies whether the bandwidth is billed by traffic or by bandwidth size. The value can be bandwidth or traffic. If this parameter is left blank or is null character string, default value bandwidth is used. For IPv6 addresses, the default parameter value is bandwidth outside China and is traffic in China. returned: success type: str id: description: - Specifies the ID of dedicated bandwidth. returned: success type: str name: description: - Specifies the bandwidth name. The value is a string of 1 to 64 characters that can contain letters, digits, underscores (V(_)), hyphens (V(-)), and periods (V(.)). returned: success type: str size: description: - Specifies the bandwidth size. The value ranges from 1 Mbit/s to 2000 Mbit/s by default. (The specific range may vary depending on the configuration in each region. You can see the bandwidth range of each region on the management console.) The minimum unit for bandwidth adjustment varies depending on the bandwidth range. The details are as follows:. - The minimum unit is 1 Mbit/s if the allowed bandwidth size ranges from 0 to 300 Mbit/s (with 300 Mbit/s included). - The minimum unit is 50 Mbit/s if the allowed bandwidth size ranges 300 Mbit/s to 1000 Mbit/s (with 1000 Mbit/s included). - The minimum unit is 500 Mbit/s if the allowed bandwidth size is greater than 1000 Mbit/s. returned: success type: int description: - Specifies the dedicated bandwidth object. returned: success type: dict enterprise_project_id: description: - Specifies the enterprise project ID. returned: success type: str ip_version: description: - The value can be 4 (IPv4 address) or 6 (IPv6 address). If this parameter is left blank, an IPv4 address will be assigned. returned: success type: int ipv4_address: description: - Specifies the obtained IPv4 EIP. The system automatically assigns an EIP if you do not specify it. returned: success type: str ipv6_address: description: - Specifies the obtained IPv6 EIP. returned: success type: str port_id: description: - Specifies the port ID. This parameter is returned only when a private IP address is bound with the EIP. returned: success type: str private_ip_address: description: - Specifies the private IP address bound with the EIP. This parameter is returned only when a private IP address is bound with the EIP. returned: success type: str shared_bandwidth_id: description: - Specifies the ID of shared bandwidth. returned: success type: str type: description: - Specifies the EIP type. returned: success type: str