1 /*
2 * Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 package com.amazonaws;
16
17 /**
18 * Represents the communication protocol to use when sending requests to AWS.
19 * <p>
20 * Communication over HTTPS is the default, and is more secure than HTTP, which
21 * is why AWS recommends using HTTPS. HTTPS connections can use more system
22 * resources because of the extra work to encrypt network traffic, so the option
23 * to use HTTP is available in case users need it.
24 */
25 public enum Protocol {
26
27 /**
28 * HTTP Protocol - Using the HTTP protocol is less secure than HTTPS, but
29 * can slightly reduce the system resources used when communicating with
30 * AWS.
31 */
32 HTTP("http"),
33
34 /**
35 * HTTPS Protocol - Using the HTTPS protocol is more secure than using the
36 * HTTP protocol, but may use slightly more system resources. AWS recommends
37 * using HTTPS for maximize security.
38 */
39 HTTPS("https");
40
41 private final String protocol;
42
43 private Protocol(String protocol) {
44 this.protocol = protocol;
45 }
46
47 /* (non-Javadoc)
48 * @see java.lang.Enum#toString()
49 */
50 @Override
51 public String toString() {
52 return protocol;
53 }
54 }
55