Skip to content
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions specification/containerservice/cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ words:
- wmem
overrides:
- filename: >-
**/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/**/*json
**/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/**/*.{json,tsp}
words:
- acnstls
- aksadvancednetworking
- kubeletidentity
- pdbs
- trustedlaunch
- undrainable
- vtpm
- vtpm

Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";
import "./ManagedCluster.tsp";

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

namespace Microsoft.ContainerService;
/**
* Agent Pool.
*/
@parentResource(ManagedCluster)
model AgentPool
is Azure.ResourceManager.ProxyResource<ManagedClusterAgentPoolProfileProperties> {
...ResourceNameParameter<
Resource = AgentPool,
KeyName = "agentPoolName",
SegmentName = "agentPools",
NamePattern = "^[a-z][a-z0-9]{0,11}$"
>;
}

@armResourceOperations(#{ allowStaticRoutes: true })
interface AgentPools {
/**
* Gets the specified managed cluster agent pool.
*/
get is ArmResourceRead<AgentPool>;

/**
* Creates or updates an agent pool in the specified managed cluster.
*/
createOrUpdate is ArmResourceCreateOrReplaceAsync<
AgentPool,
Parameters = {
/**
* The request should only proceed if an entity matches this string.
*/
@header
ifMatch?: string;

/**
* The request should only proceed if no entity matches this string.
*/
@header
ifNoneMatch?: string;
},
LroHeaders = ArmLroLocationHeader<FinalResult = AgentPool> &
Azure.Core.Foundations.RetryAfterHeader
>;

/**
* Deletes an agent pool in the specified managed cluster.
*/
delete is ArmResourceDeleteWithoutOkAsync<
AgentPool,
Parameters = {
/**
* ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget
*/
#suppress "@azure-tools/typespec-azure-core/casing-style" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@query("ignore-pod-disruption-budget")
`ignore-pod-disruption-budget`?: boolean;

/**
* The request should only proceed if an entity matches this string.
*/
@header
ifMatch?: string;
}
>;

/**
* Gets a list of agent pools in the specified managed cluster.
*/
list is ArmResourceListByParent<AgentPool>;

/**
* Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned.
*/
#suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@action("abort")
@summary("Aborts last operation running on agent pool.")
abortLatestOperation is ArmResourceActionAsync<
AgentPool,
void,
NoContentResponse,
LroHeaders = ArmCombinedLroHeaders<FinalResult = void> &
Azure.Core.Foundations.RetryAfterHeader
>;

/**
* Completes the upgrade operation for the specified agent pool.
*/
@added(Versions.v2025_10_02_preview)
@summary("Completes the upgrade of an agent pool.")
completeUpgrade is ArmResourceActionAsyncBase<
AgentPool,
void,
ArmAcceptedLroResponse<LroHeaders = ArmCombinedLroHeaders<FinalResult = void> &
Azure.Core.Foundations.RetryAfterHeader>,
BaseParameters = Azure.ResourceManager.Foundations.DefaultBaseParameters<AgentPool>
>;

/**
* Deletes specific machines in an agent pool.
*/
deleteMachines is ArmResourceActionAsyncBase<
AgentPool,
AgentPoolDeleteMachinesParameter,
ArmAcceptedLroResponse,
BaseParameters = Azure.ResourceManager.Foundations.DefaultBaseParameters<AgentPool>
>;

/**
* Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade
*/
#suppress "@azure-tools/typespec-azure-resource-manager/lro-location-header" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@summary("Upgrades the node image version of an agent pool to the latest.")
upgradeNodeImageVersion is ArmResourceActionAsyncBase<
AgentPool,
void,
{
...AcceptedResponse;
...ArmAsyncOperationHeader<FinalResult = void>;
...Azure.Core.Foundations.RetryAfterHeader;

@body
body: AgentPool;
} | OkResponse,
Foundations.DefaultBaseParameters<AgentPool>
>;

/**
* Get the status of a specific operation in the specified agent pool.
*/
@get
@route("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}")
@added(Versions.v2025_10_02_preview)
getByAgentPool is AgentPoolsOps.ActionSync<
AgentPool,
void,
ArmResponse<Azure.ResourceManager.CommonTypes.OperationStatusResult>,
Parameters = {
/**
* The ID of an ongoing async operation.
*/
@minLength(1)
@path
operationId: string;
}
>;
}

#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator"
interface AgentPoolsOps
extends Azure.ResourceManager.Legacy.RoutedOperations<
{
...ApiVersionParameter,
...SubscriptionIdParameter,
...ResourceGroupParameter,
...ParentKeysOf<AgentPool>,
},
{
/**
* The name of the agent pool.
*/
@path
@pattern("^[a-z][a-z0-9]{0,11}$")
@segment("agentPools")
@maxLength(12)
@minLength(1)
agentPoolName: string,
},
ErrorResponse,
#{ useStaticRoute: true }
> {}

@@maxLength(AgentPool.name, 12);
@@minLength(AgentPool.name, 1);
@@doc(AgentPool.name, "The name of the agent pool.");
@@doc(AgentPool.properties, "Properties of an agent pool.");
@@doc(AgentPools.createOrUpdate::parameters.resource,
"The agent pool to create or update."
);
@@doc(AgentPools.deleteMachines::parameters.body,
"A list of machines from the agent pool to be deleted."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";
import "./AgentPool.tsp";

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

namespace Microsoft.ContainerService;
/**
* The list of available upgrades for an agent pool.
*/
@singleton("default")
@parentResource(AgentPool)
model AgentPoolUpgradeProfile
is Azure.ResourceManager.ProxyResource<
AgentPoolUpgradeProfileProperties,
false
> {
...ResourceNameParameter<
Resource = AgentPoolUpgradeProfile,
KeyName = "upgradeProfile",
SegmentName = "upgradeProfiles",
NamePattern = ""
>;
}

@armResourceOperations
interface AgentPoolUpgradeProfiles {
/**
* Gets the upgrade profile for an agent pool.
*/
getUpgradeProfile is ArmResourceRead<AgentPoolUpgradeProfile>;
}

@@doc(AgentPoolUpgradeProfile.name, "");
@@doc(AgentPoolUpgradeProfile.properties,
"The properties of the agent pool upgrade profile."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";

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

namespace Microsoft.ContainerService;
/**
* Available Guardrails Version
*/
@added(Versions.v2025_10_02_preview)
@parentResource(SubscriptionLocationResource)
model GuardrailsAvailableVersion
is Azure.ResourceManager.ProxyResource<
GuardrailsAvailableVersionsProperties,
false
> {
...ResourceNameParameter<
Resource = GuardrailsAvailableVersion,
KeyName = "version",
SegmentName = "guardrailsVersions",
NamePattern = ""
>;
}

@armResourceOperations
@added(Versions.v2025_10_02_preview)
interface GuardrailsAvailableVersions {
/**
* Contains Guardrails version along with its support info and whether it is a default version.
Comment thread
tadelesh marked this conversation as resolved.
*/
getGuardrailsVersions is ArmResourceRead<
GuardrailsAvailableVersion,
BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters
>;

/**
* Contains list of Guardrails version along with its support info and whether it is a default version.
*/
listGuardrailsVersions is ArmResourceListByParent<
GuardrailsAvailableVersion,
BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters,
Response = ArmResponse<GuardrailsAvailableVersionsList>
>;
}

@@maxLength(GuardrailsAvailableVersion.name, 24);
@@minLength(GuardrailsAvailableVersion.name, 1);
@@doc(GuardrailsAvailableVersion.name, "Safeguards version");
@@doc(GuardrailsAvailableVersion.properties,
"Whether the version is default or not and support info."
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/rest";
import "./models.tsp";
import "./ManagedCluster.tsp";

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

namespace Microsoft.ContainerService;
/**
* The IdentityBinding resource.
*/
@parentResource(ManagedCluster)
@added(Versions.v2025_10_02_preview)
model IdentityBinding
is Azure.ResourceManager.ProxyResource<IdentityBindingProperties> {
...ResourceNameParameter<
Resource = IdentityBinding,
KeyName = "identityBindingName",
SegmentName = "identityBindings",
NamePattern = "^[a-z][a-z0-9]{0,63}$"
>;
...Azure.ResourceManager.EntityTagProperty;
}

@armResourceOperations
@added(Versions.v2025_10_02_preview)
interface IdentityBindings {
/**
* Gets the specified Identity Binding.
*/
get is ArmResourceRead<IdentityBinding>;

/**
* Creates or updates an identity binding in the specified managed cluster.
*/
createOrUpdate is ArmResourceCreateOrReplaceAsync<
IdentityBinding,
LroHeaders = ArmCombinedLroHeaders<FinalResult = IdentityBinding> &
Azure.Core.Foundations.RetryAfterHeader
>;

/**
* Deletes an identity binding in the specified managed cluster.
*/
delete is ArmResourceDeleteWithoutOkAsync<
IdentityBinding,
LroHeaders = ArmCombinedLroHeaders<FinalResult = void> &
Azure.Core.Foundations.RetryAfterHeader
>;

/**
* Gets a list of identity bindings in the specified managed cluster.
*/
listByManagedCluster is ArmResourceListByParent<IdentityBinding>;
}

@@maxLength(IdentityBinding.name, 63);
@@minLength(IdentityBinding.name, 1);
@@doc(IdentityBinding.name, "The name of the identity binding.");
@@doc(IdentityBinding.properties,
"The resource-specific properties for this resource."
);
@@doc(IdentityBindings.createOrUpdate::parameters.resource,
"The identity binding to create or update."
);
Loading
Loading