Fetches a specific storage policy.
34342
The ID of the storage policy.
Returns a storage policy object.
An unexpected client error.
curl -i -X GET "https://api.box.com/2.0/storage_policies/34342" \
-H "authorization: Bearer <ACCESS_TOKEN>"
await client.storagePolicies.getStoragePolicyById(storagePolicy.id);
client.storage_policies.get_storage_policy_by_id(storage_policy.id)
await client.StoragePolicies.GetStoragePolicyByIdAsync(storagePolicyId: storagePolicy.Id);
try await client.storagePolicies.getStoragePolicyById(storagePolicyId: storagePolicy.id)
BoxStoragePolicy storagePolicy = new BoxStoragePolicy(api, id);
BoxStoragePolicy.Info storagePolicyInfo = storagePolicy.getInfo();
storage_policy = client.storage_policy(policy_id='12345').get()
print(f'Storage Policy ID is {storage_policy.id} and name is {storage_policy.name}')
BoxStoragePolicy policy = await client.StoragePoliciesManager.GetStoragePolicyAsync(policyId: "6");
client.storagePolicies.get('6')
.then(storagePolicy => {
/* storagePolicy -> {
type: 'storage_policy',
id: '6',
name: 'Tokyo & Singapore' }
*/
});
client.storagePolicies.get(storagePolicyId: "22222") { (result: Result<StoragePolicy, BoxSDKError>) in
guard case let .success(policy) = result else {
print("Error getting storage policy")
return
}
print("Policy ID is \(policy.id)")
}
{
"id": "11446498",
"type": "storage_policy",
"name": "Montreal / Dublin"
}