Interface AuthorizationPolicy.Rule.DestinationOrBuilder (0.20.0)

public static interface AuthorizationPolicy.Rule.DestinationOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

getHosts(int index)

public abstract String getHosts(int index)

Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".

repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The hosts at the given index.

getHostsBytes(int index)

public abstract ByteString getHostsBytes(int index)

Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".

repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the hosts at the given index.

getHostsCount()

public abstract int getHostsCount()

Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".

repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The count of hosts.

getHostsList()

public abstract List<String> getHostsList()

Required. List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".

repeated string hosts = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<String>

A list containing the hosts.

getHttpHeaderMatch()

public abstract AuthorizationPolicy.Rule.Destination.HttpHeaderMatch getHttpHeaderMatch()

Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.

.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AuthorizationPolicy.Rule.Destination.HttpHeaderMatch

The httpHeaderMatch.

getHttpHeaderMatchOrBuilder()

public abstract AuthorizationPolicy.Rule.Destination.HttpHeaderMatchOrBuilder getHttpHeaderMatchOrBuilder()

Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.

.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AuthorizationPolicy.Rule.Destination.HttpHeaderMatchOrBuilder

getMethods(int index)

public abstract String getMethods(int index)

Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.

repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The methods at the given index.

getMethodsBytes(int index)

public abstract ByteString getMethodsBytes(int index)

Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.

repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the methods at the given index.

getMethodsCount()

public abstract int getMethodsCount()

Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.

repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The count of methods.

getMethodsList()

public abstract List<String> getMethodsList()

Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.

repeated string methods = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
List<String>

A list containing the methods.

getPorts(int index)

public abstract int getPorts(int index)

Required. List of destination ports to match. At least one port should match.

repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
int

The ports at the given index.

getPortsCount()

public abstract int getPortsCount()

Required. List of destination ports to match. At least one port should match.

repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The count of ports.

getPortsList()

public abstract List<Integer> getPortsList()

Required. List of destination ports to match. At least one port should match.

repeated uint32 ports = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
List<Integer>

A list containing the ports.

hasHttpHeaderMatch()

public abstract boolean hasHttpHeaderMatch()

Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.

.google.cloud.networksecurity.v1beta1.AuthorizationPolicy.Rule.Destination.HttpHeaderMatch http_header_match = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the httpHeaderMatch field is set.