Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR containerservices/resource-manager] [AKS] added PATCH endpoint for updating tags #3194

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/services/containerservicesManagement/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,18 @@ export interface OperationValue {
readonly provider?: string;
}

/**
* @class
* Initializes a new instance of the TagsObject class.
* @constructor
* Tags object for patch operations.
*
* @member {object} [tags] Resource tags.
*/
export interface TagsObject {
tags?: { [propertyName: string]: string };
}

/**
* @class
* Initializes a new instance of the ManagedClusterAgentPoolProfile class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ exports.ContainerServiceVMDiagnostics = require('./containerServiceVMDiagnostics
exports.ContainerServiceDiagnosticsProfile = require('./containerServiceDiagnosticsProfile');
exports.ContainerService = require('./containerService');
exports.OperationValue = require('./operationValue');
exports.TagsObject = require('./tagsObject');
exports.ManagedClusterAgentPoolProfile = require('./managedClusterAgentPoolProfile');
exports.ContainerServiceNetworkProfile = require('./containerServiceNetworkProfile');
exports.ManagedClusterAddonProfile = require('./managedClusterAddonProfile');
Expand Down
59 changes: 59 additions & 0 deletions lib/services/containerservicesManagement/lib/models/tagsObject.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/

'use strict';

/**
* Tags object for patch operations.
*
*/
class TagsObject {
/**
* Create a TagsObject.
* @member {object} [tags] Resource tags.
*/
constructor() {
}

/**
* Defines the metadata of TagsObject
*
* @returns {object} metadata of TagsObject
*
*/
mapper() {
return {
required: false,
serializedName: 'TagsObject',
type: {
name: 'Composite',
className: 'TagsObject',
modelProperties: {
tags: {
required: false,
serializedName: 'tags',
type: {
name: 'Dictionary',
value: {
required: false,
serializedName: 'StringElementType',
type: {
name: 'String'
}
}
}
}
}
}
};
}
}

module.exports = TagsObject;
146 changes: 146 additions & 0 deletions lib/services/containerservicesManagement/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1999,6 +1999,79 @@ export interface ManagedClusters {
createOrUpdate(resourceGroupName: string, resourceName: string, parameters: models.ManagedCluster, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ManagedCluster>): void;


/**
* @summary Updates tags on a managed cluster.
*
* Updates a managed cluster with the specified tags.
*
* @param {string} resourceGroupName The name of the resource group.
*
* @param {string} resourceName The name of the managed cluster resource.
*
* @param {object} parameters Parameters supplied to the Update Managed Cluster
* Tags operation.
*
* @param {object} [parameters.tags] Resource tags.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<ManagedCluster>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
updateTagsWithHttpOperationResponse(resourceGroupName: string, resourceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ManagedCluster>>;

/**
* @summary Updates tags on a managed cluster.
*
* Updates a managed cluster with the specified tags.
*
* @param {string} resourceGroupName The name of the resource group.
*
* @param {string} resourceName The name of the managed cluster resource.
*
* @param {object} parameters Parameters supplied to the Update Managed Cluster
* Tags operation.
*
* @param {object} [parameters.tags] Resource tags.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [optionalCallback] - The optional callback.
*
* @returns {ServiceCallback|Promise} If a callback was passed as the last
* parameter then it returns the callback else returns a Promise.
*
* {Promise} A promise is returned.
*
* @resolve {ManagedCluster} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*
* {ServiceCallback} optionalCallback(err, result, request, response)
*
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
*
* {ManagedCluster} [result] - The deserialized result object if an error did not occur.
* See {@link ManagedCluster} for more information.
*
* {WebResource} [request] - The HTTP Request object if an error did not occur.
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
updateTags(resourceGroupName: string, resourceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ManagedCluster>;
updateTags(resourceGroupName: string, resourceName: string, parameters: models.TagsObject, callback: ServiceCallback<models.ManagedCluster>): void;
updateTags(resourceGroupName: string, resourceName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ManagedCluster>): void;


/**
* @summary Deletes a managed cluster.
*
Expand Down Expand Up @@ -2324,6 +2397,79 @@ export interface ManagedClusters {
beginCreateOrUpdate(resourceGroupName: string, resourceName: string, parameters: models.ManagedCluster, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ManagedCluster>): void;


/**
* @summary Updates tags on a managed cluster.
*
* Updates a managed cluster with the specified tags.
*
* @param {string} resourceGroupName The name of the resource group.
*
* @param {string} resourceName The name of the managed cluster resource.
*
* @param {object} parameters Parameters supplied to the Update Managed Cluster
* Tags operation.
*
* @param {object} [parameters.tags] Resource tags.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<ManagedCluster>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, resourceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.ManagedCluster>>;

/**
* @summary Updates tags on a managed cluster.
*
* Updates a managed cluster with the specified tags.
*
* @param {string} resourceGroupName The name of the resource group.
*
* @param {string} resourceName The name of the managed cluster resource.
*
* @param {object} parameters Parameters supplied to the Update Managed Cluster
* Tags operation.
*
* @param {object} [parameters.tags] Resource tags.
*
* @param {object} [options] Optional Parameters.
*
* @param {object} [options.customHeaders] Headers that will be added to the
* request
*
* @param {ServiceCallback} [optionalCallback] - The optional callback.
*
* @returns {ServiceCallback|Promise} If a callback was passed as the last
* parameter then it returns the callback else returns a Promise.
*
* {Promise} A promise is returned.
*
* @resolve {ManagedCluster} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*
* {ServiceCallback} optionalCallback(err, result, request, response)
*
* {Error|ServiceError} err - The Error object if an error occurred, null otherwise.
*
* {ManagedCluster} [result] - The deserialized result object if an error did not occur.
* See {@link ManagedCluster} for more information.
*
* {WebResource} [request] - The HTTP Request object if an error did not occur.
*
* {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur.
*/
beginUpdateTags(resourceGroupName: string, resourceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.ManagedCluster>;
beginUpdateTags(resourceGroupName: string, resourceName: string, parameters: models.TagsObject, callback: ServiceCallback<models.ManagedCluster>): void;
beginUpdateTags(resourceGroupName: string, resourceName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.ManagedCluster>): void;


/**
* @summary Deletes a managed cluster.
*
Expand Down
Loading