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

com.pulumi.azurenative.insights.Workbook 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.WorkbookArgs;
import com.pulumi.azurenative.insights.outputs.SystemDataResponse;
import com.pulumi.azurenative.insights.outputs.WorkbookResourceResponseIdentity;
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;

/**
 * A workbook definition.
 * Azure REST API version: 2022-04-01. Prior API version in Azure Native 1.x: 2020-10-20.
 * 
 * Other available API versions: 2015-05-01, 2021-03-08, 2021-08-01, 2023-06-01.
 * 
 * ## Example Usage
 * ### WorkbookAdd
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.insights.Workbook;
 * import com.pulumi.azurenative.insights.WorkbookArgs;
 * 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 workbook = new Workbook("workbook", WorkbookArgs.builder()
 *             .category("workbook")
 *             .description("Sample workbook")
 *             .displayName("Sample workbook")
 *             .kind("shared")
 *             .location("westus")
 *             .resourceGroupName("my-resource-group")
 *             .resourceName("deadb33f-5e0d-4064-8ebb-1a4ed0313eb2")
 *             .serializedData("{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook.  This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}")
 *             .sourceId("/subscriptions/6b643656-33eb-422f-aee8-3ac145d124af/resourcegroups/my-resource-group")
 *             .tags(Map.ofEntries(
 *                 Map.entry("TagSample01", "sample01"),
 *                 Map.entry("TagSample02", "sample02")
 *             ))
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:insights:Workbook deadb33f-5e0d-4064-8ebb-1a4ed0313eb2 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/workbooks/{resourceName} * ``` * */ @ResourceType(type="azure-native:insights:Workbook") public class Workbook extends com.pulumi.resources.CustomResource { /** * Workbook category, as defined by the user at creation time. * */ @Export(name="category", refs={String.class}, tree="[0]") private Output category; /** * @return Workbook category, as defined by the user at creation time. * */ public Output category() { return this.category; } /** * The description of the workbook. * */ @Export(name="description", refs={String.class}, tree="[0]") private Output description; /** * @return The description of the workbook. * */ public Output> description() { return Codegen.optional(this.description); } /** * The user-defined name (display name) of the workbook. * */ @Export(name="displayName", refs={String.class}, tree="[0]") private Output displayName; /** * @return The user-defined name (display name) of the workbook. * */ public Output displayName() { return this.displayName; } /** * Resource etag * */ @Export(name="etag", refs={String.class}, tree="[0]") private Output etag; /** * @return Resource etag * */ public Output> etag() { return Codegen.optional(this.etag); } /** * Identity used for BYOS * */ @Export(name="identity", refs={WorkbookResourceResponseIdentity.class}, tree="[0]") private Output identity; /** * @return Identity used for BYOS * */ public Output> identity() { return Codegen.optional(this.identity); } /** * The kind of workbook. Only valid value is shared. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return The kind of workbook. Only valid value is shared. * */ public Output> kind() { return Codegen.optional(this.kind); } /** * 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 unique revision id for this workbook definition * */ @Export(name="revision", refs={String.class}, tree="[0]") private Output revision; /** * @return The unique revision id for this workbook definition * */ public Output revision() { return this.revision; } /** * Configuration of this particular workbook. Configuration data is a string containing valid JSON * */ @Export(name="serializedData", refs={String.class}, tree="[0]") private Output serializedData; /** * @return Configuration of this particular workbook. Configuration data is a string containing valid JSON * */ public Output serializedData() { return this.serializedData; } /** * ResourceId for a source resource. * */ @Export(name="sourceId", refs={String.class}, tree="[0]") private Output sourceId; /** * @return ResourceId for a source resource. * */ public Output> sourceId() { return Codegen.optional(this.sourceId); } /** * The resourceId to the storage account when bring your own storage is used * */ @Export(name="storageUri", refs={String.class}, tree="[0]") private Output storageUri; /** * @return The resourceId to the storage account when bring your own storage is used * */ public Output> storageUri() { return Codegen.optional(this.storageUri); } /** * 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); } /** * Date and time in UTC of the last modification that was made to this workbook 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 workbook definition. * */ public Output timeModified() { return this.timeModified; } /** * 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; } /** * Unique user id of the specific user that owns this workbook. * */ @Export(name="userId", refs={String.class}, tree="[0]") private Output userId; /** * @return Unique user id of the specific user that owns this workbook. * */ public Output userId() { return this.userId; } /** * Workbook schema version format, like 'Notebook/1.0', which should match the workbook in serializedData * */ @Export(name="version", refs={String.class}, tree="[0]") private Output version; /** * @return Workbook schema version format, like 'Notebook/1.0', which should match the workbook in serializedData * */ public Output> version() { return Codegen.optional(this.version); } /** * * @param name The _unique_ name of the resulting resource. */ public Workbook(java.lang.String name) { this(name, WorkbookArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Workbook(java.lang.String name, WorkbookArgs 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 Workbook(java.lang.String name, WorkbookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:Workbook", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Workbook(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:insights:Workbook", name, null, makeResourceOptions(options, id), false); } private static WorkbookArgs makeArgs(WorkbookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? WorkbookArgs.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:Workbook").build()), Output.of(Alias.builder().type("azure-native:insights/v20180617preview:Workbook").build()), Output.of(Alias.builder().type("azure-native:insights/v20201020:Workbook").build()), Output.of(Alias.builder().type("azure-native:insights/v20210308:Workbook").build()), Output.of(Alias.builder().type("azure-native:insights/v20210801:Workbook").build()), Output.of(Alias.builder().type("azure-native:insights/v20220401:Workbook").build()), Output.of(Alias.builder().type("azure-native:insights/v20230601:Workbook").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 Workbook get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Workbook(name, id, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy