com.pulumi.azure.streamanalytics.kotlin.StreamInputBlob.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-kotlin Show documentation
Show all versions of pulumi-azure-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.streamanalytics.kotlin
import com.pulumi.azure.streamanalytics.kotlin.outputs.StreamInputBlobSerialization
import com.pulumi.azure.streamanalytics.kotlin.outputs.StreamInputBlobSerialization.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [StreamInputBlob].
*/
@PulumiTagMarker
public class StreamInputBlobResourceBuilder internal constructor() {
public var name: String? = null
public var args: StreamInputBlobArgs = StreamInputBlobArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend StreamInputBlobArgsBuilder.() -> Unit) {
val builder = StreamInputBlobArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): StreamInputBlob {
val builtJavaResource =
com.pulumi.azure.streamanalytics.StreamInputBlob(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return StreamInputBlob(builtJavaResource)
}
}
/**
* Manages a Stream Analytics Stream Input Blob.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const exampleResourceGroup = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const example = azure.streamanalytics.getJobOutput({
* name: "example-job",
* resourceGroupName: exampleResourceGroup.name,
* });
* const exampleAccount = new azure.storage.Account("example", {
* name: "examplestoracc",
* resourceGroupName: exampleResourceGroup.name,
* location: exampleResourceGroup.location,
* accountTier: "Standard",
* accountReplicationType: "LRS",
* });
* const exampleContainer = new azure.storage.Container("example", {
* name: "example",
* storageAccountName: exampleAccount.name,
* containerAccessType: "private",
* });
* const exampleStreamInputBlob = new azure.streamanalytics.StreamInputBlob("example", {
* name: "blob-stream-input",
* streamAnalyticsJobName: example.apply(example => example.name),
* resourceGroupName: example.apply(example => example.resourceGroupName),
* storageAccountName: exampleAccount.name,
* storageAccountKey: exampleAccount.primaryAccessKey,
* storageContainerName: exampleContainer.name,
* pathPattern: "some-random-pattern",
* dateFormat: "yyyy/MM/dd",
* timeFormat: "HH",
* serialization: {
* type: "Json",
* encoding: "UTF8",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example_resource_group = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example = azure.streamanalytics.get_job_output(name="example-job",
* resource_group_name=example_resource_group.name)
* example_account = azure.storage.Account("example",
* name="examplestoracc",
* resource_group_name=example_resource_group.name,
* location=example_resource_group.location,
* account_tier="Standard",
* account_replication_type="LRS")
* example_container = azure.storage.Container("example",
* name="example",
* storage_account_name=example_account.name,
* container_access_type="private")
* example_stream_input_blob = azure.streamanalytics.StreamInputBlob("example",
* name="blob-stream-input",
* stream_analytics_job_name=example.name,
* resource_group_name=example.resource_group_name,
* storage_account_name=example_account.name,
* storage_account_key=example_account.primary_access_key,
* storage_container_name=example_container.name,
* path_pattern="some-random-pattern",
* date_format="yyyy/MM/dd",
* time_format="HH",
* serialization=azure.streamanalytics.StreamInputBlobSerializationArgs(
* type="Json",
* encoding="UTF8",
* ))
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var example = Azure.StreamAnalytics.GetJob.Invoke(new()
* {
* Name = "example-job",
* ResourceGroupName = exampleResourceGroup.Name,
* });
* var exampleAccount = new Azure.Storage.Account("example", new()
* {
* Name = "examplestoracc",
* ResourceGroupName = exampleResourceGroup.Name,
* Location = exampleResourceGroup.Location,
* AccountTier = "Standard",
* AccountReplicationType = "LRS",
* });
* var exampleContainer = new Azure.Storage.Container("example", new()
* {
* Name = "example",
* StorageAccountName = exampleAccount.Name,
* ContainerAccessType = "private",
* });
* var exampleStreamInputBlob = new Azure.StreamAnalytics.StreamInputBlob("example", new()
* {
* Name = "blob-stream-input",
* StreamAnalyticsJobName = example.Apply(getJobResult => getJobResult.Name),
* ResourceGroupName = example.Apply(getJobResult => getJobResult.ResourceGroupName),
* StorageAccountName = exampleAccount.Name,
* StorageAccountKey = exampleAccount.PrimaryAccessKey,
* StorageContainerName = exampleContainer.Name,
* PathPattern = "some-random-pattern",
* DateFormat = "yyyy/MM/dd",
* TimeFormat = "HH",
* Serialization = new Azure.StreamAnalytics.Inputs.StreamInputBlobSerializationArgs
* {
* Type = "Json",
* Encoding = "UTF8",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/streamanalytics"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* example := streamanalytics.LookupJobOutput(ctx, streamanalytics.GetJobOutputArgs{
* Name: pulumi.String("example-job"),
* ResourceGroupName: exampleResourceGroup.Name,
* }, nil)
* exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
* Name: pulumi.String("examplestoracc"),
* ResourceGroupName: exampleResourceGroup.Name,
* Location: exampleResourceGroup.Location,
* AccountTier: pulumi.String("Standard"),
* AccountReplicationType: pulumi.String("LRS"),
* })
* if err != nil {
* return err
* }
* exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
* Name: pulumi.String("example"),
* StorageAccountName: exampleAccount.Name,
* ContainerAccessType: pulumi.String("private"),
* })
* if err != nil {
* return err
* }
* _, err = streamanalytics.NewStreamInputBlob(ctx, "example", &streamanalytics.StreamInputBlobArgs{
* Name: pulumi.String("blob-stream-input"),
* StreamAnalyticsJobName: example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) {
* return &example.Name, nil
* }).(pulumi.StringPtrOutput),
* ResourceGroupName: example.ApplyT(func(example streamanalytics.GetJobResult) (*string, error) {
* return &example.ResourceGroupName, nil
* }).(pulumi.StringPtrOutput),
* StorageAccountName: exampleAccount.Name,
* StorageAccountKey: exampleAccount.PrimaryAccessKey,
* StorageContainerName: exampleContainer.Name,
* PathPattern: pulumi.String("some-random-pattern"),
* DateFormat: pulumi.String("yyyy/MM/dd"),
* TimeFormat: pulumi.String("HH"),
* Serialization: &streamanalytics.StreamInputBlobSerializationArgs{
* Type: pulumi.String("Json"),
* Encoding: pulumi.String("UTF8"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```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.streamanalytics.StreamanalyticsFunctions;
* import com.pulumi.azure.streamanalytics.inputs.GetJobArgs;
* import com.pulumi.azure.storage.Account;
* import com.pulumi.azure.storage.AccountArgs;
* import com.pulumi.azure.storage.Container;
* import com.pulumi.azure.storage.ContainerArgs;
* import com.pulumi.azure.streamanalytics.StreamInputBlob;
* import com.pulumi.azure.streamanalytics.StreamInputBlobArgs;
* import com.pulumi.azure.streamanalytics.inputs.StreamInputBlobSerializationArgs;
* 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("exampleResourceGroup", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* final var example = StreamanalyticsFunctions.getJob(GetJobArgs.builder()
* .name("example-job")
* .resourceGroupName(exampleResourceGroup.name())
* .build());
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("examplestoracc")
* .resourceGroupName(exampleResourceGroup.name())
* .location(exampleResourceGroup.location())
* .accountTier("Standard")
* .accountReplicationType("LRS")
* .build());
* var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
* .name("example")
* .storageAccountName(exampleAccount.name())
* .containerAccessType("private")
* .build());
* var exampleStreamInputBlob = new StreamInputBlob("exampleStreamInputBlob", StreamInputBlobArgs.builder()
* .name("blob-stream-input")
* .streamAnalyticsJobName(example.applyValue(getJobResult -> getJobResult).applyValue(example -> example.applyValue(getJobResult -> getJobResult.name())))
* .resourceGroupName(example.applyValue(getJobResult -> getJobResult).applyValue(example -> example.applyValue(getJobResult -> getJobResult.resourceGroupName())))
* .storageAccountName(exampleAccount.name())
* .storageAccountKey(exampleAccount.primaryAccessKey())
* .storageContainerName(exampleContainer.name())
* .pathPattern("some-random-pattern")
* .dateFormat("yyyy/MM/dd")
* .timeFormat("HH")
* .serialization(StreamInputBlobSerializationArgs.builder()
* .type("Json")
* .encoding("UTF8")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* exampleResourceGroup:
* type: azure:core:ResourceGroup
* name: example
* properties:
* name: example-resources
* location: West Europe
* exampleAccount:
* type: azure:storage:Account
* name: example
* properties:
* name: examplestoracc
* resourceGroupName: ${exampleResourceGroup.name}
* location: ${exampleResourceGroup.location}
* accountTier: Standard
* accountReplicationType: LRS
* exampleContainer:
* type: azure:storage:Container
* name: example
* properties:
* name: example
* storageAccountName: ${exampleAccount.name}
* containerAccessType: private
* exampleStreamInputBlob:
* type: azure:streamanalytics:StreamInputBlob
* name: example
* properties:
* name: blob-stream-input
* streamAnalyticsJobName: ${example.name}
* resourceGroupName: ${example.resourceGroupName}
* storageAccountName: ${exampleAccount.name}
* storageAccountKey: ${exampleAccount.primaryAccessKey}
* storageContainerName: ${exampleContainer.name}
* pathPattern: some-random-pattern
* dateFormat: yyyy/MM/dd
* timeFormat: HH
* serialization:
* type: Json
* encoding: UTF8
* variables:
* example:
* fn::invoke:
* Function: azure:streamanalytics:getJob
* Arguments:
* name: example-job
* resourceGroupName: ${exampleResourceGroup.name}
* ```
*
* ## Import
* Stream Analytics Stream Input Blob's can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:streamanalytics/streamInputBlob:StreamInputBlob example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.StreamAnalytics/streamingJobs/job1/inputs/input1
* ```
*/
public class StreamInputBlob internal constructor(
override val javaResource: com.pulumi.azure.streamanalytics.StreamInputBlob,
) : KotlinCustomResource(javaResource, StreamInputBlobMapper) {
/**
* The date format. Wherever `{date}` appears in `path_pattern`, the value of this property is used as the date format instead.
*/
public val dateFormat: Output
get() = javaResource.dateFormat().applyValue({ args0 -> args0 })
/**
* The name of the Stream Input Blob. Changing this forces a new resource to be created.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The blob path pattern. Not a regular expression. It represents a pattern against which blob names will be matched to determine whether or not they should be included as input or output to the job.
*/
public val pathPattern: Output
get() = javaResource.pathPattern().applyValue({ args0 -> args0 })
/**
* The name of the Resource Group where the Stream Analytics Job exists. Changing this forces a new resource to be created.
*/
public val resourceGroupName: Output
get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })
/**
* A `serialization` block as defined below.
*/
public val serialization: Output
get() = javaResource.serialization().applyValue({ args0 ->
args0.let({ args0 ->
toKotlin(args0)
})
})
/**
* The Access Key which should be used to connect to this Storage Account.
*/
public val storageAccountKey: Output
get() = javaResource.storageAccountKey().applyValue({ args0 -> args0 })
/**
* The name of the Storage Account.
*/
public val storageAccountName: Output
get() = javaResource.storageAccountName().applyValue({ args0 -> args0 })
/**
* The name of the Container within the Storage Account.
*/
public val storageContainerName: Output
get() = javaResource.storageContainerName().applyValue({ args0 -> args0 })
/**
* The name of the Stream Analytics Job. Changing this forces a new resource to be created.
*/
public val streamAnalyticsJobName: Output
get() = javaResource.streamAnalyticsJobName().applyValue({ args0 -> args0 })
/**
* The time format. Wherever `{time}` appears in `path_pattern`, the value of this property is used as the time format instead.
*/
public val timeFormat: Output
get() = javaResource.timeFormat().applyValue({ args0 -> args0 })
}
public object StreamInputBlobMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azure.streamanalytics.StreamInputBlob::class == javaResource::class
override fun map(javaResource: Resource): StreamInputBlob = StreamInputBlob(
javaResource as
com.pulumi.azure.streamanalytics.StreamInputBlob,
)
}
/**
* @see [StreamInputBlob].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [StreamInputBlob].
*/
public suspend fun streamInputBlob(
name: String,
block: suspend StreamInputBlobResourceBuilder.() -> Unit,
): StreamInputBlob {
val builder = StreamInputBlobResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [StreamInputBlob].
* @param name The _unique_ name of the resulting resource.
*/
public fun streamInputBlob(name: String): StreamInputBlob {
val builder = StreamInputBlobResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy