@@ -58,7 +58,7 @@ public Debug withNameSpace(final String nameSpace) {
5858 * </blockquote>
5959 */
6060 public HealthResponse health () throws VaultException {
61- return health (null , null , null , null , null );
61+ return health (null , null , null , null , null , null , null , null );
6262 }
6363
6464 /**
@@ -75,23 +75,32 @@ public HealthResponse health() throws VaultException {
7575 *
7676 * @param standbyOk (optional) Indicates that being a standby should still return the active
7777 * status code instead of the standby code
78+ * @param perfstandbyOk (optional) Indicates that being a performance standby should still
79+ * return the active status code instead of the performance standby code.
7880 * @param activeCode (optional) Indicates the status code that should be returned for an active
7981 * node instead of the default of 200
8082 * @param standbyCode (optional) Indicates the status code that should be returned for a standby
8183 * node instead of the default of 429
84+ * @param drsecondaryCode (optional) Indicates the status code that should be returned for a DR
85+ * secondary node instead of the default of 472
86+ * @param performanceStandbyCode (optional) Indicates the status code that should be returned
87+ * for a performance standby node instead of the default of 473
8288 * @param sealedCode (optional) Indicates the status code that should be returned for a sealed
8389 * node instead of the default of 500
84- * @param performanceStandbyCode (optional) Indicates the status code that should be
85- * returned for a performanceStandbyCode node instead of the default of 473
90+ * @param uninitCode (optional) Indicates the status code that should be returned for a
91+ * uninitialized node instead of the default of 500
8692 * @return The response information returned from Vault
8793 * @throws VaultException If an error occurs or unexpected response received from Vault
8894 */
8995 public HealthResponse health (
9096 final Boolean standbyOk ,
97+ final Boolean perfstandbyOk ,
9198 final Integer activeCode ,
9299 final Integer standbyCode ,
100+ final Integer drsecondaryCode ,
101+ final Integer performanceStandbyCode ,
93102 final Integer sealedCode ,
94- final Integer performanceStandbyCode
103+ final Integer uninitCode
95104 ) throws VaultException {
96105 final String path = "sys/health" ;
97106
@@ -110,38 +119,57 @@ public HealthResponse health(
110119 if (standbyOk != null ) {
111120 rest .parameter ("standbyok" , standbyOk .toString ());
112121 }
122+ if (perfstandbyOk != null ) {
123+ rest .parameter ("perfstandbyok" , perfstandbyOk .toString ());
124+ }
113125 if (activeCode != null ) {
114126 rest .parameter ("activecode" , activeCode .toString ());
115127 }
116128 if (standbyCode != null ) {
117129 rest .parameter ("standbycode" , standbyCode .toString ());
118130 }
131+ if (drsecondaryCode != null ) {
132+ rest .parameter ("drsecondarycode" , drsecondaryCode .toString ());
133+ }
134+ if (performanceStandbyCode != null ) {
135+ rest .parameter ("performancestandbycode" , performanceStandbyCode .toString ());
136+ }
119137 if (sealedCode != null ) {
120138 rest .parameter ("sealedcode" , sealedCode .toString ());
121139 }
122- if (performanceStandbyCode != null ) rest .parameter ("performancestandbycode" ,
123- performanceStandbyCode .toString ());
140+ if (uninitCode != null ) {
141+ rest .parameter ("uninitcode" , uninitCode .toString ());
142+ }
124143 // Execute request
125144 final RestResponse restResponse = rest .get ();
126145
127146 // Validate response
128147 final Set <Integer > validCodes = new HashSet <>();//NOPMD
129148 validCodes .add (200 );
130149 validCodes .add (429 );
131- validCodes .add (500 );
150+ validCodes .add (472 );
132151 validCodes .add (473 );
152+ validCodes .add (500 );
153+ validCodes .add (501 );
154+ validCodes .add (503 );
133155 if (activeCode != null ) {
134156 validCodes .add (activeCode );
135157 }
136158 if (standbyCode != null ) {
137159 validCodes .add (standbyCode );
138160 }
161+ if (drsecondaryCode != null ) {
162+ validCodes .add (drsecondaryCode );
163+ }
139164 if (sealedCode != null ) {
140165 validCodes .add (sealedCode );
141166 }
142167 if (performanceStandbyCode != null ) {
143168 validCodes .add (performanceStandbyCode );
144169 }
170+ if (uninitCode != null ) {
171+ validCodes .add (uninitCode );
172+ }
145173
146174 if (!validCodes .contains (restResponse .getStatus ())) {
147175 throw new VaultException (
0 commit comments