From f24da444511f45b436f133455cddccdbdba79ca7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 8 Mar 2019 20:04:53 +0000 Subject: [PATCH] Generated from fe8c0d6f96c357902dc771cc4776062668fb609f Removing unreferenced definition --- .../lib/models/ddosProtectionPlansMappers.ts | 1 + .../@azure/arm-network/lib/models/index.ts | 38 +++++++++++ .../lib/operations/ddosProtectionPlans.ts | 65 +++++++++++++++++++ 3 files changed, 104 insertions(+) diff --git a/packages/@azure/arm-network/lib/models/ddosProtectionPlansMappers.ts b/packages/@azure/arm-network/lib/models/ddosProtectionPlansMappers.ts index 87ab43115caa..421aac0aa68c 100644 --- a/packages/@azure/arm-network/lib/models/ddosProtectionPlansMappers.ts +++ b/packages/@azure/arm-network/lib/models/ddosProtectionPlansMappers.ts @@ -13,6 +13,7 @@ export { DdosProtectionPlan, BaseResource, SubResource, + TagsObject, DdosProtectionPlanListResult, NetworkInterfaceTapConfiguration, VirtualNetworkTap, diff --git a/packages/@azure/arm-network/lib/models/index.ts b/packages/@azure/arm-network/lib/models/index.ts index 570d4dfb123e..43f71ccfaeac 100644 --- a/packages/@azure/arm-network/lib/models/index.ts +++ b/packages/@azure/arm-network/lib/models/index.ts @@ -13373,6 +13373,25 @@ export type DdosProtectionPlansCreateOrUpdateResponse = DdosProtectionPlan & { }; }; +/** + * Contains response data for the updateTags operation. + */ +export type DdosProtectionPlansUpdateTagsResponse = DdosProtectionPlan & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DdosProtectionPlan; + }; +}; + /** * Contains response data for the list operation. */ @@ -13430,6 +13449,25 @@ export type DdosProtectionPlansBeginCreateOrUpdateResponse = DdosProtectionPlan }; }; +/** + * Contains response data for the beginUpdateTags operation. + */ +export type DdosProtectionPlansBeginUpdateTagsResponse = DdosProtectionPlan & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: DdosProtectionPlan; + }; +}; + /** * Contains response data for the listNext operation. */ diff --git a/packages/@azure/arm-network/lib/operations/ddosProtectionPlans.ts b/packages/@azure/arm-network/lib/operations/ddosProtectionPlans.ts index 47b60aa9ca05..070b8445f5f7 100644 --- a/packages/@azure/arm-network/lib/operations/ddosProtectionPlans.ts +++ b/packages/@azure/arm-network/lib/operations/ddosProtectionPlans.ts @@ -84,6 +84,19 @@ export class DdosProtectionPlans { .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } + /** + * Update a DDoS protection plan tags + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the update DDoS protection plan resource tags. + * @param [options] The optional parameters + * @returns Promise + */ + updateTags(resourceGroupName: string, ddosProtectionPlanName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.beginUpdateTags(resourceGroupName,ddosProtectionPlanName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** * Gets all DDoS protection plans in a subscription. * @param [options] The optional parameters @@ -174,6 +187,26 @@ export class DdosProtectionPlans { options); } + /** + * Update a DDoS protection plan tags + * @param resourceGroupName The name of the resource group. + * @param ddosProtectionPlanName The name of the DDoS protection plan. + * @param parameters Parameters supplied to the update DDoS protection plan resource tags. + * @param [options] The optional parameters + * @returns Promise + */ + beginUpdateTags(resourceGroupName: string, ddosProtectionPlanName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + ddosProtectionPlanName, + parameters, + options + }, + beginUpdateTagsOperationSpec, + options); + } + /** * Gets all DDoS protection plans in a subscription. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -365,6 +398,38 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; +const beginUpdateTagsOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.ddosProtectionPlanName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion0 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.TagsObject, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DdosProtectionPlan + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const listNextOperationSpec: msRest.OperationSpec = { httpMethod: "GET", baseUrl: "https://management.azure.com",