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

com.pulumi.azure.network.TrafficManagerNestedEndpoint Maven / Gradle / Ivy

// *** 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.azure.network;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.network.TrafficManagerNestedEndpointArgs;
import com.pulumi.azure.network.inputs.TrafficManagerNestedEndpointState;
import com.pulumi.azure.network.outputs.TrafficManagerNestedEndpointCustomHeader;
import com.pulumi.azure.network.outputs.TrafficManagerNestedEndpointSubnet;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Nested Endpoint within a Traffic Manager Profile.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.PublicIp;
 * import com.pulumi.azure.network.PublicIpArgs;
 * import com.pulumi.azure.network.TrafficManagerProfile;
 * import com.pulumi.azure.network.TrafficManagerProfileArgs;
 * import com.pulumi.azure.network.inputs.TrafficManagerProfileDnsConfigArgs;
 * import com.pulumi.azure.network.inputs.TrafficManagerProfileMonitorConfigArgs;
 * import com.pulumi.azure.network.TrafficManagerNestedEndpoint;
 * import com.pulumi.azure.network.TrafficManagerNestedEndpointArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var examplePublicIp = new PublicIp("examplePublicIp", PublicIpArgs.builder()
 *             .name("example-publicip")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .allocationMethod("Static")
 *             .domainNameLabel("example-pip")
 *             .build());
 * 
 *         var parent = new TrafficManagerProfile("parent", TrafficManagerProfileArgs.builder()
 *             .name("parent-profile")
 *             .resourceGroupName(example.name())
 *             .trafficRoutingMethod("Weighted")
 *             .dnsConfig(TrafficManagerProfileDnsConfigArgs.builder()
 *                 .relativeName("parent-profile")
 *                 .ttl(100)
 *                 .build())
 *             .monitorConfig(TrafficManagerProfileMonitorConfigArgs.builder()
 *                 .protocol("HTTP")
 *                 .port(80)
 *                 .path("/")
 *                 .intervalInSeconds(30)
 *                 .timeoutInSeconds(9)
 *                 .toleratedNumberOfFailures(3)
 *                 .build())
 *             .tags(Map.of("environment", "Production"))
 *             .build());
 * 
 *         var nested = new TrafficManagerProfile("nested", TrafficManagerProfileArgs.builder()
 *             .name("nested-profile")
 *             .resourceGroupName(example.name())
 *             .trafficRoutingMethod("Priority")
 *             .dnsConfig(TrafficManagerProfileDnsConfigArgs.builder()
 *                 .relativeName("nested-profile")
 *                 .ttl(30)
 *                 .build())
 *             .monitorConfig(TrafficManagerProfileMonitorConfigArgs.builder()
 *                 .protocol("HTTP")
 *                 .port(443)
 *                 .path("/")
 *                 .build())
 *             .build());
 * 
 *         var exampleTrafficManagerNestedEndpoint = new TrafficManagerNestedEndpoint("exampleTrafficManagerNestedEndpoint", TrafficManagerNestedEndpointArgs.builder()
 *             .name("example-endpoint")
 *             .targetResourceId(nested.id())
 *             .priority(1)
 *             .profileId(parent.id())
 *             .minimumChildEndpoints(9)
 *             .weight(5)
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Nested Endpoints can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:network/trafficManagerNestedEndpoint:TrafficManagerNestedEndpoint example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.Network/trafficManagerProfiles/example-profile/NestedEndpoints/example-endpoint * ``` * */ @ResourceType(type="azure:network/trafficManagerNestedEndpoint:TrafficManagerNestedEndpoint") public class TrafficManagerNestedEndpoint extends com.pulumi.resources.CustomResource { /** * One or more `custom_header` blocks as defined below. * */ @Export(name="customHeaders", refs={List.class,TrafficManagerNestedEndpointCustomHeader.class}, tree="[0,1]") private Output> customHeaders; /** * @return One or more `custom_header` blocks as defined below. * */ public Output>> customHeaders() { return Codegen.optional(this.customHeaders); } /** * Is the endpoint enabled? Defaults to `true`. * */ @Export(name="enabled", refs={Boolean.class}, tree="[0]") private Output enabled; /** * @return Is the endpoint enabled? Defaults to `true`. * */ public Output> enabled() { return Codegen.optional(this.enabled); } /** * Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. * */ @Export(name="endpointLocation", refs={String.class}, tree="[0]") private Output endpointLocation; /** * @return Specifies the Azure location of the Endpoint, this must be specified for Profiles using the `Performance` routing method. * */ public Output endpointLocation() { return this.endpointLocation; } /** * A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). * */ @Export(name="geoMappings", refs={List.class,String.class}, tree="[0,1]") private Output> geoMappings; /** * @return A list of Geographic Regions used to distribute traffic, such as `WORLD`, `UK` or `DE`. The same location can't be specified in two endpoints. [See the Geographic Hierarchies documentation for more information](https://docs.microsoft.com/rest/api/trafficmanager/geographichierarchies/getdefault). * */ public Output>> geoMappings() { return Codegen.optional(this.geoMappings); } /** * This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This value must be larger than `0`. * * ~>**NOTE:** If `min_child_endpoints` is less than either `minimum_required_child_endpoints_ipv4` or `minimum_required_child_endpoints_ipv6`, then it won't have any effect. * */ @Export(name="minimumChildEndpoints", refs={Integer.class}, tree="[0]") private Output minimumChildEndpoints; /** * @return This argument specifies the minimum number of endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This value must be larger than `0`. * * ~>**NOTE:** If `min_child_endpoints` is less than either `minimum_required_child_endpoints_ipv4` or `minimum_required_child_endpoints_ipv6`, then it won't have any effect. * */ public Output minimumChildEndpoints() { return this.minimumChildEndpoints; } /** * This argument specifies the minimum number of IPv4 (DNS record type A) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and * */ @Export(name="minimumRequiredChildEndpointsIpv4", refs={Integer.class}, tree="[0]") private Output minimumRequiredChildEndpointsIpv4; /** * @return This argument specifies the minimum number of IPv4 (DNS record type A) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and * */ public Output> minimumRequiredChildEndpointsIpv4() { return Codegen.optional(this.minimumRequiredChildEndpointsIpv4); } /** * This argument specifies the minimum number of IPv6 (DNS record type AAAA) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and * */ @Export(name="minimumRequiredChildEndpointsIpv6", refs={Integer.class}, tree="[0]") private Output minimumRequiredChildEndpointsIpv6; /** * @return This argument specifies the minimum number of IPv6 (DNS record type AAAA) endpoints that must be ‘online’ in the child profile in order for the parent profile to direct traffic to any of the endpoints in that child profile. This argument only applies to Endpoints of type `nestedEndpoints` and * */ public Output> minimumRequiredChildEndpointsIpv6() { return Codegen.optional(this.minimumRequiredChildEndpointsIpv6); } /** * The name of the External Endpoint. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The name of the External Endpoint. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Defaults to `1`. * */ @Export(name="priority", refs={Integer.class}, tree="[0]") private Output priority; /** * @return Specifies the priority of this Endpoint, this must be specified for Profiles using the `Priority` traffic routing method. Supports values between 1 and 1000, with no Endpoints sharing the same value. If omitted the value will be computed in order of creation. Defaults to `1`. * */ public Output> priority() { return Codegen.optional(this.priority); } /** * The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. * */ @Export(name="profileId", refs={String.class}, tree="[0]") private Output profileId; /** * @return The ID of the Traffic Manager Profile that this External Endpoint should be created within. Changing this forces a new resource to be created. * */ public Output profileId() { return this.profileId; } /** * One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. * */ @Export(name="subnets", refs={List.class,TrafficManagerNestedEndpointSubnet.class}, tree="[0,1]") private Output> subnets; /** * @return One or more `subnet` blocks as defined below. Changing this forces a new resource to be created. * */ public Output>> subnets() { return Codegen.optional(this.subnets); } /** * The resource id of an Azure resource to target. * */ @Export(name="targetResourceId", refs={String.class}, tree="[0]") private Output targetResourceId; /** * @return The resource id of an Azure resource to target. * */ public Output targetResourceId() { return this.targetResourceId; } /** * Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. * */ @Export(name="weight", refs={Integer.class}, tree="[0]") private Output weight; /** * @return Specifies how much traffic should be distributed to this endpoint, this must be specified for Profiles using the Weighted traffic routing method. Valid values are between `1` and `1000`. Defaults to `1`. * */ public Output> weight() { return Codegen.optional(this.weight); } /** * * @param name The _unique_ name of the resulting resource. */ public TrafficManagerNestedEndpoint(java.lang.String name) { this(name, TrafficManagerNestedEndpointArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public TrafficManagerNestedEndpoint(java.lang.String name, TrafficManagerNestedEndpointArgs 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 TrafficManagerNestedEndpoint(java.lang.String name, TrafficManagerNestedEndpointArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:network/trafficManagerNestedEndpoint:TrafficManagerNestedEndpoint", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private TrafficManagerNestedEndpoint(java.lang.String name, Output id, @Nullable TrafficManagerNestedEndpointState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:network/trafficManagerNestedEndpoint:TrafficManagerNestedEndpoint", name, state, makeResourceOptions(options, id), false); } private static TrafficManagerNestedEndpointArgs makeArgs(TrafficManagerNestedEndpointArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? TrafficManagerNestedEndpointArgs.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()) .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 state * @param options Optional settings to control the behavior of the CustomResource. */ public static TrafficManagerNestedEndpoint get(java.lang.String name, Output id, @Nullable TrafficManagerNestedEndpointState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new TrafficManagerNestedEndpoint(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy