1 /* 2 * Copyright 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 16 package software.amazon.awssdk.http; 17 18 import software.amazon.awssdk.annotations.SdkProtectedApi; 19 20 /** 21 * Constants for common HTTP status codes. 22 */ 23 @SdkProtectedApi 24 public final class HttpStatusCode { 25 26 // --- 1xx Informational --- 27 28 public static final int CONTINUE = 100; 29 30 // --- 2xx Success --- 31 32 public static final int OK = 200; 33 public static final int CREATED = 201; 34 public static final int ACCEPTED = 202; 35 public static final int NON_AUTHORITATIVE_INFORMATION = 203; 36 public static final int NO_CONTENT = 204; 37 public static final int RESET_CONTENT = 205; 38 public static final int PARTIAL_CONTENT = 206; 39 40 // --- 3xx Redirection --- 41 42 public static final int MOVED_PERMANENTLY = 301; 43 public static final int MOVED_TEMPORARILY = 302; 44 public static final int TEMPORARY_REDIRECT = 307; 45 46 // --- 4xx Client Error --- 47 48 public static final int BAD_REQUEST = 400; 49 public static final int UNAUTHORIZED = 401; 50 public static final int FORBIDDEN = 403; 51 public static final int NOT_FOUND = 404; 52 public static final int METHOD_NOT_ALLOWED = 405; 53 public static final int NOT_ACCEPTABLE = 406; 54 public static final int REQUEST_TIMEOUT = 408; 55 public static final int REQUEST_TOO_LONG = 413; 56 public static final int THROTTLING = 429; 57 58 // --- 5xx Server Error --- 59 60 public static final int INTERNAL_SERVER_ERROR = 500; 61 public static final int BAD_GATEWAY = 502; 62 public static final int SERVICE_UNAVAILABLE = 503; 63 public static final int GATEWAY_TIMEOUT = 504; 64 HttpStatusCode()65 private HttpStatusCode() { 66 } 67 } 68