Cloud Storage Integrator 2016 Node.js Edition
Cloud Storage Integrator 2016 Node.js Edition
Questions / Feedback?

AccessPolicy Property

The access policy assigned to a container.

Syntax

 azureblob.getAccessPolicy([callback])
 azureblob.setAccessPolicy( accessPolicy, [callback])

Possible Values

  0 (apFullPublic), 
  1 (apBlobsOnly), 
  2 (apPrivate)

Default Value

2


Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getAccessPolicy([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setAccessPolicy([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This property allows you to specify whether blobs in a container can be accessed publicly. The access policy is set for a container when calling CreateContainer or SetContainerACL. AccessPolicy will also be populated after a GetContainerACL call.

The available access policies are:

0 (apFullPublic)Full public read access. Both ContainerName and blob data can be read via anonymous requests.
1 (apBlobsOnly)Public read access for blobs only. Only blob data within ContainerName can be read via anonymous requests.
2 (apPrivate)No public read access. ContainerName and blob data can be read by the account owner only.

Data Type

Integer

 
 
Copyright (c) 2019 /n software inc. - All rights reserved.
Cloud Storage Integrator 2016 Node.js Edition - Version 16.0 [Build 7239]