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

com.pulumi.azurenative.insights.Favorite 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.azurenative.insights;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.insights.FavoriteArgs;
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.Optional;
import javax.annotation.Nullable;

/**
 * Properties that define a favorite that is associated to an Application Insights component.
 * Azure REST API version: 2015-05-01. Prior API version in Azure Native 1.x: 2015-05-01.
 * 
 * ## Example Usage
 * ### FavoriteAdd
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.insights.Favorite;
 * import com.pulumi.azurenative.insights.FavoriteArgs;
 * 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 favorite = new Favorite("favorite", FavoriteArgs.builder()
 *             .config("{\"MEDataModelRawJSON\":\"{\\n  \\\"version\\\": \\\"1.4.1\\\",\\n  \\\"isCustomDataModel\\\": true,\\n  \\\"items\\\": [\\n    {\\n      \\\"id\\\": \\\"90a7134d-9a38-4c25-88d3-a495209873eb\\\",\\n      \\\"chartType\\\": \\\"Area\\\",\\n      \\\"chartHeight\\\": 4,\\n      \\\"metrics\\\": [\\n        {\\n          \\\"id\\\": \\\"preview/requests/count\\\",\\n          \\\"metricAggregation\\\": \\\"Sum\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n        }\\n      ],\\n      \\\"priorPeriod\\\": false,\\n      \\\"clickAction\\\": {\\n        \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n      },\\n      \\\"horizontalBars\\\": true,\\n      \\\"showOther\\\": true,\\n      \\\"aggregation\\\": \\\"Sum\\\",\\n      \\\"percentage\\\": false,\\n      \\\"palette\\\": \\\"fail\\\",\\n      \\\"yAxisOption\\\": 0,\\n      \\\"title\\\": \\\"\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"0c289098-88e8-4010-b212-546815cddf70\\\",\\n      \\\"chartType\\\": \\\"Area\\\",\\n      \\\"chartHeight\\\": 2,\\n      \\\"metrics\\\": [\\n        {\\n          \\\"id\\\": \\\"preview/requests/duration\\\",\\n          \\\"metricAggregation\\\": \\\"Avg\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-j1\\\"\\n        }\\n      ],\\n      \\\"priorPeriod\\\": false,\\n      \\\"clickAction\\\": {\\n        \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n      },\\n      \\\"horizontalBars\\\": true,\\n      \\\"showOther\\\": true,\\n      \\\"aggregation\\\": \\\"Avg\\\",\\n      \\\"percentage\\\": false,\\n      \\\"palette\\\": \\\"greenHues\\\",\\n      \\\"yAxisOption\\\": 0,\\n      \\\"title\\\": \\\"\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"cbdaab6f-a808-4f71-aca5-b3976cbb7345\\\",\\n      \\\"chartType\\\": \\\"Bar\\\",\\n      \\\"chartHeight\\\": 4,\\n      \\\"metrics\\\": [\\n        {\\n          \\\"id\\\": \\\"preview/requests/duration\\\",\\n          \\\"metricAggregation\\\": \\\"Avg\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-d0\\\"\\n        }\\n      ],\\n      \\\"priorPeriod\\\": false,\\n      \\\"clickAction\\\": {\\n        \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n      },\\n      \\\"horizontalBars\\\": true,\\n      \\\"showOther\\\": true,\\n      \\\"aggregation\\\": \\\"Avg\\\",\\n      \\\"percentage\\\": false,\\n      \\\"palette\\\": \\\"magentaHues\\\",\\n      \\\"yAxisOption\\\": 0,\\n      \\\"title\\\": \\\"\\\"\\n    },\\n    {\\n      \\\"id\\\": \\\"1d5a6a3a-9fa1-4099-9cf9-05eff72d1b02\\\",\\n      \\\"grouping\\\": {\\n        \\\"kind\\\": \\\"ByDimension\\\",\\n        \\\"dimension\\\": \\\"context.application.version\\\"\\n      },\\n      \\\"chartType\\\": \\\"Grid\\\",\\n      \\\"chartHeight\\\": 1,\\n      \\\"metrics\\\": [\\n        {\\n          \\\"id\\\": \\\"basicException.count\\\",\\n          \\\"metricAggregation\\\": \\\"Sum\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-g0\\\"\\n        },\\n        {\\n          \\\"id\\\": \\\"requestFailed.count\\\",\\n          \\\"metricAggregation\\\": \\\"Sum\\\",\\n          \\\"color\\\": \\\"msportalfx-bgcolor-f0s2\\\"\\n        }\\n      ],\\n      \\\"priorPeriod\\\": true,\\n      \\\"clickAction\\\": {\\n        \\\"defaultBlade\\\": \\\"SearchBlade\\\"\\n      },\\n      \\\"horizontalBars\\\": true,\\n      \\\"showOther\\\": true,\\n      \\\"percentage\\\": false,\\n      \\\"palette\\\": \\\"blueHues\\\",\\n      \\\"yAxisOption\\\": 0,\\n      \\\"title\\\": \\\"\\\"\\n    }\\n  ],\\n  \\\"currentFilter\\\": {\\n    \\\"eventTypes\\\": [\\n      1,\\n      2\\n    ],\\n    \\\"typeFacets\\\": {},\\n    \\\"isPermissive\\\": false\\n  },\\n  \\\"timeContext\\\": {\\n    \\\"durationMs\\\": 75600000,\\n    \\\"endTime\\\": \\\"2018-01-31T20:30:00.000Z\\\",\\n    \\\"createdTime\\\": \\\"2018-01-31T23:54:26.280Z\\\",\\n    \\\"isInitialTime\\\": false,\\n    \\\"grain\\\": 1,\\n    \\\"useDashboardTimeRange\\\": false\\n  },\\n  \\\"jsonUri\\\": \\\"Favorite_BlankChart\\\",\\n  \\\"timeSource\\\": 0\\n}\"}")
 *             .favoriteId("deadb33f-8bee-4d3b-a059-9be8dac93960")
 *             .favoriteType("shared")
 *             .isGeneratedFromTemplate(false)
 *             .name("Blah Blah Blah")
 *             .resourceGroupName("my-resource-group")
 *             .resourceName("my-ai-component")
 *             .tags(            
 *                 "TagSample01",
 *                 "TagSample02")
 *             .version("ME")
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:insights:Favorite myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId} * ``` * */ @ResourceType(type="azure-native:insights:Favorite") public class Favorite extends com.pulumi.resources.CustomResource { /** * Favorite category, as defined by the user at creation time. * */ @Export(name="category", refs={String.class}, tree="[0]") private Output category; /** * @return Favorite category, as defined by the user at creation time. * */ public Output> category() { return Codegen.optional(this.category); } /** * Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON * */ @Export(name="config", refs={String.class}, tree="[0]") private Output config; /** * @return Configuration of this particular favorite, which are driven by the Azure portal UX. Configuration data is a string containing valid JSON * */ public Output> config() { return Codegen.optional(this.config); } /** * Internally assigned unique id of the favorite definition. * */ @Export(name="favoriteId", refs={String.class}, tree="[0]") private Output favoriteId; /** * @return Internally assigned unique id of the favorite definition. * */ public Output favoriteId() { return this.favoriteId; } /** * Enum indicating if this favorite definition is owned by a specific user or is shared between all users with access to the Application Insights component. * */ @Export(name="favoriteType", refs={String.class}, tree="[0]") private Output favoriteType; /** * @return Enum indicating if this favorite definition is owned by a specific user or is shared between all users with access to the Application Insights component. * */ public Output> favoriteType() { return Codegen.optional(this.favoriteType); } /** * Flag denoting wether or not this favorite was generated from a template. * */ @Export(name="isGeneratedFromTemplate", refs={Boolean.class}, tree="[0]") private Output isGeneratedFromTemplate; /** * @return Flag denoting wether or not this favorite was generated from a template. * */ public Output> isGeneratedFromTemplate() { return Codegen.optional(this.isGeneratedFromTemplate); } /** * The user-defined name of the favorite. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return The user-defined name of the favorite. * */ public Output> name() { return Codegen.optional(this.name); } /** * The source of the favorite definition. * */ @Export(name="sourceType", refs={String.class}, tree="[0]") private Output sourceType; /** * @return The source of the favorite definition. * */ public Output> sourceType() { return Codegen.optional(this.sourceType); } /** * A list of 0 or more tags that are associated with this favorite definition * */ @Export(name="tags", refs={List.class,String.class}, tree="[0,1]") private Output> tags; /** * @return A list of 0 or more tags that are associated with this favorite definition * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Date and time in UTC of the last modification that was made to this favorite definition. * */ @Export(name="timeModified", refs={String.class}, tree="[0]") private Output timeModified; /** * @return Date and time in UTC of the last modification that was made to this favorite definition. * */ public Output timeModified() { return this.timeModified; } /** * Unique user id of the specific user that owns this favorite. * */ @Export(name="userId", refs={String.class}, tree="[0]") private Output userId; /** * @return Unique user id of the specific user that owns this favorite. * */ public Output userId() { return this.userId; } /** * This instance's version of the data model. This can change as new features are added that can be marked favorite. Current examples include MetricsExplorer (ME) and Search. * */ @Export(name="version", refs={String.class}, tree="[0]") private Output version; /** * @return This instance's version of the data model. This can change as new features are added that can be marked favorite. Current examples include MetricsExplorer (ME) and Search. * */ public Output> version() { return Codegen.optional(this.version); } /** * * @param name The _unique_ name of the resulting resource. */ public Favorite(java.lang.String name) { this(name, FavoriteArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Favorite(java.lang.String name, FavoriteArgs 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 Favorite(java.lang.String name, FavoriteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:Favorite", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Favorite(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:Favorite", name, null, makeResourceOptions(options, id), false); } private static FavoriteArgs makeArgs(FavoriteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? FavoriteArgs.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:Favorite").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 Favorite get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Favorite(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy