Share via


Auto Upgrade Profiles - Create Or Update

Create a AutoUpgradeProfile

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/fleets/{fleetName}/autoUpgradeProfiles/{autoUpgradeProfileName}?api-version=2025-03-01

URI Parameters

Name In Required Type Description
autoUpgradeProfileName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$

The name of the AutoUpgradeProfile resource.

fleetName
path True

string

minLength: 1
maxLength: 63
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$

The name of the Fleet resource.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string (uuid)

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Header

Name Required Type Description
If-Match

string

The request should only proceed if an entity matches this string.

If-None-Match

string

The request should only proceed if no entity matches this string.

Request Body

Name Required Type Description
properties.channel True

UpgradeChannel

Configures how auto-upgrade will be run.

properties.autoUpgradeProfileStatus

AutoUpgradeProfileStatus

The status of the auto upgrade profile.

properties.disabled

boolean

If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule. If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters. This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile. By default, this is set to False.

properties.nodeImageSelection

AutoUpgradeNodeImageSelection

The node image upgrade to be applied to the target clusters in auto upgrade.

properties.updateStrategyId

string (arm-id)

The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet.

Responses

Name Type Description
200 OK

AutoUpgradeProfile

Resource 'AutoUpgradeProfile' update operation succeeded

201 Created

AutoUpgradeProfile

Resource 'AutoUpgradeProfile' create operation succeeded

Headers

  • Azure-AsyncOperation: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Create an AutoUpgradeProfile.
Create an AutoUpgradeProfile. - generated by [MaximumSet] rule

Create an AutoUpgradeProfile.

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/fleet1/autoUpgradeProfiles/autoupgradeprofile1?api-version=2025-03-01

{
  "properties": {
    "channel": "Stable"
  }
}

Sample response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/autoUpgradeProfiles/autoupgradeprofile1",
  "name": "autoupgradeprofile1",
  "type": "Microsoft.ContainerService/fleets/autoUpgradeProfiles",
  "systemData": {
    "createdBy": "@contoso.com",
    "createdByType": "User",
    "createdAt": "2023-03-01T01:10:08.395Z",
    "lastModifiedBy": "@contoso.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2023-03-01T01:10:08.395Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "channel": "Stable"
  },
  "eTag": "\"EtagValue\""
}
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/autoUpgradeProfiles/autoupgradeprofile1",
  "name": "autoupgradeprofile1",
  "type": "Microsoft.ContainerService/fleets/autoUpgradeProfiles",
  "systemData": {
    "createdBy": "@contoso.com",
    "createdByType": "User",
    "createdAt": "2023-03-01T01:10:08.395Z",
    "lastModifiedBy": "@contoso.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2023-03-01T01:10:08.395Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "channel": "Stable"
  },
  "eTag": "\"EtagValue\""
}

Create an AutoUpgradeProfile. - generated by [MaximumSet] rule

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgfleets/providers/Microsoft.ContainerService/fleets/fleet1/autoUpgradeProfiles/autoupgradeprofile1?api-version=2025-03-01



{
  "properties": {
    "channel": "Stable",
    "updateStrategyId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgfleets/providers/Microsoft.ContainerService/fleets/fleet1/updateStrategies/strategy1",
    "nodeImageSelection": {
      "type": "Latest"
    },
    "disabled": true,
    "autoUpgradeProfileStatus": {
      "lastTriggerError": {}
    }
  }
}

Sample response

{
  "properties": {
    "channel": "Stable",
    "provisioningState": "Succeeded",
    "updateStrategyId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgfleets/providers/Microsoft.ContainerService/fleets/fleet1/updateStrategies/strategy1",
    "nodeImageSelection": {
      "type": "Latest"
    },
    "disabled": true,
    "autoUpgradeProfileStatus": {
      "lastTriggeredAt": "2025-02-27T02:49:14.736Z",
      "lastTriggerStatus": "Succeeded",
      "lastTriggerError": {
        "code": "mohtaimtrqkhivtsopwiuveg",
        "message": "t",
        "target": "axgswjixhofej",
        "details": [],
        "additionalInfo": [
          {
            "type": "oorrhg",
            "info": {}
          }
        ]
      },
      "lastTriggerUpgradeVersions": [
        "twqzpwqov"
      ]
    }
  },
  "eTag": "\"EtagValue\"",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/autoUpgradeProfiles/autoupgradeprofile1",
  "name": "autoupgradeprofile1",
  "type": "Microsoft.ContainerService/fleets/autoUpgradeProfiles",
  "systemData": {
    "createdBy": "someUser",
    "createdByType": "User",
    "createdAt": "2022-03-23T05:40:40.657Z",
    "lastModifiedBy": "someOtherUser",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2022-03-23T05:40:40.657Z"
  }
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
  "properties": {
    "channel": "Stable",
    "provisioningState": "Succeeded",
    "updateStrategyId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgfleets/providers/Microsoft.ContainerService/fleets/fleet1/updateStrategies/strategy1",
    "nodeImageSelection": {
      "type": "Latest"
    },
    "disabled": true,
    "autoUpgradeProfileStatus": {
      "lastTriggeredAt": "2025-02-27T02:49:14.736Z",
      "lastTriggerStatus": "Succeeded",
      "lastTriggerError": {
        "code": "mohtaimtrqkhivtsopwiuveg",
        "message": "t",
        "target": "axgswjixhofej",
        "details": [],
        "additionalInfo": [
          {
            "type": "oorrhg",
            "info": {}
          }
        ]
      },
      "lastTriggerUpgradeVersions": [
        "twqzpwqov"
      ]
    }
  },
  "eTag": "\"EtagValue\"",
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/fleets/myFleet/autoUpgradeProfiles/autoupgradeprofile1",
  "name": "autoupgradeprofile1",
  "type": "Microsoft.ContainerService/fleets/autoUpgradeProfiles",
  "systemData": {
    "createdBy": "someUser",
    "createdByType": "User",
    "createdAt": "2022-03-23T05:40:40.657Z",
    "lastModifiedBy": "someOtherUser",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2022-03-23T05:40:40.657Z"
  }
}

Definitions

Name Description
AutoUpgradeLastTriggerStatus

AutoUpgradeLastTriggerStatus is the status of the last AutoUpgrade trigger (attempt to automatically create and start UpdateRun when there are new released versions) of an auto upgrade profile.

AutoUpgradeNodeImageSelection

The node image upgrade to be applied to the target clusters in auto upgrade.

AutoUpgradeNodeImageSelectionType

The node image upgrade type.

AutoUpgradeProfile

The AutoUpgradeProfile resource.

AutoUpgradeProfileProvisioningState

The provisioning state of the AutoUpgradeProfile resource.

AutoUpgradeProfileStatus

AutoUpgradeProfileStatus is the status of an auto upgrade profile.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

systemData

Metadata pertaining to creation and last modification of the resource.

UpgradeChannel

Configuration of how auto upgrade will be run.

AutoUpgradeLastTriggerStatus

AutoUpgradeLastTriggerStatus is the status of the last AutoUpgrade trigger (attempt to automatically create and start UpdateRun when there are new released versions) of an auto upgrade profile.

Value Description
Succeeded

The last AutoUpgrade trigger was succeeded.

Failed

The last AutoUpgrade trigger failed.

AutoUpgradeNodeImageSelection

The node image upgrade to be applied to the target clusters in auto upgrade.

Name Type Description
type

AutoUpgradeNodeImageSelectionType

The node image upgrade type.

AutoUpgradeNodeImageSelectionType

The node image upgrade type.

Value Description
Latest

Use the latest image version when upgrading nodes. Clusters may use different image versions (e.g., 'AKSUbuntu-1804gen2containerd-2021.10.12' and 'AKSUbuntu-1804gen2containerd-2021.10.19') because, for example, the latest available version is different in different regions.

Consistent

The image versions to upgrade nodes to are selected as described below: for each node pool in managed clusters affected by the update run, the system selects the latest image version such that it is available across all other node pools (in all other clusters) of the same image type. As a result, all node pools of the same image type will be upgraded to the same image version. For example, if the latest image version for image type 'AKSUbuntu-1804gen2containerd' is 'AKSUbuntu-1804gen2containerd-2021.10.12' for a node pool in cluster A in region X, and is 'AKSUbuntu-1804gen2containerd-2021.10.17' for a node pool in cluster B in region Y, the system will upgrade both node pools to image version 'AKSUbuntu-1804gen2containerd-2021.10.12'.

AutoUpgradeProfile

The AutoUpgradeProfile resource.

Name Type Description
eTag

string

If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.

id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.autoUpgradeProfileStatus

AutoUpgradeProfileStatus

The status of the auto upgrade profile.

properties.channel

UpgradeChannel

Configures how auto-upgrade will be run.

properties.disabled

boolean

If set to False: the auto upgrade has effect - target managed clusters will be upgraded on schedule. If set to True: the auto upgrade has no effect - no upgrade will be run on the target managed clusters. This is a boolean and not an enum because enabled/disabled are all available states of the auto upgrade profile. By default, this is set to False.

properties.nodeImageSelection

AutoUpgradeNodeImageSelection

The node image upgrade to be applied to the target clusters in auto upgrade.

properties.provisioningState

AutoUpgradeProfileProvisioningState

The provisioning state of the AutoUpgradeProfile resource.

properties.updateStrategyId

string (arm-id)

The resource id of the UpdateStrategy resource to reference. If not specified, the auto upgrade will run on all clusters which are members of the fleet.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

AutoUpgradeProfileProvisioningState

The provisioning state of the AutoUpgradeProfile resource.

Value Description
Succeeded

Resource has been created.

Failed

Resource creation failed.

Canceled

Resource creation was canceled.

AutoUpgradeProfileStatus

AutoUpgradeProfileStatus is the status of an auto upgrade profile.

Name Type Description
lastTriggerError

ErrorDetail

The error details of the last trigger.

lastTriggerStatus

AutoUpgradeLastTriggerStatus

The status of the last AutoUpgrade trigger.

lastTriggerUpgradeVersions

string[]

The target Kubernetes version or node image versions of the last trigger.

lastTriggeredAt

string (date-time)

The UTC time of the last attempt to automatically create and start an UpdateRun as triggered by the release of new versions.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

UpgradeChannel

Configuration of how auto upgrade will be run.

Value Description
Stable

Upgrades the clusters kubernetes version to the latest supported patch release on minor version N-1, where N is the latest supported minor version. For example, if a cluster runs version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, the cluster upgrades to 1.18.6.

Rapid

Upgrades the clusters kubernetes version to the latest supported patch release on the latest supported minor version.

NodeImage

Upgrade node image version of the clusters.