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

com.pulumi.azurenative.network.VirtualNetworkPeeringArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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;

import com.pulumi.azurenative.network.enums.VirtualNetworkPeeringLevel;
import com.pulumi.azurenative.network.enums.VirtualNetworkPeeringState;
import com.pulumi.azurenative.network.inputs.AddressSpaceArgs;
import com.pulumi.azurenative.network.inputs.SubResourceArgs;
import com.pulumi.azurenative.network.inputs.VirtualNetworkBgpCommunitiesArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class VirtualNetworkPeeringArgs extends com.pulumi.resources.ResourceArgs {

    public static final VirtualNetworkPeeringArgs Empty = new VirtualNetworkPeeringArgs();

    /**
     * Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
     * 
     */
    @Import(name="allowForwardedTraffic")
    private @Nullable Output allowForwardedTraffic;

    /**
     * @return Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
     * 
     */
    public Optional> allowForwardedTraffic() {
        return Optional.ofNullable(this.allowForwardedTraffic);
    }

    /**
     * If gateway links can be used in remote virtual networking to link to this virtual network.
     * 
     */
    @Import(name="allowGatewayTransit")
    private @Nullable Output allowGatewayTransit;

    /**
     * @return If gateway links can be used in remote virtual networking to link to this virtual network.
     * 
     */
    public Optional> allowGatewayTransit() {
        return Optional.ofNullable(this.allowGatewayTransit);
    }

    /**
     * Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
     * 
     */
    @Import(name="allowVirtualNetworkAccess")
    private @Nullable Output allowVirtualNetworkAccess;

    /**
     * @return Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
     * 
     */
    public Optional> allowVirtualNetworkAccess() {
        return Optional.ofNullable(this.allowVirtualNetworkAccess);
    }

    /**
     * If we need to verify the provisioning state of the remote gateway.
     * 
     */
    @Import(name="doNotVerifyRemoteGateways")
    private @Nullable Output doNotVerifyRemoteGateways;

    /**
     * @return If we need to verify the provisioning state of the remote gateway.
     * 
     */
    public Optional> doNotVerifyRemoteGateways() {
        return Optional.ofNullable(this.doNotVerifyRemoteGateways);
    }

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

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

    /**
     * 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);
    }

    /**
     * The status of the virtual network peering.
     * 
     */
    @Import(name="peeringState")
    private @Nullable Output> peeringState;

    /**
     * @return The status of the virtual network peering.
     * 
     */
    public Optional>> peeringState() {
        return Optional.ofNullable(this.peeringState);
    }

    /**
     * The peering sync status of the virtual network peering.
     * 
     */
    @Import(name="peeringSyncLevel")
    private @Nullable Output> peeringSyncLevel;

    /**
     * @return The peering sync status of the virtual network peering.
     * 
     */
    public Optional>> peeringSyncLevel() {
        return Optional.ofNullable(this.peeringSyncLevel);
    }

    /**
     * The reference to the address space peered with the remote virtual network.
     * 
     */
    @Import(name="remoteAddressSpace")
    private @Nullable Output remoteAddressSpace;

    /**
     * @return The reference to the address space peered with the remote virtual network.
     * 
     */
    public Optional> remoteAddressSpace() {
        return Optional.ofNullable(this.remoteAddressSpace);
    }

    /**
     * The reference to the remote virtual network's Bgp Communities.
     * 
     */
    @Import(name="remoteBgpCommunities")
    private @Nullable Output remoteBgpCommunities;

    /**
     * @return The reference to the remote virtual network's Bgp Communities.
     * 
     */
    public Optional> remoteBgpCommunities() {
        return Optional.ofNullable(this.remoteBgpCommunities);
    }

    /**
     * The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
     * 
     */
    @Import(name="remoteVirtualNetwork")
    private @Nullable Output remoteVirtualNetwork;

    /**
     * @return The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
     * 
     */
    public Optional> remoteVirtualNetwork() {
        return Optional.ofNullable(this.remoteVirtualNetwork);
    }

    /**
     * The reference to the current address space of the remote virtual network.
     * 
     */
    @Import(name="remoteVirtualNetworkAddressSpace")
    private @Nullable Output remoteVirtualNetworkAddressSpace;

    /**
     * @return The reference to the current address space of the remote virtual network.
     * 
     */
    public Optional> remoteVirtualNetworkAddressSpace() {
        return Optional.ofNullable(this.remoteVirtualNetworkAddressSpace);
    }

    /**
     * The name of the resource group.
     * 
     */
    @Import(name="resourceGroupName", required=true)
    private Output resourceGroupName;

    /**
     * @return The name of the resource group.
     * 
     */
    public Output resourceGroupName() {
        return this.resourceGroupName;
    }

    /**
     * Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated.
     * 
     */
    @Import(name="syncRemoteAddressSpace")
    private @Nullable Output syncRemoteAddressSpace;

    /**
     * @return Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated.
     * 
     */
    public Optional> syncRemoteAddressSpace() {
        return Optional.ofNullable(this.syncRemoteAddressSpace);
    }

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

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

    /**
     * If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
     * 
     */
    @Import(name="useRemoteGateways")
    private @Nullable Output useRemoteGateways;

    /**
     * @return If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
     * 
     */
    public Optional> useRemoteGateways() {
        return Optional.ofNullable(this.useRemoteGateways);
    }

    /**
     * The name of the virtual network.
     * 
     */
    @Import(name="virtualNetworkName", required=true)
    private Output virtualNetworkName;

    /**
     * @return The name of the virtual network.
     * 
     */
    public Output virtualNetworkName() {
        return this.virtualNetworkName;
    }

    /**
     * The name of the peering.
     * 
     */
    @Import(name="virtualNetworkPeeringName")
    private @Nullable Output virtualNetworkPeeringName;

    /**
     * @return The name of the peering.
     * 
     */
    public Optional> virtualNetworkPeeringName() {
        return Optional.ofNullable(this.virtualNetworkPeeringName);
    }

    private VirtualNetworkPeeringArgs() {}

    private VirtualNetworkPeeringArgs(VirtualNetworkPeeringArgs $) {
        this.allowForwardedTraffic = $.allowForwardedTraffic;
        this.allowGatewayTransit = $.allowGatewayTransit;
        this.allowVirtualNetworkAccess = $.allowVirtualNetworkAccess;
        this.doNotVerifyRemoteGateways = $.doNotVerifyRemoteGateways;
        this.id = $.id;
        this.name = $.name;
        this.peeringState = $.peeringState;
        this.peeringSyncLevel = $.peeringSyncLevel;
        this.remoteAddressSpace = $.remoteAddressSpace;
        this.remoteBgpCommunities = $.remoteBgpCommunities;
        this.remoteVirtualNetwork = $.remoteVirtualNetwork;
        this.remoteVirtualNetworkAddressSpace = $.remoteVirtualNetworkAddressSpace;
        this.resourceGroupName = $.resourceGroupName;
        this.syncRemoteAddressSpace = $.syncRemoteAddressSpace;
        this.type = $.type;
        this.useRemoteGateways = $.useRemoteGateways;
        this.virtualNetworkName = $.virtualNetworkName;
        this.virtualNetworkPeeringName = $.virtualNetworkPeeringName;
    }

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

    public static final class Builder {
        private VirtualNetworkPeeringArgs $;

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

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

        /**
         * @param allowForwardedTraffic Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
         * 
         * @return builder
         * 
         */
        public Builder allowForwardedTraffic(@Nullable Output allowForwardedTraffic) {
            $.allowForwardedTraffic = allowForwardedTraffic;
            return this;
        }

        /**
         * @param allowForwardedTraffic Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
         * 
         * @return builder
         * 
         */
        public Builder allowForwardedTraffic(Boolean allowForwardedTraffic) {
            return allowForwardedTraffic(Output.of(allowForwardedTraffic));
        }

        /**
         * @param allowGatewayTransit If gateway links can be used in remote virtual networking to link to this virtual network.
         * 
         * @return builder
         * 
         */
        public Builder allowGatewayTransit(@Nullable Output allowGatewayTransit) {
            $.allowGatewayTransit = allowGatewayTransit;
            return this;
        }

        /**
         * @param allowGatewayTransit If gateway links can be used in remote virtual networking to link to this virtual network.
         * 
         * @return builder
         * 
         */
        public Builder allowGatewayTransit(Boolean allowGatewayTransit) {
            return allowGatewayTransit(Output.of(allowGatewayTransit));
        }

        /**
         * @param allowVirtualNetworkAccess Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
         * 
         * @return builder
         * 
         */
        public Builder allowVirtualNetworkAccess(@Nullable Output allowVirtualNetworkAccess) {
            $.allowVirtualNetworkAccess = allowVirtualNetworkAccess;
            return this;
        }

        /**
         * @param allowVirtualNetworkAccess Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
         * 
         * @return builder
         * 
         */
        public Builder allowVirtualNetworkAccess(Boolean allowVirtualNetworkAccess) {
            return allowVirtualNetworkAccess(Output.of(allowVirtualNetworkAccess));
        }

        /**
         * @param doNotVerifyRemoteGateways If we need to verify the provisioning state of the remote gateway.
         * 
         * @return builder
         * 
         */
        public Builder doNotVerifyRemoteGateways(@Nullable Output doNotVerifyRemoteGateways) {
            $.doNotVerifyRemoteGateways = doNotVerifyRemoteGateways;
            return this;
        }

        /**
         * @param doNotVerifyRemoteGateways If we need to verify the provisioning state of the remote gateway.
         * 
         * @return builder
         * 
         */
        public Builder doNotVerifyRemoteGateways(Boolean doNotVerifyRemoteGateways) {
            return doNotVerifyRemoteGateways(Output.of(doNotVerifyRemoteGateways));
        }

        /**
         * @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 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 peeringState The status of the virtual network peering.
         * 
         * @return builder
         * 
         */
        public Builder peeringState(@Nullable Output> peeringState) {
            $.peeringState = peeringState;
            return this;
        }

        /**
         * @param peeringState The status of the virtual network peering.
         * 
         * @return builder
         * 
         */
        public Builder peeringState(Either peeringState) {
            return peeringState(Output.of(peeringState));
        }

        /**
         * @param peeringState The status of the virtual network peering.
         * 
         * @return builder
         * 
         */
        public Builder peeringState(String peeringState) {
            return peeringState(Either.ofLeft(peeringState));
        }

        /**
         * @param peeringState The status of the virtual network peering.
         * 
         * @return builder
         * 
         */
        public Builder peeringState(VirtualNetworkPeeringState peeringState) {
            return peeringState(Either.ofRight(peeringState));
        }

        /**
         * @param peeringSyncLevel The peering sync status of the virtual network peering.
         * 
         * @return builder
         * 
         */
        public Builder peeringSyncLevel(@Nullable Output> peeringSyncLevel) {
            $.peeringSyncLevel = peeringSyncLevel;
            return this;
        }

        /**
         * @param peeringSyncLevel The peering sync status of the virtual network peering.
         * 
         * @return builder
         * 
         */
        public Builder peeringSyncLevel(Either peeringSyncLevel) {
            return peeringSyncLevel(Output.of(peeringSyncLevel));
        }

        /**
         * @param peeringSyncLevel The peering sync status of the virtual network peering.
         * 
         * @return builder
         * 
         */
        public Builder peeringSyncLevel(String peeringSyncLevel) {
            return peeringSyncLevel(Either.ofLeft(peeringSyncLevel));
        }

        /**
         * @param peeringSyncLevel The peering sync status of the virtual network peering.
         * 
         * @return builder
         * 
         */
        public Builder peeringSyncLevel(VirtualNetworkPeeringLevel peeringSyncLevel) {
            return peeringSyncLevel(Either.ofRight(peeringSyncLevel));
        }

        /**
         * @param remoteAddressSpace The reference to the address space peered with the remote virtual network.
         * 
         * @return builder
         * 
         */
        public Builder remoteAddressSpace(@Nullable Output remoteAddressSpace) {
            $.remoteAddressSpace = remoteAddressSpace;
            return this;
        }

        /**
         * @param remoteAddressSpace The reference to the address space peered with the remote virtual network.
         * 
         * @return builder
         * 
         */
        public Builder remoteAddressSpace(AddressSpaceArgs remoteAddressSpace) {
            return remoteAddressSpace(Output.of(remoteAddressSpace));
        }

        /**
         * @param remoteBgpCommunities The reference to the remote virtual network's Bgp Communities.
         * 
         * @return builder
         * 
         */
        public Builder remoteBgpCommunities(@Nullable Output remoteBgpCommunities) {
            $.remoteBgpCommunities = remoteBgpCommunities;
            return this;
        }

        /**
         * @param remoteBgpCommunities The reference to the remote virtual network's Bgp Communities.
         * 
         * @return builder
         * 
         */
        public Builder remoteBgpCommunities(VirtualNetworkBgpCommunitiesArgs remoteBgpCommunities) {
            return remoteBgpCommunities(Output.of(remoteBgpCommunities));
        }

        /**
         * @param remoteVirtualNetwork The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
         * 
         * @return builder
         * 
         */
        public Builder remoteVirtualNetwork(@Nullable Output remoteVirtualNetwork) {
            $.remoteVirtualNetwork = remoteVirtualNetwork;
            return this;
        }

        /**
         * @param remoteVirtualNetwork The reference to the remote virtual network. The remote virtual network can be in the same or different region (preview). See here to register for the preview and learn more (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering).
         * 
         * @return builder
         * 
         */
        public Builder remoteVirtualNetwork(SubResourceArgs remoteVirtualNetwork) {
            return remoteVirtualNetwork(Output.of(remoteVirtualNetwork));
        }

        /**
         * @param remoteVirtualNetworkAddressSpace The reference to the current address space of the remote virtual network.
         * 
         * @return builder
         * 
         */
        public Builder remoteVirtualNetworkAddressSpace(@Nullable Output remoteVirtualNetworkAddressSpace) {
            $.remoteVirtualNetworkAddressSpace = remoteVirtualNetworkAddressSpace;
            return this;
        }

        /**
         * @param remoteVirtualNetworkAddressSpace The reference to the current address space of the remote virtual network.
         * 
         * @return builder
         * 
         */
        public Builder remoteVirtualNetworkAddressSpace(AddressSpaceArgs remoteVirtualNetworkAddressSpace) {
            return remoteVirtualNetworkAddressSpace(Output.of(remoteVirtualNetworkAddressSpace));
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(Output resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName The name of the resource group.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param syncRemoteAddressSpace Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated.
         * 
         * @return builder
         * 
         */
        public Builder syncRemoteAddressSpace(@Nullable Output syncRemoteAddressSpace) {
            $.syncRemoteAddressSpace = syncRemoteAddressSpace;
            return this;
        }

        /**
         * @param syncRemoteAddressSpace Parameter indicates the intention to sync the peering with the current address space on the remote vNet after it's updated.
         * 
         * @return builder
         * 
         */
        public Builder syncRemoteAddressSpace(String syncRemoteAddressSpace) {
            return syncRemoteAddressSpace(Output.of(syncRemoteAddressSpace));
        }

        /**
         * @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));
        }

        /**
         * @param useRemoteGateways If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
         * 
         * @return builder
         * 
         */
        public Builder useRemoteGateways(@Nullable Output useRemoteGateways) {
            $.useRemoteGateways = useRemoteGateways;
            return this;
        }

        /**
         * @param useRemoteGateways If remote gateways can be used on this virtual network. If the flag is set to true, and allowGatewayTransit on remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway.
         * 
         * @return builder
         * 
         */
        public Builder useRemoteGateways(Boolean useRemoteGateways) {
            return useRemoteGateways(Output.of(useRemoteGateways));
        }

        /**
         * @param virtualNetworkName The name of the virtual network.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkName(Output virtualNetworkName) {
            $.virtualNetworkName = virtualNetworkName;
            return this;
        }

        /**
         * @param virtualNetworkName The name of the virtual network.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkName(String virtualNetworkName) {
            return virtualNetworkName(Output.of(virtualNetworkName));
        }

        /**
         * @param virtualNetworkPeeringName The name of the peering.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkPeeringName(@Nullable Output virtualNetworkPeeringName) {
            $.virtualNetworkPeeringName = virtualNetworkPeeringName;
            return this;
        }

        /**
         * @param virtualNetworkPeeringName The name of the peering.
         * 
         * @return builder
         * 
         */
        public Builder virtualNetworkPeeringName(String virtualNetworkPeeringName) {
            return virtualNetworkPeeringName(Output.of(virtualNetworkPeeringName));
        }

        public VirtualNetworkPeeringArgs build() {
            if ($.resourceGroupName == null) {
                throw new MissingRequiredPropertyException("VirtualNetworkPeeringArgs", "resourceGroupName");
            }
            if ($.virtualNetworkName == null) {
                throw new MissingRequiredPropertyException("VirtualNetworkPeeringArgs", "virtualNetworkName");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy