ZiWei Chen 2024-07-25 18:49:16 +08:00 коммит произвёл GitHub
Родитель df7179214d
Коммит fe18ae3cb5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
269 изменённых файлов: 1957 добавлений и 13080 удалений

Просмотреть файл

@ -1,5 +1,20 @@
# Release History
## 21.0.0 (2024-07-24)
### Features Added
- Interface ManagedClusterPropertiesAutoScalerProfile has a new optional parameter daemonsetEvictionForEmptyNodes
- Interface ManagedClusterPropertiesAutoScalerProfile has a new optional parameter daemonsetEvictionForOccupiedNodes
- Interface ManagedClusterPropertiesAutoScalerProfile has a new optional parameter ignoreDaemonsetsUtilization
- Enum KnownNetworkPolicy has a new value None
- Enum KnownNodeOSUpgradeChannel has a new value SecurityPatch
### Breaking Changes
- Removed operation ManagedClusters.getOSOptions
## 20.1.0-beta.1 (2024-07-12)
Compared with version 20.0.0

Просмотреть файл

@ -6,7 +6,7 @@ The Container Service Client.
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/containerservice/arm-containerservice) |
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-containerservice) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview) |
[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-containerservice) |
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
## Getting started

Просмотреть файл

@ -1,5 +1,5 @@
{
"commit": "c35779f9b45b287e2763e803e9692dbb5627f671",
"commit": "aa23ddc02b2b1c5a34c56a49d83b77c0a1aaa614",
"readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md",
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\Microsoft.ContainerService\\aks\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",

Просмотреть файл

@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/containerservice/arm-containerservice",
"Tag": "js/containerservice/arm-containerservice_5e83559e86"
"Tag": "js/containerservice/arm-containerservice_1008631c71"
}

Просмотреть файл

@ -3,7 +3,7 @@
"sdk-type": "mgmt",
"author": "Microsoft Corporation",
"description": "A generated SDK for ContainerServiceClient.",
"version": "20.1.0-beta.1",
"version": "21.0.0",
"engines": {
"node": ">=18.0.0"
},

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -15,10 +15,10 @@ import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to 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, an error is returned.
* This sample demonstrates how to 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.
*
* @summary 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, an error is returned.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAbortOperation.json
* @summary 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.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsAbortOperation.json
*/
async function abortOperationOnAgentPool() {
const subscriptionId =

Просмотреть файл

@ -18,9 +18,45 @@ dotenv.config();
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsAssociate_CRG.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_Snapshot.json
*/
async function associateAgentPoolWithCapacityReservationGroup() {
async function createAgentPoolUsingAnAgentPoolSnapshot() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const parameters: AgentPool = {
count: 3,
creationData: {
sourceResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1",
},
enableFips: true,
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
agentPoolName,
parameters,
);
console.log(result);
}
/**
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_CRG.json
*/
async function createAgentPoolWithCapacityReservationGroup() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
@ -51,75 +87,7 @@ async function associateAgentPoolWithCapacityReservationGroup() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Snapshot.json
*/
async function createAgentPoolUsingAnAgentPoolSnapshot() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const parameters: AgentPool = {
count: 3,
creationData: {
sourceResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1",
},
enableFips: true,
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
agentPoolName,
parameters,
);
console.log(result);
}
/**
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableCustomCATrust.json
*/
async function createAgentPoolWithCustomCaTrustEnabled() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const parameters: AgentPool = {
count: 3,
enableCustomCATrust: true,
orchestratorVersion: "",
osType: "Linux",
vmSize: "Standard_DS2_v2",
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
agentPoolName,
parameters,
);
console.log(result);
}
/**
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_DedicatedHostGroup.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_DedicatedHostGroup.json
*/
async function createAgentPoolWithDedicatedHostGroup() {
const subscriptionId =
@ -152,7 +120,7 @@ async function createAgentPoolWithDedicatedHostGroup() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableEncryptionAtHost.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json
*/
async function createAgentPoolWithEncryptionAtHostEnabled() {
const subscriptionId =
@ -184,7 +152,7 @@ async function createAgentPoolWithEncryptionAtHostEnabled() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Ephemeral.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_Ephemeral.json
*/
async function createAgentPoolWithEphemeralOSDisk() {
const subscriptionId =
@ -217,7 +185,7 @@ async function createAgentPoolWithEphemeralOSDisk() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableFIPS.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_EnableFIPS.json
*/
async function createAgentPoolWithFipsEnabledOS() {
const subscriptionId =
@ -249,7 +217,7 @@ async function createAgentPoolWithFipsEnabledOS() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_GPUMIG.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_GPUMIG.json
*/
async function createAgentPoolWithGpumig() {
const subscriptionId =
@ -302,7 +270,7 @@ async function createAgentPoolWithGpumig() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_WasmWasi.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_WasmWasi.json
*/
async function createAgentPoolWithKrustletAndTheWasiRuntime() {
const subscriptionId =
@ -336,7 +304,7 @@ async function createAgentPoolWithKrustletAndTheWasiRuntime() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_CustomNodeConfig.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_CustomNodeConfig.json
*/
async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() {
const subscriptionId =
@ -388,41 +356,7 @@ async function createAgentPoolWithKubeletConfigAndLinuxOSConfig() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_MessageOfTheDay.json
*/
async function createAgentPoolWithMessageOfTheDay() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const parameters: AgentPool = {
count: 3,
messageOfTheDay: "Zm9vCg==",
mode: "User",
orchestratorVersion: "",
osDiskSizeGB: 64,
osType: "Linux",
vmSize: "Standard_DS2_v2",
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
agentPoolName,
parameters,
);
console.log(result);
}
/**
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_OSSKU.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_OSSKU.json
*/
async function createAgentPoolWithOssku() {
const subscriptionId =
@ -475,7 +409,7 @@ async function createAgentPoolWithOssku() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_PPG.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_PPG.json
*/
async function createAgentPoolWithPpg() {
const subscriptionId =
@ -508,7 +442,7 @@ async function createAgentPoolWithPpg() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_EnableUltraSSD.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_EnableUltraSSD.json
*/
async function createAgentPoolWithUltraSsdEnabled() {
const subscriptionId =
@ -540,89 +474,7 @@ async function createAgentPoolWithUltraSsdEnabled() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines.json
*/
async function createAgentPoolWithVirtualMachinesPoolType() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const parameters: AgentPool = {
typePropertiesType: "VirtualMachines",
nodeLabels: { key1: "val1" },
nodeTaints: ["Key1=Value1:NoSchedule"],
orchestratorVersion: "1.9.6",
osType: "Linux",
tags: { name1: "val1" },
virtualMachinesProfile: {
scale: {
manual: [{ count: 5, sizes: ["Standard_D2_v2", "Standard_D2_v3"] }],
},
},
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
agentPoolName,
parameters,
);
console.log(result);
}
/**
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_TypeVirtualMachines_Autoscale.json
*/
async function createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const parameters: AgentPool = {
typePropertiesType: "VirtualMachines",
nodeLabels: { key1: "val1" },
nodeTaints: ["Key1=Value1:NoSchedule"],
orchestratorVersion: "1.29.0",
osType: "Linux",
tags: { name1: "val1" },
virtualMachinesProfile: {
scale: {
autoscale: [
{
maxCount: 5,
minCount: 1,
sizes: ["Standard_D2_v2", "Standard_D2_v3"],
},
],
},
},
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginCreateOrUpdateAndWait(
resourceGroupName,
resourceName,
agentPoolName,
parameters,
);
console.log(result);
}
/**
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_WindowsOSSKU.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_WindowsOSSKU.json
*/
async function createAgentPoolWithWindowsOssku() {
const subscriptionId =
@ -654,7 +506,7 @@ async function createAgentPoolWithWindowsOssku() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Spot.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_Spot.json
*/
async function createSpotAgentPool() {
const subscriptionId =
@ -690,7 +542,7 @@ async function createSpotAgentPool() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_WindowsDisableOutboundNAT.json
*/
async function createWindowsAgentPoolWithDisablingOutboundNat() {
const subscriptionId =
@ -723,7 +575,7 @@ async function createWindowsAgentPoolWithDisablingOutboundNat() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsCreate_Update.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsCreate_Update.json
*/
async function createOrUpdateAgentPool() {
const subscriptionId =
@ -760,7 +612,7 @@ async function createOrUpdateAgentPool() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPools_Start.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPools_Start.json
*/
async function startAgentPool() {
const subscriptionId =
@ -786,7 +638,7 @@ async function startAgentPool() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPools_Stop.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPools_Stop.json
*/
async function stopAgentPool() {
const subscriptionId =
@ -812,7 +664,7 @@ async function stopAgentPool() {
* This sample demonstrates how to Creates or updates an agent pool in the specified managed cluster.
*
* @summary Creates or updates an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPools_Update.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPools_Update.json
*/
async function updateAgentPool() {
const subscriptionId =
@ -846,9 +698,8 @@ async function updateAgentPool() {
}
async function main() {
associateAgentPoolWithCapacityReservationGroup();
createAgentPoolUsingAnAgentPoolSnapshot();
createAgentPoolWithCustomCaTrustEnabled();
createAgentPoolWithCapacityReservationGroup();
createAgentPoolWithDedicatedHostGroup();
createAgentPoolWithEncryptionAtHostEnabled();
createAgentPoolWithEphemeralOSDisk();
@ -856,12 +707,9 @@ async function main() {
createAgentPoolWithGpumig();
createAgentPoolWithKrustletAndTheWasiRuntime();
createAgentPoolWithKubeletConfigAndLinuxOSConfig();
createAgentPoolWithMessageOfTheDay();
createAgentPoolWithOssku();
createAgentPoolWithPpg();
createAgentPoolWithUltraSsdEnabled();
createAgentPoolWithVirtualMachinesPoolType();
createAgentPoolWithVirtualMachinesPoolTypeWithAutoscalingEnabled();
createAgentPoolWithWindowsOssku();
createSpotAgentPool();
createWindowsAgentPoolWithDisablingOutboundNat();

Просмотреть файл

@ -1,55 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
AgentPoolDeleteMachinesParameter,
ContainerServiceClient,
} from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Deletes specific machines in an agent pool.
*
* @summary Deletes specific machines in an agent pool.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDeleteMachines.json
*/
async function deleteSpecificMachinesInAnAgentPool() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const machines: AgentPoolDeleteMachinesParameter = {
machineNames: [
"aks-nodepool1-42263519-vmss00000a",
"aks-nodepool1-42263519-vmss00000b",
],
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginDeleteMachinesAndWait(
resourceGroupName,
resourceName,
agentPoolName,
machines,
);
console.log(result);
}
async function main() {
deleteSpecificMachinesInAnAgentPool();
}
main().catch(console.error);

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Deletes an agent pool in the specified managed cluster.
*
* @summary Deletes an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsDelete.json
*/
async function deleteAgentPool() {
const subscriptionId =
@ -38,33 +38,8 @@ async function deleteAgentPool() {
console.log(result);
}
/**
* This sample demonstrates how to Deletes an agent pool in the specified managed cluster.
*
* @summary Deletes an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json
*/
async function deleteAgentPoolByIgnoringPodDisruptionBudget() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginDeleteAndWait(
resourceGroupName,
resourceName,
agentPoolName,
);
console.log(result);
}
async function main() {
deleteAgentPool();
deleteAgentPoolByIgnoringPodDisruptionBudget();
}
main().catch(console.error);

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle.
*
* @summary See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetAgentPoolAvailableVersions.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json
*/
async function getAvailableVersionsForAgentPool() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets the specified managed cluster agent pool.
*
* @summary Gets the specified managed cluster agent pool.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGet.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsGet.json
*/
async function getAgentPool() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets the upgrade profile for an agent pool.
*
* @summary Gets the upgrade profile for an agent pool.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsGetUpgradeProfile.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsGetUpgradeProfile.json
*/
async function getUpgradeProfileForAgentPool() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets a list of agent pools in the specified managed cluster.
*
* @summary Gets a list of agent pools in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsList.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsList.json
*/
async function listAgentPoolsByManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to 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
*
* @summary 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
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsUpgradeNodeImageVersion.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/AgentPoolsUpgradeNodeImageVersion.json
*/
async function upgradeAgentPoolNodeImageVersion() {
const subscriptionId =

Просмотреть файл

@ -1,45 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Creates or updates a load balancer in the specified managed cluster.
*
* @summary Creates or updates a load balancer in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Create_Or_Update.json
*/
async function createOrUpdateALoadBalancer() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const loadBalancerName = "kubernetes";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.loadBalancers.createOrUpdate(
resourceGroupName,
resourceName,
loadBalancerName,
);
console.log(result);
}
async function main() {
createOrUpdateALoadBalancer();
}
main().catch(console.error);

Просмотреть файл

@ -1,45 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Deletes a load balancer in the specified managed cluster.
*
* @summary Deletes a load balancer in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Delete.json
*/
async function deleteALoadBalancer() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const loadBalancerName = "kubernetes";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.loadBalancers.beginDeleteAndWait(
resourceGroupName,
resourceName,
loadBalancerName,
);
console.log(result);
}
async function main() {
deleteALoadBalancer();
}
main().catch(console.error);

Просмотреть файл

@ -1,45 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets the specified load balancer.
*
* @summary Gets the specified load balancer.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Get.json
*/
async function getLoadBalancer() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const loadBalancerName = "kubernetes";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.loadBalancers.get(
resourceGroupName,
resourceName,
loadBalancerName,
);
console.log(result);
}
async function main() {
getLoadBalancer();
}
main().catch(console.error);

Просмотреть файл

@ -1,46 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets a list of load balancers in the specified managed cluster.
*
* @summary Gets a list of load balancers in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_List.json
*/
async function listLoadBalancersByManagedCluster() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.loadBalancers.listByManagedCluster(
resourceGroupName,
resourceName,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listLoadBalancersByManagedCluster();
}
main().catch(console.error);

Просмотреть файл

@ -1,47 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get a specific machine in the specified agent pool.
*
* @summary Get a specific machine in the specified agent pool.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineGet.json
*/
async function getAMachineInAnAgentPoolsByManagedCluster() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const machineName = "aks-nodepool1-42263519-vmss00000t";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.machines.get(
resourceGroupName,
resourceName,
agentPoolName,
machineName,
);
console.log(result);
}
async function main() {
getAMachineInAnAgentPoolsByManagedCluster();
}
main().catch(console.error);

Просмотреть файл

@ -1,48 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets a list of machines in the specified agent pool.
*
* @summary Gets a list of machines in the specified agent pool.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineList.json
*/
async function listMachinesInAnAgentpoolByManagedCluster() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.machines.list(
resourceGroupName,
resourceName,
agentPoolName,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listMachinesInAnAgentpoolByManagedCluster();
}
main().catch(console.error);

Просмотреть файл

@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster.
*
* @summary Creates or updates a maintenance configuration in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsCreate_Update.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/MaintenanceConfigurationsCreate_Update.json
*/
async function createOrUpdateMaintenanceConfiguration() {
const subscriptionId =
@ -55,7 +55,7 @@ async function createOrUpdateMaintenanceConfiguration() {
* This sample demonstrates how to Creates or updates a maintenance configuration in the specified managed cluster.
*
* @summary Creates or updates a maintenance configuration in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json
*/
async function createOrUpdateMaintenanceConfigurationWithMaintenanceWindow() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Deletes a maintenance configuration.
*
* @summary Deletes a maintenance configuration.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsDelete.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/MaintenanceConfigurationsDelete.json
*/
async function deleteMaintenanceConfiguration() {
const subscriptionId =
@ -42,7 +42,7 @@ async function deleteMaintenanceConfiguration() {
* This sample demonstrates how to Deletes a maintenance configuration.
*
* @summary Deletes a maintenance configuration.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json
*/
async function deleteMaintenanceConfigurationForNodeOSUpgrade() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster.
*
* @summary Gets the specified maintenance configuration of a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsGet.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/MaintenanceConfigurationsGet.json
*/
async function getMaintenanceConfiguration() {
const subscriptionId =
@ -42,7 +42,7 @@ async function getMaintenanceConfiguration() {
* This sample demonstrates how to Gets the specified maintenance configuration of a managed cluster.
*
* @summary Gets the specified maintenance configuration of a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json
*/
async function getMaintenanceConfigurationConfiguredWithMaintenanceWindow() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster.
*
* @summary Gets a list of maintenance configurations in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsList.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/MaintenanceConfigurationsList.json
*/
async function listMaintenanceConfigurationsByManagedCluster() {
const subscriptionId =
@ -43,7 +43,7 @@ async function listMaintenanceConfigurationsByManagedCluster() {
* This sample demonstrates how to Gets a list of maintenance configurations in the specified managed cluster.
*
* @summary Gets a list of maintenance configurations in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MaintenanceConfigurationsList_MaintenanceWindow.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json
*/
async function listMaintenanceConfigurationsConfiguredWithMaintenanceWindowByManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -1,55 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
ManagedClusterSnapshot,
ContainerServiceClient,
} from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Creates or updates a managed cluster snapshot.
*
* @summary Creates or updates a managed cluster snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsCreate.json
*/
async function createOrUpdateManagedClusterSnapshot() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "snapshot1";
const parameters: ManagedClusterSnapshot = {
creationData: {
sourceResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1",
},
location: "westus",
tags: { key1: "val1", key2: "val2" },
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusterSnapshots.createOrUpdate(
resourceGroupName,
resourceName,
parameters,
);
console.log(result);
}
async function main() {
createOrUpdateManagedClusterSnapshot();
}
main().catch(console.error);

Просмотреть файл

@ -1,43 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Deletes a managed cluster snapshot.
*
* @summary Deletes a managed cluster snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsDelete.json
*/
async function deleteManagedClusterSnapshot() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "snapshot1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusterSnapshots.delete(
resourceGroupName,
resourceName,
);
console.log(result);
}
async function main() {
deleteManagedClusterSnapshot();
}
main().catch(console.error);

Просмотреть файл

@ -1,43 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets a managed cluster snapshot.
*
* @summary Gets a managed cluster snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsGet.json
*/
async function getManagedClusterSnapshot() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "snapshot1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusterSnapshots.get(
resourceGroupName,
resourceName,
);
console.log(result);
}
async function main() {
getManagedClusterSnapshot();
}
main().catch(console.error);

Просмотреть файл

@ -1,44 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Lists managed cluster snapshots in the specified subscription and resource group.
*
* @summary Lists managed cluster snapshots in the specified subscription and resource group.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json
*/
async function listManagedClusterSnapshotsByResourceGroup() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.managedClusterSnapshots.listByResourceGroup(
resourceGroupName,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listManagedClusterSnapshotsByResourceGroup();
}
main().catch(console.error);

Просмотреть файл

@ -1,40 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets a list of managed cluster snapshots in the specified subscription.
*
* @summary Gets a list of managed cluster snapshots in the specified subscription.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsList.json
*/
async function listManagedClusterSnapshots() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.managedClusterSnapshots.list()) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listManagedClusterSnapshots();
}
main().catch(console.error);

Просмотреть файл

@ -1,48 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
TagsObject,
ContainerServiceClient,
} from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Updates tags on a managed cluster snapshot.
*
* @summary Updates tags on a managed cluster snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json
*/
async function updateManagedClusterSnapshotTags() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "snapshot1";
const parameters: TagsObject = { tags: { key2: "new-val2", key3: "val3" } };
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusterSnapshots.updateTags(
resourceGroupName,
resourceName,
parameters,
);
console.log(result);
}
async function main() {
updateManagedClusterSnapshotTags();
}
main().catch(console.error);

Просмотреть файл

@ -15,10 +15,10 @@ import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster 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, an error is returned.
* This sample demonstrates how to Aborts the currently running operation on the managed cluster. The Managed Cluster 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.
*
* @summary Aborts the currently running operation on the managed cluster. The Managed Cluster 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, an error is returned.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersAbortOperation.json
* @summary Aborts the currently running operation on the managed cluster. The Managed Cluster 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.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersAbortOperation.json
*/
async function abortOperationOnManagedCluster() {
const subscriptionId =

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Deletes a managed cluster.
*
* @summary Deletes a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersDelete.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersDelete.json
*/
async function deleteManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) .
*
* @summary **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) .
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetAccessProfile.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersGetAccessProfile.json
*/
async function getManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster.
*
* @summary Gets the results of a command which has been run on the Managed Cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandResultFailed.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/RunCommandResultFailed.json
*/
async function commandFailedResult() {
const subscriptionId =
@ -42,7 +42,7 @@ async function commandFailedResult() {
* This sample demonstrates how to Gets the results of a command which has been run on the Managed Cluster.
*
* @summary Gets the results of a command which has been run on the Managed Cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandResultSucceed.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/RunCommandResultSucceed.json
*/
async function commandSucceedResult() {
const subscriptionId =

Просмотреть файл

@ -1,42 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Contains Guardrails version along with its support info and whether it is a default version.
*
* @summary Contains Guardrails version along with its support info and whether it is a default version.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetGuardrailsVersions.json
*/
async function getGuardrailsAvailableVersions() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "location1";
const version = "v1.0.0";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusters.getGuardrailsVersions(
location,
version,
);
console.log(result);
}
async function main() {
getGuardrailsAvailableVersions();
}
main().catch(console.error);

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades
*
* @summary Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshRevisionProfile.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersGet_MeshRevisionProfile.json
*/
async function getAMeshRevisionProfileForAMeshMode() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets available upgrades for a service mesh in a cluster.
*
* @summary Gets available upgrades for a service mesh in a cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet_MeshUpgradeProfile.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersGet_MeshUpgradeProfile.json
*/
async function getsVersionCompatibilityAndUpgradeProfileForAServiceMeshInACluster() {
const subscriptionId =

Просмотреть файл

@ -1,38 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets supported OS options in the specified subscription.
*
* @summary Gets supported OS options in the specified subscription.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ContainerServiceGetOSOptions.json
*/
async function getContainerServiceOSOptions() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "location1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusters.getOSOptions(location);
console.log(result);
}
async function main() {
getContainerServiceOSOptions();
}
main().catch(console.error);

Просмотреть файл

@ -1,42 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Contains Safeguards version along with its support info and whether it is a default version.
*
* @summary Contains Safeguards version along with its support info and whether it is a default version.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetSafeguardsVersions.json
*/
async function getSafeguardsAvailableVersions() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "location1";
const version = "v1.0.0";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusters.getSafeguardsVersions(
location,
version,
);
console.log(result);
}
async function main() {
getSafeguardsAvailableVersions();
}
main().catch(console.error);

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets a managed cluster.
*
* @summary Gets a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGet.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersGet.json
*/
async function getManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets the upgrade profile of a managed cluster.
*
* @summary Gets the upgrade profile of a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersGetUpgradeProfile.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersGetUpgradeProfile.json
*/
async function getUpgradeProfileForManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists managed clusters in the specified subscription and resource group.
*
* @summary Lists managed clusters in the specified subscription and resource group.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListByResourceGroup.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersListByResourceGroup.json
*/
async function getManagedClustersByResourceGroup() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists the admin credentials of a managed cluster.
*
* @summary Lists the admin credentials of a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersListClusterAdminCredentials.json
*/
async function getManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists the cluster monitoring user credentials of a managed cluster.
*
* @summary Lists the cluster monitoring user credentials of a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json
*/
async function getManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists the user credentials of a managed cluster.
*
* @summary Lists the user credentials of a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersListClusterCredentialResult.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersListClusterUserCredentials.json
*/
async function getManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -1,43 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Contains list of Guardrails version along with its support info and whether it is a default version.
*
* @summary Contains list of Guardrails version along with its support info and whether it is a default version.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListGuardrailsVersions.json
*/
async function listGuardrailsVersions() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "location1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.managedClusters.listGuardrailsVersions(
location,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listGuardrailsVersions();
}
main().catch(console.error);

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version
*
* @summary Contains extra metadata on the version, including supported patch versions, capabilities, available upgrades, and details on preview status of the version
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/KubernetesVersions_List.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/KubernetesVersions_List.json
*/
async function listKubernetesVersions() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades
*
* @summary Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshRevisionProfiles.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersList_MeshRevisionProfiles.json
*/
async function listMeshRevisionProfilesInALocation() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists available upgrades for all service meshes in a specific cluster.
*
* @summary Lists available upgrades for all service meshes in a specific cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList_MeshUpgradeProfiles.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersList_MeshUpgradeProfiles.json
*/
async function listsVersionCompatibilityAndUpgradeProfileForAllServiceMeshesInACluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint.
*
* @summary Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OutboundNetworkDependenciesEndpointsList.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/OutboundNetworkDependenciesEndpointsList.json
*/
async function listOutboundNetworkDependenciesEndpointsByManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -1,43 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Contains list of Safeguards version along with its support info and whether it is a default version.
*
* @summary Contains list of Safeguards version along with its support info and whether it is a default version.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ListSafeguardsVersions.json
*/
async function listSafeguardsVersions() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const location = "location1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.managedClusters.listSafeguardsVersions(
location,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listSafeguardsVersions();
}
main().catch(console.error);

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets a list of managed clusters in the specified subscription.
*
* @summary Gets a list of managed clusters in the specified subscription.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersList.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersList.json
*/
async function listManagedClusters() {
const subscriptionId =

Просмотреть файл

@ -1,51 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import {
RebalanceLoadBalancersRequestBody,
ContainerServiceClient,
} from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Rebalance nodes across specific load balancers.
*
* @summary Rebalance nodes across specific load balancers.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Rebalance.json
*/
async function listAgentPoolsByManagedCluster() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const parameters: RebalanceLoadBalancersRequestBody = {
loadBalancerNames: ["kubernetes"],
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result =
await client.managedClusters.beginRebalanceLoadBalancersAndWait(
resourceGroupName,
resourceName,
parameters,
);
console.log(result);
}
async function main() {
listAgentPoolsByManagedCluster();
}
main().catch(console.error);

Просмотреть файл

@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD.
*
* @summary **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetAADProfile.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersResetAADProfile.json
*/
async function resetAadProfile() {
const subscriptionId =

Просмотреть файл

@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to This action cannot be performed on a cluster that is not using a service principal
*
* @summary This action cannot be performed on a cluster that is not using a service principal
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersResetServicePrincipalProfile.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersResetServicePrincipalProfile.json
*/
async function resetServicePrincipalProfile() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates.
*
* @summary See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateClusterCertificates.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersRotateClusterCertificates.json
*/
async function rotateClusterCertificates() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Rotates the service account signing keys of a managed cluster.
*
* @summary Rotates the service account signing keys of a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersRotateServiceAccountSigningKeys.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json
*/
async function rotateClusterServiceAccountSigningKeys() {
const subscriptionId =

Просмотреть файл

@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
*
* @summary AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/RunCommandRequest.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/RunCommandRequest.json
*/
async function submitNewCommand() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster.
*
* @summary See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStart.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersStart.json
*/
async function startManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster.
*
* @summary This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersStop.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersStop.json
*/
async function stopManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to Updates tags on a managed cluster.
*
* @summary Updates tags on a managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClustersUpdateTags.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ManagedClustersUpdateTags.json
*/
async function updateManagedClusterTags() {
const subscriptionId =

Просмотреть файл

@ -1,47 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get the status of a specific operation in the specified agent pool.
*
* @summary Get the status of a specific operation in the specified agent pool.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGetByAgentPool.json
*/
async function getOperationStatusResult() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const operationId = "00000000-0000-0000-0000-000000000001";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.operationStatusResultOperations.getByAgentPool(
resourceGroupName,
resourceName,
agentPoolName,
operationId,
);
console.log(result);
}
async function main() {
getOperationStatusResult();
}
main().catch(console.error);

Просмотреть файл

@ -1,45 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Get the status of a specific operation in the specified managed cluster.
*
* @summary Get the status of a specific operation in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultGet.json
*/
async function getOperationStatusResult() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const operationId = "00000000-0000-0000-0000-000000000001";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.operationStatusResultOperations.get(
resourceGroupName,
resourceName,
operationId,
);
console.log(result);
}
async function main() {
getOperationStatusResult();
}
main().catch(console.error);

Просмотреть файл

@ -1,46 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ContainerServiceClient } from "@azure/arm-containerservice";
import { DefaultAzureCredential } from "@azure/identity";
import * as dotenv from "dotenv";
dotenv.config();
/**
* This sample demonstrates how to Gets a list of operations in the specified managedCluster
*
* @summary Gets a list of operations in the specified managedCluster
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/OperationStatusResultList.json
*/
async function listOfOperationStatusResult() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] ||
"00000000-0000-0000-0000-000000000000";
const resourceGroupName =
process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.operationStatusResultOperations.list(
resourceGroupName,
resourceName,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listOfOperationStatusResult();
}
main().catch(console.error);

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets a list of operations.
*
* @summary Gets a list of operations.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/Operation_List.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/Operation_List.json
*/
async function listAvailableOperationsForTheContainerServiceResourceProvider() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Deletes a private endpoint connection.
*
* @summary Deletes a private endpoint connection.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsDelete.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/PrivateEndpointConnectionsDelete.json
*/
async function deletePrivateEndpointConnection() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters
*
* @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsGet.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/PrivateEndpointConnectionsGet.json
*/
async function getPrivateEndpointConnection() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters
*
* @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsList.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/PrivateEndpointConnectionsList.json
*/
async function listPrivateEndpointConnectionsByManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to Updates a private endpoint connection.
*
* @summary Updates a private endpoint connection.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateEndpointConnectionsUpdate.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/PrivateEndpointConnectionsUpdate.json
*/
async function updatePrivateEndpointConnection() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters
*
* @summary To learn more about private clusters, see: https://docs.microsoft.com/azure/aks/private-clusters
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/PrivateLinkResourcesList.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/PrivateLinkResourcesList.json
*/
async function listPrivateLinkResourcesByManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to Gets the private link service ID for the specified managed cluster.
*
* @summary Gets the private link service ID for the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ResolvePrivateLinkServiceId.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/ResolvePrivateLinkServiceId.json
*/
async function resolveThePrivateLinkServiceIdForManagedCluster() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Creates or updates a snapshot.
*
* @summary Creates or updates a snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsCreate.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/SnapshotsCreate.json
*/
async function createOrUpdateSnapshot() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Deletes a snapshot.
*
* @summary Deletes a snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsDelete.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/SnapshotsDelete.json
*/
async function deleteSnapshot() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets a snapshot.
*
* @summary Gets a snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsGet.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/SnapshotsGet.json
*/
async function getSnapshot() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Lists snapshots in the specified subscription and resource group.
*
* @summary Lists snapshots in the specified subscription and resource group.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsListByResourceGroup.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/SnapshotsListByResourceGroup.json
*/
async function listSnapshotsByResourceGroup() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Gets a list of snapshots in the specified subscription.
*
* @summary Gets a list of snapshots in the specified subscription.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsList.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/SnapshotsList.json
*/
async function listSnapshots() {
const subscriptionId =

Просмотреть файл

@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to Updates tags on a snapshot.
*
* @summary Updates tags on a snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/SnapshotsUpdateTags.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/SnapshotsUpdateTags.json
*/
async function updateSnapshotTags() {
const subscriptionId =

Просмотреть файл

@ -21,7 +21,7 @@ dotenv.config();
* This sample demonstrates how to Create or update a trusted access role binding
*
* @summary Create or update a trusted access role binding
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_CreateOrUpdate.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/TrustedAccessRoleBindings_CreateOrUpdate.json
*/
async function createOrUpdateATrustedAccessRoleBinding() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Delete a trusted access role binding.
*
* @summary Delete a trusted access role binding.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Delete.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/TrustedAccessRoleBindings_Delete.json
*/
async function deleteATrustedAccessRoleBinding() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to Get a trusted access role binding.
*
* @summary Get a trusted access role binding.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_Get.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/TrustedAccessRoleBindings_Get.json
*/
async function getATrustedAccessRoleBinding() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to List trusted access role bindings.
*
* @summary List trusted access role bindings.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoleBindings_List.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/TrustedAccessRoleBindings_List.json
*/
async function listTrustedAccessRoleBindings() {
const subscriptionId =

Просмотреть файл

@ -18,7 +18,7 @@ dotenv.config();
* This sample demonstrates how to List supported trusted access roles.
*
* @summary List supported trusted access roles.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/TrustedAccessRoles_List.json
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2024-05-01/examples/TrustedAccessRoles_List.json
*/
async function listTrustedAccessRoles() {
const subscriptionId =

Просмотреть файл

@ -1,45 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Deletes specific machines in an agent pool.
*
* @summary Deletes specific machines in an agent pool.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDeleteMachines.json
*/
async function deleteSpecificMachinesInAnAgentPool() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const machines = {
machineNames: ["aks-nodepool1-42263519-vmss00000a", "aks-nodepool1-42263519-vmss00000b"],
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginDeleteMachinesAndWait(
resourceGroupName,
resourceName,
agentPoolName,
machines,
);
console.log(result);
}
async function main() {
deleteSpecificMachinesInAnAgentPool();
}
main().catch(console.error);

Просмотреть файл

@ -1,64 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Deletes an agent pool in the specified managed cluster.
*
* @summary Deletes an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete.json
*/
async function deleteAgentPool() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginDeleteAndWait(
resourceGroupName,
resourceName,
agentPoolName,
);
console.log(result);
}
/**
* This sample demonstrates how to Deletes an agent pool in the specified managed cluster.
*
* @summary Deletes an agent pool in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/AgentPoolsDelete_IgnorePodDisruptionBudget.json
*/
async function deleteAgentPoolByIgnoringPodDisruptionBudget() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.agentPools.beginDeleteAndWait(
resourceGroupName,
resourceName,
agentPoolName,
);
console.log(result);
}
async function main() {
deleteAgentPool();
deleteAgentPoolByIgnoringPodDisruptionBudget();
}
main().catch(console.error);

Просмотреть файл

@ -1,41 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Creates or updates a load balancer in the specified managed cluster.
*
* @summary Creates or updates a load balancer in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Create_Or_Update.json
*/
async function createOrUpdateALoadBalancer() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const loadBalancerName = "kubernetes";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.loadBalancers.createOrUpdate(
resourceGroupName,
resourceName,
loadBalancerName,
);
console.log(result);
}
async function main() {
createOrUpdateALoadBalancer();
}
main().catch(console.error);

Просмотреть файл

@ -1,41 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Deletes a load balancer in the specified managed cluster.
*
* @summary Deletes a load balancer in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Delete.json
*/
async function deleteALoadBalancer() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const loadBalancerName = "kubernetes";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.loadBalancers.beginDeleteAndWait(
resourceGroupName,
resourceName,
loadBalancerName,
);
console.log(result);
}
async function main() {
deleteALoadBalancer();
}
main().catch(console.error);

Просмотреть файл

@ -1,37 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Gets the specified load balancer.
*
* @summary Gets the specified load balancer.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_Get.json
*/
async function getLoadBalancer() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const loadBalancerName = "kubernetes";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.loadBalancers.get(resourceGroupName, resourceName, loadBalancerName);
console.log(result);
}
async function main() {
getLoadBalancer();
}
main().catch(console.error);

Просмотреть файл

@ -1,42 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Gets a list of load balancers in the specified managed cluster.
*
* @summary Gets a list of load balancers in the specified managed cluster.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/LoadBalancers_List.json
*/
async function listLoadBalancersByManagedCluster() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.loadBalancers.listByManagedCluster(
resourceGroupName,
resourceName,
)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listLoadBalancersByManagedCluster();
}
main().catch(console.error);

Просмотреть файл

@ -1,40 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Gets a list of machines in the specified agent pool.
*
* @summary Gets a list of machines in the specified agent pool.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/MachineList.json
*/
async function listMachinesInAnAgentpoolByManagedCluster() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "clustername1";
const agentPoolName = "agentpool1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.machines.list(resourceGroupName, resourceName, agentPoolName)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listMachinesInAnAgentpoolByManagedCluster();
}
main().catch(console.error);

Просмотреть файл

@ -1,48 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Creates or updates a managed cluster snapshot.
*
* @summary Creates or updates a managed cluster snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsCreate.json
*/
async function createOrUpdateManagedClusterSnapshot() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "snapshot1";
const parameters = {
creationData: {
sourceResourceId:
"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1",
},
location: "westus",
tags: { key1: "val1", key2: "val2" },
};
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusterSnapshots.createOrUpdate(
resourceGroupName,
resourceName,
parameters,
);
console.log(result);
}
async function main() {
createOrUpdateManagedClusterSnapshot();
}
main().catch(console.error);

Просмотреть файл

@ -1,36 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Deletes a managed cluster snapshot.
*
* @summary Deletes a managed cluster snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsDelete.json
*/
async function deleteManagedClusterSnapshot() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "snapshot1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusterSnapshots.delete(resourceGroupName, resourceName);
console.log(result);
}
async function main() {
deleteManagedClusterSnapshot();
}
main().catch(console.error);

Просмотреть файл

@ -1,36 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Gets a managed cluster snapshot.
*
* @summary Gets a managed cluster snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsGet.json
*/
async function getManagedClusterSnapshot() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "snapshot1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusterSnapshots.get(resourceGroupName, resourceName);
console.log(result);
}
async function main() {
getManagedClusterSnapshot();
}
main().catch(console.error);

Просмотреть файл

@ -1,38 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Lists managed cluster snapshots in the specified subscription and resource group.
*
* @summary Lists managed cluster snapshots in the specified subscription and resource group.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsListByResourceGroup.json
*/
async function listManagedClusterSnapshotsByResourceGroup() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.managedClusterSnapshots.listByResourceGroup(resourceGroupName)) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listManagedClusterSnapshotsByResourceGroup();
}
main().catch(console.error);

Просмотреть файл

@ -1,37 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Gets a list of managed cluster snapshots in the specified subscription.
*
* @summary Gets a list of managed cluster snapshots in the specified subscription.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsList.json
*/
async function listManagedClusterSnapshots() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const resArray = new Array();
for await (let item of client.managedClusterSnapshots.list()) {
resArray.push(item);
}
console.log(resArray);
}
async function main() {
listManagedClusterSnapshots();
}
main().catch(console.error);

Просмотреть файл

@ -1,41 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Updates tags on a managed cluster snapshot.
*
* @summary Updates tags on a managed cluster snapshot.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ManagedClusterSnapshotsUpdateTags.json
*/
async function updateManagedClusterSnapshotTags() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const resourceGroupName = process.env["CONTAINERSERVICE_RESOURCE_GROUP"] || "rg1";
const resourceName = "snapshot1";
const parameters = { tags: { key2: "new-val2", key3: "val3" } };
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusterSnapshots.updateTags(
resourceGroupName,
resourceName,
parameters,
);
console.log(result);
}
async function main() {
updateManagedClusterSnapshotTags();
}
main().catch(console.error);

Просмотреть файл

@ -1,36 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Contains Guardrails version along with its support info and whether it is a default version.
*
* @summary Contains Guardrails version along with its support info and whether it is a default version.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetGuardrailsVersions.json
*/
async function getGuardrailsAvailableVersions() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const location = "location1";
const version = "v1.0.0";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusters.getGuardrailsVersions(location, version);
console.log(result);
}
async function main() {
getGuardrailsAvailableVersions();
}
main().catch(console.error);

Просмотреть файл

@ -1,35 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Gets supported OS options in the specified subscription.
*
* @summary Gets supported OS options in the specified subscription.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/ContainerServiceGetOSOptions.json
*/
async function getContainerServiceOSOptions() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const location = "location1";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusters.getOSOptions(location);
console.log(result);
}
async function main() {
getContainerServiceOSOptions();
}
main().catch(console.error);

Просмотреть файл

@ -1,36 +0,0 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
const { ContainerServiceClient } = require("@azure/arm-containerservice");
const { DefaultAzureCredential } = require("@azure/identity");
require("dotenv").config();
/**
* This sample demonstrates how to Contains Safeguards version along with its support info and whether it is a default version.
*
* @summary Contains Safeguards version along with its support info and whether it is a default version.
* x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/preview/2024-04-02-preview/examples/GetSafeguardsVersions.json
*/
async function getSafeguardsAvailableVersions() {
const subscriptionId =
process.env["CONTAINERSERVICE_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000";
const location = "location1";
const version = "v1.0.0";
const credential = new DefaultAzureCredential();
const client = new ContainerServiceClient(credential, subscriptionId);
const result = await client.managedClusters.getSafeguardsVersions(location, version);
console.log(result);
}
async function main() {
getSafeguardsAvailableVersions();
}
main().catch(console.error);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше