public static final class VirtualServiceOuterClass.HTTPMatchRequest extends com.google.protobuf.GeneratedMessageV3 implements VirtualServiceOuterClass.HTTPMatchRequestOrBuilder
HttpMatchRequest specifies a set of criterion to be met in order for the
rule to be applied to the HTTP request. For example, the following
restricts the rule to match only requests where the URL path
starts with /ratings/v2/ and the request contains a custom `end-user` header
with value `jason`.
{{<tabset category-name="example">}}
{{<tab name="v1alpha3" category-value="v1alpha3">}}
```yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: ratings-route
spec:
hosts:
- ratings.prod.svc.cluster.local
http:
- match:
- headers:
end-user:
exact: jason
uri:
prefix: "/ratings/v2/"
ignoreUriCase: true
route:
- destination:
host: ratings.prod.svc.cluster.local
```
{{</tab>}}
{{<tab name="v1beta1" category-value="v1beta1">}}
```yaml
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: ratings-route
spec:
hosts:
- ratings.prod.svc.cluster.local
http:
- match:
- headers:
end-user:
exact: jason
uri:
prefix: "/ratings/v2/"
ignoreUriCase: true
route:
- destination:
host: ratings.prod.svc.cluster.local
```
{{</tab>}}
{{</tabset>}}
HTTPMatchRequest CANNOT be empty.
**Note:** No regex string match can be set when delegate VirtualService is specified.
Protobuf type istio.networking.v1alpha3.HTTPMatchRequest| 限定符和类型 | 类和说明 |
|---|---|
static class |
VirtualServiceOuterClass.HTTPMatchRequest.Builder
HttpMatchRequest specifies a set of criterion to be met in order for the
rule to be applied to the HTTP request.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| 限定符和类型 | 字段和说明 |
|---|---|
static int |
AUTHORITY_FIELD_NUMBER |
static int |
GATEWAYS_FIELD_NUMBER |
static int |
HEADERS_FIELD_NUMBER |
static int |
IGNORE_URI_CASE_FIELD_NUMBER |
static int |
METHOD_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
PORT_FIELD_NUMBER |
static int |
QUERY_PARAMS_FIELD_NUMBER |
static int |
SCHEME_FIELD_NUMBER |
static int |
SOURCE_LABELS_FIELD_NUMBER |
static int |
SOURCE_NAMESPACE_FIELD_NUMBER |
static int |
URI_FIELD_NUMBER |
static int |
WITHOUT_HEADERS_FIELD_NUMBER |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
containsHeaders(String key)
The header keys must be lowercase and use hyphen as the separator,
e.g.
|
boolean |
containsQueryParams(String key)
Query parameters for matching.
|
boolean |
containsSourceLabels(String key)
One or more labels that constrain the applicability of a rule to
workloads with the given labels.
|
boolean |
containsWithoutHeaders(String key)
withoutHeader has the same syntax with the header, but has opposite meaning.
|
boolean |
equals(Object obj) |
VirtualServiceOuterClass.StringMatch |
getAuthority()
HTTP Authority
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch authority = 4; |
VirtualServiceOuterClass.StringMatchOrBuilder |
getAuthorityOrBuilder()
HTTP Authority
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch authority = 4; |
static VirtualServiceOuterClass.HTTPMatchRequest |
getDefaultInstance() |
VirtualServiceOuterClass.HTTPMatchRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getGateways(int index)
Names of gateways where the rule should be applied.
|
com.google.protobuf.ByteString |
getGatewaysBytes(int index)
Names of gateways where the rule should be applied.
|
int |
getGatewaysCount()
Names of gateways where the rule should be applied.
|
com.google.protobuf.ProtocolStringList |
getGatewaysList()
Names of gateways where the rule should be applied.
|
Map<String,VirtualServiceOuterClass.StringMatch> |
getHeaders()
已过时。
|
int |
getHeadersCount()
The header keys must be lowercase and use hyphen as the separator,
e.g.
|
Map<String,VirtualServiceOuterClass.StringMatch> |
getHeadersMap()
The header keys must be lowercase and use hyphen as the separator,
e.g.
|
VirtualServiceOuterClass.StringMatch |
getHeadersOrDefault(String key,
VirtualServiceOuterClass.StringMatch defaultValue)
The header keys must be lowercase and use hyphen as the separator,
e.g.
|
VirtualServiceOuterClass.StringMatch |
getHeadersOrThrow(String key)
The header keys must be lowercase and use hyphen as the separator,
e.g.
|
boolean |
getIgnoreUriCase()
Flag to specify whether the URI matching should be case-insensitive.
|
VirtualServiceOuterClass.StringMatch |
getMethod()
HTTP Method
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch method = 3; |
VirtualServiceOuterClass.StringMatchOrBuilder |
getMethodOrBuilder()
HTTP Method
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch method = 3; |
String |
getName()
The name assigned to a match.
|
com.google.protobuf.ByteString |
getNameBytes()
The name assigned to a match.
|
com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPMatchRequest> |
getParserForType() |
int |
getPort()
Specifies the ports on the host that is being addressed.
|
Map<String,VirtualServiceOuterClass.StringMatch> |
getQueryParams()
已过时。
|
int |
getQueryParamsCount()
Query parameters for matching.
|
Map<String,VirtualServiceOuterClass.StringMatch> |
getQueryParamsMap()
Query parameters for matching.
|
VirtualServiceOuterClass.StringMatch |
getQueryParamsOrDefault(String key,
VirtualServiceOuterClass.StringMatch defaultValue)
Query parameters for matching.
|
VirtualServiceOuterClass.StringMatch |
getQueryParamsOrThrow(String key)
Query parameters for matching.
|
VirtualServiceOuterClass.StringMatch |
getScheme()
URI Scheme
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch scheme = 2; |
VirtualServiceOuterClass.StringMatchOrBuilder |
getSchemeOrBuilder()
URI Scheme
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch scheme = 2; |
int |
getSerializedSize() |
Map<String,String> |
getSourceLabels()
已过时。
|
int |
getSourceLabelsCount()
One or more labels that constrain the applicability of a rule to
workloads with the given labels.
|
Map<String,String> |
getSourceLabelsMap()
One or more labels that constrain the applicability of a rule to
workloads with the given labels.
|
String |
getSourceLabelsOrDefault(String key,
String defaultValue)
One or more labels that constrain the applicability of a rule to
workloads with the given labels.
|
String |
getSourceLabelsOrThrow(String key)
One or more labels that constrain the applicability of a rule to
workloads with the given labels.
|
String |
getSourceNamespace()
Source namespace constraining the applicability of a rule to workloads in that namespace.
|
com.google.protobuf.ByteString |
getSourceNamespaceBytes()
Source namespace constraining the applicability of a rule to workloads in that namespace.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
VirtualServiceOuterClass.StringMatch |
getUri()
URI to match
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
**Note:** Case-insensitive matching could be enabled via the
`ignore_uri_case` flag.
|
VirtualServiceOuterClass.StringMatchOrBuilder |
getUriOrBuilder()
URI to match
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
**Note:** Case-insensitive matching could be enabled via the
`ignore_uri_case` flag.
|
Map<String,VirtualServiceOuterClass.StringMatch> |
getWithoutHeaders()
已过时。
|
int |
getWithoutHeadersCount()
withoutHeader has the same syntax with the header, but has opposite meaning.
|
Map<String,VirtualServiceOuterClass.StringMatch> |
getWithoutHeadersMap()
withoutHeader has the same syntax with the header, but has opposite meaning.
|
VirtualServiceOuterClass.StringMatch |
getWithoutHeadersOrDefault(String key,
VirtualServiceOuterClass.StringMatch defaultValue)
withoutHeader has the same syntax with the header, but has opposite meaning.
|
VirtualServiceOuterClass.StringMatch |
getWithoutHeadersOrThrow(String key)
withoutHeader has the same syntax with the header, but has opposite meaning.
|
boolean |
hasAuthority()
HTTP Authority
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch authority = 4; |
int |
hashCode() |
boolean |
hasMethod()
HTTP Method
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch method = 3; |
boolean |
hasScheme()
URI Scheme
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch scheme = 2; |
boolean |
hasUri()
URI to match
values are case-sensitive and formatted as follows:
- `exact: "value"` for exact string match
- `prefix: "value"` for prefix-based match
- `regex: "value"` for ECMAscript style regex-based match
**Note:** Case-insensitive matching could be enabled via the
`ignore_uri_case` flag.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static VirtualServiceOuterClass.HTTPMatchRequest.Builder |
newBuilder() |
static VirtualServiceOuterClass.HTTPMatchRequest.Builder |
newBuilder(VirtualServiceOuterClass.HTTPMatchRequest prototype) |
VirtualServiceOuterClass.HTTPMatchRequest.Builder |
newBuilderForType() |
protected VirtualServiceOuterClass.HTTPMatchRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseDelimitedFrom(InputStream input) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(byte[] data) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(ByteBuffer data) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(com.google.protobuf.ByteString data) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(InputStream input) |
static VirtualServiceOuterClass.HTTPMatchRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPMatchRequest> |
parser() |
VirtualServiceOuterClass.HTTPMatchRequest.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTopublic static final int NAME_FIELD_NUMBER
public static final int URI_FIELD_NUMBER
public static final int SCHEME_FIELD_NUMBER
public static final int METHOD_FIELD_NUMBER
public static final int AUTHORITY_FIELD_NUMBER
public static final int HEADERS_FIELD_NUMBER
public static final int PORT_FIELD_NUMBER
public static final int SOURCE_LABELS_FIELD_NUMBER
public static final int GATEWAYS_FIELD_NUMBER
public static final int QUERY_PARAMS_FIELD_NUMBER
public static final int IGNORE_URI_CASE_FIELD_NUMBER
public static final int WITHOUT_HEADERS_FIELD_NUMBER
public static final int SOURCE_NAMESPACE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance 在类中 com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields 在接口中 com.google.protobuf.MessageOrBuildergetUnknownFields 在类中 com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField 在类中 com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable 在类中 com.google.protobuf.GeneratedMessageV3public String getName()
The name assigned to a match. The match's name will be concatenated with the parent route's name and will be logged in the access logs for requests matching this route.
string name = 11;getName 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
The name assigned to a match. The match's name will be concatenated with the parent route's name and will be logged in the access logs for requests matching this route.
string name = 11;getNameBytes 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic boolean hasUri()
URI to match values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match **Note:** Case-insensitive matching could be enabled via the `ignore_uri_case` flag.
.istio.networking.v1alpha3.StringMatch uri = 1;hasUri 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic VirtualServiceOuterClass.StringMatch getUri()
URI to match values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match **Note:** Case-insensitive matching could be enabled via the `ignore_uri_case` flag.
.istio.networking.v1alpha3.StringMatch uri = 1;getUri 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic VirtualServiceOuterClass.StringMatchOrBuilder getUriOrBuilder()
URI to match values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match **Note:** Case-insensitive matching could be enabled via the `ignore_uri_case` flag.
.istio.networking.v1alpha3.StringMatch uri = 1;public boolean hasScheme()
URI Scheme values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch scheme = 2;hasScheme 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic VirtualServiceOuterClass.StringMatch getScheme()
URI Scheme values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch scheme = 2;getScheme 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic VirtualServiceOuterClass.StringMatchOrBuilder getSchemeOrBuilder()
URI Scheme values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch scheme = 2;public boolean hasMethod()
HTTP Method values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch method = 3;hasMethod 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic VirtualServiceOuterClass.StringMatch getMethod()
HTTP Method values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch method = 3;getMethod 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic VirtualServiceOuterClass.StringMatchOrBuilder getMethodOrBuilder()
HTTP Method values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch method = 3;public boolean hasAuthority()
HTTP Authority values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch authority = 4;hasAuthority 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic VirtualServiceOuterClass.StringMatch getAuthority()
HTTP Authority values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch authority = 4;getAuthority 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic VirtualServiceOuterClass.StringMatchOrBuilder getAuthorityOrBuilder()
HTTP Authority values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match
.istio.networking.v1alpha3.StringMatch authority = 4;public int getHeadersCount()
The header keys must be lowercase and use hyphen as the separator, e.g. _x-request-id_. Header values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match If the value is empty and only the name of header is specfied, presence of the header is checked. **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored.
map<string, .istio.networking.v1alpha3.StringMatch> headers = 5;public boolean containsHeaders(String key)
The header keys must be lowercase and use hyphen as the separator, e.g. _x-request-id_. Header values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match If the value is empty and only the name of header is specfied, presence of the header is checked. **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored.
map<string, .istio.networking.v1alpha3.StringMatch> headers = 5;@Deprecated public Map<String,VirtualServiceOuterClass.StringMatch> getHeaders()
getHeadersMap() instead.public Map<String,VirtualServiceOuterClass.StringMatch> getHeadersMap()
The header keys must be lowercase and use hyphen as the separator, e.g. _x-request-id_. Header values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match If the value is empty and only the name of header is specfied, presence of the header is checked. **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored.
map<string, .istio.networking.v1alpha3.StringMatch> headers = 5;public VirtualServiceOuterClass.StringMatch getHeadersOrDefault(String key, VirtualServiceOuterClass.StringMatch defaultValue)
The header keys must be lowercase and use hyphen as the separator, e.g. _x-request-id_. Header values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match If the value is empty and only the name of header is specfied, presence of the header is checked. **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored.
map<string, .istio.networking.v1alpha3.StringMatch> headers = 5;public VirtualServiceOuterClass.StringMatch getHeadersOrThrow(String key)
The header keys must be lowercase and use hyphen as the separator, e.g. _x-request-id_. Header values are case-sensitive and formatted as follows: - `exact: "value"` for exact string match - `prefix: "value"` for prefix-based match - `regex: "value"` for ECMAscript style regex-based match If the value is empty and only the name of header is specfied, presence of the header is checked. **Note:** The keys `uri`, `scheme`, `method`, and `authority` will be ignored.
map<string, .istio.networking.v1alpha3.StringMatch> headers = 5;public int getPort()
Specifies the ports on the host that is being addressed. Many services only expose a single port or label ports with the protocols they support, in these cases it is not required to explicitly select the port.
uint32 port = 6;getPort 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic int getSourceLabelsCount()
One or more labels that constrain the applicability of a rule to workloads with the given labels. If the VirtualService has a list of gateways specified in the top-level `gateways` field, it must include the reserved gateway `mesh` for this field to be applicable.
map<string, string> source_labels = 7;public boolean containsSourceLabels(String key)
One or more labels that constrain the applicability of a rule to workloads with the given labels. If the VirtualService has a list of gateways specified in the top-level `gateways` field, it must include the reserved gateway `mesh` for this field to be applicable.
map<string, string> source_labels = 7;@Deprecated public Map<String,String> getSourceLabels()
getSourceLabelsMap() instead.public Map<String,String> getSourceLabelsMap()
One or more labels that constrain the applicability of a rule to workloads with the given labels. If the VirtualService has a list of gateways specified in the top-level `gateways` field, it must include the reserved gateway `mesh` for this field to be applicable.
map<string, string> source_labels = 7;public String getSourceLabelsOrDefault(String key, String defaultValue)
One or more labels that constrain the applicability of a rule to workloads with the given labels. If the VirtualService has a list of gateways specified in the top-level `gateways` field, it must include the reserved gateway `mesh` for this field to be applicable.
map<string, string> source_labels = 7;public String getSourceLabelsOrThrow(String key)
One or more labels that constrain the applicability of a rule to workloads with the given labels. If the VirtualService has a list of gateways specified in the top-level `gateways` field, it must include the reserved gateway `mesh` for this field to be applicable.
map<string, string> source_labels = 7;public com.google.protobuf.ProtocolStringList getGatewaysList()
Names of gateways where the rule should be applied. Gateway names in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.
repeated string gateways = 8;getGatewaysList 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic int getGatewaysCount()
Names of gateways where the rule should be applied. Gateway names in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.
repeated string gateways = 8;getGatewaysCount 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic String getGateways(int index)
Names of gateways where the rule should be applied. Gateway names in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.
repeated string gateways = 8;getGateways 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getGatewaysBytes(int index)
Names of gateways where the rule should be applied. Gateway names in the top-level `gateways` field of the VirtualService (if any) are overridden. The gateway match is independent of sourceLabels.
repeated string gateways = 8;getGatewaysBytes 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderindex - The index of the value to return.public int getQueryParamsCount()
Query parameters for matching. Ex: - For a query parameter like "?key=true", the map key would be "key" and the string match could be defined as `exact: "true"`. - For a query parameter like "?key", the map key would be "key" and the string match could be defined as `exact: ""`. - For a query parameter like "?key=123", the map key would be "key" and the string match could be defined as `regex: "\d+$"`. Note that this configuration will only match values like "123" but not "a123" or "123a". **Note:** `prefix` matching is currently not supported.
map<string, .istio.networking.v1alpha3.StringMatch> query_params = 9;public boolean containsQueryParams(String key)
Query parameters for matching. Ex: - For a query parameter like "?key=true", the map key would be "key" and the string match could be defined as `exact: "true"`. - For a query parameter like "?key", the map key would be "key" and the string match could be defined as `exact: ""`. - For a query parameter like "?key=123", the map key would be "key" and the string match could be defined as `regex: "\d+$"`. Note that this configuration will only match values like "123" but not "a123" or "123a". **Note:** `prefix` matching is currently not supported.
map<string, .istio.networking.v1alpha3.StringMatch> query_params = 9;@Deprecated public Map<String,VirtualServiceOuterClass.StringMatch> getQueryParams()
getQueryParamsMap() instead.public Map<String,VirtualServiceOuterClass.StringMatch> getQueryParamsMap()
Query parameters for matching. Ex: - For a query parameter like "?key=true", the map key would be "key" and the string match could be defined as `exact: "true"`. - For a query parameter like "?key", the map key would be "key" and the string match could be defined as `exact: ""`. - For a query parameter like "?key=123", the map key would be "key" and the string match could be defined as `regex: "\d+$"`. Note that this configuration will only match values like "123" but not "a123" or "123a". **Note:** `prefix` matching is currently not supported.
map<string, .istio.networking.v1alpha3.StringMatch> query_params = 9;public VirtualServiceOuterClass.StringMatch getQueryParamsOrDefault(String key, VirtualServiceOuterClass.StringMatch defaultValue)
Query parameters for matching. Ex: - For a query parameter like "?key=true", the map key would be "key" and the string match could be defined as `exact: "true"`. - For a query parameter like "?key", the map key would be "key" and the string match could be defined as `exact: ""`. - For a query parameter like "?key=123", the map key would be "key" and the string match could be defined as `regex: "\d+$"`. Note that this configuration will only match values like "123" but not "a123" or "123a". **Note:** `prefix` matching is currently not supported.
map<string, .istio.networking.v1alpha3.StringMatch> query_params = 9;public VirtualServiceOuterClass.StringMatch getQueryParamsOrThrow(String key)
Query parameters for matching. Ex: - For a query parameter like "?key=true", the map key would be "key" and the string match could be defined as `exact: "true"`. - For a query parameter like "?key", the map key would be "key" and the string match could be defined as `exact: ""`. - For a query parameter like "?key=123", the map key would be "key" and the string match could be defined as `regex: "\d+$"`. Note that this configuration will only match values like "123" but not "a123" or "123a". **Note:** `prefix` matching is currently not supported.
map<string, .istio.networking.v1alpha3.StringMatch> query_params = 9;public boolean getIgnoreUriCase()
Flag to specify whether the URI matching should be case-insensitive. **Note:** The case will be ignored only in the case of `exact` and `prefix` URI matches.
bool ignore_uri_case = 10;getIgnoreUriCase 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic int getWithoutHeadersCount()
withoutHeader has the same syntax with the header, but has opposite meaning. If a header is matched with a matching rule among withoutHeader, the traffic becomes not matched one.
map<string, .istio.networking.v1alpha3.StringMatch> without_headers = 12;public boolean containsWithoutHeaders(String key)
withoutHeader has the same syntax with the header, but has opposite meaning. If a header is matched with a matching rule among withoutHeader, the traffic becomes not matched one.
map<string, .istio.networking.v1alpha3.StringMatch> without_headers = 12;@Deprecated public Map<String,VirtualServiceOuterClass.StringMatch> getWithoutHeaders()
getWithoutHeadersMap() instead.public Map<String,VirtualServiceOuterClass.StringMatch> getWithoutHeadersMap()
withoutHeader has the same syntax with the header, but has opposite meaning. If a header is matched with a matching rule among withoutHeader, the traffic becomes not matched one.
map<string, .istio.networking.v1alpha3.StringMatch> without_headers = 12;public VirtualServiceOuterClass.StringMatch getWithoutHeadersOrDefault(String key, VirtualServiceOuterClass.StringMatch defaultValue)
withoutHeader has the same syntax with the header, but has opposite meaning. If a header is matched with a matching rule among withoutHeader, the traffic becomes not matched one.
map<string, .istio.networking.v1alpha3.StringMatch> without_headers = 12;public VirtualServiceOuterClass.StringMatch getWithoutHeadersOrThrow(String key)
withoutHeader has the same syntax with the header, but has opposite meaning. If a header is matched with a matching rule among withoutHeader, the traffic becomes not matched one.
map<string, .istio.networking.v1alpha3.StringMatch> without_headers = 12;public String getSourceNamespace()
Source namespace constraining the applicability of a rule to workloads in that namespace. If the VirtualService has a list of gateways specified in the top-level `gateways` field, it must include the reserved gateway `mesh` for this field to be applicable.
string source_namespace = 13;getSourceNamespace 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic com.google.protobuf.ByteString getSourceNamespaceBytes()
Source namespace constraining the applicability of a rule to workloads in that namespace. If the VirtualService has a list of gateways specified in the top-level `gateways` field, it must include the reserved gateway `mesh` for this field to be applicable.
string source_namespace = 13;getSourceNamespaceBytes 在接口中 VirtualServiceOuterClass.HTTPMatchRequestOrBuilderpublic final boolean isInitialized()
isInitialized 在接口中 com.google.protobuf.MessageLiteOrBuilderisInitialized 在类中 com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo 在接口中 com.google.protobuf.MessageLitewriteTo 在类中 com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize 在接口中 com.google.protobuf.MessageLitegetSerializedSize 在类中 com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals 在接口中 com.google.protobuf.Messageequals 在类中 com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode 在接口中 com.google.protobuf.MessagehashCode 在类中 com.google.protobuf.AbstractMessagepublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static VirtualServiceOuterClass.HTTPMatchRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic VirtualServiceOuterClass.HTTPMatchRequest.Builder newBuilderForType()
newBuilderForType 在接口中 com.google.protobuf.MessagenewBuilderForType 在接口中 com.google.protobuf.MessageLitepublic static VirtualServiceOuterClass.HTTPMatchRequest.Builder newBuilder()
public static VirtualServiceOuterClass.HTTPMatchRequest.Builder newBuilder(VirtualServiceOuterClass.HTTPMatchRequest prototype)
public VirtualServiceOuterClass.HTTPMatchRequest.Builder toBuilder()
toBuilder 在接口中 com.google.protobuf.MessagetoBuilder 在接口中 com.google.protobuf.MessageLiteprotected VirtualServiceOuterClass.HTTPMatchRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType 在类中 com.google.protobuf.GeneratedMessageV3public static VirtualServiceOuterClass.HTTPMatchRequest getDefaultInstance()
public static com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPMatchRequest> parser()
public com.google.protobuf.Parser<VirtualServiceOuterClass.HTTPMatchRequest> getParserForType()
getParserForType 在接口中 com.google.protobuf.MessagegetParserForType 在接口中 com.google.protobuf.MessageLitegetParserForType 在类中 com.google.protobuf.GeneratedMessageV3public VirtualServiceOuterClass.HTTPMatchRequest getDefaultInstanceForType()
getDefaultInstanceForType 在接口中 com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType 在接口中 com.google.protobuf.MessageOrBuilderCopyright © 2018–2023 Alibaba Group. All rights reserved.