- 1.91.0 (latest)
- 1.90.0
- 1.88.0
- 1.86.0
- 1.85.0
- 1.84.0
- 1.83.0
- 1.82.0
- 1.80.0
- 1.78.0
- 1.77.0
- 1.74.0
- 1.73.0
- 1.72.0
- 1.70.0
- 1.69.0
- 1.68.0
- 1.67.0
- 1.66.0
- 1.65.0
- 1.64.0
- 1.63.0
- 1.62.0
- 1.61.0
- 1.59.0
- 1.58.0
- 1.57.0
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.52.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.40.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.28.0
- 1.27.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.1
- 1.11.0
- 1.9.1
- 1.8.1
- 1.7.2
- 1.6.0-beta
public static final class Firewall.Builder extends GeneratedMessageV3.Builder<Firewall.Builder> implements FirewallOrBuilderRepresents a Firewall Rule resource.
Firewall rules allow or deny ingress traffic to, and egress traffic from your instances. For more information, readFirewall rules.
Protobuf type google.cloud.compute.v1.Firewall
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > Firewall.BuilderImplements
FirewallOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllAllowed(Iterable<? extends Allowed> values)
public Firewall.Builder addAllAllowed(Iterable<? extends Allowed> values)The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
repeated .google.cloud.compute.v1.Allowed allowed = 162398632;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.compute.v1.Allowed> |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addAllDenied(Iterable<? extends Denied> values)
public Firewall.Builder addAllDenied(Iterable<? extends Denied> values)The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
repeated .google.cloud.compute.v1.Denied denied = 275217307;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.compute.v1.Denied> |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addAllDestinationRanges(Iterable<String> values)
public Firewall.Builder addAllDestinationRanges(Iterable<String> values)If destination ranges are specified, the firewall rule applies only to traffic that has destination IP address in these ranges. These ranges must be expressed inCIDR format. Both IPv4 and IPv6 are supported.
repeated string destination_ranges = 305699879;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The destinationRanges to add. |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
This builder for chaining. |
addAllSourceRanges(Iterable<String> values)
public Firewall.Builder addAllSourceRanges(Iterable<String> values)If source ranges are specified, the firewall rule applies only to traffic that has a source IP address in these ranges. These ranges must be expressed inCIDR format. One or both of sourceRanges and sourceTags may be set. If both fields are set, the rule applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in thesourceTags field. The connection does not need to match both fields for the rule to apply. Both IPv4 and IPv6 are supported.
repeated string source_ranges = 200097658;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The sourceRanges to add. |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
This builder for chaining. |
addAllSourceServiceAccounts(Iterable<String> values)
public Firewall.Builder addAllSourceServiceAccounts(Iterable<String> values)If source service accounts are specified, the firewall rules apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address.sourceRanges can be set at the same time assourceServiceAccounts. If both are set, the firewall applies to traffic that has a source IP address within the sourceRanges OR a source IP that belongs to an instance with service account listed insourceServiceAccount. The connection does not need to match both fields for the firewall to apply.sourceServiceAccounts cannot be used at the same time assourceTags or targetTags.
repeated string source_service_accounts = 105100756;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The sourceServiceAccounts to add. |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
This builder for chaining. |
addAllSourceTags(Iterable<String> values)
public Firewall.Builder addAllSourceTags(Iterable<String> values)If source tags are specified, the firewall rule applies only to traffic with source IPs that match the primary network interfaces of VM instances that have the tag and are in the same VPC network. Source tags cannot be used to control traffic to an instance's external IP address, it only applies to traffic between instances in the same virtual network. Because tags are associated with instances, not IP addresses. One or both of sourceRanges and sourceTags may be set. If both fields are set, the firewall applies to traffic that has a source IP address within sourceRanges OR a source IP from a resource with a matching tag listed in the sourceTags field. The connection does not need to match both fields for the firewall to apply.
repeated string source_tags = 452222397;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The sourceTags to add. |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
This builder for chaining. |
addAllTargetServiceAccounts(Iterable<String> values)
public Firewall.Builder addAllTargetServiceAccounts(Iterable<String> values)A list of service accounts indicating sets of instances located in the network that may make network connections as specified inallowed[].targetServiceAccounts cannot be used at the same time astargetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network.
repeated string target_service_accounts = 457639710;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The targetServiceAccounts to add. |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
This builder for chaining. |
addAllTargetTags(Iterable<String> values)
public Firewall.Builder addAllTargetTags(Iterable<String> values)A list of tags that controls which instances the firewall rule applies to. If targetTags are specified, then the firewall rule applies only to instances in the VPC network that have one of those tags. If no targetTags are specified, the firewall rule applies to all instances on the specified network.
repeated string target_tags = 62901767;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The targetTags to add. |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
This builder for chaining. |
addAllowed(Allowed value)
public Firewall.Builder addAllowed(Allowed value)The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
repeated .google.cloud.compute.v1.Allowed allowed = 162398632;
| Parameter | |
|---|---|
| Name | Description |
value |
Allowed |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addAllowed(Allowed.Builder builderForValue)
public Firewall.Builder addAllowed(Allowed.Builder builderForValue)The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
repeated .google.cloud.compute.v1.Allowed allowed = 162398632;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Allowed.Builder |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addAllowed(int index, Allowed value)
public Firewall.Builder addAllowed(int index, Allowed value)The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
repeated .google.cloud.compute.v1.Allowed allowed = 162398632;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Allowed |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addAllowed(int index, Allowed.Builder builderForValue)
public Firewall.Builder addAllowed(int index, Allowed.Builder builderForValue)The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
repeated .google.cloud.compute.v1.Allowed allowed = 162398632;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Allowed.Builder |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addAllowedBuilder()
public Allowed.Builder addAllowedBuilder()The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
repeated .google.cloud.compute.v1.Allowed allowed = 162398632;
| Returns | |
|---|---|
| Type | Description |
Allowed.Builder |
|
addAllowedBuilder(int index)
public Allowed.Builder addAllowedBuilder(int index)The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection.
repeated .google.cloud.compute.v1.Allowed allowed = 162398632;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Allowed.Builder |
|
addDenied(Denied value)
public Firewall.Builder addDenied(Denied value)The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
repeated .google.cloud.compute.v1.Denied denied = 275217307;
| Parameter | |
|---|---|
| Name | Description |
value |
Denied |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addDenied(Denied.Builder builderForValue)
public Firewall.Builder addDenied(Denied.Builder builderForValue)The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
repeated .google.cloud.compute.v1.Denied denied = 275217307;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Denied.Builder |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addDenied(int index, Denied value)
public Firewall.Builder addDenied(int index, Denied value)The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
repeated .google.cloud.compute.v1.Denied denied = 275217307;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Denied |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addDenied(int index, Denied.Builder builderForValue)
public Firewall.Builder addDenied(int index, Denied.Builder builderForValue)The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
repeated .google.cloud.compute.v1.Denied denied = 275217307;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Denied.Builder |
| Returns | |
|---|---|
| Type | Description |
Firewall.Builder |
|
addDeniedBuilder()
public Denied.Builder addDeniedBuilder()The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
repeated .google.cloud.compute.v1.Denied denied = 275217307;
| Returns | |
|---|---|
| Type | Description |
Denied.Builder |
|
addDeniedBuilder(int index)
public Denied.Builder addDeniedBuilder(int index)The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection.
repeated .google.cloud.comp