![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.containerservice.kotlin.UpdateRunArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-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.azurenative.containerservice.kotlin
import com.pulumi.azurenative.containerservice.UpdateRunArgs.builder
import com.pulumi.azurenative.containerservice.kotlin.inputs.ManagedClusterUpdateArgs
import com.pulumi.azurenative.containerservice.kotlin.inputs.ManagedClusterUpdateArgsBuilder
import com.pulumi.azurenative.containerservice.kotlin.inputs.UpdateRunStrategyArgs
import com.pulumi.azurenative.containerservice.kotlin.inputs.UpdateRunStrategyArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* A multi-stage process to perform update operations across members of a Fleet.
* Azure REST API version: 2023-03-15-preview.
* Other available API versions: 2023-06-15-preview, 2023-08-15-preview, 2023-10-15, 2024-02-02-preview, 2024-04-01.
* ## Example Usage
* ### Create an UpdateRun.
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var updateRun = new AzureNative.ContainerService.UpdateRun("updateRun", new()
* {
* FleetName = "fleet1",
* ManagedClusterUpdate = new AzureNative.ContainerService.Inputs.ManagedClusterUpdateArgs
* {
* Upgrade = new AzureNative.ContainerService.Inputs.ManagedClusterUpgradeSpecArgs
* {
* KubernetesVersion = "1.26.1",
* Type = AzureNative.ContainerService.ManagedClusterUpgradeType.Full,
* },
* },
* ResourceGroupName = "rg1",
* Strategy = new AzureNative.ContainerService.Inputs.UpdateRunStrategyArgs
* {
* Stages = new[]
* {
* new AzureNative.ContainerService.Inputs.UpdateStageArgs
* {
* AfterStageWaitInSeconds = 3600,
* Groups = new[]
* {
* new AzureNative.ContainerService.Inputs.UpdateGroupArgs
* {
* Name = "group-a",
* },
* },
* Name = "stage1",
* },
* },
* },
* UpdateRunName = "run1",
* });
* });
* ```
* ```go
* package main
* import (
* containerservice "github.com/pulumi/pulumi-azure-native-sdk/containerservice/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := containerservice.NewUpdateRun(ctx, "updateRun", &containerservice.UpdateRunArgs{
* FleetName: pulumi.String("fleet1"),
* ManagedClusterUpdate: &containerservice.ManagedClusterUpdateArgs{
* Upgrade: &containerservice.ManagedClusterUpgradeSpecArgs{
* KubernetesVersion: pulumi.String("1.26.1"),
* Type: pulumi.String(containerservice.ManagedClusterUpgradeTypeFull),
* },
* },
* ResourceGroupName: pulumi.String("rg1"),
* Strategy: &containerservice.UpdateRunStrategyArgs{
* Stages: containerservice.UpdateStageArray{
* &containerservice.UpdateStageArgs{
* AfterStageWaitInSeconds: pulumi.Int(3600),
* Groups: containerservice.UpdateGroupArray{
* &containerservice.UpdateGroupArgs{
* Name: pulumi.String("group-a"),
* },
* },
* Name: pulumi.String("stage1"),
* },
* },
* },
* UpdateRunName: pulumi.String("run1"),
* })
* 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.azurenative.containerservice.UpdateRun;
* import com.pulumi.azurenative.containerservice.UpdateRunArgs;
* import com.pulumi.azurenative.containerservice.inputs.ManagedClusterUpdateArgs;
* import com.pulumi.azurenative.containerservice.inputs.ManagedClusterUpgradeSpecArgs;
* import com.pulumi.azurenative.containerservice.inputs.UpdateRunStrategyArgs;
* 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 updateRun = new UpdateRun("updateRun", UpdateRunArgs.builder()
* .fleetName("fleet1")
* .managedClusterUpdate(ManagedClusterUpdateArgs.builder()
* .upgrade(ManagedClusterUpgradeSpecArgs.builder()
* .kubernetesVersion("1.26.1")
* .type("Full")
* .build())
* .build())
* .resourceGroupName("rg1")
* .strategy(UpdateRunStrategyArgs.builder()
* .stages(UpdateStageArgs.builder()
* .afterStageWaitInSeconds(3600)
* .groups(UpdateGroupArgs.builder()
* .name("group-a")
* .build())
* .name("stage1")
* .build())
* .build())
* .updateRunName("run1")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:containerservice:UpdateRun run1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
* ```
* @property fleetName The name of the Fleet resource.
* @property managedClusterUpdate The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property strategy The strategy defines the order in which the clusters will be updated.
* If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members.
* The strategy of the UpdateRun can be modified until the run is started.
* @property updateRunName The name of the UpdateRun resource.
*/
public data class UpdateRunArgs(
public val fleetName: Output? = null,
public val managedClusterUpdate: Output? = null,
public val resourceGroupName: Output? = null,
public val strategy: Output? = null,
public val updateRunName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.containerservice.UpdateRunArgs =
com.pulumi.azurenative.containerservice.UpdateRunArgs.builder()
.fleetName(fleetName?.applyValue({ args0 -> args0 }))
.managedClusterUpdate(
managedClusterUpdate?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.strategy(strategy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.updateRunName(updateRunName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [UpdateRunArgs].
*/
@PulumiTagMarker
public class UpdateRunArgsBuilder internal constructor() {
private var fleetName: Output? = null
private var managedClusterUpdate: Output? = null
private var resourceGroupName: Output? = null
private var strategy: Output? = null
private var updateRunName: Output? = null
/**
* @param value The name of the Fleet resource.
*/
@JvmName("nblsafhdwtxljjqv")
public suspend fun fleetName(`value`: Output) {
this.fleetName = value
}
/**
* @param value The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started.
*/
@JvmName("hemqyufawwcqhwkc")
public suspend fun managedClusterUpdate(`value`: Output) {
this.managedClusterUpdate = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("phcnbdkqoukidhub")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The strategy defines the order in which the clusters will be updated.
* If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members.
* The strategy of the UpdateRun can be modified until the run is started.
*/
@JvmName("cvibdpcyhybtnydn")
public suspend fun strategy(`value`: Output) {
this.strategy = value
}
/**
* @param value The name of the UpdateRun resource.
*/
@JvmName("xjeqtofmysvrxjit")
public suspend fun updateRunName(`value`: Output) {
this.updateRunName = value
}
/**
* @param value The name of the Fleet resource.
*/
@JvmName("apyovyxmrmodhnxw")
public suspend fun fleetName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.fleetName = mapped
}
/**
* @param value The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started.
*/
@JvmName("tqyphyuexrkgflic")
public suspend fun managedClusterUpdate(`value`: ManagedClusterUpdateArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.managedClusterUpdate = mapped
}
/**
* @param argument The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started.
*/
@JvmName("vtkukewcvjexjcfj")
public suspend fun managedClusterUpdate(argument: suspend ManagedClusterUpdateArgsBuilder.() -> Unit) {
val toBeMapped = ManagedClusterUpdateArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.managedClusterUpdate = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("mbejlqfngudxtrvb")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The strategy defines the order in which the clusters will be updated.
* If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members.
* The strategy of the UpdateRun can be modified until the run is started.
*/
@JvmName("bbqnapgatgoskytd")
public suspend fun strategy(`value`: UpdateRunStrategyArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.strategy = mapped
}
/**
* @param argument The strategy defines the order in which the clusters will be updated.
* If not set, all members will be updated sequentially. The UpdateRun status will show a single UpdateStage and a single UpdateGroup targeting all members.
* The strategy of the UpdateRun can be modified until the run is started.
*/
@JvmName("xefbvxtvdwhivkhx")
public suspend fun strategy(argument: suspend UpdateRunStrategyArgsBuilder.() -> Unit) {
val toBeMapped = UpdateRunStrategyArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.strategy = mapped
}
/**
* @param value The name of the UpdateRun resource.
*/
@JvmName("vgcssigtkhmgskob")
public suspend fun updateRunName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.updateRunName = mapped
}
internal fun build(): UpdateRunArgs = UpdateRunArgs(
fleetName = fleetName,
managedClusterUpdate = managedClusterUpdate,
resourceGroupName = resourceGroupName,
strategy = strategy,
updateRunName = updateRunName,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy