IPWorks Cloud 2020 Node.js Edition

Questions / Feedback?

Region Property

The region the class will make requests against.

Syntax

 linode.getRegion([callback])
 linode.setRegion( region, [callback])

Default Value

"us-east-1"

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 getRegion([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 setRegion([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 control which region the class will make requests against. By default the class uses us-east-1. This property should be changed to create or access resources in other regions.

Regions:

Value Region
us-east-1 (default) US East (Newark)
eu-central-1 EU Central (Frankfurt)

Important: Each "region" supported by Linode's Object Storage service is actually a completely standalone storage cluster. These clusters do not interact with each other in any way, which causes the following non-standard behaviors:

  • Bucket names may be reused in each region (however, they must still be "globally" unique within each region).
  • The ListBuckets method will only return buckets located in the currently-selected region; there is no way to retrieve a list of all regions' buckets.
  • Similarly, the BucketExists and GetBucketLocation methods only consider buckets located in the currently-selected region.
  • The CopyObject method cannot be used to copy objects to a bucket in another region.

The class will always convert this property's value to lowercase. If this property is cleared, the class will reset it to the default value.

Data Type

String

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Node.js Edition - Version 20.0 [Build 8265]