Skip to content

Commit

Permalink
Add Subscription Level SaaS alongside Tenant Level (Azure#11903)
Browse files Browse the repository at this point in the history
* add subscription level

* changes

* fix

* change

* change

* change1

* change 3

* change4

* changes

* change2

* change 3

* change4

* change5

Co-authored-by: diyakobo <73845794+diyakobo@users.noreply.github.com>
Co-authored-by: Dina Yakobovich <diyakobo@microsoft.com>
  • Loading branch information
3 people authored Jan 7, 2021
1 parent 297b752 commit 54e5466
Show file tree
Hide file tree
Showing 21 changed files with 1,148 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceGroupName": "my-saas-rg",
"resourceName": "MyContosoSubscription",
"api-version": "2018-03-01-beta"
},
"responses": {
"200": {
"body": {
"publisherOfferBaseUri": "https://contoso.website.com/api/v1/marketplace/azure/common/auth",
"token": "jyhAtr3AiFTXO0QsEkYizsNzqIAUJ+E0M1SXhl4E5hwAl7+GJT6t+dEwuWpSizgR0Vn6dMhzpS94JRzkUh2Xuq5L1QDgmDkDUeIikTFNviwtwxtF8CwipcB49rq5d8whmVp0CmWEjd/FzU0vvlikBRuy+asxC1UhXv6XxBkSxkZKj29AAFiGgsgRvXIld47C"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceGroupName": "my-saas-rg",
"api-version": "2018-03-01-beta",
"moveResourceParameter": {
"targetResourceGroup": "/subscriptions/5122d0a3-1e10-4baf-bdc5-c2a452489525/resourceGroups/new-saas-rg",
"resources": [
"/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas1",
"/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas2",
"/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas3"
]
}
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceGroupName": "my-saas-rg",
"resourceName": "MyContosoSubscription",
"api-version": "2018-03-01-beta"
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceGroupName": "my-saas-rg",
"resourceName": "MyContosoSubscription",
"api-version": "2018-03-01-beta"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/MyContosoSubscription",
"name": "MyContosoSubscription",
"type": "Microsoft.SaaS/resources",
"properties": {
"status": "Subscribed",
"saasResourceName": "MyContosoSubscription",
"publisherId": "microsoft-contoso",
"skuId": "free",
"offerId": "contosoOffer",
"quantity": null,
"termId": null,
"paymentChannelType": "SubscriptionDelegated",
"paymentChannelMetadata": {
"azureSubscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceId": "263ebe8c-3621-4ac0-a6ba-f1419bfb9166"
},
"publisherTestEnvironment": null,
"term": {
"termUnit": "P1M",
"startDate": "2021-01-01T00:00:00Z",
"endDate": "2021-02-31T00:00:00Z"
},
"autoRenew": true,
"isFreeTrial": false,
"created": "2021-01-01T08:30:10.1234567Z",
"lastModified": "2020-01-01T08:35:05.7654321Z"
},
"tags": {}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"api-version": "2018-03-01-beta"
},
"responses": {
"200": {
"body": {
"nextLink": null,
"value": [
{
"id": "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/MyContosoSubscription",
"name": "MyContosoSubscription",
"type": "Microsoft.SaaS/resources",
"properties": {
"status": "Subscribed",
"saasResourceName": "MyContosoSubscription",
"publisherId": "microsoft-contoso",
"skuId": "free",
"offerId": "contosoOffer",
"quantity": null,
"termId": null,
"paymentChannelType": "SubscriptionDelegated",
"paymentChannelMetadata": {
"azureSubscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceId": "263ebe8c-3621-4ac0-a6ba-f1419bfb9166"
},
"publisherTestEnvironment": null,
"term": {
"termUnit": "P1M",
"startDate": "2021-01-01T00:00:00Z",
"endDate": "2021-02-31T00:00:00Z"
},
"autoRenew": true,
"isFreeTrial": false,
"created": "2021-01-01T08:30:10.1234567Z",
"lastModified": "2020-01-01T08:35:05.7654321Z"
},
"tags": {}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceGroupName": "my-saas-rg",
"api-version": "2018-03-01-beta"
},
"responses": {
"200": {
"body": {
"nextLink": null,
"value": [
{
"id": "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/MyContosoSubscription",
"name": "MyContosoSubscription",
"type": "Microsoft.SaaS/resources",
"properties": {
"status": "Subscribed",
"saasResourceName": "MyContosoSubscription",
"publisherId": "microsoft-contoso",
"skuId": "free",
"offerId": "contosoOffer",
"quantity": null,
"termId": null,
"paymentChannelType": "SubscriptionDelegated",
"paymentChannelMetadata": {
"azureSubscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceId": "263ebe8c-3621-4ac0-a6ba-f1419bfb9166"
},
"publisherTestEnvironment": null,
"term": {
"termUnit": "P1M",
"startDate": "2021-01-01T00:00:00Z",
"endDate": "2021-02-31T00:00:00Z"
},
"autoRenew": true,
"isFreeTrial": false,
"created": "2021-01-01T08:30:10.1234567Z",
"lastModified": "2020-01-01T08:35:05.7654321Z"
},
"tags": {}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceGroupName": "my-saas-rg",
"resourceName": "MyContosoSubscription",
"api-version": "2018-03-01-beta",
"parameters": {
"properties": {
"skuId": "premium"
},
"tags": {}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/MyContosoSubscription",
"name": "MyContosoSubscription",
"type": "Microsoft.SaaS/resources",
"properties": {
"status": "Subscribed",
"saasResourceName": "MyContosoSubscription",
"publisherId": "microsoft-contoso",
"skuId": "free",
"offerId": "contosoOffer",
"quantity": null,
"termId": null,
"paymentChannelType": "SubscriptionDelegated",
"paymentChannelMetadata": {
"azureSubscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceId": "263ebe8c-3621-4ac0-a6ba-f1419bfb9166"
},
"publisherTestEnvironment": null,
"term": {
"termUnit": "P1M",
"startDate": "2021-01-01T00:00:00Z",
"endDate": "2021-02-31T00:00:00Z"
},
"autoRenew": true,
"isFreeTrial": false,
"created": "2021-01-01T08:30:10.1234567Z",
"lastModified": "2020-01-01T08:35:05.7654321Z"
},
"tags": {}
}
},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceGroupName": "my-saas-rg",
"resourceName": "MyContosoSubscription",
"api-version": "2018-03-01-beta",
"parameters": {
"properties": {
"publisherId": "microsoft-contoso",
"offerId": "contosoOffer",
"saasResourceName": "MyContosoSubscription",
"skuId": "free",
"paymentChannelType": "SubscriptionDelegated",
"termId": "hjdtn7tfnxcy",
"paymentChannelMetadata": {
"AzureSubscriptionId": "155af98a-3205-47e7-883b-a2ab9db9f88d"
}
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/MyContosoSubscription",
"name": "MyContosoSubscription",
"type": "Microsoft.SaaS/resources",
"properties": {
"status": "Subscribed",
"saasResourceName": "MyContosoSubscription",
"publisherId": "microsoft-contoso",
"skuId": "free",
"offerId": "contosoOffer",
"quantity": null,
"termId": null,
"paymentChannelType": "SubscriptionDelegated",
"paymentChannelMetadata": {
"azureSubscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceId": "263ebe8c-3621-4ac0-a6ba-f1419bfb9166"
},
"publisherTestEnvironment": null,
"term": {
"termUnit": "P1M",
"startDate": "2021-01-01T00:00:00Z",
"endDate": "2021-02-31T00:00:00Z"
},
"autoRenew": true,
"isFreeTrial": false,
"created": "2021-01-01T08:30:10.1234567Z",
"lastModified": "2020-01-01T08:35:05.7654321Z"
},
"tags": {}
}
},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceGroupName": "my-saas-rg",
"resourceName": "MyContosoSubscription",
"api-version": "2018-03-01-beta",
"parameters": {
"unsubscribeOnly": true,
"reasonCode": 0,
"feedback": "No longer need this SaaS"
}
},
"responses": {
"200": {},
"202": {},
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"subscriptionId": "c825645b-e31b-9cf4-1cee-2aba9e58bc7c",
"resourceGroupName": "my-saas-rg",
"api-version": "2018-03-01-beta",
"moveResourceParameter": {
"targetResourceGroup": "/subscriptions/5122d0a3-1e10-4baf-bdc5-c2a452489525/resourceGroups/new-saas-rg",
"resources": [
"/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas1",
"/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas2",
"/subscriptions/c825645b-e31b-9cf4-1cee-2aba9e58bc7c/resourceGroups/my-saas-rg/providers/Microsoft.SaaS/resources/saas3"
]
}
},
"responses": {
"200": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@
"name": "myPlan1"
}
},
"tags": [
{
"additionalProperties": "additionalProperties"
}
]
"tags": {}
},
{
"id": "/subscriptions/bc6c2f82-a39d-41b8-a648-71527498a23e/resourceGroups/myResourceGroup/providers/Microsoft.SaaS/applications/myapp",
Expand All @@ -41,11 +37,7 @@
"name": "myPlan2"
}
},
"tags": [
{
"additionalProperties": "additionalProperties"
}
]
"tags": {}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,36 @@
},
"origin": null
},
{
"name": "Microsoft.SaaS/resources/read",
"display": {
"provider": "Microsoft",
"resource": "SaaS Subscription Level Resources",
"operation": "Get SaaS Subscription Level Resources",
"description": "Get one resource"
},
"origin": null
},
{
"name": "Microsoft.SaaS/resources/write",
"display": {
"provider": "Microsoft",
"resource": "SaaS Subscription Level Resources",
"operation": "Create or Update a SaaS Subscription Level resource",
"description": "Create or Update a SaaS Subscription Level resource"
},
"origin": null
},
{
"name": "Microsoft.SaaS/resources/delete",
"display": {
"provider": "Microsoft",
"resource": "SaaS Subscription Level Resources",
"operation": "Delete a SaaS Subscription Level Resource",
"description": "Delete a SaaS Subscription Level Resource"
},
"origin": null
},
{
"name": "Microsoft.SaaS/saasresources/listaccesstoken/action",
"display": {
Expand Down
Loading

0 comments on commit 54e5466

Please sign in to comment.