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

com.pulumi.azurenative.network.Profile 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.ProfileArgs;
import com.pulumi.azurenative.network.outputs.DnsConfigResponse;
import com.pulumi.azurenative.network.outputs.EndpointResponse;
import com.pulumi.azurenative.network.outputs.MonitorConfigResponse;
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.Double;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Class representing a Traffic Manager profile.
 * Azure REST API version: 2022-04-01. Prior API version in Azure Native 1.x: 2018-08-01.
 * 
 * Other available API versions: 2017-03-01, 2018-02-01, 2022-04-01-preview.
 * 
 * ## Example Usage
 * ### Profile-PUT-MultiValue
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.Profile;
 * import com.pulumi.azurenative.network.ProfileArgs;
 * import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
 * import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
 * 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 profile = new Profile("profile", ProfileArgs.builder()
 *             .dnsConfig(DnsConfigArgs.builder()
 *                 .relativeName("azsmnet6386")
 *                 .ttl(35)
 *                 .build())
 *             .location("global")
 *             .maxReturn(2)
 *             .monitorConfig(MonitorConfigArgs.builder()
 *                 .path("/testpath.aspx")
 *                 .port(80)
 *                 .protocol("HTTP")
 *                 .build())
 *             .profileName("azsmnet6386")
 *             .profileStatus("Enabled")
 *             .resourceGroupName("azuresdkfornetautoresttrafficmanager1421")
 *             .trafficRoutingMethod("MultiValue")
 *             .trafficViewEnrollmentStatus("Disabled")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Profile-PUT-NoEndpoints * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.Profile;
 * import com.pulumi.azurenative.network.ProfileArgs;
 * import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
 * import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
 * 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 profile = new Profile("profile", ProfileArgs.builder()
 *             .dnsConfig(DnsConfigArgs.builder()
 *                 .relativeName("azsmnet6386")
 *                 .ttl(35)
 *                 .build())
 *             .location("global")
 *             .monitorConfig(MonitorConfigArgs.builder()
 *                 .path("/testpath.aspx")
 *                 .port(80)
 *                 .protocol("HTTP")
 *                 .build())
 *             .profileName("azsmnet6386")
 *             .profileStatus("Enabled")
 *             .resourceGroupName("azuresdkfornetautoresttrafficmanager1421")
 *             .trafficRoutingMethod("Performance")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Profile-PUT-WithAliasing * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.Profile;
 * import com.pulumi.azurenative.network.ProfileArgs;
 * import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
 * import com.pulumi.azurenative.network.inputs.EndpointArgs;
 * import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
 * 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 profile = new Profile("profile", ProfileArgs.builder()
 *             .allowedEndpointRecordTypes("DomainName")
 *             .dnsConfig(DnsConfigArgs.builder()
 *                 .relativeName("azuresdkfornetautoresttrafficmanager6192")
 *                 .ttl(35)
 *                 .build())
 *             .endpoints(EndpointArgs.builder()
 *                 .endpointLocation("North Europe")
 *                 .endpointStatus("Enabled")
 *                 .name("My external endpoint")
 *                 .target("foobar.contoso.com")
 *                 .type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
 *                 .build())
 *             .location("global")
 *             .monitorConfig(MonitorConfigArgs.builder()
 *                 .intervalInSeconds(10)
 *                 .path("/testpath.aspx")
 *                 .port(80)
 *                 .protocol("HTTP")
 *                 .timeoutInSeconds(5)
 *                 .toleratedNumberOfFailures(2)
 *                 .build())
 *             .profileName("azuresdkfornetautoresttrafficmanager6192")
 *             .profileStatus("Enabled")
 *             .resourceGroupName("azuresdkfornetautoresttrafficmanager2583")
 *             .trafficRoutingMethod("Performance")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Profile-PUT-WithCustomHeaders * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.Profile;
 * import com.pulumi.azurenative.network.ProfileArgs;
 * import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
 * import com.pulumi.azurenative.network.inputs.EndpointArgs;
 * import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
 * 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 profile = new Profile("profile", ProfileArgs.builder()
 *             .dnsConfig(DnsConfigArgs.builder()
 *                 .relativeName("azuresdkfornetautoresttrafficmanager6192")
 *                 .ttl(35)
 *                 .build())
 *             .endpoints(EndpointArgs.builder()
 *                 .customHeaders(EndpointPropertiesCustomHeadersArgs.builder()
 *                     .name("header-2")
 *                     .value("value-2-overridden")
 *                     .build())
 *                 .endpointLocation("North Europe")
 *                 .endpointStatus("Enabled")
 *                 .name("My external endpoint")
 *                 .target("foobar.contoso.com")
 *                 .type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
 *                 .build())
 *             .location("global")
 *             .monitorConfig(MonitorConfigArgs.builder()
 *                 .customHeaders(                
 *                     MonitorConfigCustomHeadersArgs.builder()
 *                         .name("header-1")
 *                         .value("value-1")
 *                         .build(),
 *                     MonitorConfigCustomHeadersArgs.builder()
 *                         .name("header-2")
 *                         .value("value-2")
 *                         .build())
 *                 .expectedStatusCodeRanges(                
 *                     MonitorConfigExpectedStatusCodeRangesArgs.builder()
 *                         .max(205)
 *                         .min(200)
 *                         .build(),
 *                     MonitorConfigExpectedStatusCodeRangesArgs.builder()
 *                         .max(410)
 *                         .min(400)
 *                         .build())
 *                 .intervalInSeconds(10)
 *                 .path("/testpath.aspx")
 *                 .port(80)
 *                 .protocol("HTTP")
 *                 .timeoutInSeconds(5)
 *                 .toleratedNumberOfFailures(2)
 *                 .build())
 *             .profileName("azuresdkfornetautoresttrafficmanager6192")
 *             .profileStatus("Enabled")
 *             .resourceGroupName("azuresdkfornetautoresttrafficmanager2583")
 *             .trafficRoutingMethod("Performance")
 *             .trafficViewEnrollmentStatus("Disabled")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Profile-PUT-WithEndpoints * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.Profile;
 * import com.pulumi.azurenative.network.ProfileArgs;
 * import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
 * import com.pulumi.azurenative.network.inputs.EndpointArgs;
 * import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
 * 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 profile = new Profile("profile", ProfileArgs.builder()
 *             .dnsConfig(DnsConfigArgs.builder()
 *                 .relativeName("azuresdkfornetautoresttrafficmanager6192")
 *                 .ttl(35)
 *                 .build())
 *             .endpoints(EndpointArgs.builder()
 *                 .endpointLocation("North Europe")
 *                 .endpointStatus("Enabled")
 *                 .name("My external endpoint")
 *                 .target("foobar.contoso.com")
 *                 .type("Microsoft.network/TrafficManagerProfiles/ExternalEndpoints")
 *                 .build())
 *             .location("global")
 *             .monitorConfig(MonitorConfigArgs.builder()
 *                 .intervalInSeconds(10)
 *                 .path("/testpath.aspx")
 *                 .port(80)
 *                 .protocol("HTTP")
 *                 .timeoutInSeconds(5)
 *                 .toleratedNumberOfFailures(2)
 *                 .build())
 *             .profileName("azuresdkfornetautoresttrafficmanager6192")
 *             .profileStatus("Enabled")
 *             .resourceGroupName("azuresdkfornetautoresttrafficmanager2583")
 *             .trafficRoutingMethod("Performance")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### Profile-PUT-WithNestedEndpoints * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.network.Profile;
 * import com.pulumi.azurenative.network.ProfileArgs;
 * import com.pulumi.azurenative.network.inputs.DnsConfigArgs;
 * import com.pulumi.azurenative.network.inputs.EndpointArgs;
 * import com.pulumi.azurenative.network.inputs.MonitorConfigArgs;
 * 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 profile = new Profile("profile", ProfileArgs.builder()
 *             .dnsConfig(DnsConfigArgs.builder()
 *                 .relativeName("parentprofile")
 *                 .ttl(35)
 *                 .build())
 *             .endpoints(            
 *                 EndpointArgs.builder()
 *                     .endpointStatus("Enabled")
 *                     .minChildEndpoints(2)
 *                     .minChildEndpointsIPv4(1)
 *                     .minChildEndpointsIPv6(2)
 *                     .name("MyFirstNestedEndpoint")
 *                     .priority(1)
 *                     .target("firstnestedprofile.tmpreview.watmtest.azure-test.net")
 *                     .type("Microsoft.Network/trafficManagerProfiles/nestedEndpoints")
 *                     .weight(1)
 *                     .build(),
 *                 EndpointArgs.builder()
 *                     .endpointStatus("Enabled")
 *                     .minChildEndpoints(2)
 *                     .minChildEndpointsIPv4(2)
 *                     .minChildEndpointsIPv6(1)
 *                     .name("MySecondNestedEndpoint")
 *                     .priority(2)
 *                     .target("secondnestedprofile.tmpreview.watmtest.azure-test.net")
 *                     .type("Microsoft.Network/trafficManagerProfiles/nestedEndpoints")
 *                     .weight(1)
 *                     .build())
 *             .location("global")
 *             .monitorConfig(MonitorConfigArgs.builder()
 *                 .intervalInSeconds(10)
 *                 .path("/testpath.aspx")
 *                 .port(80)
 *                 .protocol("HTTP")
 *                 .timeoutInSeconds(5)
 *                 .toleratedNumberOfFailures(2)
 *                 .build())
 *             .profileName("parentprofile")
 *             .profileStatus("Enabled")
 *             .resourceGroupName("myresourcegroup")
 *             .trafficRoutingMethod("Priority")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:network:Profile parentprofile /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles/{profileName} * ``` * */ @ResourceType(type="azure-native:network:Profile") public class Profile extends com.pulumi.resources.CustomResource { /** * The list of allowed endpoint record types. * */ @Export(name="allowedEndpointRecordTypes", refs={List.class,String.class}, tree="[0,1]") private Output> allowedEndpointRecordTypes; /** * @return The list of allowed endpoint record types. * */ public Output>> allowedEndpointRecordTypes() { return Codegen.optional(this.allowedEndpointRecordTypes); } /** * The DNS settings of the Traffic Manager profile. * */ @Export(name="dnsConfig", refs={DnsConfigResponse.class}, tree="[0]") private Output dnsConfig; /** * @return The DNS settings of the Traffic Manager profile. * */ public Output> dnsConfig() { return Codegen.optional(this.dnsConfig); } /** * The list of endpoints in the Traffic Manager profile. * */ @Export(name="endpoints", refs={List.class,EndpointResponse.class}, tree="[0,1]") private Output> endpoints; /** * @return The list of endpoints in the Traffic Manager profile. * */ public Output>> endpoints() { return Codegen.optional(this.endpoints); } /** * The Azure Region where the resource lives * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return The Azure Region where the resource lives * */ public Output> location() { return Codegen.optional(this.location); } /** * Maximum number of endpoints to be returned for MultiValue routing type. * */ @Export(name="maxReturn", refs={Double.class}, tree="[0]") private Output maxReturn; /** * @return Maximum number of endpoints to be returned for MultiValue routing type. * */ public Output> maxReturn() { return Codegen.optional(this.maxReturn); } /** * The endpoint monitoring settings of the Traffic Manager profile. * */ @Export(name="monitorConfig", refs={MonitorConfigResponse.class}, tree="[0]") private Output monitorConfig; /** * @return The endpoint monitoring settings of the Traffic Manager profile. * */ public Output> monitorConfig() { return Codegen.optional(this.monitorConfig); } /** * 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 Codegen.optional(this.name); } /** * The status of the Traffic Manager profile. * */ @Export(name="profileStatus", refs={String.class}, tree="[0]") private Output profileStatus; /** * @return The status of the Traffic Manager profile. * */ public Output> profileStatus() { return Codegen.optional(this.profileStatus); } /** * 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 traffic routing method of the Traffic Manager profile. * */ @Export(name="trafficRoutingMethod", refs={String.class}, tree="[0]") private Output trafficRoutingMethod; /** * @return The traffic routing method of the Traffic Manager profile. * */ public Output> trafficRoutingMethod() { return Codegen.optional(this.trafficRoutingMethod); } /** * Indicates whether Traffic View is 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic Manage profile. * */ @Export(name="trafficViewEnrollmentStatus", refs={String.class}, tree="[0]") private Output trafficViewEnrollmentStatus; /** * @return Indicates whether Traffic View is 'Enabled' or 'Disabled' for the Traffic Manager profile. Null, indicates 'Disabled'. Enabling this feature will increase the cost of the Traffic Manage profile. * */ public Output> trafficViewEnrollmentStatus() { return Codegen.optional(this.trafficViewEnrollmentStatus); } /** * The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return The type of the resource. Ex- Microsoft.Network/trafficManagerProfiles. * */ public Output> type() { return Codegen.optional(this.type); } /** * * @param name The _unique_ name of the resulting resource. */ public Profile(java.lang.String name) { this(name, ProfileArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Profile(java.lang.String name, ProfileArgs 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 Profile(java.lang.String name, ProfileArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:network:Profile", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Profile(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:network:Profile", name, null, makeResourceOptions(options, id), false); } private static ProfileArgs makeArgs(ProfileArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ProfileArgs.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/v20151101:Profile").build()), Output.of(Alias.builder().type("azure-native:network/v20170301:Profile").build()), Output.of(Alias.builder().type("azure-native:network/v20170501:Profile").build()), Output.of(Alias.builder().type("azure-native:network/v20180201:Profile").build()), Output.of(Alias.builder().type("azure-native:network/v20180301:Profile").build()), Output.of(Alias.builder().type("azure-native:network/v20180401:Profile").build()), Output.of(Alias.builder().type("azure-native:network/v20180801:Profile").build()), Output.of(Alias.builder().type("azure-native:network/v20220401:Profile").build()), Output.of(Alias.builder().type("azure-native:network/v20220401preview:Profile").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 Profile get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Profile(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy