Update Run Args
A multi-stage process to perform update operations across members of a Fleet. Uses Azure REST API version 2024-05-02-preview. In version 2.x of the Azure Native provider, it used API version 2023-03-15-preview. Other available API versions: 2023-03-15-preview, 2023-06-15-preview, 2023-08-15-preview, 2023-10-15, 2024-02-02-preview, 2024-04-01, 2025-03-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native containerservice [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Create an UpdateRun.
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
{
NodeImageSelection = new AzureNative.ContainerService.Inputs.NodeImageSelectionArgs
{
Type = AzureNative.ContainerService.NodeImageSelectionType.Latest,
},
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",
UpdateStrategyId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1",
});
});
package main
import (
containerservice "github.com/pulumi/pulumi-azure-native-sdk/containerservice/v3"
"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{
NodeImageSelection: &containerservice.NodeImageSelectionArgs{
Type: pulumi.String(containerservice.NodeImageSelectionTypeLatest),
},
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"),
UpdateStrategyId: pulumi.String("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1"),
})
if err != nil {
return err
}
return nil
})
}
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.NodeImageSelectionArgs;
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()
.nodeImageSelection(NodeImageSelectionArgs.builder()
.type("Latest")
.build())
.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")
.updateStrategyId("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/updateStrategies/strategy1")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:containerservice:UpdateRun run1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/updateRuns/{updateRunName}
Constructors
Properties
The update to be applied to all clusters in the UpdateRun. The managedClusterUpdate can be modified until the run is started.
The name of the resource group. The name is case insensitive.
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.
The name of the UpdateRun resource.
The resource id of the FleetUpdateStrategy resource to reference. When creating a new run, there are three ways to define a strategy for the run: