public static final class CustomErrorResponsePolicy.Builder extends GeneratedMessageV3.Builder<CustomErrorResponsePolicy.Builder> implements CustomErrorResponsePolicyOrBuilder
Specifies the custom error response policy that must be applied when the backend service or backend bucket responds with an error.
Protobuf type google.cloud.compute.v1.CustomErrorResponsePolicy
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addAllErrorResponseRules(Iterable<? extends CustomErrorResponsePolicyCustomErrorResponseRule> values)
public CustomErrorResponsePolicy.Builder addAllErrorResponseRules(Iterable<? extends CustomErrorResponsePolicyCustomErrorResponseRule> values)
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
| Parameter |
| Name |
Description |
values |
Iterable<? extends com.google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule>
|
addErrorResponseRules(CustomErrorResponsePolicyCustomErrorResponseRule value)
public CustomErrorResponsePolicy.Builder addErrorResponseRules(CustomErrorResponsePolicyCustomErrorResponseRule value)
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
addErrorResponseRules(CustomErrorResponsePolicyCustomErrorResponseRule.Builder builderForValue)
public CustomErrorResponsePolicy.Builder addErrorResponseRules(CustomErrorResponsePolicyCustomErrorResponseRule.Builder builderForValue)
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
addErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule value)
public CustomErrorResponsePolicy.Builder addErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule value)
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
addErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule.Builder builderForValue)
public CustomErrorResponsePolicy.Builder addErrorResponseRules(int index, CustomErrorResponsePolicyCustomErrorResponseRule.Builder builderForValue)
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
addErrorResponseRulesBuilder()
public CustomErrorResponsePolicyCustomErrorResponseRule.Builder addErrorResponseRulesBuilder()
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
addErrorResponseRulesBuilder(int index)
public CustomErrorResponsePolicyCustomErrorResponseRule.Builder addErrorResponseRulesBuilder(int index)
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
| Parameter |
| Name |
Description |
index |
int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CustomErrorResponsePolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public CustomErrorResponsePolicy build()
buildPartial()
public CustomErrorResponsePolicy buildPartial()
clear()
public CustomErrorResponsePolicy.Builder clear()
Overrides
clearErrorResponseRules()
public CustomErrorResponsePolicy.Builder clearErrorResponseRules()
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
clearErrorService()
public CustomErrorResponsePolicy.Builder clearErrorService()
The full or partial URL to the BackendBucket resource that contains the custom error content. Examples are: - https://www.googleapis.com/compute/v1/projects/project/global/backendBuckets/myBackendBucket - compute/v1/projects/project/global/backendBuckets/myBackendBucket - global/backendBuckets/myBackendBucket If errorService is not specified at lower levels like pathMatcher, pathRule and routeRule, an errorService specified at a higher level in the UrlMap will be used. If UrlMap.defaultCustomErrorResponsePolicy contains one or more errorResponseRules[], it must specify errorService. If load balancer cannot reach the backendBucket, a simple Not Found Error will be returned, with the original response code (or overrideResponseCode if configured). errorService is not supported for internal or regional HTTP/HTTPS load balancers.
optional string error_service = 164214654;
clearField(Descriptors.FieldDescriptor field)
public CustomErrorResponsePolicy.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public CustomErrorResponsePolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public CustomErrorResponsePolicy.Builder clone()
Overrides
getDefaultInstanceForType()
public CustomErrorResponsePolicy getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getErrorResponseRules(int index)
public CustomErrorResponsePolicyCustomErrorResponseRule getErrorResponseRules(int index)
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
| Parameter |
| Name |
Description |
index |
int
|
getErrorResponseRulesBuilder(int index)
public CustomErrorResponsePolicyCustomErrorResponseRule.Builder getErrorResponseRulesBuilder(int index)
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
| Parameter |
| Name |
Description |
index |
int
|
getErrorResponseRulesBuilderList()
public List<CustomErrorResponsePolicyCustomErrorResponseRule.Builder> getErrorResponseRulesBuilderList()
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
getErrorResponseRulesCount()
public int getErrorResponseRulesCount()
Specifies rules for returning error responses. In a given policy, if you specify rules for both a range of error codes as well as rules for specific error codes then rules with specific error codes have a higher priority. For example, assume that you configure a rule for 401 (Un-authorized) code, and another for all 4 series error codes (4XX). If the backend service returns a 401, then the rule for 401 will be applied. However if the backend service returns a 403, the rule for 4xx takes effect.
repeated .google.cloud.compute.v1.CustomErrorResponsePolicyCustomErrorResponseRule error_response_rules = 14620304;
| Returns |
| Type |
Description |
int |
|
getErrorResponseRulesList()