Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.datafactory.kotlin.TriggerScheduleArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.datafactory.kotlin
import com.pulumi.azure.datafactory.TriggerScheduleArgs.builder
import com.pulumi.azure.datafactory.kotlin.inputs.TriggerSchedulePipelineArgs
import com.pulumi.azure.datafactory.kotlin.inputs.TriggerSchedulePipelineArgsBuilder
import com.pulumi.azure.datafactory.kotlin.inputs.TriggerScheduleScheduleArgs
import com.pulumi.azure.datafactory.kotlin.inputs.TriggerScheduleScheduleArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a Trigger Schedule inside a Azure Data Factory.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleFactory = new azure.datafactory.Factory("example", {
* name: "example",
* location: example.location,
* resourceGroupName: example.name,
* });
* const examplePipeline = new azure.datafactory.Pipeline("example", {
* name: "example",
* dataFactoryId: exampleFactory.id,
* });
* const exampleTriggerSchedule = new azure.datafactory.TriggerSchedule("example", {
* name: "example",
* dataFactoryId: exampleFactory.id,
* pipelineName: examplePipeline.name,
* interval: 5,
* frequency: "Day",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_factory = azure.datafactory.Factory("example",
* name="example",
* location=example.location,
* resource_group_name=example.name)
* example_pipeline = azure.datafactory.Pipeline("example",
* name="example",
* data_factory_id=example_factory.id)
* example_trigger_schedule = azure.datafactory.TriggerSchedule("example",
* name="example",
* data_factory_id=example_factory.id,
* pipeline_name=example_pipeline.name,
* interval=5,
* frequency="Day")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleFactory = new Azure.DataFactory.Factory("example", new()
* {
* Name = "example",
* Location = example.Location,
* ResourceGroupName = example.Name,
* });
* var examplePipeline = new Azure.DataFactory.Pipeline("example", new()
* {
* Name = "example",
* DataFactoryId = exampleFactory.Id,
* });
* var exampleTriggerSchedule = new Azure.DataFactory.TriggerSchedule("example", new()
* {
* Name = "example",
* DataFactoryId = exampleFactory.Id,
* PipelineName = examplePipeline.Name,
* Interval = 5,
* Frequency = "Day",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/datafactory"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleFactory, err := datafactory.NewFactory(ctx, "example", &datafactory.FactoryArgs{
* Name: pulumi.String("example"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* })
* if err != nil {
* return err
* }
* examplePipeline, err := datafactory.NewPipeline(ctx, "example", &datafactory.PipelineArgs{
* Name: pulumi.String("example"),
* DataFactoryId: exampleFactory.ID(),
* })
* if err != nil {
* return err
* }
* _, err = datafactory.NewTriggerSchedule(ctx, "example", &datafactory.TriggerScheduleArgs{
* Name: pulumi.String("example"),
* DataFactoryId: exampleFactory.ID(),
* PipelineName: examplePipeline.Name,
* Interval: pulumi.Int(5),
* Frequency: pulumi.String("Day"),
* })
* 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.datafactory.Factory;
* import com.pulumi.azure.datafactory.FactoryArgs;
* import com.pulumi.azure.datafactory.Pipeline;
* import com.pulumi.azure.datafactory.PipelineArgs;
* import com.pulumi.azure.datafactory.TriggerSchedule;
* import com.pulumi.azure.datafactory.TriggerScheduleArgs;
* 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
* var exampleFactory = new Factory("exampleFactory", FactoryArgs.builder()
* .name("example")
* .location(example.location())
* .resourceGroupName(example.name())
* .build());
* var examplePipeline = new Pipeline("examplePipeline", PipelineArgs.builder()
* .name("example")
* .dataFactoryId(exampleFactory.id())
* .build());
* var exampleTriggerSchedule = new TriggerSchedule("exampleTriggerSchedule", TriggerScheduleArgs.builder()
* .name("example")
* .dataFactoryId(exampleFactory.id())
* .pipelineName(examplePipeline.name())
* .interval(5)
* .frequency("Day")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleFactory:
* type: azure:datafactory:Factory
* name: example
* properties:
* name: example
* location: ${example.location}
* resourceGroupName: ${example.name}
* examplePipeline:
* type: azure:datafactory:Pipeline
* name: example
* properties:
* name: example
* dataFactoryId: ${exampleFactory.id}
* exampleTriggerSchedule:
* type: azure:datafactory:TriggerSchedule
* name: example
* properties:
* name: example
* dataFactoryId: ${exampleFactory.id}
* pipelineName: ${examplePipeline.name}
* interval: 5
* frequency: Day
* ```
*
* ## Import
* Data Factory Schedule Trigger can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:datafactory/triggerSchedule:TriggerSchedule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example/providers/Microsoft.DataFactory/factories/example/triggers/example
* ```
* @property activated Specifies if the Data Factory Schedule Trigger is activated. Defaults to `true`.
* @property annotations List of tags that can be used for describing the Data Factory Schedule Trigger.
* @property dataFactoryId The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.
* @property description The Schedule Trigger's description.
* @property endTime The time the Schedule Trigger should end. The time will be represented in UTC.
* @property frequency The trigger frequency. Valid values include `Minute`, `Hour`, `Day`, `Week`, `Month`. Defaults to `Minute`.
* @property interval The interval for how often the trigger occurs. This defaults to `1`.
* @property name Specifies the name of the Data Factory Schedule Trigger. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions.
* @property pipelineName The Data Factory Pipeline name that the trigger will act on.
* @property pipelineParameters The pipeline parameters that the trigger will act upon.
* @property pipelines A `pipeline` block as defined below.
* @property schedule A `schedule` block as defined below, which further specifies the recurrence schedule for the trigger. A schedule is capable of limiting or increasing the number of trigger executions specified by the `frequency` and `interval` properties.
* @property startTime The time the Schedule Trigger will start. This defaults to the current time. The time will be represented in UTC.
* @property timeZone The timezone of the start/end time.
*/
public data class TriggerScheduleArgs(
public val activated: Output? = null,
public val annotations: Output>? = null,
public val dataFactoryId: Output? = null,
public val description: Output? = null,
public val endTime: Output? = null,
public val frequency: Output? = null,
public val interval: Output? = null,
public val name: Output? = null,
public val pipelineName: Output? = null,
public val pipelineParameters: Output>? = null,
public val pipelines: Output>? = null,
public val schedule: Output? = null,
public val startTime: Output? = null,
public val timeZone: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.datafactory.TriggerScheduleArgs =
com.pulumi.azure.datafactory.TriggerScheduleArgs.builder()
.activated(activated?.applyValue({ args0 -> args0 }))
.annotations(annotations?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.dataFactoryId(dataFactoryId?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.endTime(endTime?.applyValue({ args0 -> args0 }))
.frequency(frequency?.applyValue({ args0 -> args0 }))
.interval(interval?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.pipelineName(pipelineName?.applyValue({ args0 -> args0 }))
.pipelineParameters(
pipelineParameters?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.pipelines(
pipelines?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.schedule(schedule?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.startTime(startTime?.applyValue({ args0 -> args0 }))
.timeZone(timeZone?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [TriggerScheduleArgs].
*/
@PulumiTagMarker
public class TriggerScheduleArgsBuilder internal constructor() {
private var activated: Output? = null
private var annotations: Output>? = null
private var dataFactoryId: Output? = null
private var description: Output? = null
private var endTime: Output? = null
private var frequency: Output? = null
private var interval: Output? = null
private var name: Output? = null
private var pipelineName: Output? = null
private var pipelineParameters: Output>? = null
private var pipelines: Output>? = null
private var schedule: Output? = null
private var startTime: Output? = null
private var timeZone: Output? = null
/**
* @param value Specifies if the Data Factory Schedule Trigger is activated. Defaults to `true`.
*/
@JvmName("fstuxhcvpimhcukv")
public suspend fun activated(`value`: Output) {
this.activated = value
}
/**
* @param value List of tags that can be used for describing the Data Factory Schedule Trigger.
*/
@JvmName("upucceaixldyjjoj")
public suspend fun annotations(`value`: Output>) {
this.annotations = value
}
@JvmName("udpqxhctnxliifdr")
public suspend fun annotations(vararg values: Output) {
this.annotations = Output.all(values.asList())
}
/**
* @param values List of tags that can be used for describing the Data Factory Schedule Trigger.
*/
@JvmName("jrbgcwmolsnbaabp")
public suspend fun annotations(values: List>) {
this.annotations = Output.all(values)
}
/**
* @param value The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.
*/
@JvmName("mlodidukrfwncyhh")
public suspend fun dataFactoryId(`value`: Output) {
this.dataFactoryId = value
}
/**
* @param value The Schedule Trigger's description.
*/
@JvmName("aebosjqyofuqtblc")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The time the Schedule Trigger should end. The time will be represented in UTC.
*/
@JvmName("eccurdbjpjgfgujh")
public suspend fun endTime(`value`: Output) {
this.endTime = value
}
/**
* @param value The trigger frequency. Valid values include `Minute`, `Hour`, `Day`, `Week`, `Month`. Defaults to `Minute`.
*/
@JvmName("yoagrsyyhivnvjvb")
public suspend fun frequency(`value`: Output) {
this.frequency = value
}
/**
* @param value The interval for how often the trigger occurs. This defaults to `1`.
*/
@JvmName("jxaemmadxmiwqpjk")
public suspend fun interval(`value`: Output) {
this.interval = value
}
/**
* @param value Specifies the name of the Data Factory Schedule Trigger. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions.
*/
@JvmName("tpxvxyswioxvikot")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The Data Factory Pipeline name that the trigger will act on.
*/
@JvmName("rmhynrqfiqymjyul")
public suspend fun pipelineName(`value`: Output) {
this.pipelineName = value
}
/**
* @param value The pipeline parameters that the trigger will act upon.
*/
@JvmName("vscfwfrpdmfadctc")
public suspend fun pipelineParameters(`value`: Output>) {
this.pipelineParameters = value
}
/**
* @param value A `pipeline` block as defined below.
*/
@JvmName("rcnbkhpijemgriuw")
public suspend fun pipelines(`value`: Output>) {
this.pipelines = value
}
@JvmName("kkebglrucyppqwjn")
public suspend fun pipelines(vararg values: Output) {
this.pipelines = Output.all(values.asList())
}
/**
* @param values A `pipeline` block as defined below.
*/
@JvmName("fpswldkgfwvqyput")
public suspend fun pipelines(values: List>) {
this.pipelines = Output.all(values)
}
/**
* @param value A `schedule` block as defined below, which further specifies the recurrence schedule for the trigger. A schedule is capable of limiting or increasing the number of trigger executions specified by the `frequency` and `interval` properties.
*/
@JvmName("jvotrojujwlksofi")
public suspend fun schedule(`value`: Output) {
this.schedule = value
}
/**
* @param value The time the Schedule Trigger will start. This defaults to the current time. The time will be represented in UTC.
*/
@JvmName("slavqxqpgovyiijb")
public suspend fun startTime(`value`: Output) {
this.startTime = value
}
/**
* @param value The timezone of the start/end time.
*/
@JvmName("gdrxybewhwmeqpaw")
public suspend fun timeZone(`value`: Output) {
this.timeZone = value
}
/**
* @param value Specifies if the Data Factory Schedule Trigger is activated. Defaults to `true`.
*/
@JvmName("rgtcaufaybqiceyg")
public suspend fun activated(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.activated = mapped
}
/**
* @param value List of tags that can be used for describing the Data Factory Schedule Trigger.
*/
@JvmName("xblmrjpffecdmiii")
public suspend fun annotations(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.annotations = mapped
}
/**
* @param values List of tags that can be used for describing the Data Factory Schedule Trigger.
*/
@JvmName("hvssxmxccouixcjq")
public suspend fun annotations(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.annotations = mapped
}
/**
* @param value The Data Factory ID in which to associate the Linked Service with. Changing this forces a new resource.
*/
@JvmName("dexqjhcqmspxqmfp")
public suspend fun dataFactoryId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.dataFactoryId = mapped
}
/**
* @param value The Schedule Trigger's description.
*/
@JvmName("dmsmolmfmyivkgwb")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The time the Schedule Trigger should end. The time will be represented in UTC.
*/
@JvmName("rtymumeplwhxukjx")
public suspend fun endTime(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.endTime = mapped
}
/**
* @param value The trigger frequency. Valid values include `Minute`, `Hour`, `Day`, `Week`, `Month`. Defaults to `Minute`.
*/
@JvmName("bbcdxdbkcdtcmobn")
public suspend fun frequency(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.frequency = mapped
}
/**
* @param value The interval for how often the trigger occurs. This defaults to `1`.
*/
@JvmName("yrfjnpovyuupiwfx")
public suspend fun interval(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.interval = mapped
}
/**
* @param value Specifies the name of the Data Factory Schedule Trigger. Changing this forces a new resource to be created. Must be globally unique. See the [Microsoft documentation](https://docs.microsoft.com/azure/data-factory/naming-rules) for all restrictions.
*/
@JvmName("qgudrynlaxsywhfq")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The Data Factory Pipeline name that the trigger will act on.
*/
@JvmName("ckdsvhokvccetvan")
public suspend fun pipelineName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.pipelineName = mapped
}
/**
* @param value The pipeline parameters that the trigger will act upon.
*/
@JvmName("fyspejeuoperlcvc")
public suspend fun pipelineParameters(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.pipelineParameters = mapped
}
/**
* @param values The pipeline parameters that the trigger will act upon.
*/
@JvmName("yoyabcpnpwpfblcj")
public fun pipelineParameters(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.pipelineParameters = mapped
}
/**
* @param value A `pipeline` block as defined below.
*/
@JvmName("swibgfajgdmbwsfr")
public suspend fun pipelines(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.pipelines = mapped
}
/**
* @param argument A `pipeline` block as defined below.
*/
@JvmName("thtclybwbfjohscr")
public suspend fun pipelines(argument: List Unit>) {
val toBeMapped = argument.toList().map {
TriggerSchedulePipelineArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.pipelines = mapped
}
/**
* @param argument A `pipeline` block as defined below.
*/
@JvmName("pvaffsqgwjjcvdjw")
public suspend fun pipelines(vararg argument: suspend TriggerSchedulePipelineArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
TriggerSchedulePipelineArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.pipelines = mapped
}
/**
* @param argument A `pipeline` block as defined below.
*/
@JvmName("jgktcbxsdfwqryyq")
public suspend fun pipelines(argument: suspend TriggerSchedulePipelineArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
TriggerSchedulePipelineArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.pipelines = mapped
}
/**
* @param values A `pipeline` block as defined below.
*/
@JvmName("jmojgqqjxivelftf")
public suspend fun pipelines(vararg values: TriggerSchedulePipelineArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.pipelines = mapped
}
/**
* @param value A `schedule` block as defined below, which further specifies the recurrence schedule for the trigger. A schedule is capable of limiting or increasing the number of trigger executions specified by the `frequency` and `interval` properties.
*/
@JvmName("jpiyfkjxqomwjdxi")
public suspend fun schedule(`value`: TriggerScheduleScheduleArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.schedule = mapped
}
/**
* @param argument A `schedule` block as defined below, which further specifies the recurrence schedule for the trigger. A schedule is capable of limiting or increasing the number of trigger executions specified by the `frequency` and `interval` properties.
*/
@JvmName("hflsxepvlplgphmw")
public suspend fun schedule(argument: suspend TriggerScheduleScheduleArgsBuilder.() -> Unit) {
val toBeMapped = TriggerScheduleScheduleArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.schedule = mapped
}
/**
* @param value The time the Schedule Trigger will start. This defaults to the current time. The time will be represented in UTC.
*/
@JvmName("dwtucvmrcmabyfpy")
public suspend fun startTime(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.startTime = mapped
}
/**
* @param value The timezone of the start/end time.
*/
@JvmName("yqodaeohpbqwlkhm")
public suspend fun timeZone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.timeZone = mapped
}
internal fun build(): TriggerScheduleArgs = TriggerScheduleArgs(
activated = activated,
annotations = annotations,
dataFactoryId = dataFactoryId,
description = description,
endTime = endTime,
frequency = frequency,
interval = interval,
name = name,
pipelineName = pipelineName,
pipelineParameters = pipelineParameters,
pipelines = pipelines,
schedule = schedule,
startTime = startTime,
timeZone = timeZone,
)
}