public static getCloudLocationsZoneIds ( ) : array | ||
Résultat | array |
public static function getCloudLocationsZoneIds()
{
return [self::REGION_AP_NORTHEAST_1 => self::ZONE_ID_AP_NORTHEAST_1, self::REGION_AP_NORTHEAST_2 => self::ZONE_ID_AP_NORTHEAST_2, self::REGION_AP_SOUTHEAST_1 => self::ZONE_ID_AP_SOUTHEAST_1, self::REGION_AP_SOUTHEAST_2 => self::ZONE_ID_AP_SOUTHEAST_2, self::REGION_EU_WEST_1 => self::ZONE_ID_EU_WEST_1, self::REGION_EU_CENTRAL_1 => self::ZONE_ID_EU_CENTRAL_1, self::REGION_SA_EAST_1 => self::ZONE_ID_SA_EAST_1, self::REGION_US_EAST_1 => self::ZONE_ID_US_EAST_1, self::REGION_US_WEST_1 => self::ZONE_ID_US_WEST_1, self::REGION_US_WEST_2 => self::ZONE_ID_US_WEST_2, self::REGION_US_GOV_WEST_1 => self::ZONE_ID_US_GOV_WEST_1];
}
/** * @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; }