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

com.pulumi.azurenative.network.DnsForwardingRuleset 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;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.network.DnsForwardingRulesetArgs;
import com.pulumi.azurenative.network.outputs.SubResourceResponse;
import com.pulumi.azurenative.network.outputs.SystemDataResponse;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Describes a DNS forwarding ruleset.
 * Azure REST API version: 2022-07-01. Prior API version in Azure Native 1.x: 2020-04-01-preview.
 * 
 * Other available API versions: 2020-04-01-preview, 2023-07-01-preview.
 * 
 * ## Example Usage
 * ### Upsert DNS forwarding ruleset
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.DnsForwardingRuleset;
 * import com.pulumi.azurenative.network.DnsForwardingRulesetArgs;
 * import com.pulumi.azurenative.network.inputs.SubResourceArgs;
 * 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 dnsForwardingRuleset = new DnsForwardingRuleset("dnsForwardingRuleset", DnsForwardingRulesetArgs.builder()
 *             .dnsForwardingRulesetName("samplednsForwardingRuleset")
 *             .dnsResolverOutboundEndpoints(            
 *                 SubResourceArgs.builder()
 *                     .id("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint0")
 *                     .build(),
 *                 SubResourceArgs.builder()
 *                     .id("/subscriptions/abdd4249-9f34-4cc6-8e42-c2e32110603e/resourceGroups/sampleResourceGroup/providers/Microsoft.Network/dnsResolvers/sampleDnsResolver/outboundEndpoints/sampleOutboundEndpoint1")
 *                     .build())
 *             .location("westus2")
 *             .resourceGroupName("sampleResourceGroup")
 *             .tags(Map.of("key1", "value1"))
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:network:DnsForwardingRuleset sampleDnsForwardingRuleset /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsForwardingRulesets/{dnsForwardingRulesetName} * ``` * */ @ResourceType(type="azure-native:network:DnsForwardingRuleset") public class DnsForwardingRuleset extends com.pulumi.resources.CustomResource { /** * The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. * */ @Export(name="dnsResolverOutboundEndpoints", refs={List.class,SubResourceResponse.class}, tree="[0,1]") private Output> dnsResolverOutboundEndpoints; /** * @return The reference to the DNS resolver outbound endpoints that are used to route DNS queries matching the forwarding rules in the ruleset to the target DNS servers. * */ public Output> dnsResolverOutboundEndpoints() { return this.dnsResolverOutboundEndpoints; } /** * ETag of the DNS forwarding ruleset. * */ @Export(name="etag", refs={String.class}, tree="[0]") private Output etag; /** * @return ETag of the DNS forwarding ruleset. * */ public Output etag() { return this.etag; } /** * The geo-location where the resource lives * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The geo-location where the resource lives * */ public Output location() { return this.location; } /** * The name of the resource * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the resource * */ public Output name() { return this.name; } /** * The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return The current provisioning state of the DNS forwarding ruleset. This is a read-only property and any attempt to set this value will be ignored. * */ public Output provisioningState() { return this.provisioningState; } /** * The resourceGuid for the DNS forwarding ruleset. * */ @Export(name="resourceGuid", refs={String.class}, tree="[0]") private Output resourceGuid; /** * @return The resourceGuid for the DNS forwarding ruleset. * */ public Output resourceGuid() { return this.resourceGuid; } /** * Metadata pertaining to creation and last modification of the resource. * */ @Export(name="systemData", refs={SystemDataResponse.class}, tree="[0]") private Output systemData; /** * @return Metadata pertaining to creation and last modification of the resource. * */ public Output systemData() { return this.systemData; } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * */ public Output type() { return this.type; } /** * * @param name The _unique_ name of the resulting resource. */ public DnsForwardingRuleset(java.lang.String name) { this(name, DnsForwardingRulesetArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public DnsForwardingRuleset(java.lang.String name, DnsForwardingRulesetArgs 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 DnsForwardingRuleset(java.lang.String name, DnsForwardingRulesetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:network:DnsForwardingRuleset", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private DnsForwardingRuleset(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:network:DnsForwardingRuleset", name, null, makeResourceOptions(options, id), false); } private static DnsForwardingRulesetArgs makeArgs(DnsForwardingRulesetArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? DnsForwardingRulesetArgs.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/v20200401preview:DnsForwardingRuleset").build()), Output.of(Alias.builder().type("azure-native:network/v20220701:DnsForwardingRuleset").build()), Output.of(Alias.builder().type("azure-native:network/v20230701preview:DnsForwardingRuleset").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 DnsForwardingRuleset get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new DnsForwardingRuleset(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy