NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class HostNameUtils

Utility class for parsing regions and services from URLs

Namespace: Aws\Common
Located at Aws/Common/HostNameUtils.php

## Methods summary

- `public static` `parseRegionName ( Guzzle\Http\Url $url )`

  Parse the AWS region name from a URL

- `public static` `parseServiceName ( Guzzle\Http\Url $url )`

  Parse the AWS service name from a URL

## Methods detail

# `public static string`
`parseRegionName( `Guzzle\Http\Url` $url )`

Parse the AWS region name from a URL

#### Parameters

$url
  ``Guzzle\Http\Url``
  $url HTTP URL

#### Returns

`string`

#### Link

http://docs.aws.amazon.com/general/latest/gr/rande.html
# `public static string`
`parseServiceName( `Guzzle\Http\Url` $url )`

Parse the AWS service name from a URL

#### Parameters

$url
  ``Guzzle\Http\Url``
  $url HTTP URL

#### Returns

`string`
Returns a service name (or empty string)

#### Link

http://docs.aws.amazon.com/general/latest/gr/rande.html

### Magic methods summary

## Constants summary

`string` | `DEFAULT_REGION` | `'us-east-1'` | #
`string` | `DEFAULT_GOV_REGION` | `'us-gov-west-1'` | #