Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";
import "./CommonModels.tsp";
import "./ManagedCluster.tsp";

using TypeSpec.Rest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";
import "./CommonModels.tsp";
import "./AgentPool.tsp";

using TypeSpec.Rest;
using Azure.ResourceManager;
using TypeSpec.Http;
using Versioning;

namespace Microsoft.ContainerService;

// =============================================================================
// AgentPoolUpgradeProfile resource and operations
// =============================================================================

/**
* The list of available upgrades for an agent pool.
*/
Expand All @@ -27,6 +33,11 @@ model AgentPoolUpgradeProfile
>;
}

@@doc(AgentPoolUpgradeProfile.name, "");
@@doc(AgentPoolUpgradeProfile.properties,
"The properties of the agent pool upgrade profile."
);

@armResourceOperations(#{ omitTags: true })
interface AgentPoolUpgradeProfiles {
/**
Expand All @@ -36,7 +47,89 @@ interface AgentPoolUpgradeProfiles {
getUpgradeProfile is ArmResourceRead<AgentPoolUpgradeProfile>;
}

@@doc(AgentPoolUpgradeProfile.name, "");
@@doc(AgentPoolUpgradeProfile.properties,
"The properties of the agent pool upgrade profile."
);
// =============================================================================
// AgentPoolUpgradeProfile models
// =============================================================================

/**
* The list of available upgrade versions.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
model AgentPoolUpgradeProfileProperties {
/**
* The Kubernetes version (major.minor.patch).
*/
kubernetesVersion: string;

/**
* The operating system type. The default is Linux.
*/
osType: OSType = OSType.Linux;

/**
* List of orchestrator types and versions available for upgrade.
*/
@identifiers(#[])
upgrades?: AgentPoolUpgradeProfilePropertiesUpgradesItem[];

/**
* List of components grouped by kubernetes major.minor version.
*/
@added(Versions.v2025_10_02_preview)
@identifiers(#[])
componentsByReleases?: ComponentsByRelease[];

/**
* List of historical good versions for rollback operations.
*/
@added(Versions.v2025_10_02_preview)
@visibility(Lifecycle.Read)
@identifiers(#[])
recentlyUsedVersions?: AgentPoolRecentlyUsedVersion[];

/**
* The latest AKS supported node image version.
*/
latestNodeImageVersion?: string;
}

/** Available upgrades for an AgentPool. */
model AgentPoolUpgradeProfilePropertiesUpgradesItem {
/**
* The Kubernetes version (major.minor.patch).
*/
kubernetesVersion?: string;

/**
* Whether the Kubernetes version is currently in preview.
*/
isPreview?: boolean;

/**
* Whether the Kubernetes version is out of support.
*/
@added(Versions.v2025_10_02_preview)
isOutOfSupport?: boolean;
}

/**
* A historical version that can be used for rollback operations.
*/
@added(Versions.v2025_10_02_preview)
model AgentPoolRecentlyUsedVersion {
/**
* The Kubernetes version (major.minor.patch) available for rollback.
*/
orchestratorVersion?: string;

/**
* The node image version available for rollback.
*/
nodeImageVersion?: string;

/**
* The timestamp when this version was last used.
*/
// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario.
timestamp?: utcDateTime;
}
Loading