Update azure_rm_publicipaddress related document (#57669)

* Update azure_rm_publicipaddress related document
This commit is contained in:
Fred-sun 2019-06-14 10:43:07 -04:00 committed by Sandra McCann
parent 78f87f2451
commit 8d635a82a4
2 changed files with 141 additions and 44 deletions

View file

@ -20,11 +20,12 @@ module: azure_rm_publicipaddress
version_added: "2.1" version_added: "2.1"
short_description: Manage Azure Public IP Addresses. short_description: Manage Azure Public IP Addresses
description: description:
- Create, update and delete a Public IP address. Allows setting and updating the address allocation method and - Create, update and delete a Public IP address.
domain name label. Use the azure_rm_networkinterface module to associate a Public IP with a network interface. - Allows setting and updating the address allocation method and domain name label.
- Use the M(azure_rm_networkinterface) module to associate a Public IP with a network interface.
options: options:
resource_group: resource_group:
@ -33,8 +34,8 @@ options:
required: true required: true
allocation_method: allocation_method:
description: description:
- Control whether the assigned Public IP remains permanently assigned to the object. If not - Control whether the assigned Public IP remains permanently assigned to the object.
set to 'Static', the IP address my changed anytime an associated virtual machine is power cycled. - If not set to C(Static), the IP address my changed anytime an associated virtual machine is power cycled.
choices: choices:
- dynamic - dynamic
- static - static
@ -43,8 +44,8 @@ options:
default: dynamic default: dynamic
domain_name: domain_name:
description: description:
- The customizable portion of the FQDN assigned to public IP address. This is an explicit setting. If - The customizable portion of the FQDN assigned to public IP address. This is an explicit setting.
no value is provided, any existing value will be removed on an existing public IP. - If no value is provided, any existing value will be removed on an existing public IP.
aliases: aliases:
- domain_name_label - domain_name_label
name: name:
@ -53,15 +54,14 @@ options:
required: true required: true
state: state:
description: description:
- Assert the state of the Public IP. Use C(present) to create or update a and - Assert the state of the Public IP. Use C(present) to create or update a and C(absent) to delete.
C(absent) to delete.
default: present default: present
choices: choices:
- absent - absent
- present - present
location: location:
description: description:
- Valid azure location. Defaults to location of the resource group. - Valid Azure location. Defaults to location of the resource group.
sku: sku:
description: description:
- The public IP address SKU. - The public IP address SKU.
@ -70,22 +70,24 @@ options:
- standard - standard
- Basic - Basic
- Standard - Standard
version_added: 2.6 version_added: "2.6"
ip_tags: ip_tags:
description: description:
- List of IpTag associated with the public IP address. - List of IpTag associated with the public IP address.
- Each element should contain type:value pair. - Each element should contain type:value pair.
suboptions: suboptions:
type: type:
description: Sets the ip_tags type. description:
- Sets the ip_tags type.
value: value:
description: Sets the ip_tags value. description:
version_added: 2.8 - Sets the ip_tags value.
version_added: "2.8"
idle_timeout: idle_timeout:
description: description:
- Idle timeout in minutes. - Idle timeout in minutes.
type: int type: int
version_added: 2.8 version_added: "2.8"
version: version:
description: description:
- The public IP address version. - The public IP address version.
@ -93,15 +95,15 @@ options:
- ipv4 - ipv4
- ipv6 - ipv6
default: ipv4 default: ipv4
version_added: 2.8 version_added: "2.8"
extends_documentation_fragment: extends_documentation_fragment:
- azure - azure
- azure_tags - azure_tags
author: author:
- "Chris Houseknecht (@chouseknecht)" - Chris Houseknecht (@chouseknecht)
- "Matt Davis (@nitzmahone)" - Matt Davis (@nitzmahone)
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -121,21 +123,90 @@ EXAMPLES = '''
RETURN = ''' RETURN = '''
state: state:
description: Facts about the current state of the object. description:
- Facts about the current state of the object.
returned: always returned: always
type: dict type: complex
sample: { contains:
"dns_settings": {}, dns_settings:
"etag": '"/"a5e56955-12df-445a-bda4-dc129d22c12f"', description:
"idle_timeout_in_minutes": 4, - The FQDN of the DNS record associated with the public IP address.
"ip_address": "52.160.103.93", returns: always
"location": "westus", type: dict
"name": "publicip002", sample: {
"provisioning_state": "Succeeded", "domain_name_label": "ansible-b57dc95985712e45eb8b9c2e",
"public_ip_allocation_method": "static", "fqdn": "ansible-b57dc95985712e45eb8b9c2e.eastus.cloudapp.azure.com",
"tags": {}, "reverse_fqdn": null
"type": "Microsoft.Network/publicIPAddresses" }
} etag:
description:
- A unique read-only string that changes whenever the resource is updated.
returns: always
type: str
sample: "W/'1905ee13-7623-45b1-bc6b-4a12b2fb9d15'"
idle_timeout_in_minutes:
description:
- The idle timeout of the public IP address.
returns: always
type: int
sample: 4
ip_address:
description:
- The Public IP Prefix this Public IP Address should be allocated from.
returns: always
type: str
sample: 52.160.103.93
location:
description:
- Resource location.
returns: always
type: str
example: eastus
name:
description:
- Name of the Public IP Address.
returns: always
type: str
example: publicip002
provisioning_state:
description:
- The provisioning state of the Public IP resource.
returns: always
type: str
example: Succeeded
public_ip_allocation_method:
description:
- The public IP allocation method.
returns: always
type: str
sample: static
public_ip_address_version:
description:
- The public IP address version.
returns: always
type: str
sample: ipv4
sku:
description:
- The public IP address SKU.
returned: always
type: str
sample: Basic
tags:
description:
- The resource tags.
returns: always
type: dict
sample: {
"delete": "on-exit",
"testing": "testing"
}
type:
description:
- Type of the resource.
returns: always
type: str
sample: "Microsoft.Network/publicIPAddresses"
''' '''
from ansible.module_utils.azure_rm_common import AzureRMModuleBase from ansible.module_utils.azure_rm_common import AzureRMModuleBase

View file

@ -20,7 +20,7 @@ module: azure_rm_publicipaddress_facts
version_added: "2.1" version_added: "2.1"
short_description: Get public IP facts. short_description: Get public IP facts
description: description:
- Get facts for a specific public IP or all public IPs within a resource group. - Get facts for a specific public IP or all public IPs within a resource group.
@ -40,8 +40,8 @@ extends_documentation_fragment:
- azure - azure
author: author:
- "Chris Houseknecht (@chouseknecht)" - Chris Houseknecht (@chouseknecht)
- "Matt Davis (@nitzmahone)" - Matt Davis (@nitzmahone)
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -77,7 +77,7 @@ azure_publicipaddresses:
}] }]
publicipaddresses: publicipaddresses:
description: description:
- List of publicipaddress - List of publicipaddress.
- Contains the detail which matches azure_rm_publicipaddress parameters. - Contains the detail which matches azure_rm_publicipaddress parameters.
- Returned when the format parameter set to curated. - Returned when the format parameter set to curated.
returned: always returned: always
@ -88,74 +88,100 @@ publicipaddresses:
- Resource ID. - Resource ID.
returned: always returned: always
type: str type: str
sample: /subscriptions/xxx---xxxxx/resourceGroups/v-xisuRG/providers/Microsoft.Network/publicIPAddresses/pipb57dc95224
name: name:
description: description:
- Name of the public ip address. - Name of the public IP address.
returned: always returned: always
type: str type: str
sample: pipb57dc95224
type: type:
description: description:
- Resource type. - Resource type.
returned: always returned: always
type: str type: str
sample: "Microsoft.Network/publicIPAddresses"
location: location:
description: description:
- Resource location. - Resource location.
returned: always returned: always
type: str type: str
sample: eastus
tags: tags:
description: description:
- Resource tags. - Resource tags.
returned: always returned: always
type: complex type: dict
sample: {
"delete": "on-exit",
"testing": "testing"
}
allocation_method: allocation_method:
description: description:
- The public IP allocation method. - The public IP allocation method.
- Possible values are 'static' and 'dynamic'. - Possible values are C(static) and C(dynamic).
returned: always returned: always
type: str type: str
sample: static
version: version:
description: description:
- The public IP address version. - The public IP address version.
- Possible values are 'ipv4' and 'ipv6'. - Possible values are C(ipv4) and C(ipv6).
returned: always returned: always
type: str type: str
sample: ipv4
dns_settings: dns_settings:
description: description:
- The FQDN of the DNS record associated with the public IP address. - The FQDN of the DNS record associated with the public IP address.
returned: always returned: always
type: complex type: dict
sample: {
"domain_name_label": "ansible-b57dc95985712e45eb8b9c2e",
"fqdn": "ansible-b57dc95985712e45eb8b9c2e.eastus.cloudapp.azure.com",
"reverse_fqdn": null
}
ip_tags: ip_tags:
description: description:
- The list of tags associated with the public IP address. - The list of tags associated with the public IP address.
returned: always returned: always
type: complex type: list
sample: [
{
"type": "FirstPartyUsage",
"value": "Storage"
}
]
ip_address: ip_address:
description: description:
- The Public IP Prefix this Public IP Address should be allocated from. - The Public IP Prefix this Public IP Address should be allocated from.
returned: always returned: always
type: str type: str
sample: 40.121.144.14
idle_timeout: idle_timeout:
description: description:
- The idle timeout of the public IP address. - The idle timeout of the public IP address.
returned: always returned: always
type: int type: int
sample: 4
provisioning_state: provisioning_state:
description: description:
- he provisioning state of the PublicIP resource. - The provisioning state of the PublicIP resource.
- Possible values are 'Updating', 'Deleting', and 'Failed'. - Possible values is C(Succeeded).
returned: always returned: always
type: str type: str
sample: Succeeded
etag: etag:
description: description:
- A unique read-only string that changes whenever the resource is updated. - A unique read-only string that changes whenever the resource is updated.
returned: always returned: always
type: str type: str
sample: "W/'1905ee13-7623-45b1-bc6b-4a12b2fb9d15'"
sku: sku:
description: description:
- The public IP address SKU. - The public IP address SKU.
returned: always returned: always
type: str type: str
sample: Basic
''' '''
try: try:
from msrestazure.azure_exceptions import CloudError from msrestazure.azure_exceptions import CloudError