From e0dde84a6f49d82f220ca01b71c404a2f316e6b2 Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Mon, 24 Jul 2023 22:45:30 +0530 Subject: [PATCH 01/13] New AO5GC 1.0 service - 2023-05-15-preview --- .../NetworkFunctions_CreateOrUpdate.json | 42 + .../NetworkFunctions_Delete.json | 14 + .../NetworkFunctions_Get.json | 31 + .../NetworkFunctions_ListByResourceGroup.json | 34 + .../NetworkFunctions_ListBySubscription.json | 33 + .../NetworkFunctions_UpdateTags.json | 37 + .../2023-05-15-preview/OperationList.json | 25 + .../mpcnetworkfunction.Management/main.tsp | 28 + .../networkfunction.tsp | 146 ++++ .../mpcnetworkfunction.Management/readme.txt | 11 + .../tspconfig.yaml | 10 + .../NetworkFunctions_CreateOrUpdate.json | 42 + .../examples/NetworkFunctions_Delete.json | 14 + .../examples/NetworkFunctions_Get.json | 31 + .../NetworkFunctions_ListByResourceGroup.json | 34 + .../NetworkFunctions_ListBySubscription.json | 33 + .../examples/NetworkFunctions_UpdateTags.json | 37 + .../examples/OperationList.json | 25 + .../2023-05-15-preview/networkfunction.json | 749 ++++++++++++++++++ .../resource-manager/readme.csharp.md | 15 + .../resource-manager/readme.go.md | 21 + .../resource-manager/readme.md | 79 ++ .../resource-manager/readme.python.md | 21 + .../resource-manager/readme.ruby.md | 19 + .../resource-manager/readme.typescript.md | 13 + 25 files changed, 1544 insertions(+) create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Delete.json create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/OperationList.json create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/readme.txt create mode 100644 specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml create mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json create mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json create mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json create mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json create mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json create mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json create mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/OperationList.json create mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json create mode 100644 specification/mpcnetworkfunction/resource-manager/readme.csharp.md create mode 100644 specification/mpcnetworkfunction/resource-manager/readme.go.md create mode 100644 specification/mpcnetworkfunction/resource-manager/readme.md create mode 100644 specification/mpcnetworkfunction/resource-manager/readme.python.md create mode 100644 specification/mpcnetworkfunction/resource-manager/readme.ruby.md create mode 100644 specification/mpcnetworkfunction/resource-manager/readme.typescript.md diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json new file mode 100644 index 000000000000..9c45abba795a --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json @@ -0,0 +1,42 @@ +{ + "operationId": "NetworkFunctions_CreateOrUpdate", + "title": "NetworkFunctions_CreateOrUpdate", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1", + "resource": { + "location": "eastus", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "userDescription": "string", + "deploymentNotes": "string" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "eastus", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Delete.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Delete.json new file mode 100644 index 000000000000..e6076255f8ba --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Delete.json @@ -0,0 +1,14 @@ +{ + "operationId": "NetworkFunctions_Delete", + "title": "NetworkFunctions_Delete", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json new file mode 100644 index 000000000000..1fb9caf508fb --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json @@ -0,0 +1,31 @@ +{ + "operationId": "NetworkFunctions_Get", + "title": "NetworkFunctions_Get", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "global", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json new file mode 100644 index 000000000000..949dee258eda --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json @@ -0,0 +1,34 @@ +{ + "operationId": "NetworkFunctions_ListByResourceGroup", + "title": "NetworkFunctions_ListByResourceGroup", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "global", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json new file mode 100644 index 000000000000..21faa079dac2 --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json @@ -0,0 +1,33 @@ +{ + "operationId": "NetworkFunctions_ListBySubscription", + "title": "NetworkFunctions_ListBySubscription", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "global", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json new file mode 100644 index 000000000000..af0e047a84f2 --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json @@ -0,0 +1,37 @@ +{ + "operationId": "NetworkFunctions_UpdateTags", + "title": "NetworkFunctions_UpdateTags", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1", + "properties": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "eastus", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/OperationList.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/OperationList.json new file mode 100644 index 000000000000..55325313d05e --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/OperationList.json @@ -0,0 +1,25 @@ +{ + "operationId": "Operations_List", + "title": "OperationsList", + "parameters": { + "api-version": "2023-05-15-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.MobilePacketCore/networkFunctions/read", + "display": { + "provider": "Microsoft.MobilePacketCore", + "resource": "NetworkFunction", + "operation": "read", + "description": "Read network function resources" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp new file mode 100644 index 000000000000..efff56956929 --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp @@ -0,0 +1,28 @@ +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +import "./networkfunction.tsp"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.ResourceManager; + +@doc("Mobile Packet Core Network Function Management API") +@armProviderNamespace("Microsoft.MobilePacketCore") +@service({ + title: "Microsoft.MobilePacketCore Network Function resource", +}) +@versioned(Versions) +namespace Microsoft.MobilePacketCore; + +interface Operations extends Azure.ResourceManager.Operations {} + +@doc("API Versions") +enum Versions { + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @doc("May 15, 2023 Preview API Version") + v2023_05_15_preview: "2023-05-15-preview", +} diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp new file mode 100644 index 000000000000..1d7416c5aa5d --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp @@ -0,0 +1,146 @@ +import "@typespec/http"; +import "@typespec/rest"; +import "@typespec/versioning"; +import "@azure-tools/typespec-azure-core"; +import "@azure-tools/typespec-azure-resource-manager"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.ResourceManager; + +namespace Microsoft.MobilePacketCore; + +@doc("AO5GC Network Function Resource") +model NetworkFunctionResource + is TrackedResource { + @doc("The name of the network function") + @key("networkFunctionName") + @segment("networkFunctions") + @path + name: string; +} + +@doc("Network Function Properties.") +model NetworkFunctionResourceProperties { + @doc("Provisioned SKU Value.") + @visibility("create", "read") + sku: SkuDefinitions; + + @doc("Type of network function") + @visibility("create", "read") + networkFunctionType: NetworkFunctionType; + + @doc("Administrative state of the network function") + networkFunctionAdministrativeState: NetworkFunctionAdministrativeState; + + @doc("Operational state of the network function") + @visibility("read") + networkFunctionOperationalStatus?: NetworkFunctionOperationalStatus; + + @doc("Count of infrastructure elements used by this network function (vCPUs, in units of 8)") + @visibility("read") + infrastructureElementCount?: int32; + + @doc("Capacity of the network function in units of 10000. This represents the session count or the Simultaneously Attached Users (SAU) count as applicable") + @visibility("create", "read") + capacity?: int32; + + @doc("User provided description") + userDescription?: string; + + @doc("User provided deployment notes. This is used to optionally provide details about the NF deployment") + deploymentNotes?: string; + + @doc("The status of the last operation.") + @visibility("read") + provisioningState?: ProvisioningState; +} + +@armResourceOperations(NetworkFunctionResource) +interface NetworkFunctions { + get is ArmResourceRead; + createOrUpdate is ArmResourceCreateOrUpdateSync; + updateTags is ArmTagsPatchSync; + delete is ArmResourceDeleteSync; + listByResourceGroup is ArmResourceListByParent; + listBySubscription is ArmListBySubscription; +} + +@doc("SKU Definitions") +enum SkuDefinitions { + @doc("Azure Lab SKU") + AzureLab, + @doc("Azure Production SKU") + AzureProduction, + @doc("Nexus Lab SKU") + NexusLab, + @doc("Nexus Production SKU") + NexusProduction +} + +@doc("Type of Network Function") +enum NetworkFunctionType { + @doc("Access and Mobility Function") + AMF, + @doc("Session Management Function") + SMF, + @doc("User Plane Function") + UPF, + @doc("Network Repository Function") + NRF, + @doc("Network Slice Selection Function") + NSSF, + @doc("Mobility Management Entity") + MME, + @doc("System Architecture Evolution Gateway Control Plane, control and user plane separation (CUPS) architecture") + SaegwControlPlane, + @doc("System Architecture Evolution Gateway User Plane, control and user plane separation (CUPS) architecture") + SaegwUserPlane, + @doc("System Architecture Evolution Gateway. This combines the Serving Gateway (SGW) and the Packet Data Network Gateway (PGW) functionality") + Saegw, + @doc("Evolved Packet Data Gateway") + ePDG, + @doc("Non-3GPP Interworking Function") + N3IWF, + @doc("Remote Platform As A Service Components") + RemotePaaS, + @doc("Element Management System") + EMS, + @doc("Operations and Policy Manager") + OperationsPolicyManager +} + +@doc("Network Function Administrative State enumerations") +enum NetworkFunctionAdministrativeState { + @doc("Resource has been commissioned") + Commissioned, + @doc("Resource has been decommissioned") + Decommissioned +} + +@doc("Network Function Operational Status enumerations") +enum NetworkFunctionOperationalStatus { + @doc("Resource is inactive") + Inactive, + @doc("Resource has been deployed, awaiting provisioning") + InstantiatedNotProvisioned, + @doc("Resource has been deployed and provisioned, awaiting testing") + InstantiatedProvisioned, + @doc("Resource is fully deployed and operational") + Active +} + +@doc("Provisioning state of the resource") +@Azure.Core.lroStatus +enum ProvisioningState { + ...ResourceProvisioningState, + @doc("Resource is getting provisioned") + Provisioning, + @doc("Resource is updating") + Updating, + @doc("Resource is getting deleted") + Deleting, + @doc("Resource has been accepted") + Accepted, +} diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/readme.txt b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/readme.txt new file mode 100644 index 000000000000..65cba162286e --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/readme.txt @@ -0,0 +1,11 @@ +- Install typespec as per instructions +https://github.com/Microsoft/typespec + +- Install providerhub controller +npm i @azure-tools/typespec-providerhub-controller + +- Initialize directory +tsp init + +- Compile typespec and generate swagger and code +tsp compile . --emit @azure-tools/typespec-autorest --emit @azure-tools/typespec-providerhub-controller diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml new file mode 100644 index 000000000000..1e6ed7d9ec0d --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml @@ -0,0 +1,10 @@ +output-dir: "{project-root}" +options: + "@azure-tools/typespec-autorest": + emitter-output-dir: "{project-root}/.." + azure-resource-provider-folder: ./swagger/MobilePacketCore/resource-manager + examples-directory: ./examples + output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/networkfunction.json" + "@azure-tools/typespec-providerhub-controller": + emitter-output-dir: "{output-dir}/generated" + code-kind: model diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json new file mode 100644 index 000000000000..9c45abba795a --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json @@ -0,0 +1,42 @@ +{ + "operationId": "NetworkFunctions_CreateOrUpdate", + "title": "NetworkFunctions_CreateOrUpdate", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1", + "resource": { + "location": "eastus", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "userDescription": "string", + "deploymentNotes": "string" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "eastus", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json new file mode 100644 index 000000000000..e6076255f8ba --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json @@ -0,0 +1,14 @@ +{ + "operationId": "NetworkFunctions_Delete", + "title": "NetworkFunctions_Delete", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json new file mode 100644 index 000000000000..1fb9caf508fb --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json @@ -0,0 +1,31 @@ +{ + "operationId": "NetworkFunctions_Get", + "title": "NetworkFunctions_Get", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "global", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json new file mode 100644 index 000000000000..949dee258eda --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json @@ -0,0 +1,34 @@ +{ + "operationId": "NetworkFunctions_ListByResourceGroup", + "title": "NetworkFunctions_ListByResourceGroup", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "global", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json new file mode 100644 index 000000000000..21faa079dac2 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json @@ -0,0 +1,33 @@ +{ + "operationId": "NetworkFunctions_ListBySubscription", + "title": "NetworkFunctions_ListBySubscription", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "global", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json new file mode 100644 index 000000000000..af0e047a84f2 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json @@ -0,0 +1,37 @@ +{ + "operationId": "NetworkFunctions_UpdateTags", + "title": "NetworkFunctions_UpdateTags", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "sub1", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1", + "properties": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "eastus", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/OperationList.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/OperationList.json new file mode 100644 index 000000000000..55325313d05e --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/OperationList.json @@ -0,0 +1,25 @@ +{ + "operationId": "Operations_List", + "title": "OperationsList", + "parameters": { + "api-version": "2023-05-15-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.MobilePacketCore/networkFunctions/read", + "display": { + "provider": "Microsoft.MobilePacketCore", + "resource": "NetworkFunction", + "operation": "read", + "description": "Read network function resources" + } + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json new file mode 100644 index 000000000000..5579c5767dc2 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -0,0 +1,749 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft.MobilePacketCore Network Function resource", + "version": "2023-05-15-preview", + "description": "Mobile Packet Core Network Function Management API", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "NetworkFunctions" + } + ], + "paths": { + "/providers/Microsoft.MobilePacketCore/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "OperationsList": { + "$ref": "./examples/OperationList.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.MobilePacketCore/networkFunctions": { + "get": { + "tags": [ + "NetworkFunctions" + ], + "operationId": "NetworkFunctions_ListBySubscription", + "description": "List NetworkFunctionResource resources by subscription ID", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResourceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "NetworkFunctions_ListBySubscription": { + "$ref": "./examples/NetworkFunctions_ListBySubscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobilePacketCore/networkFunctions": { + "get": { + "tags": [ + "NetworkFunctions" + ], + "operationId": "NetworkFunctions_ListByResourceGroup", + "description": "List NetworkFunctionResource resources by resource group", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResourceListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "NetworkFunctions_ListByResourceGroup": { + "$ref": "./examples/NetworkFunctions_ListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobilePacketCore/networkFunctions/{networkFunctionName}": { + "get": { + "tags": [ + "NetworkFunctions" + ], + "operationId": "NetworkFunctions_Get", + "description": "Get a NetworkFunctionResource", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "networkFunctionName", + "in": "path", + "required": true, + "description": "The name of the network function", + "type": "string" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "NetworkFunctions_Get": { + "$ref": "./examples/NetworkFunctions_Get.json" + } + } + }, + "put": { + "tags": [ + "NetworkFunctions" + ], + "operationId": "NetworkFunctions_CreateOrUpdate", + "description": "Create a NetworkFunctionResource", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "networkFunctionName", + "in": "path", + "required": true, + "description": "The name of the network function", + "type": "string" + }, + { + "name": "resource", + "in": "body", + "required": true, + "description": "Resource create parameters.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResource" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "NetworkFunctions_CreateOrUpdate": { + "$ref": "./examples/NetworkFunctions_CreateOrUpdate.json" + } + } + }, + "patch": { + "tags": [ + "NetworkFunctions" + ], + "operationId": "NetworkFunctions_UpdateTags", + "description": "Update a NetworkFunctionResource", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "networkFunctionName", + "in": "path", + "required": true, + "description": "The name of the network function", + "type": "string" + }, + { + "name": "properties", + "in": "body", + "required": true, + "description": "The resource properties to be updated.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResourceTagsUpdate" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "NetworkFunctions_UpdateTags": { + "$ref": "./examples/NetworkFunctions_UpdateTags.json" + } + } + }, + "delete": { + "tags": [ + "NetworkFunctions" + ], + "operationId": "NetworkFunctions_Delete", + "description": "Delete a NetworkFunctionResource", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "networkFunctionName", + "in": "path", + "required": true, + "description": "The name of the network function", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource deleted successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "NetworkFunctions_Delete": { + "$ref": "./examples/NetworkFunctions_Delete.json" + } + } + } + } + }, + "definitions": { + "NetworkFunctionAdministrativeState": { + "type": "string", + "description": "Network Function Administrative State enumerations", + "enum": [ + "Commissioned", + "Decommissioned" + ], + "x-ms-enum": { + "name": "NetworkFunctionAdministrativeState", + "modelAsString": true, + "values": [ + { + "name": "Commissioned", + "value": "Commissioned", + "description": "Resource has been commissioned" + }, + { + "name": "Decommissioned", + "value": "Decommissioned", + "description": "Resource has been decommissioned" + } + ] + } + }, + "NetworkFunctionOperationalStatus": { + "type": "string", + "description": "Network Function Operational Status enumerations", + "enum": [ + "Inactive", + "InstantiatedNotProvisioned", + "InstantiatedProvisioned", + "Active" + ], + "x-ms-enum": { + "name": "NetworkFunctionOperationalStatus", + "modelAsString": true, + "values": [ + { + "name": "Inactive", + "value": "Inactive", + "description": "Resource is inactive" + }, + { + "name": "InstantiatedNotProvisioned", + "value": "InstantiatedNotProvisioned", + "description": "Resource has been deployed, awaiting provisioning" + }, + { + "name": "InstantiatedProvisioned", + "value": "InstantiatedProvisioned", + "description": "Resource has been deployed and provisioned, awaiting testing" + }, + { + "name": "Active", + "value": "Active", + "description": "Resource is fully deployed and operational" + } + ] + } + }, + "NetworkFunctionResource": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/NetworkFunctionResourceProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "description": "AO5GC Network Function Resource", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "NetworkFunctionResourceListResult": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/NetworkFunctionResource" + }, + "x-typespec-name": "NetworkFunctionResource[]", + "description": "The NetworkFunctionResource items on this page" + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items", + "x-typespec-name": "TypeSpec.Rest.ResourceLocation" + } + }, + "description": "The response of a NetworkFunctionResource list operation.", + "required": [ + "value" + ] + }, + "NetworkFunctionResourceProperties": { + "type": "object", + "properties": { + "sku": { + "$ref": "#/definitions/SkuDefinitions", + "description": "Provisioned SKU Value.", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "networkFunctionType": { + "$ref": "#/definitions/NetworkFunctionType", + "description": "Type of network function", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "networkFunctionAdministrativeState": { + "$ref": "#/definitions/NetworkFunctionAdministrativeState", + "description": "Administrative state of the network function" + }, + "networkFunctionOperationalStatus": { + "$ref": "#/definitions/NetworkFunctionOperationalStatus", + "description": "Operational state of the network function", + "readOnly": true + }, + "infrastructureElementCount": { + "type": "integer", + "format": "int32", + "description": "Count of infrastructure elements used by this network function (vCPUs, in units of 8)", + "readOnly": true + }, + "capacity": { + "type": "integer", + "format": "int32", + "description": "Capacity of the network function in units of 10000. This represents the session count or the Simultaneously Attached Users (SAU) count as applicable", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "userDescription": { + "type": "string", + "description": "User provided description" + }, + "deploymentNotes": { + "type": "string", + "description": "User provided deployment notes. This is used to optionally provide details about the NF deployment" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + }, + "description": "Network Function Properties.", + "required": [ + "sku", + "networkFunctionType", + "networkFunctionAdministrativeState" + ] + }, + "NetworkFunctionResourceTagsUpdate": { + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-typespec-name": "Record", + "description": "Resource tags." + } + }, + "description": "The type used for updating tags in NetworkFunctionResource resources." + }, + "NetworkFunctionType": { + "type": "string", + "description": "Type of Network Function", + "enum": [ + "AMF", + "SMF", + "UPF", + "NRF", + "NSSF", + "MME", + "SaegwControlPlane", + "SaegwUserPlane", + "Saegw", + "ePDG", + "N3IWF", + "RemotePaaS", + "EMS", + "OperationsPolicyManager" + ], + "x-ms-enum": { + "name": "NetworkFunctionType", + "modelAsString": true, + "values": [ + { + "name": "AMF", + "value": "AMF", + "description": "Access and Mobility Function" + }, + { + "name": "SMF", + "value": "SMF", + "description": "Session Management Function" + }, + { + "name": "UPF", + "value": "UPF", + "description": "User Plane Function" + }, + { + "name": "NRF", + "value": "NRF", + "description": "Network Repository Function" + }, + { + "name": "NSSF", + "value": "NSSF", + "description": "Network Slice Selection Function" + }, + { + "name": "MME", + "value": "MME", + "description": "Mobility Management Entity" + }, + { + "name": "SaegwControlPlane", + "value": "SaegwControlPlane", + "description": "System Architecture Evolution Gateway Control Plane, control and user plane separation (CUPS) architecture" + }, + { + "name": "SaegwUserPlane", + "value": "SaegwUserPlane", + "description": "System Architecture Evolution Gateway User Plane, control and user plane separation (CUPS) architecture" + }, + { + "name": "Saegw", + "value": "Saegw", + "description": "System Architecture Evolution Gateway. This combines the Serving Gateway (SGW) and the Packet Data Network Gateway (PGW) functionality" + }, + { + "name": "ePDG", + "value": "ePDG", + "description": "Evolved Packet Data Gateway" + }, + { + "name": "N3IWF", + "value": "N3IWF", + "description": "Non-3GPP Interworking Function" + }, + { + "name": "RemotePaaS", + "value": "RemotePaaS", + "description": "Remote Platform As A Service Components" + }, + { + "name": "EMS", + "value": "EMS", + "description": "Element Management System" + }, + { + "name": "OperationsPolicyManager", + "value": "OperationsPolicyManager", + "description": "Operations and Policy Manager" + } + ] + } + }, + "ProvisioningState": { + "type": "string", + "description": "Provisioning state of the resource", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Provisioning", + "Updating", + "Deleting", + "Accepted" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded" + }, + { + "name": "Failed", + "value": "Failed" + }, + { + "name": "Canceled", + "value": "Canceled" + }, + { + "name": "Provisioning", + "value": "Provisioning", + "description": "Resource is getting provisioned" + }, + { + "name": "Updating", + "value": "Updating", + "description": "Resource is updating" + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "Resource is getting deleted" + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "Resource has been accepted" + } + ] + } + }, + "SkuDefinitions": { + "type": "string", + "description": "SKU Definitions", + "enum": [ + "AzureLab", + "AzureProduction", + "NexusLab", + "NexusProduction" + ], + "x-ms-enum": { + "name": "SkuDefinitions", + "modelAsString": true, + "values": [ + { + "name": "AzureLab", + "value": "AzureLab", + "description": "Azure Lab SKU" + }, + { + "name": "AzureProduction", + "value": "AzureProduction", + "description": "Azure Production SKU" + }, + { + "name": "NexusLab", + "value": "NexusLab", + "description": "Nexus Lab SKU" + }, + { + "name": "NexusProduction", + "value": "NexusProduction", + "description": "Nexus Production SKU" + } + ] + } + }, + "Versions": { + "type": "string", + "description": "API Versions", + "enum": [ + "2023-05-15-preview" + ], + "x-ms-enum": { + "name": "Versions", + "modelAsString": true, + "values": [ + { + "name": "v2023_05_15_preview", + "value": "2023-05-15-preview", + "description": "May 15, 2023 Preview API Version" + } + ] + } + } + }, + "parameters": {} +} diff --git a/specification/mpcnetworkfunction/resource-manager/readme.csharp.md b/specification/mpcnetworkfunction/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..145724961248 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/readme.csharp.md @@ -0,0 +1,15 @@ +## C + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.MobilePacketCore + output-folder: $(csharp-sdks-folder)/mobilePacketCore/management/$(namespace)/GeneratedProtocol +``` diff --git a/specification/mpcnetworkfunction/resource-manager/readme.go.md b/specification/mpcnetworkfunction/resource-manager/readme.go.md new file mode 100644 index 000000000000..42ac2dae48f3 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/readme.go.md @@ -0,0 +1,21 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +``` yaml $(go) && $(track2) +license-header: MICROSOFT_MIT_NO_VERSION +module-name: sdk/resourcemanager/mobilepacketcore/armmobilepacketcore +module: github.com/Azure/azure-sdk-for-go/$(module-name) +output-folder: $(go-sdk-folder)/$(module-name) +azure-arm: true +``` + +### Tag: package-2023-05-15-preview and go + +These settings apply only when `--tag=package-2023-05-15-preview --go` is specified on the command line. +Please also specify `--go-sdks-folder=`. + +```yaml $(tag) == 'package-2023-05-15-preview' && $(go) +namespace: mpcnetworkfunction +output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2023-05-15-preview/$(namespace) +``` diff --git a/specification/mpcnetworkfunction/resource-manager/readme.md b/specification/mpcnetworkfunction/resource-manager/readme.md new file mode 100644 index 000000000000..6afcb4af89a5 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/readme.md @@ -0,0 +1,79 @@ +# mobileCore + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for mobileCore. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. +--- + + +## Configuration + +### Basic Information + +These are the global settings for the Mobile Packet Core Network Function service. + +```yaml +openapi-type: arm +openapi-subtype: rpaas +tag: package-2023-05-15-preview +``` + +### Tag: package-2023-05-15-preview + +These settings apply only when `--tag=package-2023-05-15-preview` is specified on the command line. + +```yaml $(tag) == 'package-2023-05-15-preview' +input-file: + - Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json +``` + + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +```yaml $(swagger-to-sdk) +swagger-to-sdk: + - repo: azure-sdk-for-python + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-sdk-for-ruby + after_scripts: + - bundle install && rake arm:regen_all_profiles['azure_mgmt_mobileCore'] +``` + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.md) + +## Ruby + +See configuration in [readme.ruby.md](./readme.ruby.md) + +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) diff --git a/specification/mpcnetworkfunction/resource-manager/readme.python.md b/specification/mpcnetworkfunction/resource-manager/readme.python.md new file mode 100644 index 000000000000..85e1a1ae4cc7 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/readme.python.md @@ -0,0 +1,21 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +```yaml $(python) +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: Microsoft.MobilePacketCore + package-name: mobileCore + package-version: 2023-05-15-preview + clear-output-folder: true +``` + +```yaml $(python) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt/mobileCore +``` diff --git a/specification/mpcnetworkfunction/resource-manager/readme.ruby.md b/specification/mpcnetworkfunction/resource-manager/readme.ruby.md new file mode 100644 index 000000000000..a25fd3d8beb7 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/readme.ruby.md @@ -0,0 +1,19 @@ +## Ruby + +These settings apply only when `--ruby` is specified on the command line. + +```yaml +package-name: azure_mgmt_mobileCore +package-version: 2023-05-15-preview +azure-arm: true +``` + +### Tag: package-2023-05-15-preview and ruby + +These settings apply only when `--tag=package-2023-05-15-preview --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +```yaml $(tag) == 'package-2023-05-15-preview' && $(ruby) +namespace: Microsoft.MobilePacketCore +output-folder: $(ruby-sdks-folder)/mobileCore +``` diff --git a/specification/mpcnetworkfunction/resource-manager/readme.typescript.md b/specification/mpcnetworkfunction/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..899f3b0428f8 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/readme.typescript.md @@ -0,0 +1,13 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +```yaml $(typescript) +typescript: + azure-arm: true + package-name: "mobileCore" + output-folder: "$(typescript-sdks-folder)/packages/mobileCore" + payload-flattening-threshold: 1 + generate-metadata: true +``` From 08e227df0145f0366d07f1e3fb31bc4e798806d6 Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Mon, 24 Jul 2023 23:23:57 +0530 Subject: [PATCH 02/13] Addressed the Swagger LintDiff errors --- .../preview/2023-05-15-preview/common.json | 49 +++++++++ .../2023-05-15-preview/networkfunction.json | 103 ++++++++---------- 2 files changed, 97 insertions(+), 55 deletions(-) create mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/common.json diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/common.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/common.json new file mode 100644 index 000000000000..32645b8b4fdf --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/common.json @@ -0,0 +1,49 @@ +{ + "swagger": "2.0", + "info": { + "title": "MobilePacketCoreClient", + "description": "The resources in this API specification will be used to manage the network functions deployed using mobile packet core", + "version": "2023-05-15-preview" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": {}, + "parameters": { + "NetworkFunctionNameParameter": { + "name": "networkFunctionName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", + "maxLength": 64, + "description": "The name of the network function.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json index 5579c5767dc2..6a859807533d 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -56,20 +56,20 @@ "description": "List the operations for the provider", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "ARM operation completed successfully.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -92,10 +92,10 @@ "description": "List NetworkFunctionResource resources by subscription ID", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -108,7 +108,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -131,13 +131,13 @@ "description": "List NetworkFunctionResource resources by resource group", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { @@ -150,7 +150,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -173,33 +173,29 @@ "description": "Get a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "networkFunctionName", - "in": "path", - "required": true, - "description": "The name of the network function", - "type": "string" + "$ref": "./common.json#/parameters/NetworkFunctionNameParameter" } ], "responses": { "200": { - "description": "ARM operation completed successfully.", + "description": "Request successful. The operation returns the resulting network function resource.", "schema": { "$ref": "#/definitions/NetworkFunctionResource" } }, "default": { - "description": "An unexpected error response.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -217,20 +213,16 @@ "description": "Create a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "networkFunctionName", - "in": "path", - "required": true, - "description": "The name of the network function", - "type": "string" + "$ref": "./common.json#/parameters/NetworkFunctionNameParameter" }, { "name": "resource", @@ -244,15 +236,21 @@ ], "responses": { "200": { - "description": "ARM operation completed successfully.", + "description": "Update successful. The operation returns the resulting network function resource.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResource" + } + }, + "201": { + "description": "Create successful. The operation returns the resulting network function resource.", "schema": { "$ref": "#/definitions/NetworkFunctionResource" } }, "default": { - "description": "An unexpected error response.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -270,20 +268,16 @@ "description": "Update a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "networkFunctionName", - "in": "path", - "required": true, - "description": "The name of the network function", - "type": "string" + "$ref": "./common.json#/parameters/NetworkFunctionNameParameter" }, { "name": "properties", @@ -297,15 +291,15 @@ ], "responses": { "200": { - "description": "ARM operation completed successfully.", + "description": "Update successful. The operation returns the resulting network function resource.", "schema": { "$ref": "#/definitions/NetworkFunctionResource" } }, "default": { - "description": "An unexpected error response.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -323,33 +317,32 @@ "description": "Delete a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "name": "networkFunctionName", - "in": "path", - "required": true, - "description": "The name of the network function", - "type": "string" + "$ref": "./common.json#/parameters/NetworkFunctionNameParameter" } ], "responses": { "200": { "description": "Resource deleted successfully." }, + "202": { + "description": "Accepted. Sets 'Deleting' provisioningState until the operation completes. Returns an operation URI that can be queried to find the current state of the operation." + }, "204": { - "description": "Resource deleted successfully." + "description": "Request successful. Resource does not exist." }, "default": { - "description": "An unexpected error response.", + "description": "Error response describing why the operation failed.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -438,7 +431,7 @@ "description": "AO5GC Network Function Resource", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" } ] }, From d8589710645efbb8618eaddc40f074a23abc733d Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Mon, 24 Jul 2023 23:52:02 +0530 Subject: [PATCH 03/13] Addressed the Swagger ModelValidation errors --- .../NetworkFunctions_CreateOrUpdate.json | 26 +++++++++++++++++-- .../examples/NetworkFunctions_Delete.json | 7 ++++- .../examples/NetworkFunctions_Get.json | 4 +-- .../NetworkFunctions_ListByResourceGroup.json | 4 +-- .../NetworkFunctions_ListBySubscription.json | 4 +-- .../examples/NetworkFunctions_UpdateTags.json | 4 +-- .../2023-05-15-preview/networkfunction.json | 4 +++ 7 files changed, 42 insertions(+), 11 deletions(-) diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json index 9c45abba795a..1e3b4ae78aa7 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json @@ -3,7 +3,7 @@ "title": "NetworkFunctions_CreateOrUpdate", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1", "networkFunctionName": "nf1", "resource": { @@ -21,7 +21,29 @@ "responses": { "200": { "body": { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "eastus", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.MobilePacketCore/locations/testLocation/operationStatuses/testOperation?api-version=2023-05-15-preview" + }, + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json index e6076255f8ba..257f73888c1a 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json @@ -3,12 +3,17 @@ "title": "NetworkFunctions_Delete", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1", "networkFunctionName": "nf1" }, "responses": { "200": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.MobilePacketCore/locations/testLocation/operationStatuses/testOperation?api-version=2023-05-15-preview" + } + }, "204": {} } } diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json index 1fb9caf508fb..d23ba374202b 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json @@ -3,14 +3,14 @@ "title": "NetworkFunctions_Get", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1", "networkFunctionName": "nf1" }, "responses": { "200": { "body": { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json index 949dee258eda..eebdbe59ee06 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json @@ -3,7 +3,7 @@ "title": "NetworkFunctions_ListByResourceGroup", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1" }, "responses": { @@ -11,7 +11,7 @@ "body": { "value": [ { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json index 21faa079dac2..23f129a01101 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json @@ -3,14 +3,14 @@ "title": "NetworkFunctions_ListBySubscription", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { "value": [ { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json index af0e047a84f2..136da40153f8 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json @@ -3,7 +3,7 @@ "title": "NetworkFunctions_UpdateTags", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1", "networkFunctionName": "nf1", "properties": { @@ -16,7 +16,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json index 6a859807533d..11407fbf40cf 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -350,6 +350,10 @@ "NetworkFunctions_Delete": { "$ref": "./examples/NetworkFunctions_Delete.json" } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" } } } From 91b700eb553e27f8a24bd40a3d4e3ed21ff7b001 Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Tue, 25 Jul 2023 00:07:02 +0530 Subject: [PATCH 04/13] Addressed long running operation LintDiff errors --- .../examples/NetworkFunctions_Delete.json | 5 ----- .../preview/2023-05-15-preview/networkfunction.json | 7 ------- 2 files changed, 12 deletions(-) diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json index 257f73888c1a..e0978cfbabfe 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Delete.json @@ -9,11 +9,6 @@ }, "responses": { "200": {}, - "202": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.MobilePacketCore/locations/testLocation/operationStatuses/testOperation?api-version=2023-05-15-preview" - } - }, "204": {} } } diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json index 11407fbf40cf..c286bc5438e2 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -333,9 +333,6 @@ "200": { "description": "Resource deleted successfully." }, - "202": { - "description": "Accepted. Sets 'Deleting' provisioningState until the operation completes. Returns an operation URI that can be queried to find the current state of the operation." - }, "204": { "description": "Request successful. Resource does not exist." }, @@ -350,10 +347,6 @@ "NetworkFunctions_Delete": { "$ref": "./examples/NetworkFunctions_Delete.json" } - }, - "x-ms-long-running-operation": true, - "x-ms-long-running-operation-options": { - "final-state-via": "location" } } } From 0a6f4676ecef605d53c16bc10f8cb551d6e4472c Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Tue, 25 Jul 2023 17:45:10 +0530 Subject: [PATCH 05/13] Formatted the *.tsp files --- .../mpcnetworkfunction.Management/main.tsp | 6 +-- .../networkfunction.tsp | 44 ++++++++++++++----- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp index efff56956929..1b347be5ec84 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp @@ -22,7 +22,7 @@ interface Operations extends Azure.ResourceManager.Operations {} @doc("API Versions") enum Versions { - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) - @doc("May 15, 2023 Preview API Version") - v2023_05_15_preview: "2023-05-15-preview", + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @doc("May 15, 2023 Preview API Version") + v2023_05_15_preview: "2023-05-15-preview", } diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp index 1d7416c5aa5d..95cc52e9ad84 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp @@ -59,88 +59,112 @@ model NetworkFunctionResourceProperties { @armResourceOperations(NetworkFunctionResource) interface NetworkFunctions { - get is ArmResourceRead; - createOrUpdate is ArmResourceCreateOrUpdateSync; - updateTags is ArmTagsPatchSync; - delete is ArmResourceDeleteSync; - listByResourceGroup is ArmResourceListByParent; - listBySubscription is ArmListBySubscription; + get is ArmResourceRead; + createOrUpdate is ArmResourceCreateOrUpdateSync; + updateTags is ArmTagsPatchSync; + delete is ArmResourceDeleteSync; + listByResourceGroup is ArmResourceListByParent; + listBySubscription is ArmListBySubscription; } @doc("SKU Definitions") enum SkuDefinitions { @doc("Azure Lab SKU") AzureLab, + @doc("Azure Production SKU") AzureProduction, + @doc("Nexus Lab SKU") NexusLab, + @doc("Nexus Production SKU") - NexusProduction + NexusProduction, } @doc("Type of Network Function") enum NetworkFunctionType { @doc("Access and Mobility Function") AMF, + @doc("Session Management Function") SMF, + @doc("User Plane Function") UPF, + @doc("Network Repository Function") NRF, + @doc("Network Slice Selection Function") NSSF, + @doc("Mobility Management Entity") MME, + @doc("System Architecture Evolution Gateway Control Plane, control and user plane separation (CUPS) architecture") SaegwControlPlane, + @doc("System Architecture Evolution Gateway User Plane, control and user plane separation (CUPS) architecture") SaegwUserPlane, + @doc("System Architecture Evolution Gateway. This combines the Serving Gateway (SGW) and the Packet Data Network Gateway (PGW) functionality") Saegw, + @doc("Evolved Packet Data Gateway") ePDG, + @doc("Non-3GPP Interworking Function") N3IWF, + @doc("Remote Platform As A Service Components") RemotePaaS, + @doc("Element Management System") EMS, + @doc("Operations and Policy Manager") - OperationsPolicyManager + OperationsPolicyManager, } @doc("Network Function Administrative State enumerations") enum NetworkFunctionAdministrativeState { @doc("Resource has been commissioned") Commissioned, + @doc("Resource has been decommissioned") - Decommissioned + Decommissioned, } @doc("Network Function Operational Status enumerations") enum NetworkFunctionOperationalStatus { @doc("Resource is inactive") Inactive, + @doc("Resource has been deployed, awaiting provisioning") InstantiatedNotProvisioned, + @doc("Resource has been deployed and provisioned, awaiting testing") InstantiatedProvisioned, + @doc("Resource is fully deployed and operational") - Active + Active, } @doc("Provisioning state of the resource") @Azure.Core.lroStatus enum ProvisioningState { ...ResourceProvisioningState, + @doc("Resource is getting provisioned") Provisioning, + @doc("Resource is updating") Updating, + @doc("Resource is getting deleted") Deleting, + @doc("Resource has been accepted") Accepted, } From 282de963f7c3939533a3507500f096051469e046 Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Wed, 26 Jul 2023 19:51:09 +0530 Subject: [PATCH 06/13] Removed the common.json and added the parameters to the networkfunction.json --- .../preview/2023-05-15-preview/common.json | 49 ------------------- .../2023-05-15-preview/networkfunction.json | 21 ++++++-- 2 files changed, 16 insertions(+), 54 deletions(-) delete mode 100644 specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/common.json diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/common.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/common.json deleted file mode 100644 index 32645b8b4fdf..000000000000 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/common.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "MobilePacketCoreClient", - "description": "The resources in this API specification will be used to manage the network functions deployed using mobile packet core", - "version": "2023-05-15-preview" - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "security": [ - { - "azure_auth": [ - "user_impersonation" - ] - } - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow.", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": {}, - "parameters": { - "NetworkFunctionNameParameter": { - "name": "networkFunctionName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", - "maxLength": 64, - "description": "The name of the network function.", - "x-ms-parameter-location": "method" - } - } -} diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json index c286bc5438e2..2ba8193b58f4 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -182,7 +182,7 @@ "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "./common.json#/parameters/NetworkFunctionNameParameter" + "$ref": "#/parameters/NetworkFunctionNameParameter" } ], "responses": { @@ -222,7 +222,7 @@ "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "./common.json#/parameters/NetworkFunctionNameParameter" + "$ref": "#/parameters/NetworkFunctionNameParameter" }, { "name": "resource", @@ -277,7 +277,7 @@ "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "./common.json#/parameters/NetworkFunctionNameParameter" + "$ref": "#/parameters/NetworkFunctionNameParameter" }, { "name": "properties", @@ -326,7 +326,7 @@ "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "./common.json#/parameters/NetworkFunctionNameParameter" + "$ref": "#/parameters/NetworkFunctionNameParameter" } ], "responses": { @@ -735,5 +735,16 @@ } } }, - "parameters": {} + "parameters": { + "NetworkFunctionNameParameter": { + "name": "networkFunctionName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", + "maxLength": 64, + "description": "The name of the network function.", + "x-ms-parameter-location": "method" + } + } } From 29a4fa6eafe421769c5439fffd60bf9645dabb24 Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Thu, 27 Jul 2023 15:37:19 +0530 Subject: [PATCH 07/13] Updated the Type Script to address the Swagger API validations --- .../NetworkFunctions_CreateOrUpdate.json | 23 ++- .../NetworkFunctions_Delete.json | 2 +- .../NetworkFunctions_Get.json | 4 +- .../NetworkFunctions_ListByResourceGroup.json | 4 +- .../NetworkFunctions_ListBySubscription.json | 4 +- .../NetworkFunctions_UpdateTags.json | 4 +- .../mpcnetworkfunction.Management/main.tsp | 6 +- .../networkfunction.tsp | 56 +++----- .../NetworkFunctions_CreateOrUpdate.json | 3 - .../2023-05-15-preview/networkfunction.json | 134 +++++++++++------- 10 files changed, 133 insertions(+), 107 deletions(-) diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json index 9c45abba795a..b4f67721b461 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json @@ -3,7 +3,7 @@ "title": "NetworkFunctions_CreateOrUpdate", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1", "networkFunctionName": "nf1", "resource": { @@ -21,7 +21,26 @@ "responses": { "200": { "body": { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "name": "nf1", + "type": "Microsoft.MobilePacketCore/networkFunctions", + "location": "eastus", + "properties": { + "sku": "NexusProduction", + "networkFunctionType": "SMF", + "capacity": 100000, + "networkFunctionAdministrativeState": "Commissioned", + "networkFunctionOperationalStatus": "Active", + "infrastructureElementCount": 10, + "userDescription": "string", + "deploymentNotes": "string", + "provisioningState": "Succeeded" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Delete.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Delete.json index e6076255f8ba..e0978cfbabfe 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Delete.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Delete.json @@ -3,7 +3,7 @@ "title": "NetworkFunctions_Delete", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1", "networkFunctionName": "nf1" }, diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json index 1fb9caf508fb..d23ba374202b 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json @@ -3,14 +3,14 @@ "title": "NetworkFunctions_Get", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1", "networkFunctionName": "nf1" }, "responses": { "200": { "body": { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json index 949dee258eda..eebdbe59ee06 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json @@ -3,7 +3,7 @@ "title": "NetworkFunctions_ListByResourceGroup", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1" }, "responses": { @@ -11,7 +11,7 @@ "body": { "value": [ { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json index 21faa079dac2..23f129a01101 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json @@ -3,14 +3,14 @@ "title": "NetworkFunctions_ListBySubscription", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1" + "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { "200": { "body": { "value": [ { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json index af0e047a84f2..136da40153f8 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json @@ -3,7 +3,7 @@ "title": "NetworkFunctions_UpdateTags", "parameters": { "api-version": "2023-05-15-preview", - "subscriptionId": "sub1", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "rg1", "networkFunctionName": "nf1", "properties": { @@ -16,7 +16,7 @@ "responses": { "200": { "body": { - "id": "/subscriptions/sub1/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp index 1b347be5ec84..efff56956929 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp @@ -22,7 +22,7 @@ interface Operations extends Azure.ResourceManager.Operations {} @doc("API Versions") enum Versions { - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) - @doc("May 15, 2023 Preview API Version") - v2023_05_15_preview: "2023-05-15-preview", + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @doc("May 15, 2023 Preview API Version") + v2023_05_15_preview: "2023-05-15-preview", } diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp index 95cc52e9ad84..e3554a488fb6 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp @@ -1,5 +1,6 @@ import "@typespec/http"; import "@typespec/rest"; +import "@typespec/openapi"; import "@typespec/versioning"; import "@azure-tools/typespec-azure-core"; import "@azure-tools/typespec-azure-resource-manager"; @@ -8,16 +9,21 @@ using TypeSpec.Http; using TypeSpec.Rest; using TypeSpec.Versioning; using Azure.ResourceManager; +using Azure.Core; +using OpenAPI; namespace Microsoft.MobilePacketCore; @doc("AO5GC Network Function Resource") -model NetworkFunctionResource - is TrackedResource { +model NetworkFunctionResource is TrackedResource { @doc("The name of the network function") + @pattern("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$") + @minLength(1) + @maxLength(63) @key("networkFunctionName") - @segment("networkFunctions") @path + @segment("networkFunctions") + @visibility("create", "read") name: string; } @@ -59,112 +65,88 @@ model NetworkFunctionResourceProperties { @armResourceOperations(NetworkFunctionResource) interface NetworkFunctions { - get is ArmResourceRead; - createOrUpdate is ArmResourceCreateOrUpdateSync; - updateTags is ArmTagsPatchSync; - delete is ArmResourceDeleteSync; - listByResourceGroup is ArmResourceListByParent; - listBySubscription is ArmListBySubscription; + get is ArmResourceRead; + createOrUpdate is ArmResourceCreateOrUpdateAsync; + updateTags is ArmTagsPatchSync; + delete is ArmResourceDeleteSync; + listByResourceGroup is ArmResourceListByParent; + listBySubscription is ArmListBySubscription; } @doc("SKU Definitions") enum SkuDefinitions { @doc("Azure Lab SKU") AzureLab, - @doc("Azure Production SKU") AzureProduction, - @doc("Nexus Lab SKU") NexusLab, - @doc("Nexus Production SKU") - NexusProduction, + NexusProduction } @doc("Type of Network Function") enum NetworkFunctionType { @doc("Access and Mobility Function") AMF, - @doc("Session Management Function") SMF, - @doc("User Plane Function") UPF, - @doc("Network Repository Function") NRF, - @doc("Network Slice Selection Function") NSSF, - @doc("Mobility Management Entity") MME, - @doc("System Architecture Evolution Gateway Control Plane, control and user plane separation (CUPS) architecture") SaegwControlPlane, - @doc("System Architecture Evolution Gateway User Plane, control and user plane separation (CUPS) architecture") SaegwUserPlane, - @doc("System Architecture Evolution Gateway. This combines the Serving Gateway (SGW) and the Packet Data Network Gateway (PGW) functionality") Saegw, - @doc("Evolved Packet Data Gateway") ePDG, - @doc("Non-3GPP Interworking Function") N3IWF, - @doc("Remote Platform As A Service Components") RemotePaaS, - @doc("Element Management System") EMS, - @doc("Operations and Policy Manager") - OperationsPolicyManager, + OperationsPolicyManager } @doc("Network Function Administrative State enumerations") enum NetworkFunctionAdministrativeState { @doc("Resource has been commissioned") Commissioned, - @doc("Resource has been decommissioned") - Decommissioned, + Decommissioned } @doc("Network Function Operational Status enumerations") enum NetworkFunctionOperationalStatus { @doc("Resource is inactive") Inactive, - @doc("Resource has been deployed, awaiting provisioning") InstantiatedNotProvisioned, - @doc("Resource has been deployed and provisioned, awaiting testing") InstantiatedProvisioned, - @doc("Resource is fully deployed and operational") - Active, + Active } @doc("Provisioning state of the resource") @Azure.Core.lroStatus enum ProvisioningState { ...ResourceProvisioningState, - @doc("Resource is getting provisioned") Provisioning, - @doc("Resource is updating") Updating, - @doc("Resource is getting deleted") Deleting, - @doc("Resource has been accepted") Accepted, } diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json index 1e3b4ae78aa7..b4f67721b461 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json @@ -39,9 +39,6 @@ } }, "201": { - "headers": { - "Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.MobilePacketCore/locations/testLocation/operationStatuses/testOperation?api-version=2023-05-15-preview" - }, "body": { "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", "name": "nf1", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json index 2ba8193b58f4..6cbb88229f11 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -56,20 +56,20 @@ "description": "List the operations for the provider", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "ARM operation completed successfully.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -92,10 +92,10 @@ "description": "List NetworkFunctionResource resources by subscription ID", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -108,7 +108,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -131,13 +131,13 @@ "description": "List NetworkFunctionResource resources by resource group", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { @@ -150,7 +150,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -173,29 +173,36 @@ "description": "Get a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/NetworkFunctionNameParameter" + "name": "networkFunctionName", + "in": "path", + "required": true, + "description": "The name of the network function", + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "minLength": 1, + "maxLength": 63, + "type": "string" } ], "responses": { "200": { - "description": "Request successful. The operation returns the resulting network function resource.", + "description": "ARM operation completed successfully.", "schema": { "$ref": "#/definitions/NetworkFunctionResource" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -213,16 +220,23 @@ "description": "Create a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/NetworkFunctionNameParameter" + "name": "networkFunctionName", + "in": "path", + "required": true, + "description": "The name of the network function", + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "minLength": 1, + "maxLength": 63, + "type": "string" }, { "name": "resource", @@ -236,21 +250,28 @@ ], "responses": { "200": { - "description": "Update successful. The operation returns the resulting network function resource.", + "description": "ARM operation completed successfully.", "schema": { "$ref": "#/definitions/NetworkFunctionResource" } }, "201": { - "description": "Create successful. The operation returns the resulting network function resource.", + "description": "ARM create operation completed successfully.", + "headers": { + "Retry-After": { + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", + "type": "integer", + "format": "int32" + } + }, "schema": { "$ref": "#/definitions/NetworkFunctionResource" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -258,7 +279,11 @@ "NetworkFunctions_CreateOrUpdate": { "$ref": "./examples/NetworkFunctions_CreateOrUpdate.json" } - } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true }, "patch": { "tags": [ @@ -268,16 +293,23 @@ "description": "Update a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/NetworkFunctionNameParameter" + "name": "networkFunctionName", + "in": "path", + "required": true, + "description": "The name of the network function", + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "minLength": 1, + "maxLength": 63, + "type": "string" }, { "name": "properties", @@ -291,15 +323,15 @@ ], "responses": { "200": { - "description": "Update successful. The operation returns the resulting network function resource.", + "description": "ARM operation completed successfully.", "schema": { "$ref": "#/definitions/NetworkFunctionResource" } }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -317,16 +349,23 @@ "description": "Delete a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { - "$ref": "#/parameters/NetworkFunctionNameParameter" + "name": "networkFunctionName", + "in": "path", + "required": true, + "description": "The name of the network function", + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "minLength": 1, + "maxLength": 63, + "type": "string" } ], "responses": { @@ -334,12 +373,12 @@ "description": "Resource deleted successfully." }, "204": { - "description": "Request successful. Resource does not exist." + "description": "Resource deleted successfully." }, "default": { - "description": "Error response describing why the operation failed.", + "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -428,7 +467,7 @@ "description": "AO5GC Network Function Resource", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" } ] }, @@ -735,16 +774,5 @@ } } }, - "parameters": { - "NetworkFunctionNameParameter": { - "name": "networkFunctionName", - "in": "path", - "required": true, - "type": "string", - "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_-]*$", - "maxLength": 64, - "description": "The name of the network function.", - "x-ms-parameter-location": "method" - } - } + "parameters": {} } From 4bca215819b73f7f2c70a447dff366e4a5733374 Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Thu, 27 Jul 2023 18:06:11 +0530 Subject: [PATCH 08/13] Addressed the validation errors --- .../2023-05-15-preview/networkfunction.json | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json index 6cbb88229f11..a4a47681d480 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -56,20 +56,20 @@ "description": "List the operations for the provider", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "ARM operation completed successfully.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -92,10 +92,10 @@ "description": "List NetworkFunctionResource resources by subscription ID", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -108,7 +108,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -131,13 +131,13 @@ "description": "List NetworkFunctionResource resources by resource group", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { @@ -150,7 +150,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -173,13 +173,13 @@ "description": "Get a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "networkFunctionName", @@ -202,7 +202,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -220,13 +220,13 @@ "description": "Create a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "networkFunctionName", @@ -250,7 +250,7 @@ ], "responses": { "200": { - "description": "ARM operation completed successfully.", + "description": "ARM resource update successful.", "schema": { "$ref": "#/definitions/NetworkFunctionResource" } @@ -271,7 +271,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -293,13 +293,13 @@ "description": "Update a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "networkFunctionName", @@ -331,7 +331,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -349,13 +349,13 @@ "description": "Delete a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "networkFunctionName", @@ -378,7 +378,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, @@ -467,7 +467,7 @@ "description": "AO5GC Network Function Resource", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" } ] }, From 7a9d6cb1441a9dac844da8ffb3632db936203f60 Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Thu, 27 Jul 2023 18:42:15 +0530 Subject: [PATCH 09/13] Updated the examples and formatted the *.tsp files --- .../NetworkFunctions_CreateOrUpdate.json | 16 +++++++ .../NetworkFunctions_Get.json | 8 ++++ .../NetworkFunctions_ListByResourceGroup.json | 8 ++++ .../NetworkFunctions_ListBySubscription.json | 8 ++++ .../NetworkFunctions_UpdateTags.json | 8 ++++ .../mpcnetworkfunction.Management/main.tsp | 6 +-- .../networkfunction.tsp | 47 ++++++++++++++----- .../NetworkFunctions_CreateOrUpdate.json | 16 +++++++ .../examples/NetworkFunctions_Get.json | 8 ++++ .../NetworkFunctions_ListByResourceGroup.json | 8 ++++ .../NetworkFunctions_ListBySubscription.json | 8 ++++ .../examples/NetworkFunctions_UpdateTags.json | 8 ++++ 12 files changed, 135 insertions(+), 14 deletions(-) diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json index b4f67721b461..625b9b057857 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json @@ -25,6 +25,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", @@ -44,6 +52,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json index d23ba374202b..a3353ecacc06 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json @@ -14,6 +14,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json index eebdbe59ee06..17aab31af457 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json @@ -15,6 +15,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json index 23f129a01101..2f08c3f30bbe 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json @@ -14,6 +14,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json index 136da40153f8..3e6871f6f2b9 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json @@ -20,6 +20,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp index efff56956929..1b347be5ec84 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/main.tsp @@ -22,7 +22,7 @@ interface Operations extends Azure.ResourceManager.Operations {} @doc("API Versions") enum Versions { - @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) - @doc("May 15, 2023 Preview API Version") - v2023_05_15_preview: "2023-05-15-preview", + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @doc("May 15, 2023 Preview API Version") + v2023_05_15_preview: "2023-05-15-preview", } diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp index e3554a488fb6..d2ee8b13fca6 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp @@ -15,7 +15,8 @@ using OpenAPI; namespace Microsoft.MobilePacketCore; @doc("AO5GC Network Function Resource") -model NetworkFunctionResource is TrackedResource { +model NetworkFunctionResource + is TrackedResource { @doc("The name of the network function") @pattern("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$") @minLength(1) @@ -65,88 +66,112 @@ model NetworkFunctionResourceProperties { @armResourceOperations(NetworkFunctionResource) interface NetworkFunctions { - get is ArmResourceRead; - createOrUpdate is ArmResourceCreateOrUpdateAsync; - updateTags is ArmTagsPatchSync; - delete is ArmResourceDeleteSync; - listByResourceGroup is ArmResourceListByParent; - listBySubscription is ArmListBySubscription; + get is ArmResourceRead; + createOrUpdate is ArmResourceCreateOrUpdateAsync; + updateTags is ArmTagsPatchSync; + delete is ArmResourceDeleteSync; + listByResourceGroup is ArmResourceListByParent; + listBySubscription is ArmListBySubscription; } @doc("SKU Definitions") enum SkuDefinitions { @doc("Azure Lab SKU") AzureLab, + @doc("Azure Production SKU") AzureProduction, + @doc("Nexus Lab SKU") NexusLab, + @doc("Nexus Production SKU") - NexusProduction + NexusProduction, } @doc("Type of Network Function") enum NetworkFunctionType { @doc("Access and Mobility Function") AMF, + @doc("Session Management Function") SMF, + @doc("User Plane Function") UPF, + @doc("Network Repository Function") NRF, + @doc("Network Slice Selection Function") NSSF, + @doc("Mobility Management Entity") MME, + @doc("System Architecture Evolution Gateway Control Plane, control and user plane separation (CUPS) architecture") SaegwControlPlane, + @doc("System Architecture Evolution Gateway User Plane, control and user plane separation (CUPS) architecture") SaegwUserPlane, + @doc("System Architecture Evolution Gateway. This combines the Serving Gateway (SGW) and the Packet Data Network Gateway (PGW) functionality") Saegw, + @doc("Evolved Packet Data Gateway") ePDG, + @doc("Non-3GPP Interworking Function") N3IWF, + @doc("Remote Platform As A Service Components") RemotePaaS, + @doc("Element Management System") EMS, + @doc("Operations and Policy Manager") - OperationsPolicyManager + OperationsPolicyManager, } @doc("Network Function Administrative State enumerations") enum NetworkFunctionAdministrativeState { @doc("Resource has been commissioned") Commissioned, + @doc("Resource has been decommissioned") - Decommissioned + Decommissioned, } @doc("Network Function Operational Status enumerations") enum NetworkFunctionOperationalStatus { @doc("Resource is inactive") Inactive, + @doc("Resource has been deployed, awaiting provisioning") InstantiatedNotProvisioned, + @doc("Resource has been deployed and provisioned, awaiting testing") InstantiatedProvisioned, + @doc("Resource is fully deployed and operational") - Active + Active, } @doc("Provisioning state of the resource") @Azure.Core.lroStatus enum ProvisioningState { ...ResourceProvisioningState, + @doc("Resource is getting provisioned") Provisioning, + @doc("Resource is updating") Updating, + @doc("Resource is getting deleted") Deleting, + @doc("Resource has been accepted") Accepted, } diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json index b4f67721b461..625b9b057857 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json @@ -25,6 +25,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", @@ -44,6 +52,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json index d23ba374202b..a3353ecacc06 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json @@ -14,6 +14,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json index eebdbe59ee06..17aab31af457 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json @@ -15,6 +15,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json index 23f129a01101..2f08c3f30bbe 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json @@ -14,6 +14,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "global", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json index 136da40153f8..3e6871f6f2b9 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json @@ -20,6 +20,14 @@ "name": "nf1", "type": "Microsoft.MobilePacketCore/networkFunctions", "location": "eastus", + "systemData": { + "createdBy": "user1", + "createdByType": "User", + "createdAt": "2023-06-01T17:18:19.1234567Z", + "lastModifiedBy": "user2", + "lastModifiedByType": "User", + "lastModifiedAt": "2023-06-02T17:18:19.1234567Z" + }, "properties": { "sku": "NexusProduction", "networkFunctionType": "SMF", From 3fb7a61c1959e489148ac0b1c0d695c710617ce9 Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi <96466317+satravi@users.noreply.github.com> Date: Fri, 28 Jul 2023 12:25:19 +0530 Subject: [PATCH 10/13] Update specification/mpcnetworkfunction/resource-manager/readme.typescript.md Co-authored-by: Qiaoqiao Zhang <55688292+qiaozha@users.noreply.github.com> --- .../mpcnetworkfunction/resource-manager/readme.typescript.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/mpcnetworkfunction/resource-manager/readme.typescript.md b/specification/mpcnetworkfunction/resource-manager/readme.typescript.md index 899f3b0428f8..23f54761aed7 100644 --- a/specification/mpcnetworkfunction/resource-manager/readme.typescript.md +++ b/specification/mpcnetworkfunction/resource-manager/readme.typescript.md @@ -6,8 +6,8 @@ Please also specify `--typescript-sdks-folder= Date: Sat, 29 Jul 2023 21:56:49 +0530 Subject: [PATCH 11/13] Update specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml Co-authored-by: Mike Harder --- .../mpcnetworkfunction.Management/tspconfig.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml index 1e6ed7d9ec0d..8910415dd0b0 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml @@ -1,9 +1,10 @@ -output-dir: "{project-root}" +emit: + - "@azure-tools/typespec-autorest" options: "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "resource-manager" emitter-output-dir: "{project-root}/.." - azure-resource-provider-folder: ./swagger/MobilePacketCore/resource-manager - examples-directory: ./examples + examples-directory: "examples" output-file: "{azure-resource-provider-folder}/{service-name}/{version-status}/{version}/networkfunction.json" "@azure-tools/typespec-providerhub-controller": emitter-output-dir: "{output-dir}/generated" From 4446d00473e7f99fdd554a4ddbdcf5b7e8047fed Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Mon, 31 Jul 2023 20:02:03 +0530 Subject: [PATCH 12/13] Updated the common types version to v3 --- .../2023-05-15-preview/networkfunction.json | 56 +++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json index a4a47681d480..801a29e8a3d8 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -56,20 +56,20 @@ "description": "List the operations for the provider", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "ARM operation completed successfully.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" } }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -92,10 +92,10 @@ "description": "List NetworkFunctionResource resources by subscription ID", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" } ], "responses": { @@ -108,7 +108,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -131,13 +131,13 @@ "description": "List NetworkFunctionResource resources by resource group", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" } ], "responses": { @@ -150,7 +150,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -173,13 +173,13 @@ "description": "Get a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "networkFunctionName", @@ -202,7 +202,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -220,13 +220,13 @@ "description": "Create a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "networkFunctionName", @@ -250,7 +250,7 @@ ], "responses": { "200": { - "description": "ARM resource update successful.", + "description": "ARM resource update successful", "schema": { "$ref": "#/definitions/NetworkFunctionResource" } @@ -271,7 +271,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -293,13 +293,13 @@ "description": "Update a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "networkFunctionName", @@ -331,7 +331,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -349,13 +349,13 @@ "description": "Delete a NetworkFunctionResource", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" }, { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "networkFunctionName", @@ -378,7 +378,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -467,7 +467,7 @@ "description": "AO5GC Network Function Resource", "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" } ] }, From 9b09d9ac10793ed18528b73d2c3a52049e8a9ead Mon Sep 17 00:00:00 2001 From: Sathya Prabhu Ravi Date: Tue, 1 Aug 2023 10:00:15 +0530 Subject: [PATCH 13/13] Updated the networkfunction TypeSpec file to the latest version and generated the Swagger API --- .../networkfunction.tsp | 36 ++++++- .../2023-05-15-preview/networkfunction.json | 102 +++++++++--------- 2 files changed, 86 insertions(+), 52 deletions(-) diff --git a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp index d2ee8b13fca6..ac4aa5088c20 100644 --- a/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp @@ -9,6 +9,7 @@ using TypeSpec.Http; using TypeSpec.Rest; using TypeSpec.Versioning; using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; using Azure.Core; using OpenAPI; @@ -64,10 +65,43 @@ model NetworkFunctionResourceProperties { provisioningState?: ProvisioningState; } +/** Compliant create or update template */ +/** + * A long-running resource CreateOrUpdate (PUT) + * @template TResource the resource being patched + * @template TBaseParameters Optional. Allows overriding the operation parameters + */ +#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-operation-outside-interface" "This is a valid template" +@autoRoute +@doc("Create a {name}", TResource) +@OpenAPI.extension("x-ms-long-running-operation", true) +@OpenAPI.extension( + "x-ms-long-running-operation-options", + { + `final-state-via`: "azure-async-operation", + } +) +@armResourceCreateOrUpdate(TResource) +@put +op ArmResourceCreateOrUpdate2Async< + TResource extends Azure.ResourceManager.Foundations.ArmResource, + TBaseParameters = Azure.ResourceManager.Foundations.BaseParameters +>( + ...ResourceInstanceParameters, + + @doc("Resource create parameters.") + @body + resource: TResource, +): ArmUpdatedResponse | ArmCreatedResponse | ErrorResponse; + +@doc("ARM resource update successful") +model ArmUpdatedResponse + is ArmResponse; + @armResourceOperations(NetworkFunctionResource) interface NetworkFunctions { get is ArmResourceRead; - createOrUpdate is ArmResourceCreateOrUpdateAsync; + createOrUpdate is ArmResourceCreateOrUpdate2Async; updateTags is ArmTagsPatchSync; delete is ArmResourceDeleteSync; listByResourceGroup is ArmResourceListByParent; diff --git a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json index 801a29e8a3d8..3848d4076139 100644 --- a/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -49,10 +49,10 @@ "paths": { "/providers/Microsoft.MobilePacketCore/operations": { "get": { + "operationId": "Operations_List", "tags": [ "Operations" ], - "operationId": "Operations_List", "description": "List the operations for the provider", "parameters": [ { @@ -73,22 +73,22 @@ } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { "OperationsList": { "$ref": "./examples/OperationList.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.MobilePacketCore/networkFunctions": { "get": { + "operationId": "NetworkFunctions_ListBySubscription", "tags": [ "NetworkFunctions" ], - "operationId": "NetworkFunctions_ListBySubscription", "description": "List NetworkFunctionResource resources by subscription ID", "parameters": [ { @@ -112,22 +112,22 @@ } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { "NetworkFunctions_ListBySubscription": { "$ref": "./examples/NetworkFunctions_ListBySubscription.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobilePacketCore/networkFunctions": { "get": { + "operationId": "NetworkFunctions_ListByResourceGroup", "tags": [ "NetworkFunctions" ], - "operationId": "NetworkFunctions_ListByResourceGroup", "description": "List NetworkFunctionResource resources by resource group", "parameters": [ { @@ -154,22 +154,22 @@ } } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "x-ms-examples": { "NetworkFunctions_ListByResourceGroup": { "$ref": "./examples/NetworkFunctions_ListByResourceGroup.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobilePacketCore/networkFunctions/{networkFunctionName}": { "get": { + "operationId": "NetworkFunctions_Get", "tags": [ "NetworkFunctions" ], - "operationId": "NetworkFunctions_Get", "description": "Get a NetworkFunctionResource", "parameters": [ { @@ -184,12 +184,12 @@ { "name": "networkFunctionName", "in": "path", - "required": true, "description": "The name of the network function", - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "required": true, + "type": "string", "minLength": 1, "maxLength": 63, - "type": "string" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" } ], "responses": { @@ -213,10 +213,10 @@ } }, "put": { + "operationId": "NetworkFunctions_CreateOrUpdate", "tags": [ "NetworkFunctions" ], - "operationId": "NetworkFunctions_CreateOrUpdate", "description": "Create a NetworkFunctionResource", "parameters": [ { @@ -231,18 +231,18 @@ { "name": "networkFunctionName", "in": "path", - "required": true, "description": "The name of the network function", - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "required": true, + "type": "string", "minLength": 1, "maxLength": 63, - "type": "string" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, { "name": "resource", "in": "body", - "required": true, "description": "Resource create parameters.", + "required": true, "schema": { "$ref": "#/definitions/NetworkFunctionResource" } @@ -257,15 +257,15 @@ }, "201": { "description": "ARM create operation completed successfully.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResource" + }, "headers": { "Retry-After": { - "description": "The Retry-After header can indicate how long the client should wait before polling the operation status.", "type": "integer", - "format": "int32" + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." } - }, - "schema": { - "$ref": "#/definitions/NetworkFunctionResource" } }, "default": { @@ -286,10 +286,10 @@ "x-ms-long-running-operation": true }, "patch": { + "operationId": "NetworkFunctions_UpdateTags", "tags": [ "NetworkFunctions" ], - "operationId": "NetworkFunctions_UpdateTags", "description": "Update a NetworkFunctionResource", "parameters": [ { @@ -304,18 +304,18 @@ { "name": "networkFunctionName", "in": "path", - "required": true, "description": "The name of the network function", - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "required": true, + "type": "string", "minLength": 1, "maxLength": 63, - "type": "string" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" }, { "name": "properties", "in": "body", - "required": true, "description": "The resource properties to be updated.", + "required": true, "schema": { "$ref": "#/definitions/NetworkFunctionResourceTagsUpdate" } @@ -342,10 +342,10 @@ } }, "delete": { + "operationId": "NetworkFunctions_Delete", "tags": [ "NetworkFunctions" ], - "operationId": "NetworkFunctions_Delete", "description": "Delete a NetworkFunctionResource", "parameters": [ { @@ -360,12 +360,12 @@ { "name": "networkFunctionName", "in": "path", - "required": true, "description": "The name of the network function", - "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$", + "required": true, + "type": "string", "minLength": 1, "maxLength": 63, - "type": "string" + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" } ], "responses": { @@ -453,6 +453,7 @@ }, "NetworkFunctionResource": { "type": "object", + "description": "AO5GC Network Function Resource", "properties": { "properties": { "$ref": "#/definitions/NetworkFunctionResourceProperties", @@ -464,7 +465,6 @@ ] } }, - "description": "AO5GC Network Function Resource", "allOf": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" @@ -473,29 +473,28 @@ }, "NetworkFunctionResourceListResult": { "type": "object", + "description": "The response of a NetworkFunctionResource list operation.", "properties": { "value": { "type": "array", + "description": "The NetworkFunctionResource items on this page", "items": { "$ref": "#/definitions/NetworkFunctionResource" - }, - "x-typespec-name": "NetworkFunctionResource[]", - "description": "The NetworkFunctionResource items on this page" + } }, "nextLink": { "type": "string", "format": "uri", - "description": "The link to the next page of items", - "x-typespec-name": "TypeSpec.Rest.ResourceLocation" + "description": "The link to the next page of items" } }, - "description": "The response of a NetworkFunctionResource list operation.", "required": [ "value" ] }, "NetworkFunctionResourceProperties": { "type": "object", + "description": "Network Function Properties.", "properties": { "sku": { "$ref": "#/definitions/SkuDefinitions", @@ -551,7 +550,6 @@ "readOnly": true } }, - "description": "Network Function Properties.", "required": [ "sku", "networkFunctionType", @@ -560,17 +558,16 @@ }, "NetworkFunctionResourceTagsUpdate": { "type": "object", + "description": "The type used for updating tags in NetworkFunctionResource resources.", "properties": { "tags": { "type": "object", + "description": "Resource tags.", "additionalProperties": { "type": "string" - }, - "x-typespec-name": "Record", - "description": "Resource tags." + } } - }, - "description": "The type used for updating tags in NetworkFunctionResource resources." + } }, "NetworkFunctionType": { "type": "string", @@ -686,15 +683,18 @@ "values": [ { "name": "Succeeded", - "value": "Succeeded" + "value": "Succeeded", + "description": "Resource has been created." }, { "name": "Failed", - "value": "Failed" + "value": "Failed", + "description": "Resource creation failed." }, { "name": "Canceled", - "value": "Canceled" + "value": "Canceled", + "description": "Resource creation was canceled." }, { "name": "Provisioning",