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..625b9b057857 --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_CreateOrUpdate.json @@ -0,0 +1,77 @@ +{ + "operationId": "NetworkFunctions_CreateOrUpdate", + "title": "NetworkFunctions_CreateOrUpdate", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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", + "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", + "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..e0978cfbabfe --- /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": "00000000-0000-0000-0000-000000000000", + "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..a3353ecacc06 --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_Get.json @@ -0,0 +1,39 @@ +{ + "operationId": "NetworkFunctions_Get", + "title": "NetworkFunctions_Get", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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..17aab31af457 --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListByResourceGroup.json @@ -0,0 +1,42 @@ +{ + "operationId": "NetworkFunctions_ListByResourceGroup", + "title": "NetworkFunctions_ListByResourceGroup", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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..2f08c3f30bbe --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_ListBySubscription.json @@ -0,0 +1,41 @@ +{ + "operationId": "NetworkFunctions_ListBySubscription", + "title": "NetworkFunctions_ListBySubscription", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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..3e6871f6f2b9 --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/examples/2023-05-15-preview/NetworkFunctions_UpdateTags.json @@ -0,0 +1,45 @@ +{ + "operationId": "NetworkFunctions_UpdateTags", + "title": "NetworkFunctions_UpdateTags", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1", + "properties": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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..1b347be5ec84 --- /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..ac4aa5088c20 --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/networkfunction.tsp @@ -0,0 +1,211 @@ +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"; + +using TypeSpec.Http; +using TypeSpec.Rest; +using TypeSpec.Versioning; +using Azure.ResourceManager; +using Azure.ResourceManager.Foundations; +using Azure.Core; +using OpenAPI; + +namespace Microsoft.MobilePacketCore; + +@doc("AO5GC Network Function Resource") +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") + @path + @segment("networkFunctions") + @visibility("create", "read") + 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; +} + +/** 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 ArmResourceCreateOrUpdate2Async; + 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..8910415dd0b0 --- /dev/null +++ b/specification/mpcnetworkfunction/mpcnetworkfunction.Management/tspconfig.yaml @@ -0,0 +1,11 @@ +emit: + - "@azure-tools/typespec-autorest" +options: + "@azure-tools/typespec-autorest": + azure-resource-provider-folder: "resource-manager" + emitter-output-dir: "{project-root}/.." + 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..625b9b057857 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_CreateOrUpdate.json @@ -0,0 +1,77 @@ +{ + "operationId": "NetworkFunctions_CreateOrUpdate", + "title": "NetworkFunctions_CreateOrUpdate", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "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/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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", + "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", + "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..e0978cfbabfe --- /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": "00000000-0000-0000-0000-000000000000", + "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..a3353ecacc06 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_Get.json @@ -0,0 +1,39 @@ +{ + "operationId": "NetworkFunctions_Get", + "title": "NetworkFunctions_Get", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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..17aab31af457 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListByResourceGroup.json @@ -0,0 +1,42 @@ +{ + "operationId": "NetworkFunctions_ListByResourceGroup", + "title": "NetworkFunctions_ListByResourceGroup", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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..2f08c3f30bbe --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_ListBySubscription.json @@ -0,0 +1,41 @@ +{ + "operationId": "NetworkFunctions_ListBySubscription", + "title": "NetworkFunctions_ListBySubscription", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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..3e6871f6f2b9 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/examples/NetworkFunctions_UpdateTags.json @@ -0,0 +1,45 @@ +{ + "operationId": "NetworkFunctions_UpdateTags", + "title": "NetworkFunctions_UpdateTags", + "parameters": { + "api-version": "2023-05-15-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rg1", + "networkFunctionName": "nf1", + "properties": { + "tags": { + "tag1": "value1", + "tag2": "value2" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobilePacketCore/networkFunctions/nf1", + "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", + "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..3848d4076139 --- /dev/null +++ b/specification/mpcnetworkfunction/resource-manager/Microsoft.MobilePacketCore/preview/2023-05-15-preview/networkfunction.json @@ -0,0 +1,778 @@ +{ + "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": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "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-examples": { + "OperationsList": { + "$ref": "./examples/OperationList.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.MobilePacketCore/networkFunctions": { + "get": { + "operationId": "NetworkFunctions_ListBySubscription", + "tags": [ + "NetworkFunctions" + ], + "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-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" + ], + "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-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" + ], + "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", + "description": "The name of the network function", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + } + ], + "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": { + "operationId": "NetworkFunctions_CreateOrUpdate", + "tags": [ + "NetworkFunctions" + ], + "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", + "description": "The name of the network function", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/NetworkFunctionResource" + } + } + ], + "responses": { + "200": { + "description": "ARM resource update successful", + "schema": { + "$ref": "#/definitions/NetworkFunctionResource" + } + }, + "201": { + "description": "ARM create operation completed successfully.", + "schema": { + "$ref": "#/definitions/NetworkFunctionResource" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "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" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "NetworkFunctions_UpdateTags", + "tags": [ + "NetworkFunctions" + ], + "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", + "description": "The name of the network function", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "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": { + "operationId": "NetworkFunctions_Delete", + "tags": [ + "NetworkFunctions" + ], + "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", + "description": "The name of the network function", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 63, + "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" + } + ], + "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", + "description": "AO5GC Network Function Resource", + "properties": { + "properties": { + "$ref": "#/definitions/NetworkFunctionResourceProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "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" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "NetworkFunctionResourceProperties": { + "type": "object", + "description": "Network Function Properties.", + "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 + } + }, + "required": [ + "sku", + "networkFunctionType", + "networkFunctionAdministrativeState" + ] + }, + "NetworkFunctionResourceTagsUpdate": { + "type": "object", + "description": "The type used for updating tags in NetworkFunctionResource resources.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "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", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was 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..23f54761aed7 --- /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: "@azure/arm-mobilecore" + output-folder: "$(typescript-sdks-folder)/sdk/mobilecore/arm-mobilecore" + payload-flattening-threshold: 1 + generate-metadata: true +```