com.pulumi.azurenative.machinelearning.WebService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** 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.machinelearning;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.machinelearning.WebServiceArgs;
import com.pulumi.azurenative.machinelearning.outputs.WebServicePropertiesForGraphResponse;
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;
/**
* Instance of an Azure ML web service resource.
* Azure REST API version: 2017-01-01. Prior API version in Azure Native 1.x: 2017-01-01.
*
* Other available API versions: 2016-05-01-preview.
*
* ## Example Usage
* ### PUT WebService
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.machinelearning.WebService;
* import com.pulumi.azurenative.machinelearning.WebServiceArgs;
* import com.pulumi.azurenative.machinelearning.inputs.WebServicePropertiesForGraphArgs;
* import com.pulumi.azurenative.machinelearning.inputs.CommitmentPlanArgs;
* import com.pulumi.azurenative.machinelearning.inputs.DiagnosticsConfigurationArgs;
* import com.pulumi.azurenative.machinelearning.inputs.ExampleRequestArgs;
* import com.pulumi.azurenative.machinelearning.inputs.ServiceInputOutputSpecificationArgs;
* import com.pulumi.azurenative.machinelearning.inputs.MachineLearningWorkspaceArgs;
* import com.pulumi.azurenative.machinelearning.inputs.GraphPackageArgs;
* import com.pulumi.azurenative.machinelearning.inputs.RealtimeConfigurationArgs;
* import com.pulumi.azurenative.machinelearning.inputs.StorageAccountArgs;
* 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 webService = new WebService("webService", WebServiceArgs.builder()
* .location("West US")
* .properties(WebServicePropertiesForGraphArgs.builder()
* .assets(Map.ofEntries(
* Map.entry("asset1", Map.ofEntries(
* Map.entry("locationInfo", Map.ofEntries(
* Map.entry("credentials", ""),
* Map.entry("uri", "aml://module/moduleId-1")
* )),
* Map.entry("name", "Execute R Script"),
* Map.entry("type", "Module")
* )),
* Map.entry("asset2", Map.ofEntries(
* Map.entry("locationInfo", Map.ofEntries(
* Map.entry("credentials", ""),
* Map.entry("uri", "aml://module/moduleId-2")
* )),
* Map.entry("name", "Import Data"),
* Map.entry("type", "Module")
* ))
* ))
* .commitmentPlan(CommitmentPlanArgs.builder()
* .id("/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.MachineLearning/commitmentPlans/commitmentPlanName")
* .build())
* .description("Web Service Description")
* .diagnostics(DiagnosticsConfigurationArgs.builder()
* .level("None")
* .build())
* .exampleRequest(ExampleRequestArgs.builder()
* .inputs(Map.of("input1",
* "age",
* "workclass",
* "fnlwgt",
* "education",
* "education-num"))
* .build())
* .exposeSampleData(true)
* .input(ServiceInputOutputSpecificationArgs.builder()
* .description("")
* .properties(Map.of("input1", Map.ofEntries(
* Map.entry("description", ""),
* Map.entry("properties", Map.of("column_name", Map.ofEntries(
* Map.entry("type", "String"),
* Map.entry("xMsIsnullable", false)
* ))),
* Map.entry("title", ""),
* Map.entry("type", "object")
* )))
* .title("")
* .type("object")
* .build())
* .machineLearningWorkspace(MachineLearningWorkspaceArgs.builder()
* .id("workspaceId")
* .build())
* .output(ServiceInputOutputSpecificationArgs.builder()
* .description("")
* .properties(Map.of("output1", Map.ofEntries(
* Map.entry("description", ""),
* Map.entry("properties", Map.ofEntries(
* Map.entry("age", Map.ofEntries(
* Map.entry("format", "Int32"),
* Map.entry("type", "Integer"),
* Map.entry("xMsIsnullable", true)
* )),
* Map.entry("workclass", Map.ofEntries(
* Map.entry("type", "String"),
* Map.entry("xMsIsnullable", false)
* ))
* )),
* Map.entry("title", ""),
* Map.entry("type", "object")
* )))
* .title("")
* .type("object")
* .build())
* .package_(GraphPackageArgs.builder()
* .edges(
* GraphEdgeArgs.builder()
* .sourceNodeId("node2")
* .sourcePortId("Results dataset")
* .targetNodeId("node1")
* .targetPortId("Dataset2")
* .build(),
* GraphEdgeArgs.builder()
* .sourceNodeId("node3")
* .targetNodeId("node1")
* .targetPortId("Dataset1")
* .build(),
* GraphEdgeArgs.builder()
* .sourceNodeId("node1")
* .sourcePortId("Result Dataset")
* .targetNodeId("node4")
* .build())
* .graphParameters()
* .nodes(Map.ofEntries(
* Map.entry("node1", Map.ofEntries(
* Map.entry("assetId", "asset1"),
* Map.entry("parameters", Map.ofEntries(
* Map.entry("R Script", Map.ofEntries(
* Map.entry("certificateThumbprint", ""),
* Map.entry("value", "The R Script")
* )),
* Map.entry("R Version", Map.ofEntries(
* Map.entry("certificateThumbprint", ""),
* Map.entry("value", "CRAN R 3.1.0")
* ))
* ))
* )),
* Map.entry("node2", Map.ofEntries(
* Map.entry("assetId", "asset2"),
* Map.entry("parameters", Map.ofEntries(
* Map.entry("Account Key", Map.ofEntries(
* Map.entry("certificateThumbprint", "TheThumbprint"),
* Map.entry("value", "Encrypted Key")
* )),
* Map.entry("Account Name", Map.ofEntries(
* Map.entry("certificateThumbprint", ""),
* Map.entry("value", "accountName")
* )),
* Map.entry("Please Specify Authentication Type", Map.ofEntries(
* Map.entry("certificateThumbprint", ""),
* Map.entry("value", "Account")
* )),
* Map.entry("Please Specify Data Source", Map.ofEntries(
* Map.entry("certificateThumbprint", ""),
* Map.entry("value", "AzureBlobStorage")
* ))
* ))
* )),
* Map.entry("node3", Map.of("inputId", "input1")),
* Map.entry("node4", Map.of("outputId", "output1"))
* ))
* .build())
* .packageType("Graph")
* .parameters()
* .payloadsInBlobStorage(false)
* .readOnly(false)
* .realtimeConfiguration(RealtimeConfigurationArgs.builder()
* .maxConcurrentCalls(4)
* .build())
* .storageAccount(StorageAccountArgs.builder()
* .key("Storage_Key")
* .name("Storage_Name")
* .build())
* .title("Web Service Title")
* .build())
* .resourceGroupName("OneResourceGroupName")
* .tags(Map.ofEntries(
* Map.entry("tag1", "value1"),
* Map.entry("tag2", "value2")
* ))
* .webServiceName("TargetWebServiceName")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:machinelearning:WebService myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearning/webServices/{webServiceName}
* ```
*
*/
@ResourceType(type="azure-native:machinelearning:WebService")
public class WebService extends com.pulumi.resources.CustomResource {
/**
* Specifies the location of the resource.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Specifies the location of the resource.
*
*/
public Output location() {
return this.location;
}
/**
* Specifies the name of the resource.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Specifies the name of the resource.
*
*/
public Output name() {
return this.name;
}
/**
* Contains the property payload that describes the web service.
*
*/
@Export(name="properties", refs={WebServicePropertiesForGraphResponse.class}, tree="[0]")
private Output properties;
/**
* @return Contains the property payload that describes the web service.
*
*/
public Output properties() {
return this.properties;
}
/**
* Contains resource tags defined as key/value pairs.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Contains resource tags defined as key/value pairs.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Specifies the type of the resource.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Specifies the type of the resource.
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public WebService(java.lang.String name) {
this(name, WebServiceArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public WebService(java.lang.String name, WebServiceArgs 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 WebService(java.lang.String name, WebServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:machinelearning:WebService", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private WebService(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:machinelearning:WebService", name, null, makeResourceOptions(options, id), false);
}
private static WebServiceArgs makeArgs(WebServiceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? WebServiceArgs.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:machinelearning/v20160501preview:WebService").build()),
Output.of(Alias.builder().type("azure-native:machinelearning/v20170101:WebService").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 WebService get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new WebService(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy