role_assignments#

Exec module for managing Authorization Role Assignments.

async idem_azure.exec.azure.authorization.role_assignments.get(hub, ctx, resource_id: str, name: str = None, raw: bool = False) Dict[str, Any][source]#

Get role assignment from resource_id.

Parameters:
  • resource_id (str) – The resource_id of role assignment

  • name (str, Optional) – The name of the resource

  • raw (bool, Optional) – Returns raw response if True. Defaults to False

Returns:

Dict[str, Any]

Examples

Calling this exec module function from the cli with resource_id:

idem exec azure.authorization.role_assignments.get resource_id="value"  raw="False"

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path:  azure.network.public_ip_addresses.get
    - kwargs:
        name: "my_resource"
        resource_id: "{scope}/providers/Microsoft.Authorization/roleAssignments/{role_assignment_name}"
        raw: False
async idem_azure.exec.azure.authorization.role_assignments.list_(hub, ctx) Dict[source]#

List of role assignment

Returns:

Dict[str, Any]

Examples

Calling this exec module function from the cli with resource_id:

idem exec azure.authorization.role_assignments.list

Using in a state:

my_unmanaged_resource:
  exec.run:
    - path: azure.authorization.role_assignments.list