php - What is the difference between Location and EffectiveURI? -
i created bucket named ghazals-ghulam-ali
on aws
, in return got 2 url's:
location : http://ghazals-ghulam-ali.s3.amazonaws.com/ effectiveuri : https://s3-us-west-2.amazonaws.com/ghazals-ghulam-ali
what difference between location
, effectiveuri
? how both useful me?
i created bucket using aws php sdk
follows:
public function create_bucket($user_id) { try { $this->s3client = new s3client($this->options); $isbucketcreated = $this->s3client->createbucket(array( 'bucket' => _global::bucketnameprecursor.$user_id )); }catch(exception $exc){ $isbucketcreated = false; } return $isbucketcreated; }
value echo $isbucketcreated
: (bucketname : ghazals-noor-jahan)
{ "location": "http:\/\/ghazals-noor-jahan.s3.amazonaws.com\/", "@metadata": { "statuscode": 200, "effectiveuri": "https:\/\/s3-us-west- 2.amazonaws.com\/ghazals-noor-jahan", "headers": { "x-amz-id-2": "bsf4q230wque4zrxviissdfh76sw7vmw1qnafv2puhyz1qkrcmabtih lrlvvmhihk9yv4n7zfva=", "x-amz-request-id": "ceda84e8e932ab7b", "date": "mon, 08 feb 2016 13:16:34 gmt", "location": "http:\/\/ghazals-noor- jahan.s3.amazonaws.com\/", "content-length": "0", "server": "amazons3" } } }
the location global reference bucket created , used in api connections bucket in question connecting bucket browser. effectiveuri meta internal meta passed php sdk , indicates availability zone s3 bucket hosted out of, s3 global service , s3 bucket names required globally unique location use references effective uri , eliminates developers need add availability zone bucket uri well.
for purposes value care in further programming , value of use location value.
Comments
Post a Comment