1. Packages
  2. Azure Classic
  3. API Docs
  4. containerservice
  5. FleetUpdateStrategy

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.containerservice.FleetUpdateStrategy

Explore with Pulumi AI

Manages a Kubernetes Fleet Update Strategy.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "example-rg",
    location: "westeurope",
});
const exampleKubernetesFleetManager = new azure.containerservice.KubernetesFleetManager("example", {
    location: example.location,
    name: "example",
    resourceGroupName: example.name,
});
const exampleFleetUpdateStrategy = new azure.containerservice.FleetUpdateStrategy("example", {
    name: "example",
    kubernetesFleetManagerId: exampleKubernetesFleetManager.id,
    stages: [{
        name: "example-stage-1",
        groups: [{
            name: "example-group-1",
        }],
        afterStageWaitInSeconds: 21,
    }],
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-rg",
    location="westeurope")
example_kubernetes_fleet_manager = azure.containerservice.KubernetesFleetManager("example",
    location=example.location,
    name="example",
    resource_group_name=example.name)
example_fleet_update_strategy = azure.containerservice.FleetUpdateStrategy("example",
    name="example",
    kubernetes_fleet_manager_id=example_kubernetes_fleet_manager.id,
    stages=[{
        "name": "example-stage-1",
        "groups": [{
            "name": "example-group-1",
        }],
        "after_stage_wait_in_seconds": 21,
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/containerservice"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"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-rg"),
			Location: pulumi.String("westeurope"),
		})
		if err != nil {
			return err
		}
		exampleKubernetesFleetManager, err := containerservice.NewKubernetesFleetManager(ctx, "example", &containerservice.KubernetesFleetManagerArgs{
			Location:          example.Location,
			Name:              pulumi.String("example"),
			ResourceGroupName: example.Name,
		})
		if err != nil {
			return err
		}
		_, err = containerservice.NewFleetUpdateStrategy(ctx, "example", &containerservice.FleetUpdateStrategyArgs{
			Name:                     pulumi.String("example"),
			KubernetesFleetManagerId: exampleKubernetesFleetManager.ID(),
			Stages: containerservice.FleetUpdateStrategyStageArray{
				&containerservice.FleetUpdateStrategyStageArgs{
					Name: pulumi.String("example-stage-1"),
					Groups: containerservice.FleetUpdateStrategyStageGroupArray{
						&containerservice.FleetUpdateStrategyStageGroupArgs{
							Name: pulumi.String("example-group-1"),
						},
					},
					AfterStageWaitInSeconds: pulumi.Int(21),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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-rg",
        Location = "westeurope",
    });

    var exampleKubernetesFleetManager = new Azure.ContainerService.KubernetesFleetManager("example", new()
    {
        Location = example.Location,
        Name = "example",
        ResourceGroupName = example.Name,
    });

    var exampleFleetUpdateStrategy = new Azure.ContainerService.FleetUpdateStrategy("example", new()
    {
        Name = "example",
        KubernetesFleetManagerId = exampleKubernetesFleetManager.Id,
        Stages = new[]
        {
            new Azure.ContainerService.Inputs.FleetUpdateStrategyStageArgs
            {
                Name = "example-stage-1",
                Groups = new[]
                {
                    new Azure.ContainerService.Inputs.FleetUpdateStrategyStageGroupArgs
                    {
                        Name = "example-group-1",
                    },
                },
                AfterStageWaitInSeconds = 21,
            },
        },
    });

});
Copy
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.containerservice.KubernetesFleetManager;
import com.pulumi.azure.containerservice.KubernetesFleetManagerArgs;
import com.pulumi.azure.containerservice.FleetUpdateStrategy;
import com.pulumi.azure.containerservice.FleetUpdateStrategyArgs;
import com.pulumi.azure.containerservice.inputs.FleetUpdateStrategyStageArgs;
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-rg")
            .location("westeurope")
            .build());

        var exampleKubernetesFleetManager = new KubernetesFleetManager("exampleKubernetesFleetManager", KubernetesFleetManagerArgs.builder()
            .location(example.location())
            .name("example")
            .resourceGroupName(example.name())
            .build());

        var exampleFleetUpdateStrategy = new FleetUpdateStrategy("exampleFleetUpdateStrategy", FleetUpdateStrategyArgs.builder()
            .name("example")
            .kubernetesFleetManagerId(exampleKubernetesFleetManager.id())
            .stages(FleetUpdateStrategyStageArgs.builder()
                .name("example-stage-1")
                .groups(FleetUpdateStrategyStageGroupArgs.builder()
                    .name("example-group-1")
                    .build())
                .afterStageWaitInSeconds(21)
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-rg
      location: westeurope
  exampleKubernetesFleetManager:
    type: azure:containerservice:KubernetesFleetManager
    name: example
    properties:
      location: ${example.location}
      name: example
      resourceGroupName: ${example.name}
  exampleFleetUpdateStrategy:
    type: azure:containerservice:FleetUpdateStrategy
    name: example
    properties:
      name: example
      kubernetesFleetManagerId: ${exampleKubernetesFleetManager.id}
      stages:
        - name: example-stage-1
          groups:
            - name: example-group-1
          afterStageWaitInSeconds: 21
Copy

Create FleetUpdateStrategy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new FleetUpdateStrategy(name: string, args: FleetUpdateStrategyArgs, opts?: CustomResourceOptions);
@overload
def FleetUpdateStrategy(resource_name: str,
                        args: FleetUpdateStrategyArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def FleetUpdateStrategy(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        kubernetes_fleet_manager_id: Optional[str] = None,
                        stages: Optional[Sequence[FleetUpdateStrategyStageArgs]] = None,
                        name: Optional[str] = None)
func NewFleetUpdateStrategy(ctx *Context, name string, args FleetUpdateStrategyArgs, opts ...ResourceOption) (*FleetUpdateStrategy, error)
public FleetUpdateStrategy(string name, FleetUpdateStrategyArgs args, CustomResourceOptions? opts = null)
public FleetUpdateStrategy(String name, FleetUpdateStrategyArgs args)
public FleetUpdateStrategy(String name, FleetUpdateStrategyArgs args, CustomResourceOptions options)
type: azure:containerservice:FleetUpdateStrategy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. FleetUpdateStrategyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. FleetUpdateStrategyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. FleetUpdateStrategyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. FleetUpdateStrategyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. FleetUpdateStrategyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var fleetUpdateStrategyResource = new Azure.ContainerService.FleetUpdateStrategy("fleetUpdateStrategyResource", new()
{
    KubernetesFleetManagerId = "string",
    Stages = new[]
    {
        new Azure.ContainerService.Inputs.FleetUpdateStrategyStageArgs
        {
            Groups = new[]
            {
                new Azure.ContainerService.Inputs.FleetUpdateStrategyStageGroupArgs
                {
                    Name = "string",
                },
            },
            Name = "string",
            AfterStageWaitInSeconds = 0,
        },
    },
    Name = "string",
});
Copy
example, err := containerservice.NewFleetUpdateStrategy(ctx, "fleetUpdateStrategyResource", &containerservice.FleetUpdateStrategyArgs{
	KubernetesFleetManagerId: pulumi.String("string"),
	Stages: containerservice.FleetUpdateStrategyStageArray{
		&containerservice.FleetUpdateStrategyStageArgs{
			Groups: containerservice.FleetUpdateStrategyStageGroupArray{
				&containerservice.FleetUpdateStrategyStageGroupArgs{
					Name: pulumi.String("string"),
				},
			},
			Name:                    pulumi.String("string"),
			AfterStageWaitInSeconds: pulumi.Int(0),
		},
	},
	Name: pulumi.String("string"),
})
Copy
var fleetUpdateStrategyResource = new FleetUpdateStrategy("fleetUpdateStrategyResource", FleetUpdateStrategyArgs.builder()
    .kubernetesFleetManagerId("string")
    .stages(FleetUpdateStrategyStageArgs.builder()
        .groups(FleetUpdateStrategyStageGroupArgs.builder()
            .name("string")
            .build())
        .name("string")
        .afterStageWaitInSeconds(0)
        .build())
    .name("string")
    .build());
Copy
fleet_update_strategy_resource = azure.containerservice.FleetUpdateStrategy("fleetUpdateStrategyResource",
    kubernetes_fleet_manager_id="string",
    stages=[{
        "groups": [{
            "name": "string",
        }],
        "name": "string",
        "after_stage_wait_in_seconds": 0,
    }],
    name="string")
Copy
const fleetUpdateStrategyResource = new azure.containerservice.FleetUpdateStrategy("fleetUpdateStrategyResource", {
    kubernetesFleetManagerId: "string",
    stages: [{
        groups: [{
            name: "string",
        }],
        name: "string",
        afterStageWaitInSeconds: 0,
    }],
    name: "string",
});
Copy
type: azure:containerservice:FleetUpdateStrategy
properties:
    kubernetesFleetManagerId: string
    name: string
    stages:
        - afterStageWaitInSeconds: 0
          groups:
            - name: string
          name: string
Copy

FleetUpdateStrategy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The FleetUpdateStrategy resource accepts the following input properties:

KubernetesFleetManagerId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
Stages This property is required. List<FleetUpdateStrategyStage>
One or more stage blocks as defined below.
Name Changes to this property will trigger replacement. string
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
KubernetesFleetManagerId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
Stages This property is required. []FleetUpdateStrategyStageArgs
One or more stage blocks as defined below.
Name Changes to this property will trigger replacement. string
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
kubernetesFleetManagerId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
stages This property is required. List<FleetUpdateStrategyStage>
One or more stage blocks as defined below.
name Changes to this property will trigger replacement. String
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
kubernetesFleetManagerId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
stages This property is required. FleetUpdateStrategyStage[]
One or more stage blocks as defined below.
name Changes to this property will trigger replacement. string
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
kubernetes_fleet_manager_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
stages This property is required. Sequence[FleetUpdateStrategyStageArgs]
One or more stage blocks as defined below.
name Changes to this property will trigger replacement. str
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
kubernetesFleetManagerId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
stages This property is required. List<Property Map>
One or more stage blocks as defined below.
name Changes to this property will trigger replacement. String
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the FleetUpdateStrategy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing FleetUpdateStrategy Resource

Get an existing FleetUpdateStrategy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: FleetUpdateStrategyState, opts?: CustomResourceOptions): FleetUpdateStrategy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        kubernetes_fleet_manager_id: Optional[str] = None,
        name: Optional[str] = None,
        stages: Optional[Sequence[FleetUpdateStrategyStageArgs]] = None) -> FleetUpdateStrategy
func GetFleetUpdateStrategy(ctx *Context, name string, id IDInput, state *FleetUpdateStrategyState, opts ...ResourceOption) (*FleetUpdateStrategy, error)
public static FleetUpdateStrategy Get(string name, Input<string> id, FleetUpdateStrategyState? state, CustomResourceOptions? opts = null)
public static FleetUpdateStrategy get(String name, Output<String> id, FleetUpdateStrategyState state, CustomResourceOptions options)
resources:  _:    type: azure:containerservice:FleetUpdateStrategy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
KubernetesFleetManagerId Changes to this property will trigger replacement. string
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
Stages List<FleetUpdateStrategyStage>
One or more stage blocks as defined below.
KubernetesFleetManagerId Changes to this property will trigger replacement. string
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
Stages []FleetUpdateStrategyStageArgs
One or more stage blocks as defined below.
kubernetesFleetManagerId Changes to this property will trigger replacement. String
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
stages List<FleetUpdateStrategyStage>
One or more stage blocks as defined below.
kubernetesFleetManagerId Changes to this property will trigger replacement. string
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
name Changes to this property will trigger replacement. string
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
stages FleetUpdateStrategyStage[]
One or more stage blocks as defined below.
kubernetes_fleet_manager_id Changes to this property will trigger replacement. str
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
name Changes to this property will trigger replacement. str
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
stages Sequence[FleetUpdateStrategyStageArgs]
One or more stage blocks as defined below.
kubernetesFleetManagerId Changes to this property will trigger replacement. String
The ID of the Fleet Manager. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Kubernetes Fleet Update Strategy. Changing this forces a new Kubernetes Fleet Update Strategy to be created.
stages List<Property Map>
One or more stage blocks as defined below.

Supporting Types

FleetUpdateStrategyStage
, FleetUpdateStrategyStageArgs

Groups This property is required. List<FleetUpdateStrategyStageGroup>
One or more group blocks as defined below.
Name This property is required. string
The name which should be used for this stage.
AfterStageWaitInSeconds int
Specifies the time in seconds to wait at the end of this stage before starting the next one.
Groups This property is required. []FleetUpdateStrategyStageGroup
One or more group blocks as defined below.
Name This property is required. string
The name which should be used for this stage.
AfterStageWaitInSeconds int
Specifies the time in seconds to wait at the end of this stage before starting the next one.
groups This property is required. List<FleetUpdateStrategyStageGroup>
One or more group blocks as defined below.
name This property is required. String
The name which should be used for this stage.
afterStageWaitInSeconds Integer
Specifies the time in seconds to wait at the end of this stage before starting the next one.
groups This property is required. FleetUpdateStrategyStageGroup[]
One or more group blocks as defined below.
name This property is required. string
The name which should be used for this stage.
afterStageWaitInSeconds number
Specifies the time in seconds to wait at the end of this stage before starting the next one.
groups This property is required. Sequence[FleetUpdateStrategyStageGroup]
One or more group blocks as defined below.
name This property is required. str
The name which should be used for this stage.
after_stage_wait_in_seconds int
Specifies the time in seconds to wait at the end of this stage before starting the next one.
groups This property is required. List<Property Map>
One or more group blocks as defined below.
name This property is required. String
The name which should be used for this stage.
afterStageWaitInSeconds Number
Specifies the time in seconds to wait at the end of this stage before starting the next one.

FleetUpdateStrategyStageGroup
, FleetUpdateStrategyStageGroupArgs

Name This property is required. string
The name which should be used for this group.
Name This property is required. string
The name which should be used for this group.
name This property is required. String
The name which should be used for this group.
name This property is required. string
The name which should be used for this group.
name This property is required. str
The name which should be used for this group.
name This property is required. String
The name which should be used for this group.

Import

Kubernetes Fleet Update Strategies can be imported using the resource id, e.g.

$ pulumi import azure:containerservice/fleetUpdateStrategy:FleetUpdateStrategy example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resourceGroup1/providers/Microsoft.ContainerService/fleets/fleet1/updateStrategies/updateStrategy1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.