-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Unify EdgeActions with CDN 2025-09-01-preview and migrate to TypeSpec #38054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tundwed
merged 10 commits into
main
from
feature/cdn-edge-actions-api-version-unification
Nov 4, 2025
Merged
Changes from 2 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6fe6db0
Add EdgeActions 2025-09-01-preview baseline from 2024-07-22-preview
6dd2b1c
Migrate EdgeActions to TypeSpec with API changes for 2025-09-01-preview
fb45adf
fix java sdk validation
57bba45
fix(edgeactions): address PR review comments for 2025-09-01-preview
3a7c780
style(edgeactions): apply tsp format to TypeSpec files
a5988e2
remove unnecessary ProvisioningStateMustBeReadOnly suppression
12f7618
Revert "remove unnecessary ProvisioningStateMustBeReadOnly suppression"
98cc7b2
extend ResourceProvisioningState for standard ARM compliance
a327a60
remove ProvisioningStateMustBeReadOnly suppression
ed8c0de
add use-read-only-status-schema to resolve ProvisioningStateMustBeRea…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
240 changes: 240 additions & 0 deletions
240
specification/cdn/resource-manager/Microsoft.Cdn/EdgeActions/edgeactionsbasemodels.tsp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,240 @@ | ||
| import "@typespec/http"; | ||
| import "@typespec/rest"; | ||
| import "@typespec/versioning"; | ||
| import "@azure-tools/typespec-autorest"; | ||
| import "@azure-tools/typespec-azure-core"; | ||
| import "@azure-tools/typespec-azure-resource-manager"; | ||
| import "@azure-tools/typespec-client-generator-core"; | ||
|
|
||
| using TypeSpec.Http; | ||
| using TypeSpec.Rest; | ||
| using TypeSpec.Versioning; | ||
| using Azure.ResourceManager; | ||
| using Azure.ResourceManager.Foundations; | ||
| using Azure.Core; | ||
| using Azure.ClientGenerator.Core; | ||
|
|
||
| namespace Microsoft.Cdn; | ||
|
|
||
| /** The SKU type for the edge action */ | ||
| model SkuType { | ||
| /** The name of the SKU */ | ||
| name: string; | ||
|
|
||
| /** The tier of the SKU */ | ||
| tier: string; | ||
| } | ||
|
|
||
| /** The deployment type for edge action versions */ | ||
| union EdgeActionVersionDeploymentType { | ||
| string, | ||
|
|
||
| /** ZIP file deployment */ | ||
| zip: "zip", | ||
|
|
||
| /** Single file deployment */ | ||
| file: "file", | ||
|
|
||
| /** Other deployment types */ | ||
| others: "others", | ||
| } | ||
|
|
||
| /** The validation status for edge action versions */ | ||
| union EdgeActionVersionValidationStatus { | ||
| string, | ||
|
|
||
| /** Validation succeeded */ | ||
| Succeeded: "Succeeded", | ||
|
|
||
| /** Validation failed */ | ||
| Failed: "Failed", | ||
| } | ||
|
|
||
| /** Indicates whether this is the default version */ | ||
| union EdgeActionIsDefaultVersion { | ||
| string, | ||
|
|
||
| /** This is the default version */ | ||
| True: "True", | ||
|
|
||
| /** This is not the default version */ | ||
| False: "False", | ||
| } | ||
|
|
||
| /** The status of an operation */ | ||
| union OperationStatus { | ||
| string, | ||
|
|
||
| /** Operation is running */ | ||
| Running: "Running", | ||
|
|
||
| /** Operation succeeded */ | ||
| Succeeded: "Succeeded", | ||
|
|
||
| /** Operation failed */ | ||
| Failed: "Failed", | ||
|
|
||
| /** Operation was canceled */ | ||
| Canceled: "Canceled", | ||
| } | ||
|
|
||
| @pattern("[a-zA-Z0-9]+") | ||
| @maxLength(50) | ||
| scalar smallString extends string; | ||
|
|
||
| @doc("ARM resource identifier for attached routes") | ||
| scalar AttachedResourceId | ||
| extends Azure.Core.armResourceIdentifier<[ | ||
| { | ||
| type: "Microsoft.Cdn/Profiles/afdEndpoints/routes", | ||
| } | ||
| ]>; | ||
|
|
||
| @doc("ARM resource identifier for edge action versions") | ||
|
tundwed marked this conversation as resolved.
Outdated
|
||
| scalar EdgeActionVersionId | ||
| extends Azure.Core.armResourceIdentifier<[ | ||
| { | ||
| type: "Microsoft.Cdn/edgeActions/versions", | ||
| } | ||
| ]>; | ||
|
|
||
| /** The status of the current operation */ | ||
| @Azure.Core.lroStatus | ||
| union ProvisioningState { | ||
|
tundwed marked this conversation as resolved.
|
||
| string, | ||
|
|
||
| @doc("The operation completed successfully") | ||
| Succeeded: "Succeeded", | ||
|
|
||
| @doc("The operation failed") | ||
| Failed: "Failed", | ||
|
|
||
| @doc("The operation was canceled") | ||
| Canceled: "Canceled", | ||
|
|
||
| @doc("Initial provisioning in progress") | ||
| Provisioning: "Provisioning", | ||
|
|
||
| @doc("Upgrade in progress") | ||
| Upgrading: "Upgrading", | ||
| } | ||
|
|
||
| /** Edge action attachment information */ | ||
| model EdgeActionAttachment { | ||
| @doc("The edge action attachment id") | ||
| @visibility(Lifecycle.Read) | ||
| id: string; | ||
|
|
||
| @doc("The attached resource Id") | ||
| @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) | ||
| attachedResourceId: AttachedResourceId; | ||
| } | ||
|
|
||
| /** Edge action attachment response */ | ||
| @clientName("EdgeActionAttachmentResult", "csharp") | ||
| model EdgeActionAttachmentResponse { | ||
| @doc("Non changing guid to identity edge action") | ||
| @visibility(Lifecycle.Read) | ||
| edgeActionId: string; | ||
| } | ||
|
|
||
| @doc("Represents an edge action properties") | ||
| model EdgeActionProperties { | ||
| @doc("The provisioning state of the edge action") | ||
| @visibility(Lifecycle.Read) | ||
| provisioningState?: ProvisioningState; | ||
|
|
||
| @doc("A list of attachments for the edge action") | ||
| @visibility(Lifecycle.Read) | ||
| attachments: EdgeActionAttachment[]; | ||
| } | ||
|
|
||
| @doc("Represents an edge action version") | ||
| model EdgeActionVersionProperties { | ||
| @doc("The deployment type") | ||
| @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) | ||
| deploymentType: EdgeActionVersionDeploymentType; | ||
|
|
||
| @doc("The validation status") | ||
| @visibility(Lifecycle.Read) | ||
| validationStatus: EdgeActionVersionValidationStatus; | ||
|
|
||
| @doc("The provisioning state") | ||
| @visibility(Lifecycle.Read) | ||
| provisioningState?: ProvisioningState; | ||
|
|
||
| @doc("The active state") | ||
| @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) | ||
| isDefaultVersion: EdgeActionIsDefaultVersion; | ||
|
|
||
| @doc("The last update time in UTC for package update") | ||
| @visibility(Lifecycle.Read) | ||
| lastPackageUpdateTime: utcDateTime; | ||
| } | ||
|
|
||
| /** Properties for edge action execution filter */ | ||
| model EdgeActionExecutionFilterProperties { | ||
| @doc("The referenced versionId of the edgeaction version") | ||
| @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) | ||
| versionId: EdgeActionVersionId; | ||
|
|
||
| @doc("The last update time in UTC for the execution filter") | ||
| @visibility(Lifecycle.Read) | ||
| lastUpdateTime: utcDateTime; | ||
|
|
||
| @doc("Custom Header Key associated with the execution filter") | ||
| @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) | ||
| executionFilterIdentifierHeaderName: string; | ||
|
|
||
| @doc("Custom Header Value associated with the execution filter") | ||
| @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) | ||
| executionFilterIdentifierHeaderValue: string; | ||
|
|
||
| @doc("The provisioning state") | ||
| @visibility(Lifecycle.Read) | ||
| provisioningState?: ProvisioningState; | ||
| } | ||
|
|
||
| /** Version code information for edge action */ | ||
| model VersionCode { | ||
| @doc("The version code deployment content ") | ||
| @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) | ||
| content: string; | ||
|
|
||
| @doc("The version code name") | ||
| @visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update) | ||
| name: string; | ||
| } | ||
|
|
||
| /** Edge action operation properties */ | ||
| model EdgeActionOperationProperties { | ||
| @doc("The resource id of the operation.") | ||
| resourceId: string; | ||
|
|
||
| @doc("The GUID representing operationID.") | ||
| operationId: string; | ||
|
|
||
| @doc("The current status of the operation.") | ||
| status: OperationStatus; | ||
|
|
||
| @doc("The operation type.") | ||
| operationType: string; | ||
|
|
||
| @doc("The start time of the operation.") | ||
| startTime?: utcDateTime; | ||
|
|
||
| @doc("The end time of the operation (if completed).") | ||
| endTime?: utcDateTime; | ||
|
|
||
| @doc("Error details, if applicable.") | ||
| error?: ErrorDetails; | ||
| } | ||
|
|
||
| /** Error details for operations */ | ||
| model ErrorDetails { | ||
| @doc("Error code.") | ||
| code: string; | ||
|
|
||
| @doc("Detailed error message.") | ||
| message: string; | ||
| } | ||
51 changes: 51 additions & 0 deletions
51
...rosoft.Cdn/EdgeActions/examples/2025-09-01-preview/EdgeActionExecutionFilters_Create.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| { | ||
| "operationId": "EdgeActionExecutionFilters_Create", | ||
| "title": "CreateEdgeActionExecutionFilters", | ||
| "parameters": { | ||
| "subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
| "resourceGroupName": "testrg", | ||
| "api-version": "2025-09-01-preview", | ||
| "edgeActionName": "edgeAction1", | ||
| "executionFilter": "executionFilter1", | ||
| "resource": { | ||
| "location": "global", | ||
| "properties": { | ||
| "versionId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testrg/providers/Microsoft.Cdn/EdgeActions/edgeAction1/versions/version1", | ||
| "executionFilterIdentifierHeaderName": "header-key", | ||
| "executionFilterIdentifierHeaderValue": "header-value" | ||
| } | ||
| } | ||
| }, | ||
| "responses": { | ||
| "201": { | ||
| "body": { | ||
| "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Cdn/edgeActions/edgeAction1/executionFilters/executionFilters1", | ||
| "name": "executionFilter1", | ||
| "type": "Microsoft.Cdn/edgeActions/executionFilters", | ||
| "location": "global", | ||
| "properties": { | ||
| "versionId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testrg/providers/Microsoft.Cdn/EdgeActions/edgeAction1/versions/version1", | ||
| "executionFilterIdentifierHeaderName": "header-key", | ||
| "executionFilterIdentifierHeaderValue": "header-value", | ||
| "provisioningState": "Accepted", | ||
| "lastUpdateTime": "2024-04-25T15:19:23Z" | ||
| } | ||
| } | ||
| }, | ||
| "200": { | ||
| "body": { | ||
| "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Cdn/edgeActions/edgeAction1/executionFilters/executionFilters1", | ||
| "name": "executionFilter1", | ||
| "type": "Microsoft.Cdn/edgeActions/executionFilters", | ||
| "location": "global", | ||
| "properties": { | ||
| "versionId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testrg/providers/Microsoft.Cdn/EdgeActions/edgeAction1/versions/version1", | ||
| "executionFilterIdentifierHeaderName": "header-key", | ||
| "executionFilterIdentifierHeaderValue": "header-value", | ||
| "provisioningState": "Succeeded", | ||
| "lastUpdateTime": "2024-04-25T15:19:23Z" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
19 changes: 19 additions & 0 deletions
19
...rosoft.Cdn/EdgeActions/examples/2025-09-01-preview/EdgeActionExecutionFilters_Delete.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "operationId": "EdgeActionExecutionFilters_Delete", | ||
| "title": "DeleteEdgeActionExecutionFilters", | ||
| "parameters": { | ||
| "subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
| "resourceGroupName": "testrg", | ||
| "api-version": "2025-09-01-preview", | ||
| "edgeActionName": "edgeAction1", | ||
| "executionFilter": "executionFilter1" | ||
| }, | ||
| "responses": { | ||
| "202": { | ||
| "headers": { | ||
| "location": "https://management.azure.com/subscriptions/subid/resourcegroups/resourceGroupName/providers/Microsoft.Cdn/operationresults/operationId?api-version=2025-09-01-preview" | ||
| } | ||
| }, | ||
| "204": {} | ||
| } | ||
| } |
28 changes: 28 additions & 0 deletions
28
...Microsoft.Cdn/EdgeActions/examples/2025-09-01-preview/EdgeActionExecutionFilters_Get.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "operationId": "EdgeActionExecutionFilters_Get", | ||
| "title": "GetEdgeActionExecutionFilters", | ||
| "parameters": { | ||
| "subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
| "resourceGroupName": "testrg", | ||
| "api-version": "2025-09-01-preview", | ||
| "edgeActionName": "edgeAction1", | ||
| "executionFilter": "executionFilter1" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Cdn/edgeActions/edgeAction1/executionFilters/executionFilters1", | ||
| "name": "executionFilter1", | ||
| "type": "Microsoft.Cdn/edgeActions/executionFilters", | ||
| "location": "global", | ||
| "properties": { | ||
| "versionId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testrg/providers/Microsoft.Cdn/EdgeActions/edgeAction1/versions/version1", | ||
| "executionFilterIdentifierHeaderName": "header-key", | ||
| "executionFilterIdentifierHeaderValue": "header-value", | ||
| "provisioningState": "Succeeded", | ||
| "lastUpdateTime": "2024-04-25T15:19:23Z" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
44 changes: 44 additions & 0 deletions
44
.../EdgeActions/examples/2025-09-01-preview/EdgeActionExecutionFilters_ListByEdgeAction.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| { | ||
| "operationId": "EdgeActionExecutionFilters_ListByEdgeAction", | ||
| "title": "ListEdgeActionsExecutionFiltersByEdgeAction", | ||
| "parameters": { | ||
| "subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
| "resourceGroupName": "testrg", | ||
| "api-version": "2025-09-01-preview", | ||
| "edgeActionName": "edgeAction1" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "value": [ | ||
| { | ||
| "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Cdn/edgeActions/edgeAction1/executionFilters/executionFilters1", | ||
| "name": "executionFilter1", | ||
| "type": "Microsoft.Cdn/edgeActions/executionFilters", | ||
| "location": "global", | ||
| "properties": { | ||
| "versionId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testrg/providers/Microsoft.Cdn/EdgeActions/edgeAction1/versions/version1", | ||
| "executionFilterIdentifierHeaderName": "header-key", | ||
| "executionFilterIdentifierHeaderValue": "header-value", | ||
| "provisioningState": "Succeeded", | ||
| "lastUpdateTime": "2024-04-25T15:19:23Z" | ||
| } | ||
| }, | ||
| { | ||
| "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Cdn/edgeActions/edgeAction1/executionFilters/executionFilters2", | ||
| "name": "executionFilter2", | ||
| "type": "Microsoft.Cdn/edgeActions/executionFilters", | ||
| "location": "global", | ||
| "properties": { | ||
| "versionId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testrg/providers/Microsoft.Cdn/EdgeActions/edgeAction1/versions/version2", | ||
| "executionFilterIdentifierHeaderName": "header-key2", | ||
| "executionFilterIdentifierHeaderValue": "header-value2", | ||
| "provisioningState": "Succeeded", | ||
| "lastUpdateTime": "2024-04-25T15:19:23Z" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.