Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export {
DdosProtectionPlan,
BaseResource,
SubResource,
TagsObject,
DdosProtectionPlanListResult,
NetworkInterfaceTapConfiguration,
VirtualNetworkTap,
Expand Down
38 changes: 38 additions & 0 deletions packages/@azure/arm-network/lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
*/
Expand Down
65 changes: 65 additions & 0 deletions packages/@azure/arm-network/lib/operations/ddosProtectionPlans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,19 @@ export class DdosProtectionPlans {
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.DdosProtectionPlansCreateOrUpdateResponse>;
}

/**
* 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<Models.DdosProtectionPlansUpdateTagsResponse>
*/
updateTags(resourceGroupName: string, ddosProtectionPlanName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise<Models.DdosProtectionPlansUpdateTagsResponse> {
return this.beginUpdateTags(resourceGroupName,ddosProtectionPlanName,parameters,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.DdosProtectionPlansUpdateTagsResponse>;
}

/**
* Gets all DDoS protection plans in a subscription.
* @param [options] The optional parameters
Expand Down Expand Up @@ -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<msRestAzure.LROPoller>
*/
beginUpdateTags(resourceGroupName: string, ddosProtectionPlanName: string, parameters: Models.TagsObject, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
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.
Expand Down Expand Up @@ -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",
Expand Down