StoragePoliciesModule
public class StoragePoliciesModule
Undocumented
-
Get information about a storage policy.
Declaration
Swift
public func get( storagePolicyId: String, fields: [String]? = nil, completion: @escaping Callback<StoragePolicy> )Parameters
storagePolicyIdId for storage policy needed.
fieldsString array of fields to include in the response. Any attribute in the full Storage Policy objects can be passed in the fields parameter to get specific attributes.
completionReturns a StoragePolicy response object if successful otherwise a BoxSDKError.
-
Get all of the storage policies in an enterprise.
Declaration
Swift
public func listForEnterprise( marker: String? = nil, limit: Int? = nil, fields: [String]? = nil ) -> PaginationIterator<StoragePolicy>Parameters
markerThe position marker at which to begin the response. See marker-based paging for details. This parameter cannot be used simultaneously with the ‘offset’ parameter.
limitThe maximum number of items to return. The default is 100 and the maximum is 1,000.
fieldsString array of fields to include in the response. Any attribute in the full StoragePolicy objects can be passed in the fields parameter to get specific attributes.
-
Get storage policy assignment information.
Declaration
Swift
public func getAssignment( storagePolicyAssignmentId: String, fields: [String]? = nil, completion: @escaping Callback<StoragePolicyAssignment> )Parameters
storagePolicyAssignmentIdId for storage policy assignment needed.
fieldsString array of fields to include in the response. Any attribute in the full Storage Policy Assignment objects can be passed in the fields parameter to get specific attributes.
completionReturns a StoragePolicyAssignment response object if successful otherwise a BoxSDKError.
-
Get the storage policy assignment assigned to a user or enterprise.
Declaration
Swift
public func listAssignments( resolvedForType: String, resolvedForId: String, fields: [String]? = nil, completion: @escaping Callback<StoragePolicyAssignment> )Parameters
resolvedForTypeSpecify user or enterprise.
resolverForIdSpecify Id of user or enterprise
fieldsString array of fields to include in the response. Any attribute in the full StoragePolicy objects can be passed in the fields parameter to get specific attributes.
-
Create storage policy assignment.
Declaration
Swift
public func assign( storagePolicyId: String, assignedToType: String, assignedToId: String, fields: [String]? = nil, completion: @escaping Callback<StoragePolicyAssignment> )Parameters
storagePolicyIdId of the storage policy.
assignedToTypeSet type to
user
orenterprise
.assignedToIdId of the user or enterprise.
fieldsString array of fields to include in the response. Any attribute in the full Storage Policy Assignment objects can be passed in the fields parameter to get specific attributes.
completionReturns a StoragePolicyAssignment response object if successful otherwise a BoxSDKError.
-
Assign policy
Declaration
Swift
public func forceAssign( storagePolicyId: String, assignedToType: String, assignedToId: String, fields: [String]? = nil, completion: @escaping Callback<StoragePolicyAssignment> )Parameters
storagePolicyIdId of the storage policy.
assignedToTypeSet type to
user
orenterprise
.assignedToIdId of the user or enterprise.
fieldsString array of fields to include in the response. Any attribute in the full Storage Policy Assignment objects can be passed in the fields parameter to get specific attributes.
completionReturns a StoragePolicyAssignment response object if successful otherwise a BoxSDKError.
-
Update storage policy assignment.
Declaration
Swift
public func updateAssignment( storagePolicyAssignmentId: String, storagePolicyId: String? = nil, fields: [String]? = nil, completion: @escaping Callback<StoragePolicyAssignment> )Parameters
storagePolicyAssignmentIdId for storage policy assignment to update.
storagePolicyIdId for the storage policy.
fieldsString array of fields to include in the response. Any attribute in the full Storage Policy Assignment objects can be passed in the fields parameter to get specific attributes.
completionReturns a Storage Policy Assignment response object if successful otherwise a BoxSDKError.
-
Deleting a storage policy assignment means the user will inherit the Enterprise’s default storage policy.
Declaration
Swift
public func deleteAssignment( storagePolicyAssignmentId: String, completion: @escaping Callback<Void> )Parameters
storagePolicyAssignmentIdId for storage policy assignment.
completionReturns Void if the storage policy assignment is deleted.
StoragePoliciesModule Class Reference