getCloudLocationsZoneIds() public static method

Gets defined AWS cloud locations hosted zone ids
public static getCloudLocationsZoneIds ( ) : array
return array
Example #1
0
 /**
  * @param string $name
  * @param string $cloudLocation
  * @return array
  */
 protected function listS3Websites($name, $cloudLocation)
 {
     $result = [];
     $buckets = $this->environment->aws($cloudLocation)->s3->bucket->getWebsite($name);
     if ($buckets) {
         $location = $this->environment->aws($cloudLocation)->s3->bucket->getLocation($name);
         if (empty($location)) {
             $location = 'us-east-1';
         }
         $zoneIds = Aws::getCloudLocationsZoneIds();
         $result[] = array('domainName' => $name . 's3-website-' . $location . '.amazonaws.com', 'aliasZoneId' => isset($zoneIds[$location]) ? $zoneIds[$location] : null, 'title' => self::S3_ALIAS_TARGET_TITLE);
     }
     return $result;
 }