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

com.pulumi.azurenative.insights.WebTest Maven / Gradle / Ivy

There is a newer version: 2.82.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.insights;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.insights.WebTestArgs;
import com.pulumi.azurenative.insights.outputs.WebTestGeolocationResponse;
import com.pulumi.azurenative.insights.outputs.WebTestPropertiesResponseConfiguration;
import com.pulumi.azurenative.insights.outputs.WebTestPropertiesResponseRequest;
import com.pulumi.azurenative.insights.outputs.WebTestPropertiesResponseValidationRules;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * An Application Insights WebTest definition.
 * Azure REST API version: 2022-06-15. Prior API version in Azure Native 1.x: 2015-05-01.
 * 
 * Other available API versions: 2020-10-05-preview.
 * 
 * ## Example Usage
 * ### webTestCreate
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.insights.WebTest;
 * import com.pulumi.azurenative.insights.WebTestArgs;
 * import com.pulumi.azurenative.insights.inputs.WebTestPropertiesConfigurationArgs;
 * import com.pulumi.azurenative.insights.inputs.WebTestGeolocationArgs;
 * 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 webTest = new WebTest("webTest", WebTestArgs.builder()
 *             .configuration(WebTestPropertiesConfigurationArgs.builder()
 *                 .webTest("")
 *                 .build())
 *             .description("Ping web test alert for mytestwebapp")
 *             .enabled(true)
 *             .frequency(900)
 *             .kind("ping")
 *             .location("South Central US")
 *             .locations(WebTestGeolocationArgs.builder()
 *                 .location("us-fl-mia-edge")
 *                 .build())
 *             .resourceGroupName("my-resource-group")
 *             .retryEnabled(true)
 *             .syntheticMonitorId("my-webtest-my-component")
 *             .timeout(120)
 *             .webTestKind("ping")
 *             .webTestName("my-webtest-my-component")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### webTestCreateStandard * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.insights.WebTest;
 * import com.pulumi.azurenative.insights.WebTestArgs;
 * import com.pulumi.azurenative.insights.inputs.WebTestGeolocationArgs;
 * import com.pulumi.azurenative.insights.inputs.WebTestPropertiesRequestArgs;
 * import com.pulumi.azurenative.insights.inputs.WebTestPropertiesValidationRulesArgs;
 * 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 webTest = new WebTest("webTest", WebTestArgs.builder()
 *             .description("Ping web test alert for mytestwebapp")
 *             .enabled(true)
 *             .frequency(900)
 *             .location("South Central US")
 *             .locations(WebTestGeolocationArgs.builder()
 *                 .location("us-fl-mia-edge")
 *                 .build())
 *             .request(WebTestPropertiesRequestArgs.builder()
 *                 .headers(                
 *                     HeaderFieldArgs.builder()
 *                         .headerFieldName("Content-Language")
 *                         .headerFieldValue("de-DE")
 *                         .build(),
 *                     HeaderFieldArgs.builder()
 *                         .headerFieldName("Accept-Language")
 *                         .headerFieldValue("de-DE")
 *                         .build())
 *                 .httpVerb("POST")
 *                 .requestBody("SGVsbG8gd29ybGQ=")
 *                 .requestUrl("https://bing.com")
 *                 .build())
 *             .resourceGroupName("my-resource-group")
 *             .retryEnabled(true)
 *             .syntheticMonitorId("my-webtest-my-component")
 *             .timeout(120)
 *             .validationRules(WebTestPropertiesValidationRulesArgs.builder()
 *                 .sSLCertRemainingLifetimeCheck(100)
 *                 .sSLCheck(true)
 *                 .build())
 *             .webTestKind("standard")
 *             .webTestName("my-webtest-my-component")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* ### webTestUpdate * *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.insights.WebTest;
 * import com.pulumi.azurenative.insights.WebTestArgs;
 * import com.pulumi.azurenative.insights.inputs.WebTestPropertiesConfigurationArgs;
 * import com.pulumi.azurenative.insights.inputs.WebTestGeolocationArgs;
 * 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 webTest = new WebTest("webTest", WebTestArgs.builder()
 *             .configuration(WebTestPropertiesConfigurationArgs.builder()
 *                 .webTest("")
 *                 .build())
 *             .frequency(600)
 *             .kind("ping")
 *             .location("South Central US")
 *             .locations(            
 *                 WebTestGeolocationArgs.builder()
 *                     .location("us-fl-mia-edge")
 *                     .build(),
 *                 WebTestGeolocationArgs.builder()
 *                     .location("apac-hk-hkn-azr")
 *                     .build())
 *             .resourceGroupName("my-resource-group")
 *             .syntheticMonitorId("my-webtest-my-component")
 *             .timeout(30)
 *             .webTestKind("ping")
 *             .webTestName("my-webtest-my-component")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:insights:WebTest my-webtest-my-component /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName} * ``` * */ @ResourceType(type="azure-native:insights:WebTest") public class WebTest extends com.pulumi.resources.CustomResource { /** * An XML configuration specification for a WebTest. * */ @Export(name="configuration", refs={WebTestPropertiesResponseConfiguration.class}, tree="[0]") private Output configuration; /** * @return An XML configuration specification for a WebTest. * */ public Output> configuration() { return Codegen.optional(this.configuration); } /** * User defined description for this WebTest. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return User defined description for this WebTest. * */ public Output> description() { return Codegen.optional(this.description); } /** * Is the test actively being monitored. * */ @Export(name="enabled", refs={Boolean.class}, tree="[0]") private Output enabled; /** * @return Is the test actively being monitored. * */ public Output> enabled() { return Codegen.optional(this.enabled); } /** * Interval in seconds between test runs for this WebTest. Default value is 300. * */ @Export(name="frequency", refs={Integer.class}, tree="[0]") private Output frequency; /** * @return Interval in seconds between test runs for this WebTest. Default value is 300. * */ public Output> frequency() { return Codegen.optional(this.frequency); } /** * The kind of WebTest that this web test watches. Choices are ping, multistep and standard. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return The kind of WebTest that this web test watches. Choices are ping, multistep and standard. * */ public Output> kind() { return Codegen.optional(this.kind); } /** * Resource location * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource location * */ public Output location() { return this.location; } /** * A list of where to physically run the tests from to give global coverage for accessibility of your application. * */ @Export(name="locations", refs={List.class,WebTestGeolocationResponse.class}, tree="[0,1]") private Output> locations; /** * @return A list of where to physically run the tests from to give global coverage for accessibility of your application. * */ public Output> locations() { return this.locations; } /** * Azure resource name * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Azure resource name * */ public Output name() { return this.name; } /** * Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. * */ @Export(name="provisioningState", refs={String.class}, tree="[0]") private Output provisioningState; /** * @return Current state of this component, whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. * */ public Output provisioningState() { return this.provisioningState; } /** * The collection of request properties * */ @Export(name="request", refs={WebTestPropertiesResponseRequest.class}, tree="[0]") private Output request; /** * @return The collection of request properties * */ public Output> request() { return Codegen.optional(this.request); } /** * Allow for retries should this WebTest fail. * */ @Export(name="retryEnabled", refs={Boolean.class}, tree="[0]") private Output retryEnabled; /** * @return Allow for retries should this WebTest fail. * */ public Output> retryEnabled() { return Codegen.optional(this.retryEnabled); } /** * Unique ID of this WebTest. This is typically the same value as the Name field. * */ @Export(name="syntheticMonitorId", refs={String.class}, tree="[0]") private Output syntheticMonitorId; /** * @return Unique ID of this WebTest. This is typically the same value as the Name field. * */ public Output syntheticMonitorId() { return this.syntheticMonitorId; } /** * 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); } /** * Seconds until this WebTest will timeout and fail. Default value is 30. * */ @Export(name="timeout", refs={Integer.class}, tree="[0]") private Output timeout; /** * @return Seconds until this WebTest will timeout and fail. Default value is 30. * */ public Output> timeout() { return Codegen.optional(this.timeout); } /** * Azure resource type * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Azure resource type * */ public Output type() { return this.type; } /** * The collection of validation rule properties * */ @Export(name="validationRules", refs={WebTestPropertiesResponseValidationRules.class}, tree="[0]") private Output validationRules; /** * @return The collection of validation rule properties * */ public Output> validationRules() { return Codegen.optional(this.validationRules); } /** * The kind of web test this is, valid choices are ping, multistep and standard. * */ @Export(name="webTestKind", refs={String.class}, tree="[0]") private Output webTestKind; /** * @return The kind of web test this is, valid choices are ping, multistep and standard. * */ public Output webTestKind() { return this.webTestKind; } /** * User defined name if this WebTest. * */ @Export(name="webTestName", refs={String.class}, tree="[0]") private Output webTestName; /** * @return User defined name if this WebTest. * */ public Output webTestName() { return this.webTestName; } /** * * @param name The _unique_ name of the resulting resource. */ public WebTest(java.lang.String name) { this(name, WebTestArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public WebTest(java.lang.String name, WebTestArgs 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 WebTest(java.lang.String name, WebTestArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:WebTest", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private WebTest(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:WebTest", name, null, makeResourceOptions(options, id), false); } private static WebTestArgs makeArgs(WebTestArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? WebTestArgs.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:insights/v20150501:WebTest").build()), Output.of(Alias.builder().type("azure-native:insights/v20180501preview:WebTest").build()), Output.of(Alias.builder().type("azure-native:insights/v20201005preview:WebTest").build()), Output.of(Alias.builder().type("azure-native:insights/v20220615:WebTest").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 WebTest get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new WebTest(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy