diff --git a/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/OperationResults/Get.json b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/OperationResults/Get.json new file mode 100644 index 000000000000..eb22c59bb270 --- /dev/null +++ b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/OperationResults/Get.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2020-11-01-preview", + "operationId": "2499e7c2-d251-4a54-9b0f-7673fe325283" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/5c78bfbb-bd8b-4185-8080-0a981c668ae7/billingProfiles/AYOE-3HRP-BG7-TGB/invoiceSections/GOSZ-YOKV-PJA-TGB/providers/Microsoft.ProfessionalService/resources/testprofservice", + "name": "testprofservice", + "type": "Microsoft.ProfessionalService/resources", + "properties": { + "status": "Subscribed", + "publisherId": "profservicepublisher", + "skuId": "ff051f4f-a6d9-4cbc-8d9a-2a41bd468abc", + "offerId": "testprofservice", + "paymentChannelMetadata": { + "billingAccountId": "5c78bfbb-bd8b-4185-8080-0a981c668ae7", + "organizationId": "2303dbd1-469a-40ea-8fa0-7a456237ebdc_2018-09-30" + }, + "term": { + "termUnit": "P1Y", + "startDate": "2022-08-28T00:00:00Z", + "endDate": "2023-08-27T00:00:00Z" + }, + "autoRenew": null, + "isFreeTrial": false, + "created": "2022-08-28T05:08:40.9235607Z", + "lastModified": "2022-08-29T21:25:40.2736665Z" + }, + "tags": {} + } + }, + "202": {} + } +} diff --git a/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/OperationsRp/GetRpOperations.json b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/OperationsRp/GetRpOperations.json new file mode 100644 index 000000000000..fe9e0cbb3d6a --- /dev/null +++ b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/OperationsRp/GetRpOperations.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "api-version": "2020-11-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.ProfessionalService/register/action", + "display": { + "provider": "Microsoft", + "resource": "Professional Service Resources", + "operation": "Register Professional Service resource provider", + "description": "Register Professional Service resource provider in the tenant" + }, + "origin": null + }, + { + "name": "Microsoft.ProfessionalService/resources/read", + "display": { + "provider": "Microsoft", + "resource": "Professional Service resources", + "operation": "Get Professional Service resources", + "description": "Get one resource" + }, + "origin": null + }, + { + "name": "Microsoft.ProfessionalService/resources/write", + "display": { + "provider": "Microsoft", + "resource": "ProfessionalService resources", + "operation": "Create or Update a Professional Service resource", + "description": "Create or Update a Professional Service resource" + }, + "origin": null + }, + { + "name": "Microsoft.ProfessionalService/resources/delete", + "display": { + "provider": "Microsoft", + "resource": "Professional Service resources", + "operation": "Delete a Professional Service resource", + "description": "Delete a Professional Service resource" + }, + "origin": null + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceDelete.json b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceDelete.json new file mode 100644 index 000000000000..11a86dbd94e0 --- /dev/null +++ b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceDelete.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "billingAccount": "48cb92a8-b67e-5a1b-4c7b-7bafbb523123", + "billingProfile": "AYOE-3HRP-BG7-ABC", + "invoiceSection": "GOSZ-YOKV-PJA-ABC", + "resourceName": "ps_subscription", + "api-version": "2020-11-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.ProfessionalService/operationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2020-11-01-preview", + "Retry-After": "10" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceEnrollmentDelete.json b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceEnrollmentDelete.json new file mode 100644 index 000000000000..b3fe697e8a79 --- /dev/null +++ b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceEnrollmentDelete.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "enrollmentBillingAccount": "123456", + "resourceName": "ps_subscription", + "api-version": "2020-11-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.ProfessionalService/operationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2020-11-01-preview", + "Retry-After": "10" + } + }, + "204": {} + } +} \ No newline at end of file diff --git a/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceEnrollmentGet.json b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceEnrollmentGet.json new file mode 100644 index 000000000000..4a1bc5de5890 --- /dev/null +++ b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceEnrollmentGet.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "enrollmentBillingAccount": "123456", + "resourceName": "ps_subscription", + "api-version": "2020-11-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/48cb92a8-b67e-5a1b-4c7b-7bafbb523123/billingProfiles/AYOE-3HRP-BG7-ABC/invoiceSections/GOSZ-YOKV-PJA-ABC/providers/Microsoft.ProfessionalService/resources/ps_subscription", + "name": "ps_subscription", + "type": "Microsoft.ProfessionalService/resources", + "properties": { + "status": "Subscribed", + "publisherId": "profservicepublisher", + "skuId": "ff051f4f-a6d9-4cbc-8d9a-2a41bd468abc", + "offerId": "testprofservice", + "quantity": null, + "termId": null, + "paymentChannelMetadata": { + "billingAccountId": "34194aa3-a6c2-5306-7152-3e8a7ced1123", + "organizationId": "fe8fd1af-1f5d-47f5-9db2-600bc5c74123_2018-09-30" + }, + "term": { + "startDate": "2022-08-28T00:00:00Z", + "endDate": "2023-08-27T00:00:00Z", + "termUnit": "P1Y" + }, + "autoRenew": null, + "isFreeTrial": false, + "created": "2022-08-28T08:53:36.3296017Z", + "lastModified": "2022-08-28T08:56:10.8225908Z" + }, + "tags": {} + } + } + } +} diff --git a/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceEnrollmentPut.json b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceEnrollmentPut.json new file mode 100644 index 000000000000..78ad95f380f9 --- /dev/null +++ b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceEnrollmentPut.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "enrollmentBillingAccount": "123456", + "resourceName": "ps_subscription", + "api-version": "2020-11-01-preview", + "parameters": { + "location": "global", + "name": "ps_subscription", + "properties": { + "publisherId": "profservicepublisher", + "offerId": "testprofservice", + "skuId": "ff051f4f-a6d9-4cbc-8d9a-2a41bd468abc", + "termId": "hjdtn7tfnxcy", + "quoteId": "quoteabc", + "paymentChannelMetadata": { + "OrganizationId": "fe8fd1af-1f5d-47f5-9db2-600bc5c74123_2018-09-30" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/48cb92a8-b67e-5a1b-4c7b-7bafbb523123/billingProfiles/AYOE-3HRP-BG7-ABC/invoiceSections/GOSZ-YOKV-PJA-ABC/providers/Microsoft.ProfessionalService/resources/ps_subscription", + "name": "ps_subscription", + "type": "Microsoft.ProfessionalService/resources", + "properties": { + "status": "Subscribed", + "publisherId": "profservicepublisher", + "skuId": "ff051f4f-a6d9-4cbc-8d9a-2a41bd468abc", + "offerId": "testprofservice", + "quantity": null, + "termId": null, + "paymentChannelMetadata": { + "billingAccountId": "34194aa3-a6c2-5306-7152-3e8a7ced1123", + "organizationId": "fe8fd1af-1f5d-47f5-9db2-600bc5c74123_2018-09-30" + }, + "term": { + "startDate": "2022-08-28T00:00:00Z", + "endDate": "2023-08-27T00:00:00Z", + "termUnit": "P1Y" + }, + "autoRenew": null, + "isFreeTrial": false, + "created": "2022-08-28T08:53:36.3296017Z", + "lastModified": "2022-08-28T08:56:10.8225908Z" + }, + "tags": {} + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.ProfessionalService/operationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2020-11-01-preview", + "Retry-After": "10" + } + } + } +} \ No newline at end of file diff --git a/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceGet.json b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceGet.json new file mode 100644 index 000000000000..26120c331996 --- /dev/null +++ b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServiceGet.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "billingAccount": "48cb92a8-b67e-5a1b-4c7b-7bafbb523123", + "billingProfile": "AYOE-3HRP-BG7-ABC", + "invoiceSection": "GOSZ-YOKV-PJA-ABC", + "resourceName": "ps_subscription", + "api-version": "2020-11-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/48cb92a8-b67e-5a1b-4c7b-7bafbb523123/billingProfiles/AYOE-3HRP-BG7-ABC/invoiceSections/GOSZ-YOKV-PJA-ABC/providers/Microsoft.ProfessionalService/resources/ps_subscription", + "name": "ps_subscription", + "type": "Microsoft.ProfessionalService/resources", + "properties": { + "status": "Subscribed", + "publisherId": "profservicepublisher", + "skuId": "ff051f4f-a6d9-4cbc-8d9a-2a41bd468abc", + "offerId": "testprofservice", + "quantity": null, + "termId": null, + "paymentChannelMetadata": { + "billingAccountId": "34194aa3-a6c2-5306-7152-3e8a7ced1123", + "organizationId": "fe8fd1af-1f5d-47f5-9db2-600bc5c74123_2018-09-30" + }, + "term": { + "startDate": "2022-08-28T00:00:00Z", + "endDate": "2023-08-27T00:00:00Z", + "termUnit": "P1Y" + }, + "autoRenew": null, + "isFreeTrial": false, + "created": "2022-08-28T08:53:36.3296017Z", + "lastModified": "2022-08-28T08:56:10.8225908Z" + }, + "tags": {} + } + } + } +} \ No newline at end of file diff --git a/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServicePut.json b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServicePut.json new file mode 100644 index 000000000000..07c0c3070d2a --- /dev/null +++ b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/examples/ProfessionalService/ProfessionalServicePut.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "billingAccount": "48cb92a8-b67e-5a1b-4c7b-7bafbb523123", + "billingProfile": "AYOE-3HRP-BG7-ABC", + "invoiceSection": "GOSZ-YOKV-PJA-ABC", + "resourceName": "ps_subscription", + "api-version": "2020-11-01-preview", + "parameters": { + "location": "global", + "name": "ps_subscription", + "properties": { + "publisherId": "profservicepublisher", + "offerId": "testprofservice", + "skuId": "ff051f4f-a6d9-4cbc-8d9a-2a41bd468abc", + "termId": "hjdtn7tfnxcy", + "quoteId": "quoteabc", + "paymentChannelMetadata": { + "OrganizationId": "fe8fd1af-1f5d-47f5-9db2-600bc5c74123_2018-09-30" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Billing/billingAccounts/48cb92a8-b67e-5a1b-4c7b-7bafbb523123/billingProfiles/AYOE-3HRP-BG7-ABC/invoiceSections/GOSZ-YOKV-PJA-ABC/providers/Microsoft.ProfessionalService/resources/ps_subscription", + "name": "ps_subscription", + "type": "Microsoft.ProfessionalService/resources", + "properties": { + "status": "Subscribed", + "publisherId": "profservicepublisher", + "skuId": "ff051f4f-a6d9-4cbc-8d9a-2a41bd468abc", + "offerId": "testprofservice", + "quantity": null, + "termId": null, + "paymentChannelMetadata": { + "billingAccountId": "34194aa3-a6c2-5306-7152-3e8a7ced1123", + "organizationId": "fe8fd1af-1f5d-47f5-9db2-600bc5c74123_2018-09-30" + }, + "term": { + "startDate": "2022-08-28T00:00:00Z", + "endDate": "2023-08-27T00:00:00Z", + "termUnit": "P1Y" + }, + "autoRenew": null, + "isFreeTrial": false, + "created": "2022-08-28T08:53:36.3296017Z", + "lastModified": "2022-08-28T08:56:10.8225908Z" + }, + "tags": {} + } + }, + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.ProfessionalService/operationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2020-05-01", + "Retry-After": "10" + } + } + } +} \ No newline at end of file diff --git a/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/professionalservice.json b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/professionalservice.json new file mode 100644 index 000000000000..c7c775fc64f6 --- /dev/null +++ b/specification/professionalservice/resource-manager/Microsoft.ProfessionalService/preview/2020-11-01-preview/professionalservice.json @@ -0,0 +1,752 @@ +{ + "swagger": "2.0", + "info": { + "version": "2020-11-01-preview", + "title": "ProfessionalService", + "description": "REST APIs for Marketplace Professional Service Offers" + }, + "host": "management.azure.com", + "schemes": ["https"], + "consumes": ["application/json"], + "produces": ["application/json"], + "security": [{ + "azure_auth": ["user_impersonation"] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.Billing/billingAccounts/{billingAccount}/billingProfiles/{billingProfile}/invoiceSections/{invoiceSection}/providers/Microsoft.ProfessionalService/resources/{resourceName}": { + "get": { + "tags": [ + "BillingScopeProfessionalServiceResources" + ], + "operationId": "ProfessionalService_Get", + "description": "Gets information about the specified Professional Service.", + "produces": [ + "application/json" + ], + "parameters": [{ + "$ref": "#/parameters/BillingAccountParameter" + }, { + "$ref": "#/parameters/BillingProfileParameter" + }, { + "$ref": "#/parameters/InvoiceSectionParameter" + }, { + "$ref": "#/parameters/ResourceNameParameter" + }, { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The request returns the resulting ProfessionalService resource.", + "schema": { + "$ref": "#/definitions/ProfessionalServiceResource" + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get professional service resource": { + "$ref": "./examples/ProfessionalService/ProfessionalServiceGet.json" + } + } + }, + "put": { + "tags": [ + "BillingScopeProfessionalServiceResources" + ], + "operationId": "ProfessionalService_CreateOrUpdate", + "description": "Creates or updates a ProfessionalService resource.", + "produces": [ + "application/json" + ], + "parameters": [{ + "$ref": "#/parameters/BillingAccountParameter" + }, { + "$ref": "#/parameters/BillingProfileParameter" + }, { + "$ref": "#/parameters/InvoiceSectionParameter" + }, { + "$ref": "#/parameters/ResourceNameParameter" + }, { + "$ref": "#/parameters/ApiVersionParameter" + }, { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ProfessionalServiceResourceCreation" + }, + "description": "Parameters supplied to the create or update ProfessionalService operation." + } + ], + "responses": { + "200": { + "description": "Resource creation has completed.", + "schema": { + "$ref": "#/definitions/ProfessionalServiceResource" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URL to check the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "format": "int32", + "type": "integer" + } + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Create professional service resource": { + "$ref": "./examples/ProfessionalService/ProfessionalServicePut.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "delete": { + "tags": [ + "BillingScopeProfessionalServiceResources" + ], + "operationId": "ProfessionalService_Delete", + "description": "Deletes the specified ProfessionalService.", + "parameters": [{ + "$ref": "#/parameters/BillingAccountParameter" + }, { + "$ref": "#/parameters/BillingProfileParameter" + }, { + "$ref": "#/parameters/InvoiceSectionParameter" + }, { + "$ref": "#/parameters/ResourceNameParameter" + }, { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Delete Operation completed successfully." + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URL to check the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "format": "int32", + "type": "integer" + } + } + }, + "204": { + "description": "Delete operation completed successfully." + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete professional service resource": { + "$ref": "./examples/ProfessionalService/ProfessionalServiceDelete.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{enrollmentBillingAccount}/providers/Microsoft.ProfessionalService/resources/{resourceName}": { + "get": { + "tags": [ + "EnrollmentBillingScopeProfessionalServiceResources" + ], + "operationId": "ProfessionalServiceForEnrollment_Get", + "description": "Gets information about the specified Professional Service for enrollment account.", + "produces": [ + "application/json" + ], + "parameters": [{ + "$ref": "#/parameters/EnrollmentBillingAccountParameter" + }, { + "$ref": "#/parameters/ResourceNameParameter" + }, { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The request returns the resulting ProfessionalService resource.", + "schema": { + "$ref": "#/definitions/ProfessionalServiceResource" + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get professional service resource": { + "$ref": "./examples/ProfessionalService/ProfessionalServiceEnrollmentGet.json" + } + } + }, + "put": { + "tags": [ + "EnrollmentBillingScopeProfessionalServiceResources" + ], + "operationId": "ProfessionalServiceForEnrollment_CreateOrUpdate", + "description": "Creates or updates a ProfessionalService resource for enrollment account.", + "produces": [ + "application/json" + ], + "parameters": [{ + "$ref": "#/parameters/EnrollmentBillingAccountParameter" + }, { + "$ref": "#/parameters/ResourceNameParameter" + }, { + "$ref": "#/parameters/ApiVersionParameter" + }, { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ProfessionalServiceResourceCreation" + }, + "description": "Parameters supplied to the create or update ProfessionalService operation." + } + ], + "responses": { + "200": { + "description": "Resource creation has completed.", + "schema": { + "$ref": "#/definitions/ProfessionalServiceResource" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URL to check the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "format": "int32", + "type": "integer" + } + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Create professional service resource": { + "$ref": "./examples/ProfessionalService/ProfessionalServiceEnrollmentPut.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "delete": { + "tags": [ + "EnrollmentBillingScopeProfessionalServiceResources" + ], + "operationId": "ProfessionalServiceForEnrollment_Delete", + "description": "Deletes the specified ProfessionalService for enrollment account.", + "parameters": [{ + "$ref": "#/parameters/EnrollmentBillingAccountParameter" + }, { + "$ref": "#/parameters/ResourceNameParameter" + }, { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Delete Operation completed successfully." + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URL to check the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "format": "int32", + "type": "integer" + } + } + }, + "204": { + "description": "Delete operation completed successfully." + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete professional service resource": { + "$ref": "./examples/ProfessionalService/ProfessionalServiceEnrollmentDelete.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, + "/providers/Microsoft.ProfessionalService/operationResults/{operationId}": { + "get": { + "tags": [ + "ProfessionalServiceOperations" + ], + "operationId": "ProfessionalServiceOperation_Get", + "description": "Gets information about the specified operation progress.", + "produces": [ + "application/json" + ], + "parameters": [{ + "$ref": "#/parameters/OperationIdParameter" + }, { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Operation ended successfully. The request returns the updated ProfessionalService resource.", + "schema": { + "$ref": "#/definitions/ProfessionalServiceResource" + } + }, + "202": { + "description": "Accepted and the operation will complete asynchronously.", + "headers": { + "Location": { + "description": "The URL to check the status of the asynchronous operation.", + "type": "string" + }, + "Retry-After": { + "description": "The amount of delay to use while the status of the operation is checked. The value is expressed in seconds.", + "format": "int32", + "type": "integer" + } + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get operation status": { + "$ref": "./examples/OperationResults/Get.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + } + }, + "/providers/Microsoft.ProfessionalService/operations": { + "get": { + "tags": [ + "ProfessionalServiceResources" + ], + "operationId": "operations_List", + "description": "Gets all ProfessionalService operations.", + "produces": [ + "application/json" + ], + "parameters": [{ + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ProfessionalServiceRpOperationsResponseWithContinuation" + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get professional service operations": { + "$ref": "./examples/OperationsRp/GetRpOperations.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "ProfessionalServiceRpOperationsResponseWithContinuation": { + "description": "professional service operation response with continuation.", + "type": "object", + "properties": { + "nextLink": { + "description": "the next link to query to get the remaining results.", + "type": "string" + }, + "value": { + "description": "the value of response.", + "x-ms-identifiers": [], + "type": "array", + "items": { + "$ref": "#/definitions/ProfessionalServiceRpOperation" + } + } + } + }, + "ProfessionalServiceRpOperation": { + "description": "professional service operations", + "type": "object", + "properties": { + "name": { + "description": "the operation name", + "type": "string" + }, + "display": { + "description": "the operation display", + "$ref": "#/definitions/ProfessionalServiceRpOperationDisplay" + }, + "origin": { + "description": "the operation origin", + "type": "string" + }, + "isDataAction": { + "description": "whether the operation is a data action or not.", + "type": "boolean" + } + } + }, + "ProfessionalServiceRpOperationDisplay": { + "description": "professional service operation display", + "type": "object", + "properties": { + "provider": { + "description": "Name of the provider for display purposes", + "type": "string" + }, + "resource": { + "description": "Name of the resource type for display purposes", + "type": "string" + }, + "operation": { + "description": "Name of the operation for display purposes", + "type": "string" + }, + "description": { + "description": "Description of the operation for display purposes", + "type": "string" + } + } + }, + "ProfessionalServiceResource": { + "description": "ProfessionalService REST API resource definition.", + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "properties": { + "description": "ProfessionalService properties", + "type": "object", + "allOf": [{ + "$ref": "#/definitions/ProfessionalServiceProperties" + }, { + "$ref": "#/definitions/ProfessionalServiceCreationProperties" + } + ] + }, + "name": { + "type": "string", + "description": "The name of the resource", + "readOnly": true + }, + "id": { + "description": "The resource uri", + "type": "string", + "readOnly": true + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, + "tags": { + "description": "the resource tags.", + "$ref": "#/definitions/Tags" + } + } + }, + "ProfessionalServiceResourceCreation": { + "description": "ProfessionalService REST API resource definition for creation.", + "type": "object", + "properties": { + "id": { + "description": "The resource uri", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The resource name", + "type": "string" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + }, + "tags": { + "description": "the resource tags.", + "$ref": "#/definitions/Tags" + }, + "location": { + "type": "string", + "x-ms-mutability": ["create", "read"], + "description": "Resource location. Only value allowed for professional service is 'global'" + }, + "properties": { + "$ref": "#/definitions/ProfessionalServiceCreationProperties", + "description": "Properties of the professional service resource that are relevant for creation." + } + } + }, + "ProfessionalServiceProperties": { + "type": "object", + "description": "ProfessionalService resource properties", + "properties": { + "status": { + "type": "string", + "description": "The ProfessionalService Subscription Status.", + "enum": [ + "NotStarted", + "Subscribed", + "Unsubscribed", + "Suspended" + ], + "x-ms-enum": { + "name": "ProfessionalServiceResourceStatus", + "modelAsString": true + } + }, + "term": { + "type": "object", + "description": "The current Term object.", + "properties": { + "termUnit": { + "type": "string", + "description": "The unit indicating Monthly / Yearly" + }, + "startDate": { + "type": "string", + "description": "The start date of the current term" + }, + "endDate": { + "type": "string", + "description": "The end date of the current term" + } + } + }, + "isFreeTrial": { + "type": "boolean", + "description": "Whether the current term is a Free Trial term" + }, + "created": { + "type": "string", + "description": "The created date of this resource.", + "readOnly": true + }, + "lastModified": { + "type": "string", + "description": "The last modifier date if this resource." + } + } + }, + "ProfessionalServiceCreationProperties": { + "type": "object", + "description": "properties for creation ProfessionalService", + "properties": { + "offerId": { + "type": "string", + "description": "The offer id." + }, + "publisherId": { + "type": "string", + "description": "The publisher id." + }, + "quantity": { + "type": "number", + "description": "The seat count." + }, + "skuId": { + "type": "string", + "description": "The plan id." + }, + "paymentChannelMetadata": { + "type": "object", + "description": "The metadata about the ProfessionalService subscription such as the OrganizationId.", + "additionalProperties": { + "type": "string" + } + }, + "termId": { + "type": "string", + "description": "The current Term id." + }, + "quoteId": { + "type": "string", + "description": "The quote id which the ProfessionalService will be purchase with." + }, + "storeFront": { + "type": "string", + "description": "The store front which initiates the purchase." + }, + "autoRenew": { + "type": "boolean", + "description": "Whether the ProfessionalService subscription will auto renew upon term end." + } + } + }, + "ProfessionalServiceResourceResponseWithContinuation": { + "description": "ProfessionalService resources response with continuation.", + "type": "object", + "properties": { + "nextLink": { + "description": "the next link to query to get the remaining results.", + "type": "string" + }, + "value": { + "description": "the value of response.", + "type": "array", + "items": { + "$ref": "#/definitions/ProfessionalServiceResource" + } + } + } + }, + "Tags": { + "type": "object", + "description": "the resource tags.", + "additionalProperties": { + "type": "string" + } + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "x-ms-parameter-location": "client", + "description": "The API version to be used with the HTTP request." + }, + "OperationIdParameter": { + "name": "operationId", + "in": "path", + "required": true, + "type": "string", + "description": "the operation Id parameter.", + "x-ms-parameter-location": "method" + }, + "EnrollmentBillingAccountParameter": { + "name": "enrollmentBillingAccount", + "in": "path", + "required": true, + "type": "string", + "description": "The enrollment billing account id." + }, + "BillingAccountParameter": { + "name": "billingAccount", + "in": "path", + "required": true, + "type": "string", + "description": "The billing account id." + }, + "BillingProfileParameter": { + "name": "billingProfile", + "in": "path", + "required": true, + "type": "string", + "description": "The biling profile id.", + "x-ms-parameter-location": "method" + }, + "InvoiceSectionParameter": { + "name": "invoiceSection", + "in": "path", + "required": true, + "type": "string", + "description": "The invoice section id.", + "x-ms-parameter-location": "method" + }, + "ResourceNameParameter": { + "name": "resourceName", + "in": "path", + "required": true, + "type": "string", + "pattern": "^[a-zA-Z0-9-_.()]{0,63}[a-zA-Z0-9-_()]$", + "description": "The name of the resource.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/professionalservice/resource-manager/readme.az.md b/specification/professionalservice/resource-manager/readme.az.md new file mode 100644 index 000000000000..22b62dd04f3b --- /dev/null +++ b/specification/professionalservice/resource-manager/readme.az.md @@ -0,0 +1,28 @@ +## AZ + +These settings apply only when `--az` is specified on the command line. + +For new Resource Provider. It is highly recommended to onboard Azure CLI extensions. There's no differences in terms of customer usage. + +``` yaml $(az) && $(target-mode) != 'core' +az: + extensions: professionalservice + namespace: azure.mgmt.professionalservice + package-name: azure-mgmt-professionalservice +az-output-folder: $(azure-cli-extension-folder)/src/professionalservice +python-sdk-output-folder: "$(az-output-folder)/azext_professionalservice/vendored_sdks/professionalservice" +# add additional configuration here specific for Azure CLI +# refer to the faq.md for more details +``` + + + +This is for command modules that already in azure cli main repo. +``` yaml $(az) && $(target-mode) == 'core' +az: + extensions: professionalservice + namespace: azure.mgmt.professionalservice + package-name: azure-mgmt-professionalservice +az-output-folder: $(azure-cli-folder)/src/azure-cli/azure/cli/command_modules/professionalservice +python-sdk-output-folder: "$(az-output-folder)/vendored_sdks/professionalservice" +``` \ No newline at end of file diff --git a/specification/professionalservice/resource-manager/readme.cli.md b/specification/professionalservice/resource-manager/readme.cli.md new file mode 100644 index 000000000000..c6cf6ad37ea4 --- /dev/null +++ b/specification/professionalservice/resource-manager/readme.cli.md @@ -0,0 +1 @@ +## CLI Common Settings for all the command line tools \ No newline at end of file diff --git a/specification/professionalservice/resource-manager/readme.csharp.md b/specification/professionalservice/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..2bc953e89b63 --- /dev/null +++ b/specification/professionalservice/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.ProfessionalService + output-folder: $(csharp-sdks-folder)/professionalservice/management/Microsoft.ProfessionalService/GeneratedProtocol +``` diff --git a/specification/professionalservice/resource-manager/readme.go.md b/specification/professionalservice/resource-manager/readme.go.md new file mode 100644 index 000000000000..0d7e2c0cf1d3 --- /dev/null +++ b/specification/professionalservice/resource-manager/readme.go.md @@ -0,0 +1,11 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) && $(track2) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +module-name: sdk/resourcemanager/professionalservice/armprofessionalservice +module: github.com/Azure/azure-sdk-for-go/$(module-name) +output-folder: $(go-sdk-folder)/$(module-name) +``` diff --git a/specification/professionalservice/resource-manager/readme.md b/specification/professionalservice/resource-manager/readme.md new file mode 100644 index 000000000000..2360567aa839 --- /dev/null +++ b/specification/professionalservice/resource-manager/readme.md @@ -0,0 +1,78 @@ +# professionalservice + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for professionalservice. + +## 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 professionalservice. + +```yaml +openapi-type: arm +tag: package-2020-05-01 +``` + +### Tag: package-2020-05-01 + +These settings apply only when `--tag=package-2020-05-01` is specified on the command line. + +```yaml $(tag) == 'package-2020-05-01' +input-file: + - Microsoft.ProfessionalService/stable/2020-05-01/professionalservice.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-track2 + - repo: azure-sdk-for-java + - repo: azure-sdk-for-go + - repo: azure-sdk-for-js + - repo: azure-resource-manager-schemas + - repo: azure-cli-extensions + - repo: azure-powershell +``` +## Az + +See configuration in [readme.az.md](./readme.az.md) + +## Go + +See configuration in [readme.go.md](./readme.go.md) + +## Python + +See configuration in [readme.python.md](./readme.python.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/professionalservice/resource-manager/readme.python.md b/specification/professionalservice/resource-manager/readme.python.md new file mode 100644 index 000000000000..f67cec02f779 --- /dev/null +++ b/specification/professionalservice/resource-manager/readme.python.md @@ -0,0 +1,18 @@ +## Python + +These settings apply only when `--python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(python) +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-mgmt-professionalservice +namespace: azure.mgmt.professionalservice +package-version: 1.0.0b1 +clear-output-folder: true +``` + +``` yaml $(python) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/professionalservice/azure-mgmt-professionalservice/azure/mgmt/professionalservice +``` diff --git a/specification/professionalservice/resource-manager/readme.typescript.md b/specification/professionalservice/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..56a9ea8b5c4f --- /dev/null +++ b/specification/professionalservice/resource-manager/readme.typescript.md @@ -0,0 +1,14 @@ +## 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-professionalservice" + output-folder: "$(typescript-sdks-folder)/sdk/professionalservice/arm-professionalservice" + payload-flattening-threshold: 1 + clear-output-folder: true + generate-metadata: true +```