com.pulumi.azure.machinelearning.SynapseSpark Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.machinelearning;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.machinelearning.SynapseSparkArgs;
import com.pulumi.azure.machinelearning.inputs.SynapseSparkState;
import com.pulumi.azure.machinelearning.outputs.SynapseSparkIdentity;
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.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages the linked service to link an Azure Machine learning workspace to an Azure Synapse workspace.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.CoreFunctions;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.appinsights.Insights;
* import com.pulumi.azure.appinsights.InsightsArgs;
* import com.pulumi.azure.keyvault.KeyVault;
* import com.pulumi.azure.keyvault.KeyVaultArgs;
* import com.pulumi.azure.storage.Account;
* import com.pulumi.azure.storage.AccountArgs;
* import com.pulumi.azure.machinelearning.Workspace;
* import com.pulumi.azure.machinelearning.WorkspaceArgs;
* import com.pulumi.azure.machinelearning.inputs.WorkspaceIdentityArgs;
* 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.SparkPool;
* import com.pulumi.azure.synapse.SparkPoolArgs;
* import com.pulumi.azure.machinelearning.SynapseSpark;
* import com.pulumi.azure.machinelearning.SynapseSparkArgs;
* import com.pulumi.azure.machinelearning.inputs.SynapseSparkIdentityArgs;
* 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 }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* final var current = CoreFunctions.getClientConfig();
*
* var example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-rg")
* .location("west europe")
* .tags(Map.of("stage", "example"))
* .build());
*
* var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
* .name("example-ai")
* .location(example.location())
* .resourceGroupName(example.name())
* .applicationType("web")
* .build());
*
* var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
* .name("example-kv")
* .location(example.location())
* .resourceGroupName(example.name())
* .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
* .skuName("standard")
* .purgeProtectionEnabled(true)
* .build());
*
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("examplesa")
* .location(example.location())
* .resourceGroupName(example.name())
* .accountTier("Standard")
* .accountReplicationType("LRS")
* .build());
*
* var exampleWorkspace = new Workspace("exampleWorkspace", WorkspaceArgs.builder()
* .name("example-mlw")
* .location(example.location())
* .resourceGroupName(example.name())
* .applicationInsightsId(exampleInsights.id())
* .keyVaultId(exampleKeyVault.id())
* .storageAccountId(exampleAccount.id())
* .identity(WorkspaceIdentityArgs.builder()
* .type("SystemAssigned")
* .build())
* .build());
*
* var exampleDataLakeGen2Filesystem = new DataLakeGen2Filesystem("exampleDataLakeGen2Filesystem", DataLakeGen2FilesystemArgs.builder()
* .name("example")
* .storageAccountId(exampleAccount.id())
* .build());
*
* var exampleWorkspace2 = new Workspace("exampleWorkspace2", WorkspaceArgs.builder()
* .name("example")
* .resourceGroupName(example.name())
* .location(example.location())
* .storageDataLakeGen2FilesystemId(exampleDataLakeGen2Filesystem.id())
* .sqlAdministratorLogin("sqladminuser")
* .sqlAdministratorLoginPassword("H}{@literal @}{@code Sh1CoR3!")
* .identity(WorkspaceIdentityArgs.builder()
* .type("SystemAssigned")
* .build())
* .build());
*
* var exampleSparkPool = new SparkPool("exampleSparkPool", SparkPoolArgs.builder()
* .name("example")
* .synapseWorkspaceId(exampleWorkspace2.id())
* .nodeSizeFamily("MemoryOptimized")
* .nodeSize("Small")
* .nodeCount(3)
* .build());
*
* var exampleSynapseSpark = new SynapseSpark("exampleSynapseSpark", SynapseSparkArgs.builder()
* .name("example")
* .machineLearningWorkspaceId(exampleWorkspace.id())
* .location(example.location())
* .synapseSparkPoolId(exampleSparkPool.id())
* .identity(SynapseSparkIdentityArgs.builder()
* .type("SystemAssigned")
* .build())
* .build());
*
* }}{@code
* }}{@code
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Machine Learning Synapse Sparks can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:machinelearning/synapseSpark:SynapseSpark example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.MachineLearningServices/workspaces/workspace1/computes/compute1
* ```
*
*/
@ResourceType(type="azure:machinelearning/synapseSpark:SynapseSpark")
public class SynapseSpark extends com.pulumi.resources.CustomResource {
/**
* The description of the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return The description of the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* An `identity` block as defined below. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
@Export(name="identity", refs={SynapseSparkIdentity.class}, tree="[0]")
private Output* @Nullable */ SynapseSparkIdentity> identity;
/**
* @return An `identity` block as defined below. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
@Export(name="localAuthEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> localAuthEnabled;
/**
* @return Whether local authentication methods is enabled. Defaults to `true`. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
public Output> localAuthEnabled() {
return Codegen.optional(this.localAuthEnabled);
}
/**
* The Azure Region where the Machine Learning Synapse Spark should exist. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The Azure Region where the Machine Learning Synapse Spark should exist. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
public Output location() {
return this.location;
}
/**
* The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
@Export(name="machineLearningWorkspaceId", refs={String.class}, tree="[0]")
private Output machineLearningWorkspaceId;
/**
* @return The ID of the Machine Learning Workspace. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
public Output machineLearningWorkspaceId() {
return this.machineLearningWorkspaceId;
}
/**
* The name which should be used for this Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name which should be used for this Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The ID of the linked Synapse Spark Pool. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
@Export(name="synapseSparkPoolId", refs={String.class}, tree="[0]")
private Output synapseSparkPoolId;
/**
* @return The ID of the linked Synapse Spark Pool. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
public Output synapseSparkPoolId() {
return this.synapseSparkPoolId;
}
/**
* A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A mapping of tags which should be assigned to the Machine Learning Synapse Spark. Changing this forces a new Machine Learning Synapse Spark to be created.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public SynapseSpark(java.lang.String name) {
this(name, SynapseSparkArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public SynapseSpark(java.lang.String name, SynapseSparkArgs 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 SynapseSpark(java.lang.String name, SynapseSparkArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:machinelearning/synapseSpark:SynapseSpark", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private SynapseSpark(java.lang.String name, Output id, @Nullable SynapseSparkState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:machinelearning/synapseSpark:SynapseSpark", name, state, makeResourceOptions(options, id), false);
}
private static SynapseSparkArgs makeArgs(SynapseSparkArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? SynapseSparkArgs.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())
.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 SynapseSpark get(java.lang.String name, Output id, @Nullable SynapseSparkState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new SynapseSpark(name, id, state, options);
}
}