Class: AWS.Endpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/http.js

Overview

The endpoint that a service will talk to, for example, 'https://ec2.ap-southeast-1.amazonaws.com'. If you need to override an endpoint for a service, you can set the endpoint on a service by passing the endpoint object with the endpoint option key:

var ep = new AWS.Endpoint('awsproxy.example.com');
var s3 = new AWS.S3({endpoint: ep});
s3.service.endpoint.hostname == 'awsproxy.example.com'

Note that if you do not specify a protocol, the protocol will be selected based on your current AWS.config configuration.

Constructor Summary (collapse)

Property Summary (collapse)

Constructor Details

new AWS.Endpoint(endpoint)

Constructs a new endpoint given an endpoint URL. If the URL omits a protocol (http or https), the default protocol set in the global AWS.config will be used.

Parameters:

  • endpoint (String)

    the URL to construct an endpoint from

Property Details

(String) host (readwrite)

Returns the host portion of the endpoint including the port, e.g., example.com:80

Returns:

  • (String)

    the host portion of the endpoint including the port, e.g., example.com:80

(String) hostname (readwrite)

Returns the host portion of the endpoint, e.g., example.com

Returns:

  • (String)

    the host portion of the endpoint, e.g., example.com

(String) href (readwrite)

Returns the full URL of the endpoint

Returns:

  • (String)

    the full URL of the endpoint

(Integer) port (readwrite)

Returns the port of the endpoint

Returns:

  • (Integer)

    the port of the endpoint

(String) protocol (readwrite)

Returns the protocol (http or https) of the endpoint URL

Returns:

  • (String)

    the protocol (http or https) of the endpoint URL