diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 3df37c100915..5df5a9c93cc1 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -10195,28 +10195,27 @@ packages: dev: false file:projects/arm-containerservice.tgz: - resolution: {integrity: sha512-ydzxfNP0RKW/IMAJIOMPMAr38GWiOKPriHKATazJlcETiAn2mfHAXrPj/5YZTe7/Cvh4anicieTseoA2LUf7Nw==, tarball: file:projects/arm-containerservice.tgz} + resolution: {integrity: sha512-xsvax5ejhQf6od++due7jG07ThW9oVYJten5uBhVTIAsUFBcFJqWdisPQRIXccVNlJ+AP4cmE/JZeiKq/3jI0A==, tarball: file:projects/arm-containerservice.tgz} name: '@rush-temp/arm-containerservice' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 - '@microsoft/api-extractor': 7.18.11 - '@rollup/plugin-commonjs': 21.1.0_rollup@2.72.0 - '@rollup/plugin-json': 4.1.0_rollup@2.72.0 - '@rollup/plugin-multi-entry': 4.1.0_rollup@2.72.0 - '@rollup/plugin-node-resolve': 13.3.0_rollup@2.72.0 + '@microsoft/api-extractor': 7.23.1 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.72.0 - rollup-plugin-sourcemaps: 0.6.3_rollup@2.72.0 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.4.0 typescript: 4.2.4 uglify-js: 3.15.4 transitivePeerDependencies: - - '@types/node' - debug - encoding - supports-color diff --git a/sdk/containerservice/arm-containerservice/CHANGELOG.md b/sdk/containerservice/arm-containerservice/CHANGELOG.md index b521f762bfbc..2c9bfdfe8e2e 100644 --- a/sdk/containerservice/arm-containerservice/CHANGELOG.md +++ b/sdk/containerservice/arm-containerservice/CHANGELOG.md @@ -1,59 +1,14 @@ # Release History - -## 16.1.0-beta.1 (2022-05-06) + +## 16.1.0 (2022-05-10) **Features** - - Added operation group ManagedClusterSnapshots - - Added operation ManagedClusters.beginRotateServiceAccountSigningKeys - - Added operation ManagedClusters.beginRotateServiceAccountSigningKeysAndWait - - Added Interface AzureKeyVaultKms - - Added Interface ManagedClusterIngressProfile - - Added Interface ManagedClusterIngressProfileWebAppRouting - - Added Interface ManagedClusterOidcIssuerProfile - - Added Interface ManagedClusterPropertiesForSnapshot - - Added Interface ManagedClusterSecurityProfileWorkloadIdentity - - Added Interface ManagedClusterSnapshotListResult - - Added Interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams - - Added Interface ManagedClusterSnapshotsDeleteOptionalParams - - Added Interface ManagedClusterSnapshotsGetOptionalParams - - Added Interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams - - Added Interface ManagedClusterSnapshotsListByResourceGroupOptionalParams - - Added Interface ManagedClusterSnapshotsListNextOptionalParams - - Added Interface ManagedClusterSnapshotsListOptionalParams - - Added Interface ManagedClusterSnapshotsUpdateTagsOptionalParams - - Added Interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams - - Added Interface NetworkProfileForSnapshot - - Added Type Alias ManagedClusterSnapshot - - Added Type Alias ManagedClusterSnapshotsCreateOrUpdateResponse - - Added Type Alias ManagedClusterSnapshotsGetResponse - - Added Type Alias ManagedClusterSnapshotsListByResourceGroupNextResponse - - Added Type Alias ManagedClusterSnapshotsListByResourceGroupResponse - - Added Type Alias ManagedClusterSnapshotsListNextResponse - - Added Type Alias ManagedClusterSnapshotsListResponse - - Added Type Alias ManagedClusterSnapshotsUpdateTagsResponse - - Interface AgentPoolsDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget - - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter capacityReservationGroupID - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter currentOrchestratorVersion - - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter hostGroupID - - Interface ManagedClusterAgentPoolProfileProperties has a new optional parameter messageOfTheDay - - Interface ManagedClusterHttpProxyConfig has a new optional parameter effectiveNoProxy - - Interface ManagedClustersDeleteOptionalParams has a new optional parameter ignorePodDisruptionBudget - - Interface ManagedClusterSecurityProfile has a new optional parameter azureKeyVaultKms - - Interface ManagedClusterSecurityProfile has a new optional parameter workloadIdentity - - Interface ManagedClusterStorageProfileDiskCSIDriver has a new optional parameter version - - Class ContainerServiceClient has a new parameter managedClusterSnapshots - - Type Alias AgentPool has a new parameter messageOfTheDay - Type Alias AgentPool has a new parameter currentOrchestratorVersion - - Type Alias AgentPool has a new parameter capacityReservationGroupID - - Type Alias AgentPool has a new parameter hostGroupID - - Type Alias ManagedCluster has a new parameter creationData - Type Alias ManagedCluster has a new parameter currentKubernetesVersion - - Type Alias ManagedCluster has a new parameter oidcIssuerProfile - - Type Alias ManagedCluster has a new parameter enableNamespaceResources - - Type Alias ManagedCluster has a new parameter ingressProfile - - Enum KnownNetworkPlugin has a new value None - - Enum KnownSnapshotType has a new value ManagedCluster + - Type Alias ManagedCluster has a new parameter storageProfile + ## 16.0.0 (2022-04-20) diff --git a/sdk/containerservice/arm-containerservice/README.md b/sdk/containerservice/arm-containerservice/README.md index 634b51c21adf..af59cad6e49a 100644 --- a/sdk/containerservice/arm-containerservice/README.md +++ b/sdk/containerservice/arm-containerservice/README.md @@ -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 @@ -16,8 +16,6 @@ The Container Service Client. - [LTS versions of Node.js](https://nodejs.org/about/releases/) - Latest versions of Safari, Chrome, Edge and Firefox. -See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details. - ### Prerequisites - An [Azure subscription][azure_sub]. @@ -51,17 +49,8 @@ For more information about how to create an Azure AD Application check out [this ```javascript const { ContainerServiceClient } = require("@azure/arm-containerservice"); const { DefaultAzureCredential } = require("@azure/identity"); -// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details. - const subscriptionId = "00000000-0000-0000-0000-000000000000"; const client = new ContainerServiceClient(new DefaultAzureCredential(), subscriptionId); - -// For client-side applications running in the browser, use this code instead: -// const credential = new InteractiveBrowserCredential({ -// tenantId: "", -// clientId: "" -// }); -// const client = new ContainerServiceClient(credential, subscriptionId); ``` diff --git a/sdk/containerservice/arm-containerservice/_meta.json b/sdk/containerservice/arm-containerservice/_meta.json index c0f0fa522199..6b95a0747bc8 100644 --- a/sdk/containerservice/arm-containerservice/_meta.json +++ b/sdk/containerservice/arm-containerservice/_meta.json @@ -1,8 +1,8 @@ { - "commit": "63ecc4782618d9f20f3b1d9d0b5153d4cf4e45be", + "commit": "aa6bc7cdba48d5c9b6611bddfbb279d6dce4c3b8", "readme": "specification/containerservice/resource-manager/readme.md", - "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\containerservice\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/containerservice/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.3.0", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/package.json b/sdk/containerservice/arm-containerservice/package.json index 0ba5dab77c35..c853cd51ba1b 100644 --- a/sdk/containerservice/arm-containerservice/package.json +++ b/sdk/containerservice/arm-containerservice/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for ContainerServiceClient.", - "version": "16.1.0-beta.1", + "version": "16.1.0", "engines": { "node": ">=12.0.0" }, @@ -11,9 +11,9 @@ "@azure/core-lro": "^2.2.0", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.5.0", + "@azure/core-client": "^1.0.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.1.0", "tslib": "^2.2.0" }, "keywords": [ @@ -28,14 +28,14 @@ "module": "./dist-esm/src/index.js", "types": "./types/arm-containerservice.d.ts", "devDependencies": { - "@microsoft/api-extractor": "7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", - "@rollup/plugin-json": "^4.1.0", - "@rollup/plugin-multi-entry": "^4.1.0", - "@rollup/plugin-node-resolve": "^13.1.3", + "@microsoft/api-extractor": "^7.18.11", + "@rollup/plugin-commonjs": "11.0.2", + "@rollup/plugin-json": "^4.0.0", + "@rollup/plugin-multi-entry": "^3.0.0", + "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.66.1", - "rollup-plugin-sourcemaps": "^0.6.3", + "rollup": "^1.16.3", + "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", @@ -98,21 +98,5 @@ "docs": "echo skipped" }, "sideEffects": false, - "//metadata": { - "constantPaths": [ - { - "path": "src/containerServiceClient.ts", - "prefix": "packageDetails" - } - ] - }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-containerservice?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md index 01db72d6f270..9764be18a0ae 100644 --- a/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md +++ b/sdk/containerservice/arm-containerservice/review/arm-containerservice.api.md @@ -18,7 +18,6 @@ export type AgentPool = SubResource & { osDiskType?: OSDiskType; kubeletDiskType?: KubeletDiskType; workloadRuntime?: WorkloadRuntime; - messageOfTheDay?: string; vnetSubnetID?: string; podSubnetID?: string; maxPods?: number; @@ -31,7 +30,7 @@ export type AgentPool = SubResource & { typePropertiesType?: AgentPoolType; mode?: AgentPoolMode; orchestratorVersion?: string; - currentOrchestratorVersion?: string; + readonly currentOrchestratorVersion?: string; readonly nodeImageVersion?: string; upgradeSettings?: AgentPoolUpgradeSettings; readonly provisioningState?: string; @@ -57,8 +56,6 @@ export type AgentPool = SubResource & { enableFips?: boolean; gpuInstanceProfile?: GPUInstanceProfile; creationData?: CreationData; - capacityReservationGroupID?: string; - hostGroupID?: string; }; // @public @@ -110,7 +107,6 @@ export type AgentPoolsCreateOrUpdateResponse = AgentPool; // @public export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { - ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -186,12 +182,6 @@ export interface AgentPoolUpgradeSettings { maxSurge?: string; } -// @public -export interface AzureKeyVaultKms { - enabled?: boolean; - keyId?: string; -} - // @public export interface CloudError { error?: CloudErrorBody; @@ -225,8 +215,6 @@ export class ContainerServiceClient extends coreClient.ServiceClient { // (undocumented) managedClusters: ManagedClusters; // (undocumented) - managedClusterSnapshots: ManagedClusterSnapshots; - // (undocumented) operations: Operations; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -862,8 +850,7 @@ export enum KnownNetworkMode { // @public export enum KnownNetworkPlugin { Azure = "azure", - Kubenet = "kubenet", - None = "none" + Kubenet = "kubenet" } // @public @@ -940,7 +927,6 @@ export enum KnownScaleSetPriority { // @public export enum KnownSnapshotType { - ManagedCluster = "ManagedCluster", NodePool = "NodePool" } @@ -1069,7 +1055,6 @@ export type ManagedCluster = TrackedResource & { identity?: ManagedClusterIdentity; readonly provisioningState?: string; readonly powerState?: PowerState; - creationData?: CreationData; readonly maxAgentPools?: number; kubernetesVersion?: string; readonly currentKubernetesVersion?: string; @@ -1086,11 +1071,9 @@ export type ManagedCluster = TrackedResource & { [propertyName: string]: ManagedClusterAddonProfile; }; podIdentityProfile?: ManagedClusterPodIdentityProfile; - oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; nodeResourceGroup?: string; enableRbac?: boolean; enablePodSecurityPolicy?: boolean; - enableNamespaceResources?: boolean; networkProfile?: ContainerServiceNetworkProfile; aadProfile?: ManagedClusterAADProfile; autoUpgradeProfile?: ManagedClusterAutoUpgradeProfile; @@ -1104,7 +1087,7 @@ export type ManagedCluster = TrackedResource & { disableLocalAccounts?: boolean; httpProxyConfig?: ManagedClusterHttpProxyConfig; securityProfile?: ManagedClusterSecurityProfile; - ingressProfile?: ManagedClusterIngressProfile; + storageProfile?: ManagedClusterStorageProfile; publicNetworkAccess?: PublicNetworkAccess; }; @@ -1144,23 +1127,20 @@ export type ManagedClusterAgentPoolProfile = ManagedClusterAgentPoolProfilePrope // @public export interface ManagedClusterAgentPoolProfileProperties { availabilityZones?: string[]; - capacityReservationGroupID?: string; count?: number; creationData?: CreationData; - currentOrchestratorVersion?: string; + readonly currentOrchestratorVersion?: string; enableAutoScaling?: boolean; enableEncryptionAtHost?: boolean; enableFips?: boolean; enableNodePublicIP?: boolean; enableUltraSSD?: boolean; gpuInstanceProfile?: GPUInstanceProfile; - hostGroupID?: string; kubeletConfig?: KubeletConfig; kubeletDiskType?: KubeletDiskType; linuxOSConfig?: LinuxOSConfig; maxCount?: number; maxPods?: number; - messageOfTheDay?: string; minCount?: number; mode?: AgentPoolMode; readonly nodeImageVersion?: string; @@ -1208,7 +1188,6 @@ export interface ManagedClusterAutoUpgradeProfile { // @public export interface ManagedClusterHttpProxyConfig { - readonly effectiveNoProxy?: string[]; httpProxy?: string; httpsProxy?: string; noProxy?: string[]; @@ -1225,17 +1204,6 @@ export interface ManagedClusterIdentity { }; } -// @public -export interface ManagedClusterIngressProfile { - webAppRouting?: ManagedClusterIngressProfileWebAppRouting; -} - -// @public -export interface ManagedClusterIngressProfileWebAppRouting { - dnsZoneResourceId?: string; - enabled?: boolean; -} - // @public export interface ManagedClusterListResult { readonly nextLink?: string; @@ -1281,12 +1249,6 @@ export interface ManagedClusterNATGatewayProfile { managedOutboundIPProfile?: ManagedClusterManagedOutboundIPProfile; } -// @public -export interface ManagedClusterOidcIssuerProfile { - enabled?: boolean; - readonly issuerURL?: string; -} - // @public export interface ManagedClusterPodIdentity { bindingSelector?: string; @@ -1370,14 +1332,6 @@ export interface ManagedClusterPropertiesAutoScalerProfile { skipNodesWithSystemPods?: string; } -// @public -export interface ManagedClusterPropertiesForSnapshot { - enableRbac?: boolean; - kubernetesVersion?: string; - readonly networkProfile?: NetworkProfileForSnapshot; - sku?: ManagedClusterSKU; -} - // @public export interface ManagedClusters { beginCreateOrUpdate(resourceGroupName: string, resourceName: string, parameters: ManagedCluster, options?: ManagedClustersCreateOrUpdateOptionalParams): Promise, ManagedClustersCreateOrUpdateResponse>>; @@ -1390,8 +1344,6 @@ export interface ManagedClusters { beginResetServicePrincipalProfileAndWait(resourceGroupName: string, resourceName: string, parameters: ManagedClusterServicePrincipalProfile, options?: ManagedClustersResetServicePrincipalProfileOptionalParams): Promise; beginRotateClusterCertificates(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams): Promise, void>>; beginRotateClusterCertificatesAndWait(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams): Promise; - beginRotateServiceAccountSigningKeys(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams): Promise, void>>; - beginRotateServiceAccountSigningKeysAndWait(resourceGroupName: string, resourceName: string, options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams): Promise; beginRunCommand(resourceGroupName: string, resourceName: string, requestPayload: RunCommandRequest, options?: ManagedClustersRunCommandOptionalParams): Promise, ManagedClustersRunCommandResponse>>; beginRunCommandAndWait(resourceGroupName: string, resourceName: string, requestPayload: RunCommandRequest, options?: ManagedClustersRunCommandOptionalParams): Promise; beginStart(resourceGroupName: string, resourceName: string, options?: ManagedClustersStartOptionalParams): Promise, void>>; @@ -1424,7 +1376,6 @@ export type ManagedClustersCreateOrUpdateResponse = ManagedCluster; // @public export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { - ignorePodDisruptionBudget?: boolean; resumeFrom?: string; updateIntervalInMs?: number; } @@ -1432,8 +1383,6 @@ export interface ManagedClustersDeleteOptionalParams extends coreClient.Operatio // @public export interface ManagedClusterSecurityProfile { azureDefender?: ManagedClusterSecurityProfileAzureDefender; - azureKeyVaultKms?: AzureKeyVaultKms; - workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; } // @public @@ -1442,11 +1391,6 @@ export interface ManagedClusterSecurityProfileAzureDefender { logAnalyticsWorkspaceResourceId?: string; } -// @public -export interface ManagedClusterSecurityProfileWorkloadIdentity { - enabled?: boolean; -} - // @public export interface ManagedClusterServicePrincipalProfile { clientId: string; @@ -1568,82 +1512,6 @@ export type ManagedClustersListOutboundNetworkDependenciesEndpointsResponse = Ou // @public export type ManagedClustersListResponse = ManagedClusterListResult; -// @public -export type ManagedClusterSnapshot = TrackedResource & { - creationData?: CreationData; - snapshotType?: SnapshotType; - readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; -}; - -// @public -export interface ManagedClusterSnapshotListResult { - readonly nextLink?: string; - value?: ManagedClusterSnapshot[]; -} - -// @public -export interface ManagedClusterSnapshots { - createOrUpdate(resourceGroupName: string, resourceName: string, parameters: ManagedClusterSnapshot, options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, resourceName: string, options?: ManagedClusterSnapshotsDeleteOptionalParams): Promise; - get(resourceGroupName: string, resourceName: string, options?: ManagedClusterSnapshotsGetOptionalParams): Promise; - list(options?: ManagedClusterSnapshotsListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateTags(resourceGroupName: string, resourceName: string, parameters: TagsObject, options?: ManagedClusterSnapshotsUpdateTagsOptionalParams): Promise; -} - -// @public -export interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedClusterSnapshotsCreateOrUpdateResponse = ManagedClusterSnapshot; - -// @public -export interface ManagedClusterSnapshotsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface ManagedClusterSnapshotsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedClusterSnapshotsGetResponse = ManagedClusterSnapshot; - -// @public -export interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedClusterSnapshotsListByResourceGroupNextResponse = ManagedClusterSnapshotListResult; - -// @public -export interface ManagedClusterSnapshotsListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedClusterSnapshotsListByResourceGroupResponse = ManagedClusterSnapshotListResult; - -// @public -export interface ManagedClusterSnapshotsListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedClusterSnapshotsListNextResponse = ManagedClusterSnapshotListResult; - -// @public -export interface ManagedClusterSnapshotsListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedClusterSnapshotsListResponse = ManagedClusterSnapshotListResult; - -// @public -export interface ManagedClusterSnapshotsUpdateTagsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ManagedClusterSnapshotsUpdateTagsResponse = ManagedClusterSnapshot; - // @public export interface ManagedClustersResetAADProfileOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1662,12 +1530,6 @@ export interface ManagedClustersRotateClusterCertificatesOptionalParams extends updateIntervalInMs?: number; } -// @public -export interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - // @public export interface ManagedClustersRunCommandOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1699,7 +1561,6 @@ export interface ManagedClusterStorageProfile { // @public export interface ManagedClusterStorageProfileDiskCSIDriver { enabled?: boolean; - version?: string; } // @public @@ -1754,14 +1615,6 @@ export type NetworkPlugin = string; // @public export type NetworkPolicy = string; -// @public -export interface NetworkProfileForSnapshot { - loadBalancerSku?: LoadBalancerSku; - networkMode?: NetworkMode; - networkPlugin?: NetworkPlugin; - networkPolicy?: NetworkPolicy; -} - // @public export interface OperationListResult { readonly value?: OperationValue[]; diff --git a/sdk/containerservice/arm-containerservice/rollup.config.js b/sdk/containerservice/arm-containerservice/rollup.config.js index 3f89d7309da5..9be1955eb7f1 100644 --- a/sdk/containerservice/arm-containerservice/rollup.config.js +++ b/sdk/containerservice/arm-containerservice/rollup.config.js @@ -14,14 +14,62 @@ import json from "@rollup/plugin-json"; import nodeBuiltins from "builtin-modules"; +/** + * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api. + * + * NOTE: this manual configuration is only needed because OpenTelemetry uses an + * __exportStar downleveled helper function to declare its exports which confuses + * rollup's automatic discovery mechanism. + * + * @returns an object reference that can be `...`'d into your cjs() configuration. + */ +export function openTelemetryCommonJs() { + const namedExports = {}; + + for (const key of [ + "@opentelemetry/api", + "@azure/core-tracing/node_modules/@opentelemetry/api" + ]) { + namedExports[key] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "SpanStatusCode", + "getSpanContext", + "setSpanContext" + ]; + } + + const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"]; + + for (const version of releasedOpenTelemetryVersions) { + namedExports[ + // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path. + `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js` + ] = [ + "SpanKind", + "TraceFlags", + "getSpan", + "setSpan", + "StatusCode", + "CanonicalCode", + "getSpanContext", + "setSpanContext" + ]; + } + + return namedExports; +} + // #region Warning Handler /** - * A function that can determine whether a rollup warning should be ignored. If + * A function that can determine whether a rollupwarning should be ignored. If * the function returns `true`, then the warning will not be displayed. */ -function ignoreNiseSinonEval(warning) { +function ignoreNiseSinonEvalWarnings(warning) { return ( warning.code === "EVAL" && warning.id && @@ -30,14 +78,17 @@ function ignoreNiseSinonEval(warning) { ); } -function ignoreChaiCircularDependency(warning) { +function ignoreChaiCircularDependencyWarnings(warning) { return ( warning.code === "CIRCULAR_DEPENDENCY" && warning.importer && warning.importer.includes("node_modules/chai") === true ); } -const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval]; +const warningInhibitors = [ + ignoreChaiCircularDependencyWarnings, + ignoreNiseSinonEvalWarnings +]; /** * Construct a warning handler for the shared rollup configuration @@ -71,7 +122,22 @@ function makeBrowserTestConfig() { nodeResolve({ mainFields: ["module", "browser"] }), - cjs(), + cjs({ + namedExports: { + // Chai's strange internal architecture makes it impossible to statically + // analyze its exports. + chai: [ + "version", + "use", + "util", + "config", + "expect", + "should", + "assert" + ], + ...openTelemetryCommonJs() + } + }), json(), sourcemaps() //viz({ filename: "dist-test/browser-stats.html", sourcemap: true }) @@ -107,7 +173,7 @@ export function makeConfig(pkg, options) { ], output: { file: "dist/index.js", format: "cjs", sourcemap: true }, preserveSymlinks: false, - plugins: [sourcemaps(), nodeResolve()] + plugins: [sourcemaps(), nodeResolve(), cjs()] }; const config = [baseConfig]; diff --git a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts index a7ac1f385fa8..b580e4fcbbd3 100644 --- a/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts +++ b/sdk/containerservice/arm-containerservice/src/containerServiceClient.ts @@ -7,7 +7,6 @@ */ import * as coreClient from "@azure/core-client"; -import * as coreRestPipeline from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { OperationsImpl, @@ -17,8 +16,7 @@ import { PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, ResolvePrivateLinkServiceIdImpl, - SnapshotsImpl, - ManagedClusterSnapshotsImpl + SnapshotsImpl } from "./operations"; import { Operations, @@ -28,8 +26,7 @@ import { PrivateEndpointConnections, PrivateLinkResources, ResolvePrivateLinkServiceId, - Snapshots, - ManagedClusterSnapshots + Snapshots } from "./operationsInterfaces"; import { ContainerServiceClientOptionalParams } from "./models"; @@ -65,7 +62,7 @@ export class ContainerServiceClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-containerservice/16.1.0-beta.1`; + const packageDetails = `azsdk-js-arm-containerservice/16.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -80,39 +77,15 @@ export class ContainerServiceClient extends coreClient.ServiceClient { userAgentOptions: { userAgentPrefix }, - baseUri: - options.endpoint ?? options.baseUri ?? "https://management.azure.com" + baseUri: options.endpoint || "https://management.azure.com" }; super(optionsWithDefaults); - - if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { - const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( - (pipelinePolicy) => - pipelinePolicy.name === - coreRestPipeline.bearerTokenAuthenticationPolicyName - ); - if (!bearerTokenAuthenticationPolicyFound) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - scopes: `${optionsWithDefaults.baseUri}/.default`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); - } - } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-03-02-preview"; + this.apiVersion = options.apiVersion || "2022-04-01"; this.operations = new OperationsImpl(this); this.managedClusters = new ManagedClustersImpl(this); this.maintenanceConfigurations = new MaintenanceConfigurationsImpl(this); @@ -123,7 +96,6 @@ export class ContainerServiceClient extends coreClient.ServiceClient { this ); this.snapshots = new SnapshotsImpl(this); - this.managedClusterSnapshots = new ManagedClusterSnapshotsImpl(this); } operations: Operations; @@ -134,5 +106,4 @@ export class ContainerServiceClient extends coreClient.ServiceClient { privateLinkResources: PrivateLinkResources; resolvePrivateLinkServiceId: ResolvePrivateLinkServiceId; snapshots: Snapshots; - managedClusterSnapshots: ManagedClusterSnapshots; } diff --git a/sdk/containerservice/arm-containerservice/src/models/index.ts b/sdk/containerservice/arm-containerservice/src/models/index.ts index 2fefc02d087e..409b94780d2b 100644 --- a/sdk/containerservice/arm-containerservice/src/models/index.ts +++ b/sdk/containerservice/arm-containerservice/src/models/index.ts @@ -164,12 +164,6 @@ export interface PowerState { code?: Code; } -/** Data used when creating a target resource from a source resource. */ -export interface CreationData { - /** This is the ARM ID of the source object to be used to create the target object. */ - sourceResourceId?: string; -} - /** Properties for the container service agent pool profile. */ export interface ManagedClusterAgentPoolProfileProperties { /** Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. */ @@ -184,8 +178,6 @@ export interface ManagedClusterAgentPoolProfileProperties { kubeletDiskType?: KubeletDiskType; /** Determines the type of workload a node can run. */ workloadRuntime?: WorkloadRuntime; - /** A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). */ - messageOfTheDay?: string; /** If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ vnetSubnetID?: string; /** If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ @@ -208,10 +200,13 @@ export interface ManagedClusterAgentPoolProfileProperties { type?: AgentPoolType; /** A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools */ mode?: AgentPoolMode; - /** Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ + /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ orchestratorVersion?: string; - /** If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion was , this field will contain the full version being used. */ - currentOrchestratorVersion?: string; + /** + * If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly currentOrchestratorVersion?: string; /** * The version of node image * NOTE: This property will not be serialized. It can only be populated by the server. @@ -260,10 +255,6 @@ export interface ManagedClusterAgentPoolProfileProperties { gpuInstanceProfile?: GPUInstanceProfile; /** CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. */ creationData?: CreationData; - /** AKS will associate the specified agent pool with the Capacity Reservation Group. */ - capacityReservationGroupID?: string; - /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ - hostGroupID?: string; } /** Settings for upgrading an agentpool */ @@ -370,6 +361,12 @@ export interface SysctlConfig { vmVfsCachePressure?: number; } +/** Data used when creating a target resource from a source resource. */ +export interface CreationData { + /** This is the ARM ID of the source object to be used to create the target object. */ + sourceResourceId?: string; +} + /** Profile for Linux VMs in the container service cluster. */ export interface ContainerServiceLinuxProfile { /** The administrator username to use for Linux VMs. */ @@ -509,17 +506,6 @@ export interface ManagedClusterPodIdentityException { podLabels: { [propertyName: string]: string }; } -/** The OIDC issuer profile of the Managed Cluster. */ -export interface ManagedClusterOidcIssuerProfile { - /** - * The OIDC issuer url of the Managed Cluster. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly issuerURL?: string; - /** Whether the OIDC issuer is enabled. */ - enabled?: boolean; -} - /** Profile of network configuration. */ export interface ContainerServiceNetworkProfile { /** Network plugin used for building the Kubernetes network. */ @@ -715,11 +701,6 @@ export interface ManagedClusterHttpProxyConfig { httpsProxy?: string; /** The endpoints that should not go through proxy. */ noProxy?: string[]; - /** - * A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset of noProxy and values injected by AKS. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly effectiveNoProxy?: string[]; /** Alternative CA cert to use for connecting to proxy servers. */ trustedCa?: string; } @@ -728,10 +709,6 @@ export interface ManagedClusterHttpProxyConfig { export interface ManagedClusterSecurityProfile { /** Azure Defender settings for the security profile. */ azureDefender?: ManagedClusterSecurityProfileAzureDefender; - /** Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for the security profile. */ - azureKeyVaultKms?: AzureKeyVaultKms; - /** [Workload Identity](https://azure.github.io/azure-workload-identity/docs/) settings for the security profile. */ - workloadIdentity?: ManagedClusterSecurityProfileWorkloadIdentity; } /** Azure Defender settings for the security profile. */ @@ -742,32 +719,32 @@ export interface ManagedClusterSecurityProfileAzureDefender { logAnalyticsWorkspaceResourceId?: string; } -/** Azure Key Vault key management service settings for the security profile. */ -export interface AzureKeyVaultKms { - /** Whether to enable Azure Key Vault key management service. The default is false. */ - enabled?: boolean; - /** Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty. */ - keyId?: string; +/** Storage profile for the container service cluster. */ +export interface ManagedClusterStorageProfile { + /** AzureDisk CSI Driver settings for the storage profile. */ + diskCSIDriver?: ManagedClusterStorageProfileDiskCSIDriver; + /** AzureFile CSI Driver settings for the storage profile. */ + fileCSIDriver?: ManagedClusterStorageProfileFileCSIDriver; + /** Snapshot Controller settings for the storage profile. */ + snapshotController?: ManagedClusterStorageProfileSnapshotController; } -/** Workload Identity settings for the security profile. */ -export interface ManagedClusterSecurityProfileWorkloadIdentity { - /** Whether to enable Workload Identity */ +/** AzureDisk CSI Driver settings for the storage profile. */ +export interface ManagedClusterStorageProfileDiskCSIDriver { + /** Whether to enable AzureDisk CSI Driver. The default value is true. */ enabled?: boolean; } -/** Ingress profile for the container service cluster. */ -export interface ManagedClusterIngressProfile { - /** Web App Routing settings for the ingress profile. */ - webAppRouting?: ManagedClusterIngressProfileWebAppRouting; +/** AzureFile CSI Driver settings for the storage profile. */ +export interface ManagedClusterStorageProfileFileCSIDriver { + /** Whether to enable AzureFile CSI Driver. The default value is true. */ + enabled?: boolean; } -/** Web App Routing settings for the ingress profile. */ -export interface ManagedClusterIngressProfileWebAppRouting { - /** Whether to enable Web App Routing. */ +/** Snapshot Controller settings for the storage profile. */ +export interface ManagedClusterStorageProfileSnapshotController { + /** Whether to enable Snapshot Controller. The default value is true. */ enabled?: boolean; - /** Resource ID of the DNS Zone to be associated with the web app. Used only when Web App Routing is enabled. */ - dnsZoneResourceId?: string; } /** Common fields that are returned in the response for all Azure Resource Manager resources */ @@ -1155,44 +1132,6 @@ export interface SnapshotListResult { readonly nextLink?: string; } -/** The response from the List Managed Cluster Snapshots operation. */ -export interface ManagedClusterSnapshotListResult { - /** The list of managed cluster snapshots. */ - value?: ManagedClusterSnapshot[]; - /** - * The URL to get the next set of managed cluster snapshot results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** managed cluster properties for snapshot, these properties are read only. */ -export interface ManagedClusterPropertiesForSnapshot { - /** The current kubernetes version. */ - kubernetesVersion?: string; - /** The current managed cluster sku. */ - sku?: ManagedClusterSKU; - /** Whether the cluster has enabled Kubernetes Role-Based Access Control or not. */ - enableRbac?: boolean; - /** - * The current network profile. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly networkProfile?: NetworkProfileForSnapshot; -} - -/** network profile for managed cluster snapshot, these properties are read only. */ -export interface NetworkProfileForSnapshot { - /** networkPlugin for managed cluster snapshot. */ - networkPlugin?: NetworkPlugin; - /** networkPolicy for managed cluster snapshot. */ - networkPolicy?: NetworkPolicy; - /** networkMode for managed cluster snapshot. */ - networkMode?: NetworkMode; - /** loadBalancerSku for managed cluster snapshot. */ - loadBalancerSku?: LoadBalancerSku; -} - /** Profile for the container service master. */ export interface ContainerServiceMasterProfile { /** Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. */ @@ -1233,36 +1172,6 @@ export interface ContainerServiceVMDiagnostics { readonly storageUri?: string; } -/** Storage profile for the container service cluster. */ -export interface ManagedClusterStorageProfile { - /** AzureDisk CSI Driver settings for the storage profile. */ - diskCSIDriver?: ManagedClusterStorageProfileDiskCSIDriver; - /** AzureFile CSI Driver settings for the storage profile. */ - fileCSIDriver?: ManagedClusterStorageProfileFileCSIDriver; - /** Snapshot Controller settings for the storage profile. */ - snapshotController?: ManagedClusterStorageProfileSnapshotController; -} - -/** AzureDisk CSI Driver settings for the storage profile. */ -export interface ManagedClusterStorageProfileDiskCSIDriver { - /** Whether to enable AzureDisk CSI Driver. The default value is true. */ - enabled?: boolean; - /** The version of AzureDisk CSI Driver. The default value is v1. */ - version?: string; -} - -/** AzureFile CSI Driver settings for the storage profile. */ -export interface ManagedClusterStorageProfileFileCSIDriver { - /** Whether to enable AzureFile CSI Driver. The default value is true. */ - enabled?: boolean; -} - -/** Snapshot Controller settings for the storage profile. */ -export interface ManagedClusterStorageProfileSnapshotController { - /** Whether to enable Snapshot Controller. The default value is true. */ - enabled?: boolean; -} - /** Profile for the container service agent pool. */ export type ManagedClusterAgentPoolProfile = ManagedClusterAgentPoolProfileProperties & { /** Windows agent pool names must be 6 characters or less. */ @@ -1307,8 +1216,6 @@ export type AgentPool = SubResource & { kubeletDiskType?: KubeletDiskType; /** Determines the type of workload a node can run. */ workloadRuntime?: WorkloadRuntime; - /** A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script). */ - messageOfTheDay?: string; /** If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ vnetSubnetID?: string; /** If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName} */ @@ -1331,10 +1238,13 @@ export type AgentPool = SubResource & { typePropertiesType?: AgentPoolType; /** A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools */ mode?: AgentPoolMode; - /** Both patch version and are supported. When is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same once it has been created will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ + /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). */ orchestratorVersion?: string; - /** If orchestratorVersion was a fully specified version , this field will be exactly equal to it. If orchestratorVersion was , this field will contain the full version being used. */ - currentOrchestratorVersion?: string; + /** + * If orchestratorVersion is a fully specified version , this field will be exactly equal to it. If orchestratorVersion is , this field will contain the full version being used. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly currentOrchestratorVersion?: string; /** * The version of node image * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1383,10 +1293,6 @@ export type AgentPool = SubResource & { gpuInstanceProfile?: GPUInstanceProfile; /** CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. */ creationData?: CreationData; - /** AKS will associate the specified agent pool with the Capacity Reservation Group. */ - capacityReservationGroupID?: string; - /** This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). */ - hostGroupID?: string; }; /** Managed cluster. */ @@ -1407,17 +1313,15 @@ export type ManagedCluster = TrackedResource & { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly powerState?: PowerState; - /** CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot. */ - creationData?: CreationData; /** * The max number of agent pools for the managed cluster. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly maxAgentPools?: number; - /** When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. */ + /** Both patch version (e.g. 1.20.13) and (e.g. 1.20) are supported. When is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. */ kubernetesVersion?: string; /** - * The version of Kubernetes the Managed Cluster is running. + * If kubernetesVersion was a fully specified version , this field will be exactly equal to it. If kubernetesVersion was , this field will contain the full version being used. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly currentKubernetesVersion?: string; @@ -1452,16 +1356,12 @@ export type ManagedCluster = TrackedResource & { addonProfiles?: { [propertyName: string]: ManagedClusterAddonProfile }; /** See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity integration. */ podIdentityProfile?: ManagedClusterPodIdentityProfile; - /** The OIDC issuer profile of the Managed Cluster. */ - oidcIssuerProfile?: ManagedClusterOidcIssuerProfile; /** The name of the resource group containing agent pool nodes. */ nodeResourceGroup?: string; /** Whether to enable Kubernetes Role-Based Access Control. */ enableRbac?: boolean; /** (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy. */ enablePodSecurityPolicy?: boolean; - /** The default value is false. It can be enabled/disabled on creation and updation of the managed cluster. See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM Resource. */ - enableNamespaceResources?: boolean; /** The network configuration profile. */ networkProfile?: ContainerServiceNetworkProfile; /** The Azure Active Directory configuration. */ @@ -1484,8 +1384,8 @@ export type ManagedCluster = TrackedResource & { httpProxyConfig?: ManagedClusterHttpProxyConfig; /** Security profile for the managed cluster. */ securityProfile?: ManagedClusterSecurityProfile; - /** Ingress profile for the managed cluster. */ - ingressProfile?: ManagedClusterIngressProfile; + /** Storage profile for the managed cluster. */ + storageProfile?: ManagedClusterStorageProfile; /** Allow or deny public network access for AKS */ publicNetworkAccess?: PublicNetworkAccess; }; @@ -1534,19 +1434,6 @@ export type Snapshot = TrackedResource & { readonly enableFips?: boolean; }; -/** A managed cluster snapshot resource. */ -export type ManagedClusterSnapshot = TrackedResource & { - /** CreationData to be used to specify the source resource ID to create this snapshot. */ - creationData?: CreationData; - /** The type of a snapshot. The default is NodePool. */ - snapshotType?: SnapshotType; - /** - * What the properties will be showed when getting managed cluster snapshot. Those properties are read-only. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly managedClusterPropertiesReadOnly?: ManagedClusterPropertiesForSnapshot; -}; - /** Defines headers for AgentPools_upgradeNodeImageVersion operation. */ export interface AgentPoolsUpgradeNodeImageVersionHeaders { /** URL to query for status of the operation. */ @@ -1860,9 +1747,7 @@ export enum KnownNetworkPlugin { /** Use the Azure CNI network plugin. See [Azure CNI (advanced) networking](https://docs.microsoft.com/azure/aks/concepts-network#azure-cni-advanced-networking) for more information. */ Azure = "azure", /** Use the Kubenet network plugin. See [Kubenet (basic) networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) for more information. */ - Kubenet = "kubenet", - /** Do not use a network plugin. A custom CNI will need to be installed after cluster creation for networking functionality. */ - None = "none" + Kubenet = "kubenet" } /** @@ -1871,8 +1756,7 @@ export enum KnownNetworkPlugin { * this enum contains the known values that the service supports. * ### Known values supported by the service * **azure**: Use the Azure CNI network plugin. See [Azure CNI (advanced) networking](https:\/\/docs.microsoft.com\/azure\/aks\/concepts-network#azure-cni-advanced-networking) for more information. \ - * **kubenet**: Use the Kubenet network plugin. See [Kubenet (basic) networking](https:\/\/docs.microsoft.com\/azure\/aks\/concepts-network#kubenet-basic-networking) for more information. \ - * **none**: Do not use a network plugin. A custom CNI will need to be installed after cluster creation for networking functionality. + * **kubenet**: Use the Kubenet network plugin. See [Kubenet (basic) networking](https:\/\/docs.microsoft.com\/azure\/aks\/concepts-network#kubenet-basic-networking) for more information. */ export type NetworkPlugin = string; @@ -2144,9 +2028,7 @@ export type ConnectionStatus = string; /** Known values of {@link SnapshotType} that the service accepts. */ export enum KnownSnapshotType { /** The snapshot is a snapshot of a node pool. */ - NodePool = "NodePool", - /** The snapshot is a snapshot of a managed cluster. */ - ManagedCluster = "ManagedCluster" + NodePool = "NodePool" } /** @@ -2154,8 +2036,7 @@ export enum KnownSnapshotType { * {@link KnownSnapshotType} can be used interchangeably with SnapshotType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NodePool**: The snapshot is a snapshot of a node pool. \ - * **ManagedCluster**: The snapshot is a snapshot of a managed cluster. + * **NodePool**: The snapshot is a snapshot of a node pool. */ export type SnapshotType = string; @@ -2650,8 +2531,6 @@ export type ManagedClustersUpdateTagsResponse = ManagedCluster; /** Optional parameters. */ export interface ManagedClustersDeleteOptionalParams extends coreClient.OperationOptions { - /** ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget */ - ignorePodDisruptionBudget?: boolean; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -2685,15 +2564,6 @@ export interface ManagedClustersRotateClusterCertificatesOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface ManagedClustersRotateServiceAccountSigningKeysOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - /** Optional parameters. */ export interface ManagedClustersStopOptionalParams extends coreClient.OperationOptions { @@ -2820,8 +2690,6 @@ export type AgentPoolsCreateOrUpdateResponse = AgentPool; /** Optional parameters. */ export interface AgentPoolsDeleteOptionalParams extends coreClient.OperationOptions { - /** ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget */ - ignorePodDisruptionBudget?: boolean; /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ @@ -2955,59 +2823,6 @@ export interface SnapshotsListByResourceGroupNextOptionalParams /** Contains response data for the listByResourceGroupNext operation. */ export type SnapshotsListByResourceGroupNextResponse = SnapshotListResult; -/** Optional parameters. */ -export interface ManagedClusterSnapshotsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ManagedClusterSnapshotsListResponse = ManagedClusterSnapshotListResult; - -/** Optional parameters. */ -export interface ManagedClusterSnapshotsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ManagedClusterSnapshotsListByResourceGroupResponse = ManagedClusterSnapshotListResult; - -/** Optional parameters. */ -export interface ManagedClusterSnapshotsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedClusterSnapshotsGetResponse = ManagedClusterSnapshot; - -/** Optional parameters. */ -export interface ManagedClusterSnapshotsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type ManagedClusterSnapshotsCreateOrUpdateResponse = ManagedClusterSnapshot; - -/** Optional parameters. */ -export interface ManagedClusterSnapshotsUpdateTagsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the updateTags operation. */ -export type ManagedClusterSnapshotsUpdateTagsResponse = ManagedClusterSnapshot; - -/** Optional parameters. */ -export interface ManagedClusterSnapshotsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ManagedClusterSnapshotsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ManagedClusterSnapshotsListNextResponse = ManagedClusterSnapshotListResult; - -/** Optional parameters. */ -export interface ManagedClusterSnapshotsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type ManagedClusterSnapshotsListByResourceGroupNextResponse = ManagedClusterSnapshotListResult; - /** Optional parameters. */ export interface ContainerServiceClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/containerservice/arm-containerservice/src/models/mappers.ts b/sdk/containerservice/arm-containerservice/src/models/mappers.ts index e25358b421cf..9bc4485392c7 100644 --- a/sdk/containerservice/arm-containerservice/src/models/mappers.ts +++ b/sdk/containerservice/arm-containerservice/src/models/mappers.ts @@ -352,21 +352,6 @@ export const PowerState: coreClient.CompositeMapper = { } }; -export const CreationData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CreationData", - modelProperties: { - sourceResourceId: { - serializedName: "sourceResourceId", - type: { - name: "String" - } - } - } - } -}; - export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -412,12 +397,6 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "String" } }, - messageOfTheDay: { - serializedName: "messageOfTheDay", - type: { - name: "String" - } - }, vnetSubnetID: { serializedName: "vnetSubnetID", type: { @@ -493,6 +472,7 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe }, currentOrchestratorVersion: { serializedName: "currentOrchestratorVersion", + readOnly: true, type: { name: "String" } @@ -644,18 +624,6 @@ export const ManagedClusterAgentPoolProfileProperties: coreClient.CompositeMappe name: "Composite", className: "CreationData" } - }, - capacityReservationGroupID: { - serializedName: "capacityReservationGroupID", - type: { - name: "String" - } - }, - hostGroupID: { - serializedName: "hostGroupID", - type: { - name: "String" - } } } } @@ -970,6 +938,21 @@ export const SysctlConfig: coreClient.CompositeMapper = { } }; +export const CreationData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CreationData", + modelProperties: { + sourceResourceId: { + serializedName: "sourceResourceId", + type: { + name: "String" + } + } + } + } +}; + export const ContainerServiceLinuxProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1378,28 +1361,6 @@ export const ManagedClusterPodIdentityException: coreClient.CompositeMapper = { } }; -export const ManagedClusterOidcIssuerProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterOidcIssuerProfile", - modelProperties: { - issuerURL: { - serializedName: "issuerURL", - readOnly: true, - type: { - name: "String" - } - }, - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - } - } - } -}; - export const ContainerServiceNetworkProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2058,18 +2019,6 @@ export const ManagedClusterHttpProxyConfig: coreClient.CompositeMapper = { } } }, - effectiveNoProxy: { - serializedName: "effectiveNoProxy", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, trustedCa: { serializedName: "trustedCa", type: { @@ -2091,20 +2040,6 @@ export const ManagedClusterSecurityProfile: coreClient.CompositeMapper = { name: "Composite", className: "ManagedClusterSecurityProfileAzureDefender" } - }, - azureKeyVaultKms: { - serializedName: "azureKeyVaultKms", - type: { - name: "Composite", - className: "AzureKeyVaultKms" - } - }, - workloadIdentity: { - serializedName: "workloadIdentity", - type: { - name: "Composite", - className: "ManagedClusterSecurityProfileWorkloadIdentity" - } } } } @@ -2131,31 +2066,40 @@ export const ManagedClusterSecurityProfileAzureDefender: coreClient.CompositeMap } }; -export const AzureKeyVaultKms: coreClient.CompositeMapper = { +export const ManagedClusterStorageProfile: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureKeyVaultKms", + className: "ManagedClusterStorageProfile", modelProperties: { - enabled: { - serializedName: "enabled", + diskCSIDriver: { + serializedName: "diskCSIDriver", type: { - name: "Boolean" + name: "Composite", + className: "ManagedClusterStorageProfileDiskCSIDriver" } }, - keyId: { - serializedName: "keyId", + fileCSIDriver: { + serializedName: "fileCSIDriver", type: { - name: "String" + name: "Composite", + className: "ManagedClusterStorageProfileFileCSIDriver" + } + }, + snapshotController: { + serializedName: "snapshotController", + type: { + name: "Composite", + className: "ManagedClusterStorageProfileSnapshotController" } } } } }; -export const ManagedClusterSecurityProfileWorkloadIdentity: coreClient.CompositeMapper = { +export const ManagedClusterStorageProfileDiskCSIDriver: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedClusterSecurityProfileWorkloadIdentity", + className: "ManagedClusterStorageProfileDiskCSIDriver", modelProperties: { enabled: { serializedName: "enabled", @@ -2167,38 +2111,31 @@ export const ManagedClusterSecurityProfileWorkloadIdentity: coreClient.Composite } }; -export const ManagedClusterIngressProfile: coreClient.CompositeMapper = { +export const ManagedClusterStorageProfileFileCSIDriver: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedClusterIngressProfile", + className: "ManagedClusterStorageProfileFileCSIDriver", modelProperties: { - webAppRouting: { - serializedName: "webAppRouting", + enabled: { + serializedName: "enabled", type: { - name: "Composite", - className: "ManagedClusterIngressProfileWebAppRouting" + name: "Boolean" } } } } }; -export const ManagedClusterIngressProfileWebAppRouting: coreClient.CompositeMapper = { +export const ManagedClusterStorageProfileSnapshotController: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedClusterIngressProfileWebAppRouting", + className: "ManagedClusterStorageProfileSnapshotController", modelProperties: { enabled: { serializedName: "enabled", type: { name: "Boolean" } - }, - dnsZoneResourceId: { - serializedName: "dnsZoneResourceId", - type: { - name: "String" - } } } } @@ -3110,103 +3047,6 @@ export const SnapshotListResult: coreClient.CompositeMapper = { } }; -export const ManagedClusterSnapshotListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterSnapshotListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedClusterSnapshot" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ManagedClusterPropertiesForSnapshot: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterPropertiesForSnapshot", - modelProperties: { - kubernetesVersion: { - serializedName: "kubernetesVersion", - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ManagedClusterSKU" - } - }, - enableRbac: { - serializedName: "enableRbac", - type: { - name: "Boolean" - } - }, - networkProfile: { - serializedName: "networkProfile", - type: { - name: "Composite", - className: "NetworkProfileForSnapshot" - } - } - } - } -}; - -export const NetworkProfileForSnapshot: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkProfileForSnapshot", - modelProperties: { - networkPlugin: { - defaultValue: "kubenet", - serializedName: "networkPlugin", - type: { - name: "String" - } - }, - networkPolicy: { - serializedName: "networkPolicy", - type: { - name: "String" - } - }, - networkMode: { - serializedName: "networkMode", - type: { - name: "String" - } - }, - loadBalancerSku: { - serializedName: "loadBalancerSku", - type: { - name: "String" - } - } - } - } -}; - export const ContainerServiceMasterProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3313,87 +3153,6 @@ export const ContainerServiceVMDiagnostics: coreClient.CompositeMapper = { } }; -export const ManagedClusterStorageProfile: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterStorageProfile", - modelProperties: { - diskCSIDriver: { - serializedName: "diskCSIDriver", - type: { - name: "Composite", - className: "ManagedClusterStorageProfileDiskCSIDriver" - } - }, - fileCSIDriver: { - serializedName: "fileCSIDriver", - type: { - name: "Composite", - className: "ManagedClusterStorageProfileFileCSIDriver" - } - }, - snapshotController: { - serializedName: "snapshotController", - type: { - name: "Composite", - className: "ManagedClusterStorageProfileSnapshotController" - } - } - } - } -}; - -export const ManagedClusterStorageProfileDiskCSIDriver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterStorageProfileDiskCSIDriver", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - }, - version: { - serializedName: "version", - type: { - name: "String" - } - } - } - } -}; - -export const ManagedClusterStorageProfileFileCSIDriver: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterStorageProfileFileCSIDriver", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - } - } - } -}; - -export const ManagedClusterStorageProfileSnapshotController: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterStorageProfileSnapshotController", - modelProperties: { - enabled: { - serializedName: "enabled", - type: { - name: "Boolean" - } - } - } - } -}; - export const ManagedClusterAgentPoolProfile: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3535,12 +3294,6 @@ export const AgentPool: coreClient.CompositeMapper = { name: "String" } }, - messageOfTheDay: { - serializedName: "properties.messageOfTheDay", - type: { - name: "String" - } - }, vnetSubnetID: { serializedName: "properties.vnetSubnetID", type: { @@ -3616,6 +3369,7 @@ export const AgentPool: coreClient.CompositeMapper = { }, currentOrchestratorVersion: { serializedName: "properties.currentOrchestratorVersion", + readOnly: true, type: { name: "String" } @@ -3767,18 +3521,6 @@ export const AgentPool: coreClient.CompositeMapper = { name: "Composite", className: "CreationData" } - }, - capacityReservationGroupID: { - serializedName: "properties.capacityReservationGroupID", - type: { - name: "String" - } - }, - hostGroupID: { - serializedName: "properties.hostGroupID", - type: { - name: "String" - } } } } @@ -3825,13 +3567,6 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "PowerState" } }, - creationData: { - serializedName: "properties.creationData", - type: { - name: "Composite", - className: "CreationData" - } - }, maxAgentPools: { serializedName: "properties.maxAgentPools", readOnly: true, @@ -3934,13 +3669,6 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterPodIdentityProfile" } }, - oidcIssuerProfile: { - serializedName: "properties.oidcIssuerProfile", - type: { - name: "Composite", - className: "ManagedClusterOidcIssuerProfile" - } - }, nodeResourceGroup: { serializedName: "properties.nodeResourceGroup", type: { @@ -3959,12 +3687,6 @@ export const ManagedCluster: coreClient.CompositeMapper = { name: "Boolean" } }, - enableNamespaceResources: { - serializedName: "properties.enableNamespaceResources", - type: { - name: "Boolean" - } - }, networkProfile: { serializedName: "properties.networkProfile", type: { @@ -4047,11 +3769,11 @@ export const ManagedCluster: coreClient.CompositeMapper = { className: "ManagedClusterSecurityProfile" } }, - ingressProfile: { - serializedName: "properties.ingressProfile", + storageProfile: { + serializedName: "properties.storageProfile", type: { name: "Composite", - className: "ManagedClusterIngressProfile" + className: "ManagedClusterStorageProfile" } }, publicNetworkAccess: { @@ -4147,37 +3869,6 @@ export const Snapshot: coreClient.CompositeMapper = { } }; -export const ManagedClusterSnapshot: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedClusterSnapshot", - modelProperties: { - ...TrackedResource.type.modelProperties, - creationData: { - serializedName: "properties.creationData", - type: { - name: "Composite", - className: "CreationData" - } - }, - snapshotType: { - defaultValue: "NodePool", - serializedName: "properties.snapshotType", - type: { - name: "String" - } - }, - managedClusterPropertiesReadOnly: { - serializedName: "properties.managedClusterPropertiesReadOnly", - type: { - name: "Composite", - className: "ManagedClusterPropertiesForSnapshot" - } - } - } - } -}; - export const AgentPoolsUpgradeNodeImageVersionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", diff --git a/sdk/containerservice/arm-containerservice/src/models/parameters.ts b/sdk/containerservice/arm-containerservice/src/models/parameters.ts index c83c37a48294..9d355ccba07e 100644 --- a/sdk/containerservice/arm-containerservice/src/models/parameters.ts +++ b/sdk/containerservice/arm-containerservice/src/models/parameters.ts @@ -21,8 +21,7 @@ import { AgentPool as AgentPoolMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, PrivateLinkResource as PrivateLinkResourceMapper, - Snapshot as SnapshotMapper, - ManagedClusterSnapshot as ManagedClusterSnapshotMapper + Snapshot as SnapshotMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -52,7 +51,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-03-02-preview", + defaultValue: "2022-04-01", isConstant: true, serializedName: "api-version", type: { @@ -185,16 +184,6 @@ export const parameters1: OperationParameter = { mapper: TagsObjectMapper }; -export const ignorePodDisruptionBudget: OperationQueryParameter = { - parameterPath: ["options", "ignorePodDisruptionBudget"], - mapper: { - serializedName: "ignore-pod-disruption-budget", - type: { - name: "Boolean" - } - } -}; - export const parameters2: OperationParameter = { parameterPath: "parameters", mapper: ManagedClusterServicePrincipalProfileMapper @@ -290,8 +279,3 @@ export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: SnapshotMapper }; - -export const parameters9: OperationParameter = { - parameterPath: "parameters", - mapper: ManagedClusterSnapshotMapper -}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts index cef7bd8c5f6f..2c9321a35cf2 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/agentPools.ts @@ -204,12 +204,10 @@ export class AgentPoolsImpl implements AgentPools { { resourceGroupName, resourceName, agentPoolName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -294,12 +292,10 @@ export class AgentPoolsImpl implements AgentPools { { resourceGroupName, resourceName, agentPoolName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -421,12 +417,10 @@ export class AgentPoolsImpl implements AgentPools { { resourceGroupName, resourceName, agentPoolName, options }, upgradeNodeImageVersionOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -567,10 +561,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [ - Parameters.apiVersion, - Parameters.ignorePodDisruptionBudget - ], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/containerservice/arm-containerservice/src/operations/index.ts b/sdk/containerservice/arm-containerservice/src/operations/index.ts index 67e60e725e9b..6d786ed8c56d 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/index.ts @@ -14,4 +14,3 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; export * from "./snapshots"; -export * from "./managedClusterSnapshots"; diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts deleted file mode 100644 index e6ac26542e18..000000000000 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusterSnapshots.ts +++ /dev/null @@ -1,447 +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. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ManagedClusterSnapshots } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { ContainerServiceClient } from "../containerServiceClient"; -import { - ManagedClusterSnapshot, - ManagedClusterSnapshotsListNextOptionalParams, - ManagedClusterSnapshotsListOptionalParams, - ManagedClusterSnapshotsListByResourceGroupNextOptionalParams, - ManagedClusterSnapshotsListByResourceGroupOptionalParams, - ManagedClusterSnapshotsListResponse, - ManagedClusterSnapshotsListByResourceGroupResponse, - ManagedClusterSnapshotsGetOptionalParams, - ManagedClusterSnapshotsGetResponse, - ManagedClusterSnapshotsCreateOrUpdateOptionalParams, - ManagedClusterSnapshotsCreateOrUpdateResponse, - TagsObject, - ManagedClusterSnapshotsUpdateTagsOptionalParams, - ManagedClusterSnapshotsUpdateTagsResponse, - ManagedClusterSnapshotsDeleteOptionalParams, - ManagedClusterSnapshotsListNextResponse, - ManagedClusterSnapshotsListByResourceGroupNextResponse -} from "../models"; - -/// -/** Class containing ManagedClusterSnapshots operations. */ -export class ManagedClusterSnapshotsImpl implements ManagedClusterSnapshots { - private readonly client: ContainerServiceClient; - - /** - * Initialize a new instance of the class ManagedClusterSnapshots class. - * @param client Reference to the service client - */ - constructor(client: ContainerServiceClient) { - this.client = client; - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * @param options The options parameters. - */ - public list( - options?: ManagedClusterSnapshotsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(options); - } - }; - } - - private async *listPagingPage( - options?: ManagedClusterSnapshotsListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - options?: ManagedClusterSnapshotsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByResourceGroupPagingPage(resourceGroupName, options); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams - ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * @param options The options parameters. - */ - private _list( - options?: ManagedClusterSnapshotsListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Gets a managed cluster snapshot. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - resourceName: string, - options?: ManagedClusterSnapshotsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, resourceName, options }, - getOperationSpec - ); - } - - /** - * Creates or updates a managed cluster snapshot. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - resourceName: string, - parameters: ManagedClusterSnapshot, - options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, resourceName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Updates tags on a managed cluster snapshot. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - resourceName: string, - parameters: TagsObject, - options?: ManagedClusterSnapshotsUpdateTagsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, resourceName, parameters, options }, - updateTagsOperationSpec - ); - } - - /** - * Deletes a managed cluster snapshot. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - resourceName: string, - options?: ManagedClusterSnapshotsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, resourceName, options }, - deleteOperationSpec - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ManagedClusterSnapshotsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ManagedClusterSnapshotsListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterSnapshotListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterSnapshotListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterSnapshot - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterSnapshot - }, - 201: { - bodyMapper: Mappers.ManagedClusterSnapshot - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateTagsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterSnapshot - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterSnapshotListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedClusterSnapshotListResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts index d5c53c65fd5b..f7bfe538ce82 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/managedClusters.ts @@ -50,7 +50,6 @@ import { ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, ManagedClustersRotateClusterCertificatesOptionalParams, - ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersStopOptionalParams, ManagedClustersStartOptionalParams, RunCommandRequest, @@ -454,12 +453,10 @@ export class ManagedClustersImpl implements ManagedClusters { { resourceGroupName, resourceName, parameters, options }, createOrUpdateOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -546,12 +543,10 @@ export class ManagedClustersImpl implements ManagedClusters { { resourceGroupName, resourceName, parameters, options }, updateTagsOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -631,12 +626,10 @@ export class ManagedClustersImpl implements ManagedClusters { { resourceGroupName, resourceName, options }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -715,12 +708,10 @@ export class ManagedClustersImpl implements ManagedClusters { { resourceGroupName, resourceName, parameters, options }, resetServicePrincipalProfileOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -802,12 +793,10 @@ export class ManagedClustersImpl implements ManagedClusters { { resourceGroupName, resourceName, parameters, options }, resetAADProfileOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -888,12 +877,10 @@ export class ManagedClustersImpl implements ManagedClusters { { resourceGroupName, resourceName, options }, rotateClusterCertificatesOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -916,88 +903,6 @@ export class ManagedClustersImpl implements ManagedClusters { return poller.pollUntilDone(); } - /** - * Rotates the service account signing keys of a managed cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - async beginRotateServiceAccountSigningKeys( - resourceGroupName: string, - resourceName: string, - options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, resourceName, options }, - rotateServiceAccountSigningKeysOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; - } - - /** - * Rotates the service account signing keys of a managed cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - async beginRotateServiceAccountSigningKeysAndWait( - resourceGroupName: string, - resourceName: string, - options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams - ): Promise { - const poller = await this.beginRotateServiceAccountSigningKeys( - resourceGroupName, - resourceName, - options - ); - return poller.pollUntilDone(); - } - /** * 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 @@ -1057,12 +962,10 @@ export class ManagedClustersImpl implements ManagedClusters { { resourceGroupName, resourceName, options }, stopOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -1144,12 +1047,10 @@ export class ManagedClustersImpl implements ManagedClusters { { resourceGroupName, resourceName, options }, startOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -1236,12 +1137,10 @@ export class ManagedClustersImpl implements ManagedClusters { { resourceGroupName, resourceName, requestPayload, options }, runCommandOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** @@ -1637,10 +1536,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.CloudError } }, - queryParameters: [ - Parameters.apiVersion, - Parameters.ignorePodDisruptionBudget - ], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1723,29 +1619,6 @@ const rotateClusterCertificatesOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const rotateServiceAccountSigningKeysOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys", - httpMethod: "POST", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.resourceName - ], - headerParameters: [Parameters.accept], - serializer -}; const stopOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop", diff --git a/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts b/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts index b79ddd490026..03c9e8935226 100644 --- a/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts +++ b/sdk/containerservice/arm-containerservice/src/operations/privateEndpointConnections.ts @@ -167,12 +167,10 @@ export class PrivateEndpointConnectionsImpl }, deleteOperationSpec ); - const poller = new LroEngine(lro, { + return new LroEngine(lro, { resumeFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); - await poller.poll(); - return poller; } /** diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts index 67e60e725e9b..6d786ed8c56d 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/index.ts @@ -14,4 +14,3 @@ export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; export * from "./resolvePrivateLinkServiceId"; export * from "./snapshots"; -export * from "./managedClusterSnapshots"; diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts deleted file mode 100644 index bec60709a6e4..000000000000 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusterSnapshots.ts +++ /dev/null @@ -1,91 +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. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ManagedClusterSnapshot, - ManagedClusterSnapshotsListOptionalParams, - ManagedClusterSnapshotsListByResourceGroupOptionalParams, - ManagedClusterSnapshotsGetOptionalParams, - ManagedClusterSnapshotsGetResponse, - ManagedClusterSnapshotsCreateOrUpdateOptionalParams, - ManagedClusterSnapshotsCreateOrUpdateResponse, - TagsObject, - ManagedClusterSnapshotsUpdateTagsOptionalParams, - ManagedClusterSnapshotsUpdateTagsResponse, - ManagedClusterSnapshotsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a ManagedClusterSnapshots. */ -export interface ManagedClusterSnapshots { - /** - * Gets a list of managed cluster snapshots in the specified subscription. - * @param options The options parameters. - */ - list( - options?: ManagedClusterSnapshotsListOptionalParams - ): PagedAsyncIterableIterator; - /** - * Lists managed cluster snapshots in the specified subscription and resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ManagedClusterSnapshotsListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets a managed cluster snapshot. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - resourceName: string, - options?: ManagedClusterSnapshotsGetOptionalParams - ): Promise; - /** - * Creates or updates a managed cluster snapshot. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters The managed cluster snapshot to create or update. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - resourceName: string, - parameters: ManagedClusterSnapshot, - options?: ManagedClusterSnapshotsCreateOrUpdateOptionalParams - ): Promise; - /** - * Updates tags on a managed cluster snapshot. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param parameters Parameters supplied to the Update managed cluster snapshot Tags operation. - * @param options The options parameters. - */ - updateTags( - resourceGroupName: string, - resourceName: string, - parameters: TagsObject, - options?: ManagedClusterSnapshotsUpdateTagsOptionalParams - ): Promise; - /** - * Deletes a managed cluster snapshot. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - resourceName: string, - options?: ManagedClusterSnapshotsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts index 5d7cb831a154..ff803ac9e121 100644 --- a/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts +++ b/sdk/containerservice/arm-containerservice/src/operationsInterfaces/managedClusters.ts @@ -39,7 +39,6 @@ import { ManagedClusterAADProfile, ManagedClustersResetAADProfileOptionalParams, ManagedClustersRotateClusterCertificatesOptionalParams, - ManagedClustersRotateServiceAccountSigningKeysOptionalParams, ManagedClustersStopOptionalParams, ManagedClustersStartOptionalParams, RunCommandRequest, @@ -321,28 +320,6 @@ export interface ManagedClusters { resourceName: string, options?: ManagedClustersRotateClusterCertificatesOptionalParams ): Promise; - /** - * Rotates the service account signing keys of a managed cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - beginRotateServiceAccountSigningKeys( - resourceGroupName: string, - resourceName: string, - options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams - ): Promise, void>>; - /** - * Rotates the service account signing keys of a managed cluster. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param resourceName The name of the managed cluster resource. - * @param options The options parameters. - */ - beginRotateServiceAccountSigningKeysAndWait( - resourceGroupName: string, - resourceName: string, - options?: ManagedClustersRotateServiceAccountSigningKeysOptionalParams - ): Promise; /** * 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 diff --git a/sdk/containerservice/arm-containerservice/test/sampleTest.ts b/sdk/containerservice/arm-containerservice/test/sampleTest.ts new file mode 100644 index 000000000000..7ed89b043e1b --- /dev/null +++ b/sdk/containerservice/arm-containerservice/test/sampleTest.ts @@ -0,0 +1,48 @@ +/* + * 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. + */ + +import { + env, + record, + RecorderEnvironmentSetup, + Recorder +} from "@azure-tools/test-recorder"; +import * as assert from "assert"; + +const recorderEnvSetup: RecorderEnvironmentSetup = { + replaceableVariables: { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" + }, + customizationsOnRecordings: [ + (recording: any): any => + recording.replace( + /"access_token":"[^"]*"/g, + `"access_token":"access_token"` + ) + ], + queryParametersToSkip: [] +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function() { + recorder = record(this, recorderEnvSetup); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/containerservice/arm-containerservice/tsconfig.json b/sdk/containerservice/arm-containerservice/tsconfig.json index 5bad5556bbfd..3e6ae96443f3 100644 --- a/sdk/containerservice/arm-containerservice/tsconfig.json +++ b/sdk/containerservice/arm-containerservice/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-containerservice": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"