write_role_assignment
Use the write_role_assignment
command to write the selected role assignment with its current settings to a file in JSON format. You can use this command to save the currently selected role assignment that is stored in memory to a file with the permissions of 0600. If the file already exists, the command truncates the file. If the command cannot open or write to the specified file, the command fails with an error message.
Zone type
Hierarchical only
Syntax
write_role_assignment file
Abbreviation
wra
Options
This command takes no options.
Arguments
This command takes the following argument:
Argument | Type | Description |
file |
string |
Required. Specifies the file to which the command writes the role assignment. |
Return value
This command returns nothing.
Examples
write_role_assignment roleassignment.txt
Related commands
Before you use this command, you must have a currently selected zone stored in memory. The following commands enable you to view and select role assignment to work with:
- get_role_assignments returns a Tcl list of role assignments in the current zone.
- list_role_assignments lists to
stdout
the role assignments in the current zone. - new_role_assignment creates a new role assignment and stores it in memory.
- select_role_assignment retrieves a role assignment from Active Directory and stores it in memory.
- save_role_assignment saves a role assignment to Active Directory.
After you have a role assignment stored in memory, you can use the following commands to work with that role assignment’s attributes, delete the role assignment, or save information for the role assignment:
- delete_role_assignment deletes the selected role assignment from Active Directory and from memory.
- get_role_assignment_field reads a field value from the current role assignment.
- save_role_assignment saves the selected role assignment with its current settings to Active Directory.
- set_role_assignment_field sets a field value in the current role assignment.
- write_role_assignment saves the selected role assignment to a file.