com.pulumi.azurenative.streamanalytics.Input 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.streamanalytics;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.streamanalytics.InputArgs;
import com.pulumi.azurenative.streamanalytics.outputs.ReferenceInputPropertiesResponse;
import com.pulumi.azurenative.streamanalytics.outputs.StreamInputPropertiesResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Either;
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.Optional;
import javax.annotation.Nullable;
/**
* An input object, containing all information associated with the named input. All inputs are contained under a streaming job.
* Azure REST API version: 2020-03-01. Prior API version in Azure Native 1.x: 2016-03-01.
*
* Other available API versions: 2021-10-01-preview.
*
* ## Example Usage
* ### Create a Gateway Message Bus input
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.streamanalytics.Input;
* import com.pulumi.azurenative.streamanalytics.InputArgs;
* 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 input = new Input("input", InputArgs.builder()
* .inputName("input7970")
* .jobName("sj9742")
* .properties(StreamInputPropertiesArgs.builder()
* .datasource(GatewayMessageBusStreamInputDataSourceArgs.builder()
* .topic("EdgeTopic1")
* .type("GatewayMessageBus")
* .build())
* .type("Stream")
* .build())
* .resourceGroupName("sjrg3467")
* .build());
*
* }
* }
*
* }
*
* ### Create a reference blob input with CSV serialization
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.streamanalytics.Input;
* import com.pulumi.azurenative.streamanalytics.InputArgs;
* 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 input = new Input("input", InputArgs.builder()
* .inputName("input7225")
* .jobName("sj9597")
* .properties(ReferenceInputPropertiesArgs.builder()
* .datasource(AzureSqlReferenceInputDataSourceArgs.builder()
* .container("state")
* .dateFormat("yyyy/MM/dd")
* .pathPattern("{date}/{time}")
* .storageAccounts(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
* .timeFormat("HH")
* .type("Microsoft.Storage/Blob")
* .build())
* .serialization(CsvSerializationArgs.builder()
* .encoding("UTF8")
* .fieldDelimiter(",")
* .type("Csv")
* .build())
* .type("Reference")
* .build())
* .resourceGroupName("sjrg8440")
* .build());
*
* }
* }
*
* }
*
* ### Create a reference file input
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.streamanalytics.Input;
* import com.pulumi.azurenative.streamanalytics.InputArgs;
* 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 input = new Input("input", InputArgs.builder()
* .inputName("input7225")
* .jobName("sj9597")
* .properties(ReferenceInputPropertiesArgs.builder()
* .datasource(FileReferenceInputDataSourceArgs.builder()
* .path("my/path")
* .type("File")
* .build())
* .type("Reference")
* .build())
* .resourceGroupName("sjrg8440")
* .build());
*
* }
* }
*
* }
*
* ### Create a stream Event Hub input with JSON serialization
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.streamanalytics.Input;
* import com.pulumi.azurenative.streamanalytics.InputArgs;
* 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 input = new Input("input", InputArgs.builder()
* .inputName("input7425")
* .jobName("sj197")
* .properties(StreamInputPropertiesArgs.builder()
* .datasource(BlobStreamInputDataSourceArgs.builder()
* .consumerGroupName("sdkconsumergroup")
* .eventHubName("sdkeventhub")
* .serviceBusNamespace("sdktest")
* .sharedAccessPolicyKey("someSharedAccessPolicyKey==")
* .sharedAccessPolicyName("RootManageSharedAccessKey")
* .type("Microsoft.ServiceBus/EventHub")
* .build())
* .serialization(JsonSerializationArgs.builder()
* .encoding("UTF8")
* .type("Json")
* .build())
* .type("Stream")
* .build())
* .resourceGroupName("sjrg3139")
* .build());
*
* }
* }
*
* }
*
* ### Create a stream IoT Hub input with Avro serialization
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.streamanalytics.Input;
* import com.pulumi.azurenative.streamanalytics.InputArgs;
* 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 input = new Input("input", InputArgs.builder()
* .inputName("input7970")
* .jobName("sj9742")
* .properties(StreamInputPropertiesArgs.builder()
* .datasource(BlobStreamInputDataSourceArgs.builder()
* .consumerGroupName("sdkconsumergroup")
* .endpoint("messages/events")
* .iotHubNamespace("iothub")
* .sharedAccessPolicyKey("sharedAccessPolicyKey=")
* .sharedAccessPolicyName("owner")
* .type("Microsoft.Devices/IotHubs")
* .build())
* .serialization(AvroSerializationArgs.builder()
* .type("Avro")
* .build())
* .type("Stream")
* .build())
* .resourceGroupName("sjrg3467")
* .build());
*
* }
* }
*
* }
*
* ### Create a stream blob input with CSV serialization
*
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.streamanalytics.Input;
* import com.pulumi.azurenative.streamanalytics.InputArgs;
* 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 input = new Input("input", InputArgs.builder()
* .inputName("input8899")
* .jobName("sj6695")
* .properties(StreamInputPropertiesArgs.builder()
* .datasource(BlobStreamInputDataSourceArgs.builder()
* .container("state")
* .dateFormat("yyyy/MM/dd")
* .pathPattern("{date}/{time}")
* .sourcePartitionCount(16)
* .storageAccounts(StorageAccountArgs.builder()
* .accountKey("someAccountKey==")
* .accountName("someAccountName")
* .build())
* .timeFormat("HH")
* .type("Microsoft.Storage/Blob")
* .build())
* .serialization(CsvSerializationArgs.builder()
* .encoding("UTF8")
* .fieldDelimiter(",")
* .type("Csv")
* .build())
* .type("Stream")
* .build())
* .resourceGroupName("sjrg8161")
* .build());
*
* }
* }
*
* }
*
*
* ## Import
*
* An existing resource can be imported using its type token, name, and identifier, e.g.
*
* ```sh
* $ pulumi import azure-native:streamanalytics:Input input8899 /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.StreamAnalytics/streamingjobs/{jobName}/inputs/{inputName}
* ```
*
*/
@ResourceType(type="azure-native:streamanalytics:Input")
public class Input extends com.pulumi.resources.CustomResource {
/**
* Resource name
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> name;
/**
* @return Resource name
*
*/
public Output> name() {
return Codegen.optional(this.name);
}
/**
* The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.
*
*/
@Export(name="properties", refs={Either.class,ReferenceInputPropertiesResponse.class,StreamInputPropertiesResponse.class}, tree="[0,1,2]")
private Output> properties;
/**
* @return The properties that are associated with an input. Required on PUT (CreateOrReplace) requests.
*
*/
public Output> properties() {
return this.properties;
}
/**
* Resource type
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return Resource type
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Input(java.lang.String name) {
this(name, InputArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Input(java.lang.String name, InputArgs 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 Input(java.lang.String name, InputArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:streamanalytics:Input", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Input(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:streamanalytics:Input", name, null, makeResourceOptions(options, id), false);
}
private static InputArgs makeArgs(InputArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? InputArgs.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:streamanalytics/v20160301:Input").build()),
Output.of(Alias.builder().type("azure-native:streamanalytics/v20170401preview:Input").build()),
Output.of(Alias.builder().type("azure-native:streamanalytics/v20200301:Input").build()),
Output.of(Alias.builder().type("azure-native:streamanalytics/v20211001preview:Input").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 Input get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Input(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy