Update azure_rm_roledefinition related document (#57927)

* Update azure_rm_roledefinition related documentation
This commit is contained in:
Fred-sun 2019-06-19 22:27:30 +08:00 committed by Alicia Cozine
parent f656959861
commit 8cff96e388
2 changed files with 76 additions and 67 deletions

View file

@ -17,7 +17,7 @@ DOCUMENTATION = '''
---
module: azure_rm_roledefinition
version_added: "2.8"
short_description: Manage Azure Role Definition.
short_description: Manage Azure Role Definition
description:
- Create, update and delete instance of Azure Role Definition.
@ -48,26 +48,28 @@ options:
- List of denied data actions.
type: list
assignable_scopes:
description: List of assignable scope of this definition.
description:
- List of assignable scopes of this definition.
scope:
description: The scope of the role definition.
description:
- The scope of the role definition.
description:
description:
- The role definition description.
state:
description:
- Assert the state of the role definition.
- Use 'present' to create or update a role definition and 'absent' to delete it.
default: present
choices:
- absent
- present
description:
- Assert the state of the role definition.
- Use C(present) to create or update a role definition; use C(absent) to delete it.
default: present
choices:
- absent
- present
extends_documentation_fragment:
- azure
author:
- "Yunge Zhu(@yungezz)"
- Yunge Zhu(@yungezz)
'''
@ -87,7 +89,8 @@ EXAMPLES = '''
RETURN = '''
id:
description: Id of current role definition.
description:
- ID of current role definition.
returned: always
type: str
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Authorization/roleDefinitions/roleDefinitionId"

View file

@ -17,7 +17,7 @@ DOCUMENTATION = '''
---
module: azure_rm_roledefinition_facts
version_added: "2.8"
short_description: Get Azure Role Definition facts.
short_description: Get Azure Role Definition facts
description:
- Get facts of Azure Role Definition.
@ -30,9 +30,11 @@ options:
description:
- Role definition id.
role_name:
description: Role name.
description:
- Role name.
type:
description: Type of role.
description:
- Type of role.
choices:
- system
- custom
@ -41,7 +43,7 @@ extends_documentation_fragment:
- azure
author:
- "Yunge Zhu(@yungezz)"
- Yunge Zhu(@yungezz)
'''
@ -58,60 +60,64 @@ EXAMPLES = '''
RETURN = '''
roledefinitions:
description: A list of Role Definition facts.
description:
- A list of Role Definition facts.
returned: always
type: complex
contains:
id:
description: Role Definition id.
returned: always
type: str
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Authorization/roleDefinitions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
role_name:
description: Role name.
returned: always
type: str
sample: myCustomRoleDefinition
name:
description: System assigned role name.
returned: always
type: str
sample: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
assignable_scopes:
description:
- List of assignable scope of this definition.
returned: always
type: list
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup"
permissions:
description:
- List of Role Definition peremissions.
returned: always
contains:
actions:
description:
- List of allowed actions.
returned: always
type: list
sample: Microsoft.Compute/virtualMachines/read
not_actions:
description:
- List of denied actions.
returned: always
type: list
sample: Microsoft.Compute/virtualMachines/write
data_actions:
description:
- List of allowed data actions.
returned: always
type: list
sample: Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read
not_data_actions:
description:
- List of denied actions.
returned: always
type: list
sample: Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write
id:
description:
- Role Definition ID.
returned: always
type: str
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Authorization/roleDefinitions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
role_name:
description:
- Role name.
returned: always
type: str
sample: myCustomRoleDefinition
name:
description:
- System assigned role name.
returned: always
type: str
sample: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
assignable_scopes:
description:
- List of assignable scopes of this definition.
returned: always
type: list
sample: [ "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup" ]
permissions:
description:
- List of Role Definition permissions.
returned: always
contains:
actions:
description:
- List of allowed actions.
returned: always
type: list
sample: [ 'Microsoft.Compute/virtualMachines/read' ]
not_actions:
description:
- List of denied actions.
returned: always
type: list
sample: [ 'Microsoft.Compute/virtualMachines/write' ]
data_actions:
description:
- List of allowed data actions.
returned: always
type: list
sample: [ 'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read' ]
not_data_actions:
description:
- List of denied data actions.
returned: always
type: list
sample: [ 'Microsoft.Storage/storageAccounts/blobServices/containers/blobs/write' ]
'''
from ansible.module_utils.azure_rm_common import AzureRMModuleBase