AWS.Endpoint — AWS SDK for JavaScript (original) (raw)
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
Class: AWS.Endpoint
Inherits:
Object
- Object
- AWS.Endpoint 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 Summarycollapse
- new AWS.Endpoint(endpoint) ⇒ void constructor
Constructs a new endpoint given an endpoint URL.
Property Summarycollapse
- host ⇒ String readwrite
The host portion of the endpoint including the port, e.g., example.com:80. - hostname ⇒ String readwrite
The host portion of the endpoint, e.g., example.com. - href ⇒ String readwrite
The full URL of the endpoint. - port ⇒ Integer readwrite
The port of the endpoint. - protocol ⇒ String readwrite
The protocol (http or https) of the endpoint URL.
Constructor Details
new AWS.Endpoint(endpoint) ⇒ void
Property Details
host ⇒ String
Returns the host portion of the endpoint including the port, e.g., example.com:80.
hostname ⇒ String
Returns the host portion of the endpoint, e.g., example.com.
href ⇒ String
Returns the full URL of the endpoint.
port ⇒ Integer
Returns the port of the endpoint.
protocol ⇒ String
Returns the protocol (http or https) of the endpoint URL.