From cabc84ab2c273bdf0b5d0d8d85dbcb6258046dac Mon Sep 17 00:00:00 2001 From: Aman Verma Date: Fri, 6 May 2022 18:29:30 +0530 Subject: [PATCH] adding a new preview version --- ...yServices_AddPartition_MaximumSet_Gen.json | 18 + ...ervices_ListPartitions_MaximumSet_Gen.json | 20 + ...rvices_RemovePartition_MaximumSet_Gen.json | 18 + .../Locations_CheckNameAvailability.json | 19 + .../examples/OepResource_Create.json | 73 ++ .../examples/OepResource_Delete.json | 13 + .../examples/OepResource_Get.json | 34 + .../OepResource_ListByResourceGroup.json | 38 + .../OepResource_ListBySubscriptionId.json | 37 + .../examples/OepResource_Update.json | 39 + .../examples/Operations_List.json | 133 ++++ .../preview/2022-04-04-preview/oep.json | 718 ++++++++++++++++++ specification/oep/resource-manager/readme.md | 24 +- 13 files changed, 1182 insertions(+), 2 deletions(-) create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_AddPartition_MaximumSet_Gen.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_ListPartitions_MaximumSet_Gen.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_RemovePartition_MaximumSet_Gen.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/Locations_CheckNameAvailability.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Create.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Delete.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Get.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_ListByResourceGroup.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_ListBySubscriptionId.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Update.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/Operations_List.json create mode 100644 specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/oep.json diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_AddPartition_MaximumSet_Gen.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_AddPartition_MaximumSet_Gen.json new file mode 100644 index 000000000000..f3e305fb4db5 --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_AddPartition_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgoep", + "resourceName": "a", + "api-version": "2022-04-04-preview", + "body": { + "name": "aaaaaaaaaaaaaaaaaa" + } + }, + "responses": { + "201": { + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_ListPartitions_MaximumSet_Gen.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_ListPartitions_MaximumSet_Gen.json new file mode 100644 index 000000000000..783cb0c17578 --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_ListPartitions_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgoep", + "resourceName": "aaaaaaaaaaaaaaaaaaa", + "api-version": "2022-04-04-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "aaaaaaaaaaa", + "provisioningState": "aaaaaaaaaaaa" + } + ] + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_RemovePartition_MaximumSet_Gen.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_RemovePartition_MaximumSet_Gen.json new file mode 100644 index 000000000000..0c4b9cbf6747 --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/EnergyServices_RemovePartition_MaximumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "rgoep", + "resourceName": "aaaaaaa", + "api-version": "2022-04-04-preview", + "body": { + "name": "aaaaaaaaaaaaaaaaaa" + } + }, + "responses": { + "201": { + "headers": { + "Azure-AsyncOperation": "https://foo.com/operationstatus" + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/Locations_CheckNameAvailability.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/Locations_CheckNameAvailability.json new file mode 100644 index 000000000000..83e9b46cd74d --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/Locations_CheckNameAvailability.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "api-version": "2021-06-01-preview", + "body": { + "name": "sample-name", + "type": "Microsoft.OEP/oepResource" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true, + "reason": null, + "message": null + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Create.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Create.json new file mode 100644 index 000000000000..601ec8f053d5 --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Create.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "0000000-0000-0000-0000-000000000001", + "resourceGroupName": "DummyResourceGroupName", + "resourceName": "DummyResourceName", + "oepResource": { + "location": "West US", + "tags": { + "additionalProps1": "additional properties" + }, + "properties": { + "authAppId": "sample-id", + "dataPartitionNames": [ + { + "name": "dataPartition1" + }, + { + "name": "dataPartition2" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "provisioningState": "Succeeded", + "authAppId": "sample-id", + "dataPartitionNames": [ + { + "name": "dataPartition1" + }, + { + "name": "dataPartition2" + } + ] + }, + "name": "DummyResourceName", + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/DummyResourceGroupName/providers/Microsoft.OEP/oepResource/DummyResourceName", + "type": "Microsoft.OEP/oepResource", + "location": "WestUS", + "tags": { + "additionalProps1": "additional properties" + } + } + }, + "201": { + "body": { + "properties": { + "provisioningState": "Accepted", + "authAppId": "sample-id", + "dataPartitionNames": [ + { + "name": "dataPartition1" + }, + { + "name": "dataPartition2" + } + ] + }, + "name": "DummyResourceName", + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/DummyResourceGroupName/providers/Microsoft.OEP/oepResource/DummyResourceName", + "type": "Microsoft.OEP/oepResource", + "location": "WestUS", + "tags": { + "additionalProps1": "additional properties" + } + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Delete.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Delete.json new file mode 100644 index 000000000000..485ede36145a --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Delete.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "subscriptionId": "0000000-0000-0000-0000-000000000001", + "resourceGroupName": "DummyResourceGroupName", + "api-version": "2021-06-01-preview", + "resourceName": "DummyResourceName" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Get.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Get.json new file mode 100644 index 000000000000..d02213ad7702 --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Get.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "0000000-0000-0000-0000-000000000001", + "resourceGroupName": "DummyResourceGroupName", + "resourceName": "DummyResourceName" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "provisioningState": "Accepted", + "authAppId": "sample-id", + "dataPartitionNames": [ + { + "name": "dataPartition1" + }, + { + "name": "dataPartition2" + } + ] + }, + "name": "DummyResourceName", + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/DummyResourceGroupName/providers/Microsoft.OEP/oepResource/DummyResourceName", + "type": "Microsoft.OEP/oepResource", + "location": "WestUS", + "tags": { + "additionalProps1": "additional properties" + } + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_ListByResourceGroup.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_ListByResourceGroup.json new file mode 100644 index 000000000000..ca019028a4f1 --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_ListByResourceGroup.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "0000000-0000-0000-0000-000000000001", + "resourceGroupName": "DummyResourceGroupName" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "provisioningState": "Accepted", + "authAppId": "sample-id", + "dataPartitionNames": [ + { + "name": "dataPartition1" + }, + { + "name": "dataPartition2" + } + ] + }, + "name": "DummyResourceName", + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/DummyResourceGroupName/providers/Microsoft.OEP/oepResource/DummyResourceName", + "type": "Microsoft.OEP/oepResource", + "location": "WestUS", + "tags": { + "additionalProps1": "additional properties" + } + } + ], + "nextLink": "" + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_ListBySubscriptionId.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_ListBySubscriptionId.json new file mode 100644 index 000000000000..c485e1534c11 --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_ListBySubscriptionId.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview", + "subscriptionId": "0000000-0000-0000-0000-000000000001" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "properties": { + "provisioningState": "Accepted", + "authAppId": "sample-id", + "dataPartitionNames": [ + { + "name": "dataPartition1" + }, + { + "name": "dataPartition2" + } + ] + }, + "name": "DummyResourceName", + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/DummyResourceGroupName/providers/Microsoft.OEP/oepResource/DummyResourceName", + "type": "Microsoft.OEP/oepResource", + "location": "WestUS", + "tags": { + "additionalProps1": "additional properties" + } + } + ], + "nextLink": "" + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Update.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Update.json new file mode 100644 index 000000000000..2f91438e8581 --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/OepResource_Update.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "0000000-0000-0000-0000-000000000001", + "resourceGroupName": "DummyResourceGroupName", + "resourceName": "DummyResourceName", + "api-version": "2021-06-01-preview", + "oepPatchResource": { + "tags": { + "additionalProps1": "additional properties" + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "properties": { + "provisioningState": "Success", + "authAppId": "sample-id", + "dataPartitionNames": [ + { + "name": "dataPartition1" + }, + { + "name": "dataPartition2" + } + ] + }, + "name": "DummyResourceName", + "id": "/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/DummyResourceGroupName/providers/Microsoft.OEP/oepResource/DummyResourceName", + "type": "Microsoft.OEP/oepResource", + "location": "WestUS", + "tags": { + "additionalProps1": "additional properties" + } + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/Operations_List.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/Operations_List.json new file mode 100644 index 000000000000..91d106836f76 --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/examples/Operations_List.json @@ -0,0 +1,133 @@ +{ + "parameters": { + "api-version": "2021-06-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.OpenEnergyPlatform/register/action", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "Microsoft.OpenEnergyPlatform", + "operation": "Register the Microsoft.OpenEnergyPlatform", + "description": "Register the subscription for Microsoft.OpenEnergyPlatform" + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/unregister/action", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "Microsoft.OpenEnergyPlatform", + "operation": "Unregister the Microsoft.OpenEnergyPlatform", + "description": "Unregister the subscription for Microsoft.OpenEnergyPlatform" + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/Locations/OperationStatuses/read", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "Locations/OperationStatuses", + "operation": "read_OperationStatuses", + "description": "read OperationStatuses" + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/Locations/OperationStatuses/write", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "Locations/OperationStatuses", + "operation": "write_OperationStatuses", + "description": "write OperationStatuses" + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/energyServices/read", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "energyServices", + "operation": "OepResources_ListByResourceGroup", + "description": "Returns list of oep resources.." + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/energyServices/read", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "energyServices", + "operation": "OepResources_ListBySubscriptionId", + "description": "Lists a collection of oep resources under the given Azure Subscription ID." + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/energyServices/read", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "energyServices", + "operation": "OepResources_Get", + "description": "Returns oep resource for a given name." + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/energyServices/write", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "energyServices", + "operation": "OepResources_Create", + "description": "Method that gets called if subscribed for ResourceCreationBegin trigger." + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/energyServices/delete", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "energyServices", + "operation": "OepResources_Delete", + "description": "Deletes oep resource" + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/energyServices/write", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "energyServices", + "operation": "OepResources_Update", + "description": "write energyServices" + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/Operations/read", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "Operations", + "operation": "read_Operations", + "description": "read Operations" + } + }, + { + "name": "Microsoft.OpenEnergyPlatform/checkNameAvailability/action", + "isDataAction": false, + "display": { + "provider": "Microsoft.OpenEnergyPlatform", + "resource": "checkNameAvailability", + "operation": "action_checkNameAvailability", + "description": "action checkNameAvailability" + } + } + ] + } + } + } +} diff --git a/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/oep.json b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/oep.json new file mode 100644 index 000000000000..5421d19d100c --- /dev/null +++ b/specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/oep.json @@ -0,0 +1,718 @@ +{ + "swagger": "2.0", + "info": { + "title": "Open Energy Platform Management Service APIs", + "description": "Open Energy Platform Management Service APIs", + "version": "2022-04-04-preview" + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.OpenEnergyPlatform/checkNameAvailability": { + "post": { + "tags": [ + "Locations" + ], + "description": "Checks the name availability of the resource with requested resource name.", + "operationId": "Locations_CheckNameAvailability", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "in": "body", + "name": "body", + "description": "NameAvailabilityRequest object.", + "required": true, + "schema": { + "description": "NameAvailabilityRequest object.", + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Locations_CheckNameAvailability": { + "$ref": "./examples/Locations_CheckNameAvailability.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices": { + "get": { + "tags": [ + "UserRPOepResource" + ], + "description": "Returns list of oep resources..", + "operationId": "EnergyServices_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/EnergyServiceList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "OepResource_ListByResourceGroup": { + "$ref": "./examples/OepResource_ListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.OpenEnergyPlatform/energyServices": { + "get": { + "tags": [ + "UserRPOepResource" + ], + "description": "Lists a collection of oep resources under the given Azure Subscription ID.", + "operationId": "EnergyServices_ListBySubscription", + "x-ms-examples": { + "OepResource_ListBySubscriptionId": { + "$ref": "./examples/OepResource_ListBySubscriptionId.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Returned when the operation is successful.", + "schema": { + "$ref": "#/definitions/EnergyServiceList" + } + }, + "default": { + "x-nullable": false, + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices/{resourceName}": { + "get": { + "tags": [ + "UserRPOepResource" + ], + "description": "Returns oep resource for a given name.", + "operationId": "EnergyServices_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "in": "path", + "name": "resourceName", + "description": "The resource name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/EnergyService" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "OepResource_Get": { + "$ref": "./examples/OepResource_Get.json" + } + } + }, + "put": { + "tags": [ + "UserRPOepResource" + ], + "description": "Method that gets called if subscribed for ResourceCreationBegin trigger.", + "operationId": "EnergyServices_Create", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "in": "path", + "name": "resourceName", + "description": "The resource name.", + "required": true, + "type": "string" + }, + { + "in": "body", + "name": "body", + "description": "Request body.", + "schema": { + "description": "Request body.", + "$ref": "#/definitions/EnergyService" + } + } + ], + "responses": { + "200": { + "description": "The OEP resource created.", + "schema": { + "$ref": "#/definitions/EnergyService" + } + }, + "201": { + "description": "The OEP resource will be created asynchronously", + "schema": { + "$ref": "#/definitions/EnergyService" + } + }, + "default": { + "description": "Error response describing the reason for operation failure. 404 - NotFound (Confidential Ledger could not be created/updated)", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "OepResource_Create": { + "$ref": "./examples/OepResource_Create.json" + } + } + }, + "patch": { + "operationId": "EnergyServices_Update", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "in": "path", + "name": "resourceName", + "description": "The resource name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/EnergyResourceUpdate" + } + } + ], + "responses": { + "200": { + "description": "Updates the oep resource.", + "schema": { + "$ref": "#/definitions/EnergyService" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "OepResource_Update": { + "$ref": "./examples/OepResource_Update.json" + } + } + }, + "delete": { + "description": "Deletes oep resource", + "operationId": "EnergyServices_Delete", + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "in": "path", + "name": "resourceName", + "description": "The resource name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success" + }, + "202": { + "description": "The OEP resource will be deleted asynchronously" + }, + "204": { + "description": "Returned when the operation returns no content." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "OepResource_Delete": { + "$ref": "./examples/OepResource_Delete.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices/{resourceName}/addPartition": { + "post": { + "tags": [ + "OEPResourcePartition" + ], + "description": "Method that gets called if new partition is to be added in a resource.", + "operationId": "EnergyServices_AddPartition", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "in": "path", + "name": "resourceName", + "description": "The resource name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "add partition action payload", + "schema": { + "description": "Request body.", + "$ref": "#/definitions/DataPartitionAddOrRemoveRequest" + } + } + ], + "responses": { + "201": { + "description": "The data partitions will be created asynchronously" + }, + "default": { + "description": "Error response describing the reason for operation failure. 404 - NotFound (Confidential Ledger could not be created/updated)", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "EnergyServices_AddPartition_MaximumSet_Gen": { + "$ref": "./examples/EnergyServices_AddPartition_MaximumSet_Gen.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices/{resourceName}/removePartition": { + "post": { + "tags": [ + "OEPResourcePartition" + ], + "description": "Method that gets called if new partition is to be removed from a resource.", + "operationId": "EnergyServices_RemovePartition", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "in": "path", + "name": "resourceName", + "description": "The resource name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "body", + "description": "remove partition action payload", + "schema": { + "description": "Request body.", + "$ref": "#/definitions/DataPartitionAddOrRemoveRequest" + } + } + ], + "responses": { + "201": { + "description": "The data partitions will be deleted asynchronously" + }, + "default": { + "description": "Error response describing the reason for operation failure. 404 - NotFound (Confidential Ledger could not be created/updated)", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "EnergyServices_RemovePartition_MaximumSet_Gen": { + "$ref": "./examples/EnergyServices_RemovePartition_MaximumSet_Gen.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform/energyServices/{resourceName}/listPartitions": { + "post": { + "tags": [ + "OEPResourcePartition" + ], + "description": "Method that gets called when list of partitions is requested.", + "operationId": "EnergyServices_ListPartitions", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "in": "path", + "name": "resourceName", + "description": "The resource name.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DataPartitionsListResult" + } + }, + "default": { + "description": "Error response describing the reason for operation failure. 404 - NotFound (Confidential Ledger could not be created/updated)", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "EnergyServices_ListPartitions_MaximumSet_Gen": { + "$ref": "./examples/EnergyServices_ListPartitions_MaximumSet_Gen.json" + } + } + } + }, + "/providers/Microsoft.OpenEnergyPlatform/operations": { + "get": { + "tags": [ + "Operations" + ], + "description": "Lists the available operations of Microsoft.OpenEnergyPlatform resource provider.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Operations_List": { + "$ref": "./examples/Operations_List.json" + } + } + } + } + }, + "parameters": { + "DataPartitionIdParameter": { + "name": "dataPartitionId", + "in": "path", + "required": true, + "type": "string", + "description": "The data partition id.", + "x-ms-parameter-location": "method" + } + }, + "definitions": { + "EnergyServiceList": { + "description": "The list of oep resources.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link used to get the next page of oep resources list.", + "type": "string" + }, + "value": { + "description": "The list of oep resources.", + "type": "array", + "items": { + "$ref": "#/definitions/EnergyService" + } + } + } + }, + "DataPartitionsList": { + "type": "object", + "description": "List of data partitions", + "properties": { + "dataPartitionNames": { + "type": "array", + "items": { + "$ref": "#/definitions/DataPartitionNames" + }, + "x-ms-identifiers": [] + } + } + }, + "DataPartitionNames": { + "type": "object", + "description": "The list of Energy services resource's Data Partition Names.", + "properties": { + "name": { + "type": "string" + } + } + }, + "DataPartitionAddOrRemoveRequest": { + "description": "Defines the partition add/ delete action properties.", + "type": "object", + "properties": { + "name": { + "description": "Name of the data partition", + "type": "string" + } + } + }, + "DataPartitionProperties": { + "description": "Defines the properties of an individual data partition.", + "type": "object", + "properties": { + "name": { + "description": "Name of the data partition", + "type": "string" + }, + "provisioningState": { + "description": "Name of the data partition", + "type": "string" + } + } + }, + "DataPartitionsListResult": { + "type": "object", + "description": "List of data partitions.", + "properties": { + "value": { + "type": "array", + "description": "List of data partitions along with their properties in a given OEP resource.", + "items": { + "$ref": "#/definitions/DataPartitionProperties" + }, + "x-ms-identifiers": [] + } + } + }, + "EnergyServiceProperties": { + "type": "object", + "properties": { + "dnsName": { + "type": "string", + "readOnly": true + }, + "provisioningState": { + "enum": [ + "Unknown", + "Succeeded", + "Failed", + "Canceled", + "Creating", + "Deleting", + "Updating" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "authAppId": { + "type": "string", + "readOnly": false + }, + "dataPartitionNames": { + "type": "array", + "items": { + "$ref": "#/definitions/DataPartitionNames" + }, + "x-ms-identifiers": [] + } + } + }, + "EnergyService": { + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/EnergyServiceProperties" + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "location": { + "description": "Geo-location where the resource lives.", + "type": "string" + } + } + }, + "EnergyResourceUpdate": { + "description": "The resource model definition used for updating a tracked ARM resource.", + "type": "object", + "properties": { + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + }, + "description": "Azure Active Directory OAuth2 Flow" + } + }, + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "host": "management.azure.com", + "schemes": [ + "https" + ] +} diff --git a/specification/oep/resource-manager/readme.md b/specification/oep/resource-manager/readme.md index d522afb3e1fa..a855f23870c8 100644 --- a/specification/oep/resource-manager/readme.md +++ b/specification/oep/resource-manager/readme.md @@ -27,7 +27,7 @@ These are the global settings for the oep. ```yaml openapi-type: arm openapi-subtype: rpaas -tag: package-2021-06-01-preview +tag: package-2022-04-04-preview ``` ### Tag: package-2021-06-01-preview @@ -39,6 +39,27 @@ input-file: - Microsoft.OpenEnergyPlatform/preview/2021-06-01-preview/oep.json ``` +### Tag: package-2022-04-04-preview + +These settings apply only when `--tag=package-2022-04-04-preview` is specified on the command line. + +```yaml $(tag) == 'package-2022-04-04-preview' +input-file: + - Microsoft.OpenEnergyPlatform/preview/2022-04-04-preview/oep.json +``` + +## Suppression +``` yaml +directive: + - suppress: RequiredPropertiesMissingInResourceModel + from: oep.json + where: $.definitions.DataPartitionsList + reason: DataPartitionsList is a proxy resource + - suppress: BodyTopLevelProperties + from: oep.json + where: $.definitions.DataPartitionsList.properties + reason: DataPartitionsList is a proxy resource +``` --- # Code Generation @@ -55,7 +76,6 @@ swagger-to-sdk: - repo: azure-sdk-for-go-track2 - repo: azure-sdk-for-js - repo: azure-cli-extensions - - repo: azure-powershell ``` ## Az