Constructor
new StoragePolicies(client) → {void}
Parameters:
Name | Type | Description |
---|---|---|
client |
BoxClient | The Box API Client that is responsible for making calls to the API |
- Source:
Returns:
- Type
- void
Methods
assign(storagePolicyID, userID, callbackopt) → {Promise.<Object>}
Assign a storage policy to a user
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
storagePolicyID |
string | The ID of the storage policy to assign | |
userID |
string | The ID of the user to assign the storage policy to | |
callback |
function |
<optional> |
Passed the assignment object if successful |
- Source:
Returns:
Promise resolving to the assignment object
- Type
- Promise.<Object>
assign(storagePolicyID, userID, callbackopt) → {Promise.<Object>}
Assign a storage policy to a user
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
storagePolicyID |
string | The ID of the storage policy to assign | |
userID |
string | The ID of the user to assign the storage policy to | |
callback |
function |
<optional> |
Passed the assignment object if successful |
- Source:
Returns:
Promise resolving to the assignment object
- Type
- Promise.<Object>
createAssignment(storagePolicyID, userID, callbackopt) → {Promise.<Object>}
Create a new storage policy assignment to a user
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
storagePolicyID |
string | The ID of the storage policy to assign | |
userID |
string | The ID of the user to assign the storage policy to | |
callback |
function |
<optional> |
Passed the assignment object if successful |
- Source:
Returns:
Promise resolving to the assignment object
- Type
- Promise.<Object>
createAssignment(storagePolicyID, userID, callbackopt) → {Promise.<Object>}
Create a new storage policy assignment to a user
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
storagePolicyID |
string | The ID of the storage policy to assign | |
userID |
string | The ID of the user to assign the storage policy to | |
callback |
function |
<optional> |
Passed the assignment object if successful |
- Source:
Returns:
Promise resolving to the assignment object
- Type
- Promise.<Object>
get(storagePolicyID, optionsopt, callbackopt) → {Promise.<Object>}
Get information about a specific storage policy
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
storagePolicyID |
string | The ID of the storage policy | |||||||||
options |
Object |
<optional> |
Optional parameters
Properties
|
||||||||
callback |
function |
<optional> |
Passed the storage policy object if successful |
- Source:
Returns:
Promise resolving to the storage policy object
- Type
- Promise.<Object>
get(storagePolicyID, optionsopt, callbackopt) → {Promise.<Object>}
Get information about a specific storage policy
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
storagePolicyID |
string | The ID of the storage policy | |||||||||
options |
Object |
<optional> |
Optional parameters
Properties
|
||||||||
callback |
function |
<optional> |
Passed the storage policy object if successful |
- Source:
Returns:
Promise resolving to the storage policy object
- Type
- Promise.<Object>
getAll(optionsopt, callbackopt) → {Promise.<Object>}
Get all available storage policies for the enterprise
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Optional parameters
Properties
|
||||||||
callback |
function |
<optional> |
Passed a collection of storage policies if successful |
- Source:
Returns:
Promise resolving to the collection of storage policies
- Type
- Promise.<Object>
getAll(optionsopt, callbackopt) → {Promise.<Object>}
Get all available storage policies for the enterprise
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Optional parameters
Properties
|
||||||||
callback |
function |
<optional> |
Passed a collection of storage policies if successful |
- Source:
Returns:
Promise resolving to the collection of storage policies
- Type
- Promise.<Object>
getAssignment(assignmentID, callbackopt) → {Promise.<Object>}
Get information about a specific storage policy asisgnment by ID
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
assignmentID |
string | The ID of the assignment | |
callback |
function |
<optional> |
Passed the assignment object if successful |
- Source:
Returns:
Promise resolving to the assignment object
- Type
- Promise.<Object>
getAssignment(assignmentID, callbackopt) → {Promise.<Object>}
Get information about a specific storage policy asisgnment by ID
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
assignmentID |
string | The ID of the assignment | |
callback |
function |
<optional> |
Passed the assignment object if successful |
- Source:
Returns:
Promise resolving to the assignment object
- Type
- Promise.<Object>
getAssignmentForTarget(targetID, optionsopt, callbackopt) → {Promise.<Object>}
Gets the storage policy assignment for a specific user
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
targetID |
string | The ID of the target | |||||||||||
options |
Object |
<optional> |
Optional parameters
Properties
|
||||||||||
callback |
function |
<optional> |
Passed the assignment object if successful |
- Source:
Returns:
Promise resolving to the assignment object
- Type
- Promise.<Object>
getAssignmentForTarget(targetID, optionsopt, callbackopt) → {Promise.<Object>}
Gets the storage policy assignment for a specific user
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
targetID |
string | The ID of the target | |||||||||||
options |
Object |
<optional> |
Optional parameters
Properties
|
||||||||||
callback |
function |
<optional> |
Passed the assignment object if successful |
- Source:
Returns:
Promise resolving to the assignment object
- Type
- Promise.<Object>
removeAssignment(assignmentID, callbackopt) → {Promise.<void>}
Remove a storage policy assignment, returning the user to the default policy
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
assignmentID |
string | The ID of the assignment to remove | |
callback |
function |
<optional> |
Passed nothing if successful |
- Source:
Returns:
Promise resolving if the removal succeeds
- Type
- Promise.<void>
removeAssignment(assignmentID, callbackopt) → {Promise.<void>}
Remove a storage policy assignment, returning the user to the default policy
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
assignmentID |
string | The ID of the assignment to remove | |
callback |
function |
<optional> |
Passed nothing if successful |
- Source:
Returns:
Promise resolving if the removal succeeds
- Type
- Promise.<void>
updateAssignment(assignmentID, updates, callbackopt) → {Promise.<Object>}
Update a storage policy assignment
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
assignmentID |
string | The ID of the storage policy assignment to update | |
updates |
Object | The updates fields to apply | |
callback |
function |
<optional> |
Passed the updated assignment object if successful |
- Source:
Returns:
Promise resolving to the updated assignment object
- Type
- Promise.<Object>
updateAssignment(assignmentID, updates, callbackopt) → {Promise.<Object>}
Update a storage policy assignment
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
assignmentID |
string | The ID of the storage policy assignment to update | |
updates |
Object | The updates fields to apply | |
callback |
function |
<optional> |
Passed the updated assignment object if successful |
- Source:
Returns:
Promise resolving to the updated assignment object
- Type
- Promise.<Object>