diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md index aded4476a252..8341f4d4ff14 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/README.md @@ -40,8 +40,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { const clusterResourceName = "managedClusters"; const clusterName = "testclusterName"; const sourceControlConfigurationName = "testsourceControlConfigurationName"; - const apiVersion = "testapiVersion"; - client.sourceControlConfigurations.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName, apiVersion).then((result) => { + client.sourceControlConfigurations.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName).then((result) => { console.log("The result is:"); console.log(result); }); @@ -89,8 +88,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to const clusterResourceName = "managedClusters"; const clusterName = "testclusterName"; const sourceControlConfigurationName = "testsourceControlConfigurationName"; - const apiVersion = "testapiVersion"; - client.sourceControlConfigurations.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName, apiVersion).then((result) => { + client.sourceControlConfigurations.get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts index 95ebf0d17ec0..7126858bd70a 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/operations.ts @@ -28,26 +28,22 @@ export class Operations { /** * List all the available operations the KubernetesConfiguration resource provider supports. - * @param apiVersion The API version to be used with the HTTP request. * @param [options] The optional parameters * @returns Promise */ - list(apiVersion: string, options?: msRest.RequestOptionsBase): Promise; + list(options?: msRest.RequestOptionsBase): Promise; /** - * @param apiVersion The API version to be used with the HTTP request. * @param callback The callback */ - list(apiVersion: string, callback: msRest.ServiceCallback): void; + list(callback: msRest.ServiceCallback): void; /** - * @param apiVersion The API version to be used with the HTTP request. * @param options The optional parameters * @param callback The callback */ - list(apiVersion: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(apiVersion: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - apiVersion, options }, listOperationSpec, diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts index b3e3933d0990..769e6cbc8979 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/operations/sourceControlConfigurations.ts @@ -38,11 +38,10 @@ export class SourceControlConfigurations { * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param apiVersion The API version to be used with the HTTP request. * @param [options] The optional parameters * @returns Promise */ - get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, options?: msRest.RequestOptionsBase): Promise; + get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS @@ -53,10 +52,9 @@ export class SourceControlConfigurations { * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param apiVersion The API version to be used with the HTTP request. * @param callback The callback */ - get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS @@ -67,12 +65,11 @@ export class SourceControlConfigurations { * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param apiVersion The API version to be used with the HTTP request. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterRp: Models.ClusterRp, clusterResourceName: Models.ClusterResourceName, clusterName: string, sourceControlConfigurationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -80,7 +77,6 @@ export class SourceControlConfigurations { clusterResourceName, clusterName, sourceControlConfigurationName, - apiVersion, options }, getOperationSpec, @@ -98,12 +94,11 @@ export class SourceControlConfigurations { * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param apiVersion The API version to be used with the HTTP request. * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, sourceControlConfiguration: Models.SourceControlConfiguration, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfiguration, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS @@ -114,11 +109,10 @@ export class SourceControlConfigurations { * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param apiVersion The API version to be used with the HTTP request. * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. * @param callback The callback */ - createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, sourceControlConfiguration: Models.SourceControlConfiguration, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfiguration, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS @@ -129,13 +123,12 @@ export class SourceControlConfigurations { * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param apiVersion The API version to be used with the HTTP request. * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. * @param options The optional parameters * @param callback The callback */ - createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, sourceControlConfiguration: Models.SourceControlConfiguration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, sourceControlConfiguration: Models.SourceControlConfiguration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfiguration, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, clusterRp: Models.ClusterRp1, clusterResourceName: Models.ClusterResourceName1, clusterName: string, sourceControlConfigurationName: string, sourceControlConfiguration: Models.SourceControlConfiguration, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -143,7 +136,6 @@ export class SourceControlConfigurations { clusterResourceName, clusterName, sourceControlConfigurationName, - apiVersion, sourceControlConfiguration, options }, @@ -163,12 +155,11 @@ export class SourceControlConfigurations { * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param apiVersion The API version to be used with the HTTP request. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp2, clusterResourceName: Models.ClusterResourceName2, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,clusterRp,clusterResourceName,clusterName,sourceControlConfigurationName,apiVersion,options) + deleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp2, clusterResourceName: Models.ClusterResourceName2, clusterName: string, sourceControlConfigurationName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,clusterRp,clusterResourceName,clusterName,sourceControlConfigurationName,options) .then(lroPoller => lroPoller.pollUntilFinished()); } @@ -182,11 +173,10 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param apiVersion The API version to be used with the HTTP request. * @param [options] The optional parameters * @returns Promise */ - list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, apiVersion: string, options?: msRest.RequestOptionsBase): Promise; + list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName The name of the resource group. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS @@ -196,10 +186,9 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param apiVersion The API version to be used with the HTTP request. * @param callback The callback */ - list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, apiVersion: string, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName The name of the resource group. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS @@ -209,19 +198,17 @@ export class SourceControlConfigurations { * AKS clusters) or connectedClusters (for OnPrem K8S clusters). Possible values include: * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. - * @param apiVersion The API version to be used with the HTTP request. * @param options The optional parameters * @param callback The callback */ - list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, apiVersion: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, apiVersion: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, clusterRp: Models.ClusterRp3, clusterResourceName: Models.ClusterResourceName3, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, clusterRp, clusterResourceName, clusterName, - apiVersion, options }, listOperationSpec, @@ -240,11 +227,10 @@ export class SourceControlConfigurations { * 'managedClusters', 'connectedClusters' * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @param apiVersion The API version to be used with the HTTP request. * @param [options] The optional parameters * @returns Promise */ - beginDeleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp2, clusterResourceName: Models.ClusterResourceName2, clusterName: string, sourceControlConfigurationName: string, apiVersion: string, options?: msRest.RequestOptionsBase): Promise { + beginDeleteMethod(resourceGroupName: string, clusterRp: Models.ClusterRp2, clusterResourceName: Models.ClusterResourceName2, clusterName: string, sourceControlConfigurationName: string, options?: msRest.RequestOptionsBase): Promise { return this.client.sendLRORequest( { resourceGroupName, @@ -252,7 +238,6 @@ export class SourceControlConfigurations { clusterResourceName, clusterName, sourceControlConfigurationName, - apiVersion, options }, beginDeleteMethodOperationSpec, diff --git a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts index 4cf94f2c58f3..8d44f60c79ad 100644 --- a/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts +++ b/sdk/kubernetesconfiguration/arm-kubernetesconfiguration/src/sourceControlConfigurationClientContext.ts @@ -18,6 +18,7 @@ const packageVersion = "1.0.0"; export class SourceControlConfigurationClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; subscriptionId: string; + apiVersion?: string; /** * Initializes a new instance of the SourceControlConfigurationClient class. @@ -44,6 +45,7 @@ export class SourceControlConfigurationClientContext extends msRestAzure.AzureSe super(credentials, options); + this.apiVersion = '2019-11-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";