All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.digitalocean.inputs.GetFirewallInboundRuleArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing DigitalOcean cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.digitalocean.inputs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class GetFirewallInboundRuleArgs extends com.pulumi.resources.ResourceArgs {
public static final GetFirewallInboundRuleArgs Empty = new GetFirewallInboundRuleArgs();
/**
* The ports on which traffic will be allowed
* specified as a string containing a single port, a range (e.g. "8000-9000"),
* or "1-65535" to open all ports for a protocol. Required for when protocol is
* `tcp` or `udp`.
*
*/
@Import(name="portRange")
private @Nullable Output portRange;
/**
* @return The ports on which traffic will be allowed
* specified as a string containing a single port, a range (e.g. "8000-9000"),
* or "1-65535" to open all ports for a protocol. Required for when protocol is
* `tcp` or `udp`.
*
*/
public Optional> portRange() {
return Optional.ofNullable(this.portRange);
}
/**
* The type of traffic to be allowed.
* This may be one of "tcp", "udp", or "icmp".
*
*/
@Import(name="protocol", required=true)
private Output protocol;
/**
* @return The type of traffic to be allowed.
* This may be one of "tcp", "udp", or "icmp".
*
*/
public Output protocol() {
return this.protocol;
}
/**
* An array of strings containing the IPv4
* addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the
* inbound traffic will be accepted.
*
*/
@Import(name="sourceAddresses")
private @Nullable Output> sourceAddresses;
/**
* @return An array of strings containing the IPv4
* addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the
* inbound traffic will be accepted.
*
*/
public Optional>> sourceAddresses() {
return Optional.ofNullable(this.sourceAddresses);
}
/**
* An array containing the IDs of
* the Droplets from which the inbound traffic will be accepted.
*
*/
@Import(name="sourceDropletIds")
private @Nullable Output> sourceDropletIds;
/**
* @return An array containing the IDs of
* the Droplets from which the inbound traffic will be accepted.
*
*/
public Optional>> sourceDropletIds() {
return Optional.ofNullable(this.sourceDropletIds);
}
@Import(name="sourceKubernetesIds")
private @Nullable Output> sourceKubernetesIds;
public Optional>> sourceKubernetesIds() {
return Optional.ofNullable(this.sourceKubernetesIds);
}
/**
* An array containing the IDs
* of the Load Balancers from which the inbound traffic will be accepted.
*
*/
@Import(name="sourceLoadBalancerUids")
private @Nullable Output> sourceLoadBalancerUids;
/**
* @return An array containing the IDs
* of the Load Balancers from which the inbound traffic will be accepted.
*
*/
public Optional>> sourceLoadBalancerUids() {
return Optional.ofNullable(this.sourceLoadBalancerUids);
}
/**
* A set of names of Tags corresponding to group of
* Droplets from which the inbound traffic will be accepted.
*
*/
@Import(name="sourceTags")
private @Nullable Output> sourceTags;
/**
* @return A set of names of Tags corresponding to group of
* Droplets from which the inbound traffic will be accepted.
*
*/
public Optional>> sourceTags() {
return Optional.ofNullable(this.sourceTags);
}
private GetFirewallInboundRuleArgs() {}
private GetFirewallInboundRuleArgs(GetFirewallInboundRuleArgs $) {
this.portRange = $.portRange;
this.protocol = $.protocol;
this.sourceAddresses = $.sourceAddresses;
this.sourceDropletIds = $.sourceDropletIds;
this.sourceKubernetesIds = $.sourceKubernetesIds;
this.sourceLoadBalancerUids = $.sourceLoadBalancerUids;
this.sourceTags = $.sourceTags;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetFirewallInboundRuleArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private GetFirewallInboundRuleArgs $;
public Builder() {
$ = new GetFirewallInboundRuleArgs();
}
public Builder(GetFirewallInboundRuleArgs defaults) {
$ = new GetFirewallInboundRuleArgs(Objects.requireNonNull(defaults));
}
/**
* @param portRange The ports on which traffic will be allowed
* specified as a string containing a single port, a range (e.g. "8000-9000"),
* or "1-65535" to open all ports for a protocol. Required for when protocol is
* `tcp` or `udp`.
*
* @return builder
*
*/
public Builder portRange(@Nullable Output portRange) {
$.portRange = portRange;
return this;
}
/**
* @param portRange The ports on which traffic will be allowed
* specified as a string containing a single port, a range (e.g. "8000-9000"),
* or "1-65535" to open all ports for a protocol. Required for when protocol is
* `tcp` or `udp`.
*
* @return builder
*
*/
public Builder portRange(String portRange) {
return portRange(Output.of(portRange));
}
/**
* @param protocol The type of traffic to be allowed.
* This may be one of "tcp", "udp", or "icmp".
*
* @return builder
*
*/
public Builder protocol(Output protocol) {
$.protocol = protocol;
return this;
}
/**
* @param protocol The type of traffic to be allowed.
* This may be one of "tcp", "udp", or "icmp".
*
* @return builder
*
*/
public Builder protocol(String protocol) {
return protocol(Output.of(protocol));
}
/**
* @param sourceAddresses An array of strings containing the IPv4
* addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the
* inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceAddresses(@Nullable Output> sourceAddresses) {
$.sourceAddresses = sourceAddresses;
return this;
}
/**
* @param sourceAddresses An array of strings containing the IPv4
* addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the
* inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceAddresses(List sourceAddresses) {
return sourceAddresses(Output.of(sourceAddresses));
}
/**
* @param sourceAddresses An array of strings containing the IPv4
* addresses, IPv6 addresses, IPv4 CIDRs, and/or IPv6 CIDRs from which the
* inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceAddresses(String... sourceAddresses) {
return sourceAddresses(List.of(sourceAddresses));
}
/**
* @param sourceDropletIds An array containing the IDs of
* the Droplets from which the inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceDropletIds(@Nullable Output> sourceDropletIds) {
$.sourceDropletIds = sourceDropletIds;
return this;
}
/**
* @param sourceDropletIds An array containing the IDs of
* the Droplets from which the inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceDropletIds(List sourceDropletIds) {
return sourceDropletIds(Output.of(sourceDropletIds));
}
/**
* @param sourceDropletIds An array containing the IDs of
* the Droplets from which the inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceDropletIds(Integer... sourceDropletIds) {
return sourceDropletIds(List.of(sourceDropletIds));
}
public Builder sourceKubernetesIds(@Nullable Output> sourceKubernetesIds) {
$.sourceKubernetesIds = sourceKubernetesIds;
return this;
}
public Builder sourceKubernetesIds(List sourceKubernetesIds) {
return sourceKubernetesIds(Output.of(sourceKubernetesIds));
}
public Builder sourceKubernetesIds(String... sourceKubernetesIds) {
return sourceKubernetesIds(List.of(sourceKubernetesIds));
}
/**
* @param sourceLoadBalancerUids An array containing the IDs
* of the Load Balancers from which the inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceLoadBalancerUids(@Nullable Output> sourceLoadBalancerUids) {
$.sourceLoadBalancerUids = sourceLoadBalancerUids;
return this;
}
/**
* @param sourceLoadBalancerUids An array containing the IDs
* of the Load Balancers from which the inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceLoadBalancerUids(List sourceLoadBalancerUids) {
return sourceLoadBalancerUids(Output.of(sourceLoadBalancerUids));
}
/**
* @param sourceLoadBalancerUids An array containing the IDs
* of the Load Balancers from which the inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceLoadBalancerUids(String... sourceLoadBalancerUids) {
return sourceLoadBalancerUids(List.of(sourceLoadBalancerUids));
}
/**
* @param sourceTags A set of names of Tags corresponding to group of
* Droplets from which the inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceTags(@Nullable Output> sourceTags) {
$.sourceTags = sourceTags;
return this;
}
/**
* @param sourceTags A set of names of Tags corresponding to group of
* Droplets from which the inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceTags(List sourceTags) {
return sourceTags(Output.of(sourceTags));
}
/**
* @param sourceTags A set of names of Tags corresponding to group of
* Droplets from which the inbound traffic will be accepted.
*
* @return builder
*
*/
public Builder sourceTags(String... sourceTags) {
return sourceTags(List.of(sourceTags));
}
public GetFirewallInboundRuleArgs build() {
if ($.protocol == null) {
throw new MissingRequiredPropertyException("GetFirewallInboundRuleArgs", "protocol");
}
return $;
}
}
}