Skip to content

Commit f3c63d1

Browse files
committed
Migration swagger
1 parent 3b872bf commit f3c63d1

File tree

6 files changed

+327
-1
lines changed

6 files changed

+327
-1
lines changed

specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/afdx.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4183,6 +4183,13 @@
41834183
"description": "The host name of the domain. Must be a domain name.",
41844184
"type": "string"
41854185
},
4186+
"extendedProperties": {
4187+
"description": "Key-Value pair representing migration properties for domains.",
4188+
"type": "object",
4189+
"additionalProperties": {
4190+
"type": "string"
4191+
}
4192+
},
41864193
"validationProperties": {
41874194
"description": "Values the customer needs to validate domain ownership",
41884195
"readOnly": true,

specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdn.json

Lines changed: 262 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,153 @@
332332
"x-ms-long-running-operation": true
333333
}
334334
},
335+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/canMigrate": {
336+
"post": {
337+
"tags": [
338+
"Profiles"
339+
],
340+
"description": "Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile.",
341+
"operationId": "Profiles_CanMigrate",
342+
"x-ms-examples": {
343+
"Profiles_CanMigrate": {
344+
"$ref": "./examples/Profiles_CanMigrate.json"
345+
}
346+
},
347+
"parameters": [
348+
{
349+
"$ref": "#/parameters/resourceGroupNameParameter"
350+
},
351+
{
352+
"name": "profileName",
353+
"in": "path",
354+
"description": "Name of the CDN profile which is unique within the resource group.",
355+
"required": true,
356+
"type": "string"
357+
},
358+
{
359+
"$ref": "#/parameters/subscriptionIdParameter"
360+
},
361+
{
362+
"$ref": "#/parameters/apiVersionParameter"
363+
}
364+
],
365+
"responses": {
366+
"200": {
367+
"description": "OK. The request has succeeded.",
368+
"schema": {
369+
"$ref": "#/definitions/CanMigrateResult"
370+
}
371+
},
372+
"default": {
373+
"description": "CDN error response describing why the operation failed.",
374+
"schema": {
375+
"$ref": "#/definitions/ErrorResponse"
376+
}
377+
}
378+
},
379+
"x-ms-long-running-operation": true
380+
}
381+
},
382+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrate": {
383+
"post": {
384+
"tags": [
385+
"Profiles"
386+
],
387+
"description": "Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. The change need to be committed after this.",
388+
"operationId": "Profiles_Migrate",
389+
"x-ms-examples": {
390+
"Profiles_Create": {
391+
"$ref": "./examples/Profiles_Migrate.json"
392+
}
393+
},
394+
"parameters": [
395+
{
396+
"$ref": "#/parameters/resourceGroupNameParameter"
397+
},
398+
{
399+
"name": "profileName",
400+
"in": "path",
401+
"description": "Name of the CDN profile which is unique within the resource group.",
402+
"required": true,
403+
"type": "string"
404+
},
405+
{
406+
"$ref": "#/parameters/subscriptionIdParameter"
407+
},
408+
{
409+
"$ref": "#/parameters/apiVersionParameter"
410+
},
411+
{
412+
"description": "Properties needed to migrate the profile.",
413+
"in": "body",
414+
"name": "migrationParameters",
415+
"required": true,
416+
"schema": {
417+
"$ref": "#/definitions/MigrationParameters"
418+
}
419+
}
420+
],
421+
"responses": {
422+
"200": {
423+
"description": "OK. The request has succeeded.",
424+
"schema": {
425+
"$ref": "#/definitions/MigrateResult"
426+
}
427+
},
428+
"default": {
429+
"description": "CDN error response describing why the operation failed.",
430+
"schema": {
431+
"$ref": "#/definitions/ErrorResponse"
432+
}
433+
}
434+
},
435+
"x-ms-long-running-operation": true
436+
}
437+
},
438+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationCommit": {
439+
"post": {
440+
"tags": [
441+
"Profiles"
442+
],
443+
"description": "Commit the migrated Azure Frontdoor(Standard/Premium) profile.",
444+
"operationId": "Profiles_Migrate",
445+
"x-ms-examples": {
446+
"Profiles_Create": {
447+
"$ref": "./examples/Profiles_MigrationCommit.json"
448+
}
449+
},
450+
"parameters": [
451+
{
452+
"$ref": "#/parameters/resourceGroupNameParameter"
453+
},
454+
{
455+
"name": "profileName",
456+
"in": "path",
457+
"description": "Name of the CDN profile which is unique within the resource group.",
458+
"required": true,
459+
"type": "string"
460+
},
461+
{
462+
"$ref": "#/parameters/subscriptionIdParameter"
463+
},
464+
{
465+
"$ref": "#/parameters/apiVersionParameter"
466+
}
467+
],
468+
"responses": {
469+
"200": {
470+
"description": "OK. The request has succeeded."
471+
},
472+
"default": {
473+
"description": "CDN error response describing why the operation failed.",
474+
"schema": {
475+
"$ref": "#/definitions/ErrorResponse"
476+
}
477+
}
478+
},
479+
"x-ms-long-running-operation": true
480+
}
481+
},
335482
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/generateSsoUri": {
336483
"post": {
337484
"tags": [
@@ -2465,7 +2612,9 @@
24652612
"Creating",
24662613
"Active",
24672614
"Deleting",
2468-
"Disabled"
2615+
"Disabled",
2616+
"Migrating",
2617+
"Migrated"
24692618
],
24702619
"type": "string",
24712620
"x-ms-enum": {
@@ -2478,6 +2627,16 @@
24782627
"description": "Provisioning status of the profile.",
24792628
"type": "string"
24802629
},
2630+
"migratedTo": {
2631+
"readOnly": true,
2632+
"description": "Reference of the Profile this is migrated to.",
2633+
"$ref": "#/definitions/ResourceReference"
2634+
},
2635+
"migratedFrom": {
2636+
"readOnly": true,
2637+
"description": "Reference of the Profile this is migrated from.",
2638+
"$ref": "#/definitions/ResourceReference"
2639+
},
24812640
"frontdoorId": {
24822641
"readOnly": true,
24832642
"type": "string",
@@ -2516,6 +2675,108 @@
25162675
},
25172676
"x-ms-azure-resource": true
25182677
},
2678+
"CanMigrateResult": {
2679+
"type": "object",
2680+
"description": "Result for canMigrate operation.",
2681+
"properties": {
2682+
"canMigrate": {
2683+
"readOnly": true,
2684+
"description": "Flag that says if the profile can be migrated",
2685+
"type": "boolean"
2686+
},
2687+
"defaultSku": {
2688+
"readOnly": true,
2689+
"description": "Recommended sku for the migration",
2690+
"type": "string",
2691+
"enum": [
2692+
"Standard_AzureFrontDoor",
2693+
"Premium_AzureFrontDoor"
2694+
],
2695+
"x-ms-enum": {
2696+
"name": "CanMigrateDefaultSku",
2697+
"modelAsString": true
2698+
}
2699+
},
2700+
"errors": {
2701+
"readOnly": true,
2702+
"description": "List of validation errors",
2703+
"$ref": "#/definitions/MigrationErrorsListResponse"
2704+
}
2705+
},
2706+
"x-ms-azure-resource": true
2707+
},
2708+
"MigrationErrorsListResponse": {
2709+
"description": "Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message.",
2710+
"type": "object",
2711+
"properties": {
2712+
"errors":{
2713+
"items": {
2714+
"$ref": "#/definitions/MigrationErrorType"
2715+
},
2716+
"type": "array"
2717+
}
2718+
}
2719+
},
2720+
"MigrationErrorType": {
2721+
"description": "Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message.",
2722+
"type": "object",
2723+
"properties": {
2724+
"code": {
2725+
"description": "Error code.",
2726+
"readOnly": true,
2727+
"type": "string"
2728+
},
2729+
"message": {
2730+
"description": "Error message indicating why the operation failed.",
2731+
"readOnly": true,
2732+
"type": "string"
2733+
}
2734+
}
2735+
},
2736+
"MigrationParameters": {
2737+
"type": "object",
2738+
"description": "Request body for Migrate operation.",
2739+
"properties": {
2740+
"Sku": {
2741+
"description": "Sku for the migration",
2742+
"type": "string",
2743+
"enum": [
2744+
"Standard_AzureFrontDoor",
2745+
"Premium_AzureFrontDoor"
2746+
],
2747+
"x-ms-enum": {
2748+
"name": "MigrationSku",
2749+
"modelAsString": true
2750+
}
2751+
}
2752+
},
2753+
"x-ms-azure-resource": true
2754+
},
2755+
"MigrateResult": {
2756+
"type": "object",
2757+
"description": "Result for canMigrate operation.",
2758+
"properties": {
2759+
"MigratedProfileArmResourceId": {
2760+
"readOnly": true,
2761+
"description": "Arm resource id of the migrated profile",
2762+
"$ref": "#/definitions/ResourceReference"
2763+
},
2764+
"MigratedWafArmResourceIds": {
2765+
"description": "Arm resource ids of the waf resources",
2766+
"type": "array",
2767+
"items": {
2768+
"description": "A reference to a origin.",
2769+
"$ref": "#/definitions/ResourceReference"
2770+
}
2771+
},
2772+
"errors": {
2773+
"readOnly": true,
2774+
"description": "List of validation errors",
2775+
"$ref": "#/definitions/MigrationErrorsListResponse"
2776+
}
2777+
},
2778+
"x-ms-azure-resource": true
2779+
},
25192780
"SsoUri": {
25202781
"description": "The URI required to login to the supplemental portal from the Azure portal.",
25212782
"type": "object",

specification/cdn/resource-manager/Microsoft.Cdn/stable/2021-06-01/cdnwebapplicationfirewall.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,12 @@
396396
"$ref": "#/definitions/CdnEndpoint"
397397
}
398398
},
399+
"migratedTo": {
400+
"readOnly": true,
401+
"description": "Reference of the Profile this is migrated to.",
402+
"type": "object",
403+
"$ref": "./cdn.json#/definitions/ResourceReference"
404+
},
399405
"provisioningState": {
400406
"readOnly": true,
401407
"type": "string",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-06-01",
4+
"subscriptionId": "subid",
5+
"resourceGroupName": "RG",
6+
"profileName": "profile1"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"properties": {
12+
"canMigrate": true,
13+
"defaultSku": "Standard_AzureFrontDoor",
14+
"errors": null
15+
}
16+
}
17+
}
18+
}
19+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-06-01",
4+
"subscriptionId": "subid",
5+
"resourceGroupName": "RG",
6+
"profileName": "profile1",
7+
"properties":{
8+
"sku": "Standard_AzureFrontDoor"
9+
}
10+
},
11+
"responses": {
12+
"200": {
13+
"body": {
14+
"properties": {
15+
"MigratedProfileArmResourceId": {"id":"/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/migratedprofile1"},
16+
"MigratedWafArmResourceIds": null,
17+
"errors": null
18+
}
19+
}
20+
}
21+
}
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-06-01",
4+
"subscriptionId": "subid",
5+
"resourceGroupName": "RG",
6+
"profileName": "profile1"
7+
},
8+
"responses": {
9+
"200": {}
10+
}
11+
}

0 commit comments

Comments
 (0)