
com.pulumi.azurenative.databricks.VNetPeering Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure 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.azurenative.databricks;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.databricks.VNetPeeringArgs;
import com.pulumi.azurenative.databricks.outputs.AddressSpaceResponse;
import com.pulumi.azurenative.databricks.outputs.VirtualNetworkPeeringPropertiesFormatResponseDatabricksVirtualNetwork;
import com.pulumi.azurenative.databricks.outputs.VirtualNetworkPeeringPropertiesFormatResponseRemoteVirtualNetwork;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Peerings in a VirtualNetwork resource
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2018-04-01.
*
* ## Example Usage
* ### Create vNet Peering for Workspace
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.databricks.VNetPeering;
* import com.pulumi.azurenative.databricks.VNetPeeringArgs;
* import com.pulumi.azurenative.databricks.inputs.VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkArgs;
* import java.util.List;
* import java.util.ArrayList;
* import java.util.Map;
* import java.io.File;
* import java.nio.file.Files;
* import java.nio.file.Paths;
*
* public class App {
* public static void main(String[] args) {
* Pulumi.run(App::stack);
* }
*
* public static void stack(Context ctx) {
* var vNetPeering = new VNetPeering("vNetPeering", VNetPeeringArgs.builder()
* .allowForwardedTraffic(false)
* .allowGatewayTransit(false)
* .allowVirtualNetworkAccess(true)
* .peeringName("vNetPeeringTest")
* .remoteVirtualNetwork(VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetworkArgs.builder()
* .id("/subscriptions/0140911e-1040-48da-8bc9-b99fb3dd88a6/resourceGroups/subramantest/providers/Microsoft.Network/virtualNetworks/subramanvnet")
* .build())
* .resourceGroupName("rg")
* .useRemoteGateways(false)
* .workspaceName("myWorkspace")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:databricks:VNetPeering vNetPeeringTest /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}
* ```
*
*/
@ResourceType(type="azure-native:databricks:VNetPeering")
public class VNetPeering extends com.pulumi.resources.CustomResource {
/**
* Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
*
*/
@Export(name="allowForwardedTraffic", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> allowForwardedTraffic;
/**
* @return Whether the forwarded traffic from the VMs in the local virtual network will be allowed/disallowed in remote virtual network.
*
*/
public Output> allowForwardedTraffic() {
return Codegen.optional(this.allowForwardedTraffic);
}
/**
* If gateway links can be used in remote virtual networking to link to this virtual network.
*
*/
@Export(name="allowGatewayTransit", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> allowGatewayTransit;
/**
* @return If gateway links can be used in remote virtual networking to link to this virtual network.
*
*/
public Output> allowGatewayTransit() {
return Codegen.optional(this.allowGatewayTransit);
}
/**
* Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
*
*/
@Export(name="allowVirtualNetworkAccess", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> allowVirtualNetworkAccess;
/**
* @return Whether the VMs in the local virtual network space would be able to access the VMs in remote virtual network space.
*
*/
public Output> allowVirtualNetworkAccess() {
return Codegen.optional(this.allowVirtualNetworkAccess);
}
/**
* The reference to the databricks virtual network address space.
*
*/
@Export(name="databricksAddressSpace", refs={AddressSpaceResponse.class}, tree="[0]")
private Output* @Nullable */ AddressSpaceResponse> databricksAddressSpace;
/**
* @return The reference to the databricks virtual network address space.
*
*/
public Output> databricksAddressSpace() {
return Codegen.optional(this.databricksAddressSpace);
}
/**
* The remote virtual network should be in the same region. See here to learn more (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering).
*
*/
@Export(name="databricksVirtualNetwork", refs={VirtualNetworkPeeringPropertiesFormatResponseDatabricksVirtualNetwork.class}, tree="[0]")
private Output* @Nullable */ VirtualNetworkPeeringPropertiesFormatResponseDatabricksVirtualNetwork> databricksVirtualNetwork;
/**
* @return The remote virtual network should be in the same region. See here to learn more (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering).
*
*/
public Output> databricksVirtualNetwork() {
return Codegen.optional(this.databricksVirtualNetwork);
}
/**
* Name of the virtual network peering resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Name of the virtual network peering resource
*
*/
public Output name() {
return this.name;
}
/**
* The status of the virtual network peering.
*
*/
@Export(name="peeringState", refs={String.class}, tree="[0]")
private Output peeringState;
/**
* @return The status of the virtual network peering.
*
*/
public Output peeringState() {
return this.peeringState;
}
/**
* The provisioning state of the virtual network peering resource.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The provisioning state of the virtual network peering resource.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* The reference to the remote virtual network address space.
*
*/
@Export(name="remoteAddressSpace", refs={AddressSpaceResponse.class}, tree="[0]")
private Output* @Nullable */ AddressSpaceResponse> remoteAddressSpace;
/**
* @return The reference to the remote virtual network address space.
*
*/
public Output> remoteAddressSpace() {
return Codegen.optional(this.remoteAddressSpace);
}
/**
* The remote virtual network should be in the same region. See here to learn more (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering).
*
*/
@Export(name="remoteVirtualNetwork", refs={VirtualNetworkPeeringPropertiesFormatResponseRemoteVirtualNetwork.class}, tree="[0]")
private Output remoteVirtualNetwork;
/**
* @return The remote virtual network should be in the same region. See here to learn more (https://docs.microsoft.com/en-us/azure/databricks/administration-guide/cloud-configurations/azure/vnet-peering).
*
*/
public Output remoteVirtualNetwork() {
return this.remoteVirtualNetwork;
}
/**
* type of the virtual network peering resource
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return type of the virtual network peering resource
*
*/
public Output type() {
return 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.
*
*/
@Export(name="useRemoteGateways", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> 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 Output> useRemoteGateways() {
return Codegen.optional(this.useRemoteGateways);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public VNetPeering(java.lang.String name) {
this(name, VNetPeeringArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public VNetPeering(java.lang.String name, VNetPeeringArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public VNetPeering(java.lang.String name, VNetPeeringArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:databricks:VNetPeering", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private VNetPeering(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:databricks:VNetPeering", name, null, makeResourceOptions(options, id), false);
}
private static VNetPeeringArgs makeArgs(VNetPeeringArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? VNetPeeringArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:databricks:vNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20180401:VNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20180401:vNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20210401preview:VNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20210401preview:vNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20220401preview:VNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20220401preview:vNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20230201:VNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20230201:vNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20230915preview:VNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20230915preview:vNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20240501:VNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20240501:vNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20240901preview:VNetPeering").build()),
Output.of(Alias.builder().type("azure-native:databricks/v20240901preview:vNetPeering").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static VNetPeering get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new VNetPeering(name, id, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy