All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.network.inputs.SubnetArgs Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.network.inputs;

import com.pulumi.azurenative.network.enums.VirtualNetworkPrivateEndpointNetworkPolicies;
import com.pulumi.azurenative.network.enums.VirtualNetworkPrivateLinkServiceNetworkPolicies;
import com.pulumi.azurenative.network.inputs.ApplicationGatewayIPConfigurationArgs;
import com.pulumi.azurenative.network.inputs.DelegationArgs;
import com.pulumi.azurenative.network.inputs.NetworkSecurityGroupArgs;
import com.pulumi.azurenative.network.inputs.ResourceNavigationLinkArgs;
import com.pulumi.azurenative.network.inputs.RouteTableArgs;
import com.pulumi.azurenative.network.inputs.ServiceAssociationLinkArgs;
import com.pulumi.azurenative.network.inputs.ServiceEndpointPolicyArgs;
import com.pulumi.azurenative.network.inputs.ServiceEndpointPropertiesFormatArgs;
import com.pulumi.azurenative.network.inputs.SubResourceArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Subnet in a virtual network resource.
 * 
 */
public final class SubnetArgs extends com.pulumi.resources.ResourceArgs {

    public static final SubnetArgs Empty = new SubnetArgs();

    /**
     * The address prefix for the subnet.
     * 
     */
    @Import(name="addressPrefix")
    private @Nullable Output addressPrefix;

    /**
     * @return The address prefix for the subnet.
     * 
     */
    public Optional> addressPrefix() {
        return Optional.ofNullable(this.addressPrefix);
    }

    /**
     * List of address prefixes for the subnet.
     * 
     */
    @Import(name="addressPrefixes")
    private @Nullable Output> addressPrefixes;

    /**
     * @return List of address prefixes for the subnet.
     * 
     */
    public Optional>> addressPrefixes() {
        return Optional.ofNullable(this.addressPrefixes);
    }

    /**
     * Application gateway IP configurations of virtual network resource.
     * 
     */
    @Import(name="applicationGatewayIPConfigurations")
    private @Nullable Output> applicationGatewayIPConfigurations;

    /**
     * @return Application gateway IP configurations of virtual network resource.
     * 
     */
    public Optional>> applicationGatewayIPConfigurations() {
        return Optional.ofNullable(this.applicationGatewayIPConfigurations);
    }

    /**
     * An array of references to the delegations on the subnet.
     * 
     */
    @Import(name="delegations")
    private @Nullable Output> delegations;

    /**
     * @return An array of references to the delegations on the subnet.
     * 
     */
    public Optional>> delegations() {
        return Optional.ofNullable(this.delegations);
    }

    /**
     * A unique read-only string that changes whenever the resource is updated.
     * 
     */
    @Import(name="etag")
    private @Nullable Output etag;

    /**
     * @return A unique read-only string that changes whenever the resource is updated.
     * 
     */
    public Optional> etag() {
        return Optional.ofNullable(this.etag);
    }

    /**
     * Resource ID.
     * 
     */
    @Import(name="id")
    private @Nullable Output id;

    /**
     * @return Resource ID.
     * 
     */
    public Optional> id() {
        return Optional.ofNullable(this.id);
    }

    /**
     * Array of IpAllocation which reference this subnet.
     * 
     */
    @Import(name="ipAllocations")
    private @Nullable Output> ipAllocations;

    /**
     * @return Array of IpAllocation which reference this subnet.
     * 
     */
    public Optional>> ipAllocations() {
        return Optional.ofNullable(this.ipAllocations);
    }

    /**
     * The name of the resource that is unique within a resource group. This name can be used to access the resource.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the resource that is unique within a resource group. This name can be used to access the resource.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Nat gateway associated with this subnet.
     * 
     */
    @Import(name="natGateway")
    private @Nullable Output natGateway;

    /**
     * @return Nat gateway associated with this subnet.
     * 
     */
    public Optional> natGateway() {
        return Optional.ofNullable(this.natGateway);
    }

    /**
     * The reference to the NetworkSecurityGroup resource.
     * 
     */
    @Import(name="networkSecurityGroup")
    private @Nullable Output networkSecurityGroup;

    /**
     * @return The reference to the NetworkSecurityGroup resource.
     * 
     */
    public Optional> networkSecurityGroup() {
        return Optional.ofNullable(this.networkSecurityGroup);
    }

    /**
     * Enable or Disable apply network policies on private end point in the subnet.
     * 
     */
    @Import(name="privateEndpointNetworkPolicies")
    private @Nullable Output> privateEndpointNetworkPolicies;

    /**
     * @return Enable or Disable apply network policies on private end point in the subnet.
     * 
     */
    public Optional>> privateEndpointNetworkPolicies() {
        return Optional.ofNullable(this.privateEndpointNetworkPolicies);
    }

    /**
     * Enable or Disable apply network policies on private link service in the subnet.
     * 
     */
    @Import(name="privateLinkServiceNetworkPolicies")
    private @Nullable Output> privateLinkServiceNetworkPolicies;

    /**
     * @return Enable or Disable apply network policies on private link service in the subnet.
     * 
     */
    public Optional>> privateLinkServiceNetworkPolicies() {
        return Optional.ofNullable(this.privateLinkServiceNetworkPolicies);
    }

    /**
     * The provisioning state of the resource.
     * 
     */
    @Import(name="provisioningState")
    private @Nullable Output provisioningState;

    /**
     * @return The provisioning state of the resource.
     * 
     */
    public Optional> provisioningState() {
        return Optional.ofNullable(this.provisioningState);
    }

    /**
     * Gets an array of references to the external resources using subnet.
     * 
     */
    @Import(name="resourceNavigationLinks")
    private @Nullable Output> resourceNavigationLinks;

    /**
     * @return Gets an array of references to the external resources using subnet.
     * 
     */
    public Optional>> resourceNavigationLinks() {
        return Optional.ofNullable(this.resourceNavigationLinks);
    }

    /**
     * The reference to the RouteTable resource.
     * 
     */
    @Import(name="routeTable")
    private @Nullable Output routeTable;

    /**
     * @return The reference to the RouteTable resource.
     * 
     */
    public Optional> routeTable() {
        return Optional.ofNullable(this.routeTable);
    }

    /**
     * Gets an array of references to services injecting into this subnet.
     * 
     */
    @Import(name="serviceAssociationLinks")
    private @Nullable Output> serviceAssociationLinks;

    /**
     * @return Gets an array of references to services injecting into this subnet.
     * 
     */
    public Optional>> serviceAssociationLinks() {
        return Optional.ofNullable(this.serviceAssociationLinks);
    }

    /**
     * An array of service endpoint policies.
     * 
     */
    @Import(name="serviceEndpointPolicies")
    private @Nullable Output> serviceEndpointPolicies;

    /**
     * @return An array of service endpoint policies.
     * 
     */
    public Optional>> serviceEndpointPolicies() {
        return Optional.ofNullable(this.serviceEndpointPolicies);
    }

    /**
     * An array of service endpoints.
     * 
     */
    @Import(name="serviceEndpoints")
    private @Nullable Output> serviceEndpoints;

    /**
     * @return An array of service endpoints.
     * 
     */
    public Optional>> serviceEndpoints() {
        return Optional.ofNullable(this.serviceEndpoints);
    }

    /**
     * Resource type.
     * 
     */
    @Import(name="type")
    private @Nullable Output type;

    /**
     * @return Resource type.
     * 
     */
    public Optional> type() {
        return Optional.ofNullable(this.type);
    }

    private SubnetArgs() {}

    private SubnetArgs(SubnetArgs $) {
        this.addressPrefix = $.addressPrefix;
        this.addressPrefixes = $.addressPrefixes;
        this.applicationGatewayIPConfigurations = $.applicationGatewayIPConfigurations;
        this.delegations = $.delegations;
        this.etag = $.etag;
        this.id = $.id;
        this.ipAllocations = $.ipAllocations;
        this.name = $.name;
        this.natGateway = $.natGateway;
        this.networkSecurityGroup = $.networkSecurityGroup;
        this.privateEndpointNetworkPolicies = $.privateEndpointNetworkPolicies;
        this.privateLinkServiceNetworkPolicies = $.privateLinkServiceNetworkPolicies;
        this.provisioningState = $.provisioningState;
        this.resourceNavigationLinks = $.resourceNavigationLinks;
        this.routeTable = $.routeTable;
        this.serviceAssociationLinks = $.serviceAssociationLinks;
        this.serviceEndpointPolicies = $.serviceEndpointPolicies;
        this.serviceEndpoints = $.serviceEndpoints;
        this.type = $.type;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(SubnetArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private SubnetArgs $;

        public Builder() {
            $ = new SubnetArgs();
        }

        public Builder(SubnetArgs defaults) {
            $ = new SubnetArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param addressPrefix The address prefix for the subnet.
         * 
         * @return builder
         * 
         */
        public Builder addressPrefix(@Nullable Output addressPrefix) {
            $.addressPrefix = addressPrefix;
            return this;
        }

        /**
         * @param addressPrefix The address prefix for the subnet.
         * 
         * @return builder
         * 
         */
        public Builder addressPrefix(String addressPrefix) {
            return addressPrefix(Output.of(addressPrefix));
        }

        /**
         * @param addressPrefixes List of address prefixes for the subnet.
         * 
         * @return builder
         * 
         */
        public Builder addressPrefixes(@Nullable Output> addressPrefixes) {
            $.addressPrefixes = addressPrefixes;
            return this;
        }

        /**
         * @param addressPrefixes List of address prefixes for the subnet.
         * 
         * @return builder
         * 
         */
        public Builder addressPrefixes(List addressPrefixes) {
            return addressPrefixes(Output.of(addressPrefixes));
        }

        /**
         * @param addressPrefixes List of address prefixes for the subnet.
         * 
         * @return builder
         * 
         */
        public Builder addressPrefixes(String... addressPrefixes) {
            return addressPrefixes(List.of(addressPrefixes));
        }

        /**
         * @param applicationGatewayIPConfigurations Application gateway IP configurations of virtual network resource.
         * 
         * @return builder
         * 
         */
        public Builder applicationGatewayIPConfigurations(@Nullable Output> applicationGatewayIPConfigurations) {
            $.applicationGatewayIPConfigurations = applicationGatewayIPConfigurations;
            return this;
        }

        /**
         * @param applicationGatewayIPConfigurations Application gateway IP configurations of virtual network resource.
         * 
         * @return builder
         * 
         */
        public Builder applicationGatewayIPConfigurations(List applicationGatewayIPConfigurations) {
            return applicationGatewayIPConfigurations(Output.of(applicationGatewayIPConfigurations));
        }

        /**
         * @param applicationGatewayIPConfigurations Application gateway IP configurations of virtual network resource.
         * 
         * @return builder
         * 
         */
        public Builder applicationGatewayIPConfigurations(ApplicationGatewayIPConfigurationArgs... applicationGatewayIPConfigurations) {
            return applicationGatewayIPConfigurations(List.of(applicationGatewayIPConfigurations));
        }

        /**
         * @param delegations An array of references to the delegations on the subnet.
         * 
         * @return builder
         * 
         */
        public Builder delegations(@Nullable Output> delegations) {
            $.delegations = delegations;
            return this;
        }

        /**
         * @param delegations An array of references to the delegations on the subnet.
         * 
         * @return builder
         * 
         */
        public Builder delegations(List delegations) {
            return delegations(Output.of(delegations));
        }

        /**
         * @param delegations An array of references to the delegations on the subnet.
         * 
         * @return builder
         * 
         */
        public Builder delegations(DelegationArgs... delegations) {
            return delegations(List.of(delegations));
        }

        /**
         * @param etag A unique read-only string that changes whenever the resource is updated.
         * 
         * @return builder
         * 
         */
        public Builder etag(@Nullable Output etag) {
            $.etag = etag;
            return this;
        }

        /**
         * @param etag A unique read-only string that changes whenever the resource is updated.
         * 
         * @return builder
         * 
         */
        public Builder etag(String etag) {
            return etag(Output.of(etag));
        }

        /**
         * @param id Resource ID.
         * 
         * @return builder
         * 
         */
        public Builder id(@Nullable Output id) {
            $.id = id;
            return this;
        }

        /**
         * @param id Resource ID.
         * 
         * @return builder
         * 
         */
        public Builder id(String id) {
            return id(Output.of(id));
        }

        /**
         * @param ipAllocations Array of IpAllocation which reference this subnet.
         * 
         * @return builder
         * 
         */
        public Builder ipAllocations(@Nullable Output> ipAllocations) {
            $.ipAllocations = ipAllocations;
            return this;
        }

        /**
         * @param ipAllocations Array of IpAllocation which reference this subnet.
         * 
         * @return builder
         * 
         */
        public Builder ipAllocations(List ipAllocations) {
            return ipAllocations(Output.of(ipAllocations));
        }

        /**
         * @param ipAllocations Array of IpAllocation which reference this subnet.
         * 
         * @return builder
         * 
         */
        public Builder ipAllocations(SubResourceArgs... ipAllocations) {
            return ipAllocations(List.of(ipAllocations));
        }

        /**
         * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the resource that is unique within a resource group. This name can be used to access the resource.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param natGateway Nat gateway associated with this subnet.
         * 
         * @return builder
         * 
         */
        public Builder natGateway(@Nullable Output natGateway) {
            $.natGateway = natGateway;
            return this;
        }

        /**
         * @param natGateway Nat gateway associated with this subnet.
         * 
         * @return builder
         * 
         */
        public Builder natGateway(SubResourceArgs natGateway) {
            return natGateway(Output.of(natGateway));
        }

        /**
         * @param networkSecurityGroup The reference to the NetworkSecurityGroup resource.
         * 
         * @return builder
         * 
         */
        public Builder networkSecurityGroup(@Nullable Output networkSecurityGroup) {
            $.networkSecurityGroup = networkSecurityGroup;
            return this;
        }

        /**
         * @param networkSecurityGroup The reference to the NetworkSecurityGroup resource.
         * 
         * @return builder
         * 
         */
        public Builder networkSecurityGroup(NetworkSecurityGroupArgs networkSecurityGroup) {
            return networkSecurityGroup(Output.of(networkSecurityGroup));
        }

        /**
         * @param privateEndpointNetworkPolicies Enable or Disable apply network policies on private end point in the subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateEndpointNetworkPolicies(@Nullable Output> privateEndpointNetworkPolicies) {
            $.privateEndpointNetworkPolicies = privateEndpointNetworkPolicies;
            return this;
        }

        /**
         * @param privateEndpointNetworkPolicies Enable or Disable apply network policies on private end point in the subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateEndpointNetworkPolicies(Either privateEndpointNetworkPolicies) {
            return privateEndpointNetworkPolicies(Output.of(privateEndpointNetworkPolicies));
        }

        /**
         * @param privateEndpointNetworkPolicies Enable or Disable apply network policies on private end point in the subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateEndpointNetworkPolicies(String privateEndpointNetworkPolicies) {
            return privateEndpointNetworkPolicies(Either.ofLeft(privateEndpointNetworkPolicies));
        }

        /**
         * @param privateEndpointNetworkPolicies Enable or Disable apply network policies on private end point in the subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateEndpointNetworkPolicies(VirtualNetworkPrivateEndpointNetworkPolicies privateEndpointNetworkPolicies) {
            return privateEndpointNetworkPolicies(Either.ofRight(privateEndpointNetworkPolicies));
        }

        /**
         * @param privateLinkServiceNetworkPolicies Enable or Disable apply network policies on private link service in the subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateLinkServiceNetworkPolicies(@Nullable Output> privateLinkServiceNetworkPolicies) {
            $.privateLinkServiceNetworkPolicies = privateLinkServiceNetworkPolicies;
            return this;
        }

        /**
         * @param privateLinkServiceNetworkPolicies Enable or Disable apply network policies on private link service in the subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateLinkServiceNetworkPolicies(Either privateLinkServiceNetworkPolicies) {
            return privateLinkServiceNetworkPolicies(Output.of(privateLinkServiceNetworkPolicies));
        }

        /**
         * @param privateLinkServiceNetworkPolicies Enable or Disable apply network policies on private link service in the subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateLinkServiceNetworkPolicies(String privateLinkServiceNetworkPolicies) {
            return privateLinkServiceNetworkPolicies(Either.ofLeft(privateLinkServiceNetworkPolicies));
        }

        /**
         * @param privateLinkServiceNetworkPolicies Enable or Disable apply network policies on private link service in the subnet.
         * 
         * @return builder
         * 
         */
        public Builder privateLinkServiceNetworkPolicies(VirtualNetworkPrivateLinkServiceNetworkPolicies privateLinkServiceNetworkPolicies) {
            return privateLinkServiceNetworkPolicies(Either.ofRight(privateLinkServiceNetworkPolicies));
        }

        /**
         * @param provisioningState The provisioning state of the resource.
         * 
         * @return builder
         * 
         */
        public Builder provisioningState(@Nullable Output provisioningState) {
            $.provisioningState = provisioningState;
            return this;
        }

        /**
         * @param provisioningState The provisioning state of the resource.
         * 
         * @return builder
         * 
         */
        public Builder provisioningState(String provisioningState) {
            return provisioningState(Output.of(provisioningState));
        }

        /**
         * @param resourceNavigationLinks Gets an array of references to the external resources using subnet.
         * 
         * @return builder
         * 
         */
        public Builder resourceNavigationLinks(@Nullable Output> resourceNavigationLinks) {
            $.resourceNavigationLinks = resourceNavigationLinks;
            return this;
        }

        /**
         * @param resourceNavigationLinks Gets an array of references to the external resources using subnet.
         * 
         * @return builder
         * 
         */
        public Builder resourceNavigationLinks(List resourceNavigationLinks) {
            return resourceNavigationLinks(Output.of(resourceNavigationLinks));
        }

        /**
         * @param resourceNavigationLinks Gets an array of references to the external resources using subnet.
         * 
         * @return builder
         * 
         */
        public Builder resourceNavigationLinks(ResourceNavigationLinkArgs... resourceNavigationLinks) {
            return resourceNavigationLinks(List.of(resourceNavigationLinks));
        }

        /**
         * @param routeTable The reference to the RouteTable resource.
         * 
         * @return builder
         * 
         */
        public Builder routeTable(@Nullable Output routeTable) {
            $.routeTable = routeTable;
            return this;
        }

        /**
         * @param routeTable The reference to the RouteTable resource.
         * 
         * @return builder
         * 
         */
        public Builder routeTable(RouteTableArgs routeTable) {
            return routeTable(Output.of(routeTable));
        }

        /**
         * @param serviceAssociationLinks Gets an array of references to services injecting into this subnet.
         * 
         * @return builder
         * 
         */
        public Builder serviceAssociationLinks(@Nullable Output> serviceAssociationLinks) {
            $.serviceAssociationLinks = serviceAssociationLinks;
            return this;
        }

        /**
         * @param serviceAssociationLinks Gets an array of references to services injecting into this subnet.
         * 
         * @return builder
         * 
         */
        public Builder serviceAssociationLinks(List serviceAssociationLinks) {
            return serviceAssociationLinks(Output.of(serviceAssociationLinks));
        }

        /**
         * @param serviceAssociationLinks Gets an array of references to services injecting into this subnet.
         * 
         * @return builder
         * 
         */
        public Builder serviceAssociationLinks(ServiceAssociationLinkArgs... serviceAssociationLinks) {
            return serviceAssociationLinks(List.of(serviceAssociationLinks));
        }

        /**
         * @param serviceEndpointPolicies An array of service endpoint policies.
         * 
         * @return builder
         * 
         */
        public Builder serviceEndpointPolicies(@Nullable Output> serviceEndpointPolicies) {
            $.serviceEndpointPolicies = serviceEndpointPolicies;
            return this;
        }

        /**
         * @param serviceEndpointPolicies An array of service endpoint policies.
         * 
         * @return builder
         * 
         */
        public Builder serviceEndpointPolicies(List serviceEndpointPolicies) {
            return serviceEndpointPolicies(Output.of(serviceEndpointPolicies));
        }

        /**
         * @param serviceEndpointPolicies An array of service endpoint policies.
         * 
         * @return builder
         * 
         */
        public Builder serviceEndpointPolicies(ServiceEndpointPolicyArgs... serviceEndpointPolicies) {
            return serviceEndpointPolicies(List.of(serviceEndpointPolicies));
        }

        /**
         * @param serviceEndpoints An array of service endpoints.
         * 
         * @return builder
         * 
         */
        public Builder serviceEndpoints(@Nullable Output> serviceEndpoints) {
            $.serviceEndpoints = serviceEndpoints;
            return this;
        }

        /**
         * @param serviceEndpoints An array of service endpoints.
         * 
         * @return builder
         * 
         */
        public Builder serviceEndpoints(List serviceEndpoints) {
            return serviceEndpoints(Output.of(serviceEndpoints));
        }

        /**
         * @param serviceEndpoints An array of service endpoints.
         * 
         * @return builder
         * 
         */
        public Builder serviceEndpoints(ServiceEndpointPropertiesFormatArgs... serviceEndpoints) {
            return serviceEndpoints(List.of(serviceEndpoints));
        }

        /**
         * @param type Resource type.
         * 
         * @return builder
         * 
         */
        public Builder type(@Nullable Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Resource type.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public SubnetArgs build() {
            $.privateEndpointNetworkPolicies = Codegen.stringProp("privateEndpointNetworkPolicies").left(VirtualNetworkPrivateEndpointNetworkPolicies.class).output().arg($.privateEndpointNetworkPolicies).def("Disabled").getNullable();
            $.privateLinkServiceNetworkPolicies = Codegen.stringProp("privateLinkServiceNetworkPolicies").left(VirtualNetworkPrivateLinkServiceNetworkPolicies.class).output().arg($.privateLinkServiceNetworkPolicies).def("Enabled").getNullable();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy