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

import com.pulumi.azure.Utilities;
import com.pulumi.azure.synapse.SqlPoolWorkloadGroupArgs;
import com.pulumi.azure.synapse.inputs.SqlPoolWorkloadGroupState;
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.Integer;
import java.lang.String;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Synapse SQL Pool Workload Group.
 * 
 * ## Example Usage
 * ```java
 * 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.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.storage.DataLakeGen2Filesystem;
 * import com.pulumi.azure.storage.DataLakeGen2FilesystemArgs;
 * import com.pulumi.azure.synapse.Workspace;
 * import com.pulumi.azure.synapse.WorkspaceArgs;
 * import com.pulumi.azure.synapse.inputs.WorkspaceIdentityArgs;
 * import com.pulumi.azure.synapse.SqlPool;
 * import com.pulumi.azure.synapse.SqlPoolArgs;
 * import com.pulumi.azure.synapse.SqlPoolWorkloadGroup;
 * import com.pulumi.azure.synapse.SqlPoolWorkloadGroupArgs;
 * 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 exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;west europe&#34;)
 *             .build());
 * 
 *         var exampleAccount = new Account(&#34;exampleAccount&#34;, AccountArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .accountKind(&#34;BlobStorage&#34;)
 *             .accountTier(&#34;Standard&#34;)
 *             .accountReplicationType(&#34;LRS&#34;)
 *             .build());
 * 
 *         var exampleDataLakeGen2Filesystem = new DataLakeGen2Filesystem(&#34;exampleDataLakeGen2Filesystem&#34;, DataLakeGen2FilesystemArgs.builder()        
 *             .storageAccountId(exampleAccount.id())
 *             .build());
 * 
 *         var exampleWorkspace = new Workspace(&#34;exampleWorkspace&#34;, WorkspaceArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .storageDataLakeGen2FilesystemId(exampleDataLakeGen2Filesystem.id())
 *             .sqlAdministratorLogin(&#34;sqladminuser&#34;)
 *             .sqlAdministratorLoginPassword(&#34;H@Sh1CoR3!&#34;)
 *             .identity(WorkspaceIdentityArgs.builder()
 *                 .type(&#34;SystemAssigned&#34;)
 *                 .build())
 *             .build());
 * 
 *         var exampleSqlPool = new SqlPool(&#34;exampleSqlPool&#34;, SqlPoolArgs.builder()        
 *             .synapseWorkspaceId(exampleWorkspace.id())
 *             .skuName(&#34;DW100c&#34;)
 *             .createMode(&#34;Default&#34;)
 *             .build());
 * 
 *         var exampleSqlPoolWorkloadGroup = new SqlPoolWorkloadGroup(&#34;exampleSqlPoolWorkloadGroup&#34;, SqlPoolWorkloadGroupArgs.builder()        
 *             .sqlPoolId(exampleSqlPool.id())
 *             .importance(&#34;normal&#34;)
 *             .maxResourcePercent(100)
 *             .minResourcePercent(0)
 *             .maxResourcePercentPerRequest(3)
 *             .minResourcePercentPerRequest(3)
 *             .queryExecutionTimeoutInSeconds(0)
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Synapse SQL Pool Workload Groups can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:synapse/sqlPoolWorkloadGroup:SqlPoolWorkloadGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.Synapse/workspaces/workspace1/sqlPools/sqlPool1/workloadGroups/workloadGroup1
 * ```
 * 
 */
@ResourceType(type="azure:synapse/sqlPoolWorkloadGroup:SqlPoolWorkloadGroup")
public class SqlPoolWorkloadGroup extends com.pulumi.resources.CustomResource {
    /**
     * The workload group importance level. Defaults to `normal`.
     * 
     */
    @Export(name="importance", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> importance;

    /**
     * @return The workload group importance level. Defaults to `normal`.
     * 
     */
    public Output<Optional<String>> importance() {
        return Codegen.optional(this.importance);
    }
    /**
     * The workload group cap percentage resource.
     * 
     */
    @Export(name="maxResourcePercent", refs={Integer.class}, tree="[0]")
    private Output<Integer> maxResourcePercent;

    /**
     * @return The workload group cap percentage resource.
     * 
     */
    public Output<Integer> maxResourcePercent() {
        return this.maxResourcePercent;
    }
    /**
     * The workload group request maximum grant percentage. Defaults to `3`.
     * 
     */
    @Export(name="maxResourcePercentPerRequest", refs={Double.class}, tree="[0]")
    private Output</* @Nullable */ Double> maxResourcePercentPerRequest;

    /**
     * @return The workload group request maximum grant percentage. Defaults to `3`.
     * 
     */
    public Output<Optional<Double>> maxResourcePercentPerRequest() {
        return Codegen.optional(this.maxResourcePercentPerRequest);
    }
    /**
     * The workload group minimum percentage resource.
     * 
     */
    @Export(name="minResourcePercent", refs={Integer.class}, tree="[0]")
    private Output<Integer> minResourcePercent;

    /**
     * @return The workload group minimum percentage resource.
     * 
     */
    public Output<Integer> minResourcePercent() {
        return this.minResourcePercent;
    }
    /**
     * The workload group request minimum grant percentage.
     * 
     */
    @Export(name="minResourcePercentPerRequest", refs={Double.class}, tree="[0]")
    private Output</* @Nullable */ Double> minResourcePercentPerRequest;

    /**
     * @return The workload group request minimum grant percentage.
     * 
     */
    public Output<Optional<Double>> minResourcePercentPerRequest() {
        return Codegen.optional(this.minResourcePercentPerRequest);
    }
    /**
     * The name which should be used for this Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Group to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name which should be used for this Synapse SQL Pool Workload Group. Changing this forces a new Synapse SQL Pool Workload Group to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * The workload group query execution timeout.
     * 
     */
    @Export(name="queryExecutionTimeoutInSeconds", refs={Integer.class}, tree="[0]")
    private Output</* @Nullable */ Integer> queryExecutionTimeoutInSeconds;

    /**
     * @return The workload group query execution timeout.
     * 
     */
    public Output<Optional<Integer>> queryExecutionTimeoutInSeconds() {
        return Codegen.optional(this.queryExecutionTimeoutInSeconds);
    }
    /**
     * The ID of the Synapse SQL Pool. Changing this forces a new Synapse SQL Pool Workload Group to be created.
     * 
     */
    @Export(name="sqlPoolId", refs={String.class}, tree="[0]")
    private Output<String> sqlPoolId;

    /**
     * @return The ID of the Synapse SQL Pool. Changing this forces a new Synapse SQL Pool Workload Group to be created.
     * 
     */
    public Output<String> sqlPoolId() {
        return this.sqlPoolId;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public SqlPoolWorkloadGroup(String name) {
        this(name, SqlPoolWorkloadGroupArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public SqlPoolWorkloadGroup(String name, SqlPoolWorkloadGroupArgs 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 SqlPoolWorkloadGroup(String name, SqlPoolWorkloadGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:synapse/sqlPoolWorkloadGroup:SqlPoolWorkloadGroup", name, args == null ? SqlPoolWorkloadGroupArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private SqlPoolWorkloadGroup(String name, Output<String> id, @Nullable SqlPoolWorkloadGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:synapse/sqlPoolWorkloadGroup:SqlPoolWorkloadGroup", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> 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 SqlPoolWorkloadGroup get(String name, Output<String> id, @Nullable SqlPoolWorkloadGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new SqlPoolWorkloadGroup(name, id, state, options);
    }
}
