Update azure_rm_resourcegroup related document (#57819)

* Update azure_rm_resourcegroup related document

* resolve shippable error
This commit is contained in:
Fred-sun 2019-06-14 15:34:20 -04:00 committed by Sandra McCann
parent 23eb465956
commit 019a48361b
2 changed files with 64 additions and 30 deletions

View file

@ -18,31 +18,30 @@ DOCUMENTATION = '''
---
module: azure_rm_resourcegroup
version_added: "2.1"
short_description: Manage Azure resource groups.
short_description: Manage Azure resource groups
description:
- Create, update and delete a resource group.
options:
force_delete_nonempty:
description:
- Remove a resource group and all associated resources. Use with state C(absent) to delete a resource.
group that contains resources.
- Remove a resource group and all associated resources.
- Use with I(state=absent) to delete a resource group that contains resources.
type: bool
aliases:
- force
default: 'no'
location:
description:
- Azure location for the resource group. Required when creating a new resource group. Cannot
be changed once resource group is created.
- Azure location for the resource group. Required when creating a new resource group.
- Cannot be changed once resource group is created.
name:
description:
- Name of the resource group.
required: true
state:
description:
- Assert the state of the resource group. Use C(present) to create or update and
C(absent) to delete. When C(absent) a resource group containing resources will not be removed unless the
force option is used.
- Assert the state of the resource group. Use C(present) to create or update and C(absent) to delete.
- When C(absent) a resource group containing resources will not be removed unless the I(force) option is used.
default: present
choices:
- absent
@ -52,8 +51,8 @@ extends_documentation_fragment:
- azure_tags
author:
- "Chris Houseknecht (@chouseknecht)"
- "Matt Davis (@nitzmahone)"
- Chris Houseknecht (@chouseknecht)
- Matt Davis (@nitzmahone)
'''
@ -79,24 +78,50 @@ EXAMPLES = '''
'''
RETURN = '''
contains_resources:
description: Whether or not the resource group contains associated resources.
description:
- Whether or not the resource group contains associated resources.
returned: always
type: bool
sample: True
state:
description: Current state of the resource group.
description:
- Current state of the resource group.
returned: always
type: dict
sample: {
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroup/myResourceGroup",
"location": "westus",
"name": "Testing",
"provisioning_state": "Succeeded",
"tags": {
"delete": "on-exit",
"testing": "no"
}
}
type: complex
contains:
id:
description:
- Resource ID.
returned: always
type: str
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroup/myResourceGroup"
location:
description:
- Azure location for the resource group.
returned: always
type: str
sample: westus
name:
description:
- The resource group name.
returned: always
type: str
sample: Testing
provisioning_state:
description:
- Provisioning state of the resource group.
returned: always
type: str
sample: Succeeded
tags:
description:
- The resource group's tags.
returned: always
type: dict
sample: {
"delete": "on-exit",
"testing": "no"
}
'''
try:

View file

@ -20,7 +20,7 @@ module: azure_rm_resourcegroup_info
version_added: "2.1"
short_description: Get resource group facts.
short_description: Get resource group facts
description:
- Get facts for a specific resource group or all resource groups.
@ -35,15 +35,15 @@ options:
list_resources:
description:
- List all resources under the resource group.
- Note this will cost network overhead for each resource group. Suggest use this when C(name) set.
version_added: 2.8
- Note this will cost network overhead for each resource group. Suggest use this when I(name) set.
version_added: "2.8"
extends_documentation_fragment:
- azure
author:
- "Chris Houseknecht (@chouseknecht)"
- "Matt Davis (@nitzmahone)"
- Chris Houseknecht (@chouseknecht)
- Matt Davis (@nitzmahone)
'''
@ -68,55 +68,64 @@ EXAMPLES = '''
'''
RETURN = '''
azure_resourcegroups:
description: List of resource group dicts.
description:
- List of resource group dicts.
returned: always
type: list
contains:
id:
description:
- Resource id.
returned: always
type: str
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroup/myResourceGroup"
name:
description:
- Resource group name.
returned: always
type: str
sample: foo
tags:
description:
- Tags assigned to resource group.
returned: always
type: dict
sample: { "tag": "value" }
resources:
description:
- List of resources under the resource group.
- Only shows when C(list_resources) set to C(True).
returned: when I(list_resources=yes).
type: list
contains:
id:
description:
- Resource id.
returned: always
type: str
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMa
chines/myVirtualMachine"
name:
description:
- Resource name.
returned: always
type: str
sample: myVirtualMachine
location:
description:
- Resource region.
returned: always
type: str
sample: eastus
type:
description:
- Resource type.
returned: always
type: str
sample: "Microsoft.Compute/virtualMachines"
tags:
description:
- Tags to assign to the managed disk.
returned: always
type: dict
sample: { "tag": "value" }
'''