diff --git a/cSpell.json b/cSpell.json index 6d8c0045d327..1eec4e4a1c8b 100644 --- a/cSpell.json +++ b/cSpell.json @@ -748,6 +748,14 @@ "pstn", "unconfiguring" ] + }, + { + "filename": "**/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/saas.json", + "words": [ + "checkmoderneligibility", + "saasresources", + "Moderneligibility" + ] } ] } \ No newline at end of file diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetApplications.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetApplications.json new file mode 100644 index 000000000000..58c4ddb7b505 --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetApplications.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "subscriptionId": "bc6c2f82-a39d-41b8-a648-71527498a23e", + "resourceGroupName": "myResourceGroup", + "api-version": "2018-03-01-beta" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/bc6c2f82-a39d-41b8-a648-71527498a23e/resourceGroups/myResourceGroup/providers/Microsoft.SaaS/applications/myapp", + "location": "location", + "name": "myapp", + "type": "Microsoft.SaaS/applications", + "properties": { + "status": "Subscribed", + "saasAppPlan": { + "publisher": "contoso", + "product": "myOffer", + "name": "myPlan1" + } + }, + "tags": [ + { + "additionalProperties": "additionalProperties" + } + ] + }, + { + "id": "/subscriptions/bc6c2f82-a39d-41b8-a648-71527498a23e/resourceGroups/myResourceGroup/providers/Microsoft.SaaS/applications/myapp", + "location": "location", + "name": "myapp", + "type": "Microsoft.SaaS/applications", + "properties": { + "status": "Subscribed", + "saasAppPlan": { + "publisher": "contoso", + "product": "myOffer", + "name": "myPlan2" + } + }, + "tags": [ + { + "additionalProperties": "additionalProperties" + } + ] + } + ] + } + } + } +} diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetModerneligibility.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetModerneligibility.json new file mode 100644 index 000000000000..a38d36253bfa --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetModerneligibility.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2018-03-01-beta", + "subscriptionId": "bc6c2f82-a39d-41b8-a648-71527498a23e" + }, + "responses": { + "200": { + "body": { + "id": "bc6c2f82-a39d-41b8-a648-71527498a23e", + "isModern": true + } + } + } +} diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetOperations.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetOperations.json new file mode 100644 index 000000000000..3ab5aebaa12c --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV1/SaaSGetOperations.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2018-03-01-beta" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.SaaS/register/action", + "display": { + "provider": "Microsoft", + "resource": "SaaS Resources", + "operation": "Register SaaS resource provider", + "description": "Register Saas resource provider in the tenant" + }, + "origin": null + }, + { + "name": "Microsoft.SaaS/saasresources/read", + "display": { + "provider": "Microsoft", + "resource": "SaaS Resources", + "operation": "Get SaaS Resources", + "description": "Get all SaaS resources or one resource" + }, + "origin": null + }, + { + "name": "Microsoft.SaaS/saasresources/write", + "display": { + "provider": "Microsoft", + "resource": "SaaS Resources", + "operation": "Create or Update a SaaS resource", + "description": "Create or Update a SaaS resource" + }, + "origin": null + }, + { + "name": "Microsoft.SaaS/saasresources/delete", + "display": { + "provider": "Microsoft", + "resource": "SaaS Resources", + "operation": "Delete a SaaS Resource", + "description": "Delete a SaaS Resource" + }, + "origin": null + }, + { + "name": "Microsoft.SaaS/saasresources/listaccesstoken/action", + "display": { + "provider": "Microsoft", + "resource": "SaaS Resources", + "operation": "Get the access Token", + "description": "Get the access Token for a SaaS resource" + }, + "origin": null + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/ListAccessTokenPost.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/ListAccessTokenPost.json new file mode 100644 index 000000000000..a33759071995 --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/ListAccessTokenPost.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "resourceId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c", + "api-version": "2018-03-01-beta" + }, + "responses": { + "200": { + "body": { + "publisherOfferBaseUri": "https://cloud.elastic.co/api/v1/marketplace/azure/common/auth", + "token": "jyhAtr3AiFTXO0QsEkYizsNzqIAUJ+E0M1SXhl4E5hwAl7+GJT6t+dEwuWpSizgR0Vn6dMhzpS94JRzkUh2Xuq5L1QDgmDkDUeIikTFNviwtwxtF8CwipcB49rq5d8whmVp0CmWEjd/FzU0vvlikBRuy+asxC1UhXv6XxBkSxkZKj29AAFiGgsgRvXIld47C" + } + } + } +} diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaaSGetAllResources.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaaSGetAllResources.json new file mode 100644 index 000000000000..bd1522b2795c --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaaSGetAllResources.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2018-03-01-beta" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/providers/Microsoft.SaaS/saasresources/115c3523-1fae-757f-af86-7b27cfd29805", + "name": "diyakobo-transfer", + "type": "Microsoft.SaaS/saasresources", + "properties": { + "status": "Subscribed", + "saasResourceName": "diyakobo-transfer", + "publisherId": "microsoft-hcb", + "skuId": "free", + "offerId": "microsofthealthcarebot", + "quantity": null, + "termId": null, + "paymentChannelType": null, + "paymentChannelMetadata": { + "azureSubscriptionId": "155af98a-3205-47e7-883b-a2ab9db9f88d", + "resourceId": "b25dba9a-1bd7-4600-9447-3d27d11a6477" + }, + "publisherTestEnvironment": null, + "term": { + "termUnit": "P1M", + "startDate": "2020-11-12T00:00:00Z", + "endDate": "2020-12-11T00:00:00Z" + }, + "autoRenew": null, + "isFreeTrial": false, + "created": "2020-10-12T05:08:40.9235607Z", + "lastModified": "2020-11-12T21:25:40.2736665Z" + }, + "tags": null + }, + { + "id": "/providers/Microsoft.SaaS/saasresources/7a4a733c-2204-ee2c-2f51-47c2dfbcb7fd", + "name": "test-transfer", + "type": "Microsoft.SaaS/saasresources", + "properties": { + "status": "Subscribed", + "saasResourceName": "test-transfer", + "publisherId": "microsoft-hcb", + "skuId": "free", + "offerId": "microsofthealthcarebot", + "quantity": null, + "termId": null, + "paymentChannelType": null, + "paymentChannelMetadata": { + "azureSubscriptionId": "155af98a-3205-47e7-883b-a2ab9db9f88d", + "resourceId": "f5816b76-67e3-45e1-b331-91fbb021e068" + }, + "publisherTestEnvironment": null, + "term": { + "termUnit": "P1M", + "startDate": "2020-10-30T00:00:00Z", + "endDate": "2020-11-29T00:00:00Z" + }, + "autoRenew": null, + "isFreeTrial": false, + "created": "2020-09-30T16:45:41.2981172Z", + "lastModified": "2020-10-30T16:22:15.4319475Z" + }, + "tags": null + } + ] + } + } + } +} diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasDelete.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasDelete.json new file mode 100644 index 000000000000..b40386b71ab1 --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasDelete.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2018-03-01-beta", + "resourceId": "115c3523-1fae-757f-af86-7b27cfd29805", + "parameters": { + "unsubscribeOnly": true, + "reasonCode": 0, + "feedback": null + } + }, + "responses": { + "204": {}, + "200": {} + } +} diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasGet.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasGet.json new file mode 100644 index 000000000000..2e446b8be87e --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasGet.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2018-03-01-beta", + "resourceId": "115c3523-1fae-757f-af86-7b27cfd29805" + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.SaaS/saasresources/115c3523-1fae-757f-af86-7b27cfd29805", + "name": "diyakobo-transfer", + "type": "Microsoft.SaaS/saasresources", + "properties": { + "status": "Subscribed", + "saasResourceName": "diyakobo-transfer", + "publisherId": "microsoft-hcb", + "skuId": "free", + "offerId": "microsofthealthcarebot", + "quantity": null, + "termId": null, + "paymentChannelType": null, + "paymentChannelMetadata": { + "azureSubscriptionId": "155af98a-3205-47e7-883b-a2ab9db9f88d", + "resourceId": "b25dba9a-1bd7-4600-9447-3d27d11a6477" + }, + "publisherTestEnvironment": null, + "term": { + "termUnit": "P1M", + "startDate": "2020-11-12T00:00:00Z", + "endDate": "2020-12-11T00:00:00Z" + }, + "autoRenew": null, + "isFreeTrial": false, + "created": "2020-10-12T05:08:40.9235607Z", + "lastModified": "2020-11-12T21:25:40.2736665Z" + }, + "tags": null + } + } + } +} diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasPut.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasPut.json new file mode 100644 index 000000000000..da1d6e182948 --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/examples/saasV2/SaasPut.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "api-version": "2018-03-01-beta", + "parameters": { + "properties": { + "publisherId": "microsoft-hcb", + "offerId": "microsofthealthcarebot", + "saasResourceName": "testRunnerFromArm", + "skuId": "free", + "paymentChannelType": "SubscriptionDelegated", + "termId": "hjdtn7tfnxcy", + "paymentChannelMetadata": { + "AzureSubscriptionId": "155af98a-3205-47e7-883b-a2ab9db9f88d" + } + } + } + }, + "responses": { + "202": {} + } +} diff --git a/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/saas.json b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/saas.json new file mode 100644 index 000000000000..0b9dcb9d3cbc --- /dev/null +++ b/specification/saas/resource-manager/Microsoft.SaaS/preview/2018-03-01-beta/saas.json @@ -0,0 +1,807 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-03-01-beta", + "title": "SaaS", + "description": "REST APIs for Azure Marketplace SaaS 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.SaaS/operations": { + "get": { + "tags": [ + "SaaSResources" + ], + "operationId": "operations_List", + "description": "Gets all SaaS app operations.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SaasAppOperationsResponseWithContinuation" + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get saas operations": { + "$ref": "./examples/saasV1/SaaSGetOperations.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.SaaS/checkModernEligibility": { + "get": { + "tags": [ + "SaaSResources" + ], + "operationId": "SaaSAppModerneligibility_Get", + "description": "Check if the Azure Subscription has been converted to modern.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The request returns the generated access token.", + "schema": { + "$ref": "#/definitions/SaasRpModernEligibility" + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get modern eligibility": { + "$ref": "./examples/saasV1/SaaSGetModerneligibility.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SaaS/applications": { + "get": { + "tags": [ + "SaaSResources" + ], + "operationId": "Applications_List", + "description": "Gets all SaaS resources by subscription id and resource group name.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SaasAppResponseWithContinuation" + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get saas application": { + "$ref": "./examples/saasV1/SaaSGetApplications.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.SaaS/saasresources/{resourceId}": { + "delete": { + "tags": [ + "SaaSResources" + ], + "operationId": "SaaS_Delete", + "description": "Deletes the specified SaaS.", + "parameters": [ + { + "$ref": "#/parameters/SaasResourceIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/deleteOptions" + }, + "description": "Parameters supplied to delete saas operation." + } + ], + "responses": { + "204": { + "description": "Request successful." + }, + "200": { + "description": "Request successful." + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete SaaS resource": { + "$ref": "./examples/saasV2/SaasDelete.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + }, + "get": { + "tags": [ + "SaaSResources" + ], + "operationId": "Saa_GetResource", + "description": "Gets information about the specified SaaS.", + "parameters": [ + { + "$ref": "#/parameters/SaasResourceIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The request returns the resulting SaaS resource.", + "schema": { + "$ref": "#/definitions/SaasResource" + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get SaaS resource": { + "$ref": "./examples/saasV2/SaasGet.json" + } + } + } + }, + "/providers/Microsoft.SaaS/saasresources": { + "put": { + "tags": [ + "SaaSResources" + ], + "operationId": "SaaS_CreateResource", + "description": "Creates a SaaS resource.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/SaasResourceCreation" + }, + "description": "Parameters supplied to the create saas operation." + } + ], + "responses": { + "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 SaaS resource": { + "$ref": "./examples/saasV2/SaasPut.json" + } + } + }, + "get": { + "tags": [ + "SaaSResources" + ], + "operationId": "SaasResources_List", + "description": "Get All Resources", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/SaasResourceResponseWithContinuation" + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get get all SaaS resources": { + "$ref": "./examples/saasV2/SaaSGetAllResources.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.SaaS/saasresources/{resourceId}/listAccessToken": { + "post": { + "tags": [ + "SaaSResources" + ], + "operationId": "SaasResource-listAccessToken", + "description": "Gets the ISV access token for a SaaS resource.", + "parameters": [ + { + "$ref": "#/parameters/SaasResourceIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. The request returns the generated access token.", + "schema": { + "$ref": "#/definitions/AccessTokenResult" + } + }, + "default": { + "description": "A response indicating an error.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "generated SaaS resource token": { + "$ref": "./examples/saasV2/ListAccessTokenPost.json" + } + } + } + } + }, + "definitions": { + "Result": { + "description": "Sample result definition", + "properties": { + "sampleProperty": { + "type": "string", + "description": "Sample property of type string" + } + } + }, + "SaasAppOperationsResponseWithContinuation": { + "description": "saas app 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.", + "type": "array", + "items": { + "$ref": "#/definitions/SaasAppOperation" + } + } + } + }, + "SaasAppOperation": { + "description": "saas app operations", + "type": "object", + "properties": { + "name": { + "description": "the operation name", + "type": "string" + }, + "display": { + "description": "the operation display", + "$ref": "#/definitions/SaasAppOperationDisplay" + }, + "origin": { + "description": "the operation origin", + "type": "string" + }, + "isDataAction": { + "description": "whether the operation is a data action or not.", + "type": "boolean" + } + } + }, + "SaasAppOperationDisplay": { + "description": "Saas app 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" + } + } + }, + "SaasResource": { + "description": "SaaS REST API resource definition.", + "type": "object", + "properties": { + "properties": { + "description": "saas properties", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/SaasProperties" + }, + { + "$ref": "#/definitions/SaasCreationProperties" + } + ] + }, + "name": { + "type": "string", + "description": "The name of the resource" + }, + "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" + } + } + }, + "SaasResourceCreation": { + "description": "SaaS 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." + }, + "properties": { + "$ref": "#/definitions/SaasCreationProperties", + "description": "Properties of the SaaS resource that are relevant for creation." + } + } + }, + "SaasProperties": { + "type": "object", + "description": "saas resource properties", + "properties": { + "status": { + "type": "string", + "description": "The SaaS Subscription Status.", + "enum": [ + "NotStarted", + "PendingFulfillmentStart", + "Subscribed", + "Unsubscribed", + "Suspended" + ], + "x-ms-enum": { + "name": "SaasResourceStatus", + "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." + } + } + }, + "SaasCreationProperties": { + "type": "object", + "description": "properties for creation saas", + "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." + }, + "paymentChannelType": { + "type": "string", + "description": "The Payment channel for the SaasSubscription.", + "enum": [ + "SubscriptionDelegated", + "CustomerDelegated" + ], + "x-ms-enum": { + "name": "paymentChannelType", + "modelAsString": true + } + }, + "paymentChannelMetadata": { + "type": "object", + "description": "The metadata about the SaaS subscription such as the AzureSubscriptionId and ResourceUri.", + "additionalProperties": { + "type": "string" + } + }, + "saasResourceName": { + "type": "string", + "description": "The SaaS resource name." + }, + "termId": { + "type": "string", + "description": "The current Term id." + }, + "autoRenew": { + "type": "boolean", + "description": "Whether the SaaS subscription will auto renew upon term end." + }, + "publisherTestEnvironment": { + "type": "string", + "description": "The environment in the publisher side for this resource." + } + } + }, + "AccessTokenResult": { + "description": "the ISV access token result response.", + "type": "object", + "properties": { + "publisherOfferBaseUri": { + "description": "The Publisher Offer Base Uri", + "type": "string" + }, + "token": { + "description": "The generated token", + "type": "string" + } + } + }, + "SaasAppResponseWithContinuation": { + "description": "saas app 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/SaasApp" + } + } + } + }, + "SaasResourceResponseWithContinuation": { + "description": "saas 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/SaasResource" + } + } + } + }, + "SaasApp": { + "description": "the saasApp resource.", + "type": "object", + "properties": { + "id": { + "description": "the resource Id.", + "type": "string", + "readOnly": true + }, + "location": { + "description": "the resource location.", + "type": "string" + }, + "name": { + "description": "the resource name.", + "type": "string" + }, + "type": { + "description": "the resource type.", + "type": "string" + }, + "properties": { + "description": "the resource properties.", + "$ref": "#/definitions/SaasAppProperties" + }, + "tags": { + "description": "the resource tags.", + "$ref": "#/definitions/Tags" + } + } + }, + "SaasAppProperties": { + "description": "Saas resource properties.", + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "the Saas resource status.", + "enum": [ + "Pending", + "Subscribed", + "Unsubscribed", + "Suspended", + "Deactivated" + ], + "x-ms-enum": { + "name": "SaasAppStatus", + "modelAsString": true + } + }, + "saasAppPlan": { + "description": "the resource plan details.", + "$ref": "#/definitions/SaasAppPlan" + } + } + }, + "SaasAppPlan": { + "description": "Saas resource plan.", + "type": "object", + "properties": { + "publisher": { + "description": "the publisher id.", + "type": "string" + }, + "product": { + "description": "the offer id.", + "type": "string" + }, + "name": { + "description": "the plan id.", + "type": "string" + } + } + }, + "Tags": { + "description": "the resource tags.", + "type": "array", + "items": { + "additionalProperties": { + "description": "additional properties.", + "type": "string" + } + } + }, + "SaasRpModernEligibility": { + "description": "SaasRp Modern Eligibility", + "type": "object", + "properties": { + "id": { + "description": "the azure subscription id", + "type": "string", + "readOnly": true + }, + "isModern": { + "description": "whether the azure subscription has been converted to modern.", + "type": "boolean" + } + } + }, + "deleteOptions": { + "description": "delete Options", + "type": "object", + "properties": { + "unsubscribeOnly": { + "type": "boolean", + "description": "whether it is unsubscribeOnly" + }, + "reasonCode": { + "type": "number", + "description": "The reasonCode" + }, + "feedback": { + "type": "string", + "description": "the feedback" + } + } + } + }, + "parameters": { + "SaasResourceIdParameter": { + "name": "resourceId", + "in": "path", + "required": true, + "type": "string", + "description": "The Saas resource ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "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" + }, + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)" + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/saas/resource-manager/readme.csharp.md b/specification/saas/resource-manager/readme.csharp.md new file mode 100644 index 000000000000..dc56a9d877a0 --- /dev/null +++ b/specification/saas/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.saas + output-folder: $(csharp-sdks-folder)/saas/management/Microsoft.SaaS/GeneratedProtocol +``` diff --git a/specification/saas/resource-manager/readme.go.md b/specification/saas/resource-manager/readme.go.md new file mode 100644 index 000000000000..304193d8937c --- /dev/null +++ b/specification/saas/resource-manager/readme.go.md @@ -0,0 +1,19 @@ +## Go + +These settings apply only when `--go` is specified on the command line. + +```yaml $(go) +go: + license-header: MICROSOFT_APACHE_NO_VERSION + clear-output-folder: true +``` + +### Tag: package-2018-03-01-beta and go + +These settings apply only when `--tag=package-2018-03-01-beta --go` is specified on the command line. +Please also specify `--go-sdks-folder=`. + +```yaml $(tag) == 'package-2018-03-01-beta' && $(go) +namespace: microsoft.saas +output-folder: $(go-sdks-folder)/saas/Generated +``` diff --git a/specification/saas/resource-manager/readme.md b/specification/saas/resource-manager/readme.md new file mode 100644 index 000000000000..71dab2d2bd87 --- /dev/null +++ b/specification/saas/resource-manager/readme.md @@ -0,0 +1,85 @@ +# saas + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for saas. + +## 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 saas. + +```yaml +openapi-type: arm +tag: package-2018-03-01-beta +``` + +### Tag: package-2018-03-01-beta + +These settings apply only when `--tag=package-2018-03-01-beta` is specified on the command line. + +```yaml $(tag) == 'package-2018-03-01-beta' +input-file: + - Microsoft.SaaS/preview/2018-03-01-beta/saas.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_saas'] +``` + +``` yaml +directive: + - suppress: DeleteMustNotHaveRequestBody + reason: saas in a tenant level and its an exsisting API +``` + +## 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/saas/resource-manager/readme.python.md b/specification/saas/resource-manager/readme.python.md new file mode 100644 index 000000000000..d91145ef4e97 --- /dev/null +++ b/specification/saas/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.saas + package-name: saas + package-version: 2018-03-01-beta + clear-output-folder: true +``` + +```yaml $(python) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/azure-mgmt/saas +``` diff --git a/specification/saas/resource-manager/readme.ruby.md b/specification/saas/resource-manager/readme.ruby.md new file mode 100644 index 000000000000..8a8df3fb5674 --- /dev/null +++ b/specification/saas/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_saas +package-version: 2018-03-01-beta +azure-arm: true +``` + +### Tag: package-2018-03-01-beta and ruby + +These settings apply only when `--tag=package-2018-03-01-beta --ruby` is specified on the command line. +Please also specify `--ruby-sdks-folder=`. + +```yaml $(tag) == 'package-2018-03-01-beta' && $(ruby) +namespace: microsoft.saas +output-folder: $(ruby-sdks-folder)/saas +``` diff --git a/specification/saas/resource-manager/readme.typescript.md b/specification/saas/resource-manager/readme.typescript.md new file mode 100644 index 000000000000..1ca6c364f4a9 --- /dev/null +++ b/specification/saas/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: "saas" + output-folder: "$(typescript-sdks-folder)/packages/saas" + payload-flattening-threshold: 1 + generate-metadata: true +```