com.pulumi.azurenative.network.PrivateLinkService 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.network;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.network.PrivateLinkServiceArgs;
import com.pulumi.azurenative.network.outputs.ExtendedLocationResponse;
import com.pulumi.azurenative.network.outputs.FrontendIPConfigurationResponse;
import com.pulumi.azurenative.network.outputs.NetworkInterfaceResponse;
import com.pulumi.azurenative.network.outputs.PrivateEndpointConnectionResponse;
import com.pulumi.azurenative.network.outputs.PrivateLinkServiceIpConfigurationResponse;
import com.pulumi.azurenative.network.outputs.PrivateLinkServicePropertiesResponseAutoApproval;
import com.pulumi.azurenative.network.outputs.PrivateLinkServicePropertiesResponseVisibility;
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.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Private link service resource.
* Azure REST API version: 2023-02-01. Prior API version in Azure Native 1.x: 2020-11-01.
*
* Other available API versions: 2019-08-01, 2021-02-01, 2023-04-01, 2023-05-01, 2023-06-01, 2023-09-01, 2023-11-01, 2024-01-01, 2024-03-01.
*
* ## Example Usage
* ### Create private link service
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.network.PrivateLinkService;
* import com.pulumi.azurenative.network.PrivateLinkServiceArgs;
* import com.pulumi.azurenative.network.inputs.PrivateLinkServicePropertiesAutoApprovalArgs;
* import com.pulumi.azurenative.network.inputs.PrivateLinkServiceIpConfigurationArgs;
* import com.pulumi.azurenative.network.inputs.SubnetArgs;
* import com.pulumi.azurenative.network.inputs.FrontendIPConfigurationArgs;
* import com.pulumi.azurenative.network.inputs.PrivateLinkServicePropertiesVisibilityArgs;
* 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 privateLinkService = new PrivateLinkService("privateLinkService", PrivateLinkServiceArgs.builder()
* .autoApproval(PrivateLinkServicePropertiesAutoApprovalArgs.builder()
* .subscriptions(
* "subscription1",
* "subscription2")
* .build())
* .fqdns(
* "fqdn1",
* "fqdn2",
* "fqdn3")
* .ipConfigurations(PrivateLinkServiceIpConfigurationArgs.builder()
* .name("fe-lb")
* .privateIPAddress("10.0.1.4")
* .privateIPAddressVersion("IPv4")
* .privateIPAllocationMethod("Static")
* .subnet(SubnetArgs.builder()
* .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnetlb/subnets/subnetlb")
* .build())
* .build())
* .loadBalancerFrontendIpConfigurations(FrontendIPConfigurationArgs.builder()
* .id("/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/loadBalancers/lb/frontendIPConfigurations/fe-lb")
* .build())
* .location("eastus")
* .resourceGroupName("rg1")
* .serviceName("testPls")
* .visibility(PrivateLinkServicePropertiesVisibilityArgs.builder()
* .subscriptions(
* "subscription1",
* "subscription2",
* "subscription3")
* .build())
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:network:PrivateLinkService testPls /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}
* ```
*
*/
@ResourceType(type="azure-native:network:PrivateLinkService")
public class PrivateLinkService extends com.pulumi.resources.CustomResource {
/**
* The alias of the private link service.
*
*/
@Export(name="alias", refs={String.class}, tree="[0]")
private Output alias;
/**
* @return The alias of the private link service.
*
*/
public Output alias() {
return this.alias;
}
/**
* The auto-approval list of the private link service.
*
*/
@Export(name="autoApproval", refs={PrivateLinkServicePropertiesResponseAutoApproval.class}, tree="[0]")
private Output* @Nullable */ PrivateLinkServicePropertiesResponseAutoApproval> autoApproval;
/**
* @return The auto-approval list of the private link service.
*
*/
public Output> autoApproval() {
return Codegen.optional(this.autoApproval);
}
/**
* Whether the private link service is enabled for proxy protocol or not.
*
*/
@Export(name="enableProxyProtocol", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enableProxyProtocol;
/**
* @return Whether the private link service is enabled for proxy protocol or not.
*
*/
public Output> enableProxyProtocol() {
return Codegen.optional(this.enableProxyProtocol);
}
/**
* A unique read-only string that changes whenever the resource is updated.
*
*/
@Export(name="etag", refs={String.class}, tree="[0]")
private Output etag;
/**
* @return A unique read-only string that changes whenever the resource is updated.
*
*/
public Output etag() {
return this.etag;
}
/**
* The extended location of the load balancer.
*
*/
@Export(name="extendedLocation", refs={ExtendedLocationResponse.class}, tree="[0]")
private Output* @Nullable */ ExtendedLocationResponse> extendedLocation;
/**
* @return The extended location of the load balancer.
*
*/
public Output> extendedLocation() {
return Codegen.optional(this.extendedLocation);
}
/**
* The list of Fqdn.
*
*/
@Export(name="fqdns", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> fqdns;
/**
* @return The list of Fqdn.
*
*/
public Output>> fqdns() {
return Codegen.optional(this.fqdns);
}
/**
* An array of private link service IP configurations.
*
*/
@Export(name="ipConfigurations", refs={List.class,PrivateLinkServiceIpConfigurationResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> ipConfigurations;
/**
* @return An array of private link service IP configurations.
*
*/
public Output>> ipConfigurations() {
return Codegen.optional(this.ipConfigurations);
}
/**
* An array of references to the load balancer IP configurations.
*
*/
@Export(name="loadBalancerFrontendIpConfigurations", refs={List.class,FrontendIPConfigurationResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> loadBalancerFrontendIpConfigurations;
/**
* @return An array of references to the load balancer IP configurations.
*
*/
public Output>> loadBalancerFrontendIpConfigurations() {
return Codegen.optional(this.loadBalancerFrontendIpConfigurations);
}
/**
* Resource location.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> location;
/**
* @return Resource location.
*
*/
public Output> location() {
return Codegen.optional(this.location);
}
/**
* Resource name.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Resource name.
*
*/
public Output name() {
return this.name;
}
/**
* An array of references to the network interfaces created for this private link service.
*
*/
@Export(name="networkInterfaces", refs={List.class,NetworkInterfaceResponse.class}, tree="[0,1]")
private Output> networkInterfaces;
/**
* @return An array of references to the network interfaces created for this private link service.
*
*/
public Output> networkInterfaces() {
return this.networkInterfaces;
}
/**
* An array of list about connections to the private endpoint.
*
*/
@Export(name="privateEndpointConnections", refs={List.class,PrivateEndpointConnectionResponse.class}, tree="[0,1]")
private Output> privateEndpointConnections;
/**
* @return An array of list about connections to the private endpoint.
*
*/
public Output> privateEndpointConnections() {
return this.privateEndpointConnections;
}
/**
* The provisioning state of the private link service resource.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output provisioningState;
/**
* @return The provisioning state of the private link service resource.
*
*/
public Output provisioningState() {
return this.provisioningState;
}
/**
* Resource tags.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Resource type.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type.
*
*/
public Output type() {
return this.type;
}
/**
* The visibility list of the private link service.
*
*/
@Export(name="visibility", refs={PrivateLinkServicePropertiesResponseVisibility.class}, tree="[0]")
private Output* @Nullable */ PrivateLinkServicePropertiesResponseVisibility> visibility;
/**
* @return The visibility list of the private link service.
*
*/
public Output> visibility() {
return Codegen.optional(this.visibility);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public PrivateLinkService(java.lang.String name) {
this(name, PrivateLinkServiceArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public PrivateLinkService(java.lang.String name, PrivateLinkServiceArgs 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 PrivateLinkService(java.lang.String name, PrivateLinkServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:network:PrivateLinkService", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private PrivateLinkService(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:network:PrivateLinkService", name, null, makeResourceOptions(options, id), false);
}
private static PrivateLinkServiceArgs makeArgs(PrivateLinkServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? PrivateLinkServiceArgs.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:network/v20190401:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20190601:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20190701:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20190801:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20190901:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20191101:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20191201:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20200301:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20200401:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20200501:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20200601:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20200701:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20200801:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20201101:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20210201:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20210301:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20210501:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20210801:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20220101:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20220501:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20220701:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20220901:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20221101:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20230201:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20230401:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20230501:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20230601:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20230901:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20231101:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20240101:PrivateLinkService").build()),
Output.of(Alias.builder().type("azure-native:network/v20240301:PrivateLinkService").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 PrivateLinkService get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new PrivateLinkService(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy