-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Swagger and Examples for custom resource provider to Azure (#5808)
* Add Swagger and Examples for custom resource provider to Azure * Apply suggestions from code review Fix typos in strings for RP. Co-Authored-By: jjbfour <jobreen@microsoft.com>
- Loading branch information
Showing
15 changed files
with
1,222 additions
and
0 deletions.
There are no files selected for viewing
707 changes: 707 additions & 0 deletions
707
...esource-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/customproviders.json
Large diffs are not rendered by default.
Oops, something went wrong.
79 changes: 79 additions & 0 deletions
79
...Microsoft.CustomProviders/preview/2018-09-01-preview/examples/createOrUpdateCustomRP.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"parameters": { | ||
"resourceProviderName": "newrp", | ||
"resourceGroupName": "testRG", | ||
"api-version": "2018-09-01-preview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceProvider": { | ||
"location": "eastus", | ||
"properties": { | ||
"actions": [ | ||
{ | ||
"name": "TestAction", | ||
"routingType": "Proxy", | ||
"endpoint": "https://mytestendpoint/" | ||
} | ||
], | ||
"resourceTypes": [ | ||
{ | ||
"name": "TestResource", | ||
"routingType": "Proxy,Cache", | ||
"endpoint": "https://mytestendpoint2/" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"body": { | ||
"name": "newrp", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp", | ||
"type": "Microsoft.CustomProviders/resourceProviders", | ||
"location": "East US", | ||
"properties": { | ||
"provisioningState": "Accepted", | ||
"actions": [ | ||
{ | ||
"name": "TestAction", | ||
"routingType": "Proxy", | ||
"endpoint": "https://mytestendpoint/" | ||
} | ||
], | ||
"resourceTypes": [ | ||
{ | ||
"name": "TestResource", | ||
"routingType": "Proxy,Cache", | ||
"endpoint": "https://mytestendpoint2/" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"200": { | ||
"body": { | ||
"name": "newrp", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp", | ||
"type": "Microsoft.CustomProviders/resourceProviders", | ||
"location": "East US", | ||
"properties": { | ||
"provisioningState": "Accepted", | ||
"actions": [ | ||
{ | ||
"name": "TestAction", | ||
"routingType": "Proxy", | ||
"endpoint": "https://mytestendpoint/" | ||
} | ||
], | ||
"resourceTypes": [ | ||
{ | ||
"name": "TestResource", | ||
"routingType": "Proxy,Cache", | ||
"endpoint": "https://mytestendpoint2/" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/deleteCustomRP.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "testRG", | ||
"resourceProviderName": "newrp", | ||
"api-version": "2018-09-01-preview" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"202": {}, | ||
"204": {} | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...ce-manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/getCustomRP.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "testRG", | ||
"resourceProviderName": "newrp", | ||
"api-version": "2018-09-01-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"name": "newrp", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp", | ||
"type": "Microsoft.CustomProviders/resourceProviders", | ||
"location": "East US", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"actions": [ | ||
{ | ||
"name": "TestAction", | ||
"routingType": "Proxy", | ||
"endpoint": "https://mytestendpoint/" | ||
} | ||
], | ||
"resourceTypes": [ | ||
{ | ||
"name": "TestResource", | ||
"routingType": "Proxy,Cache", | ||
"endpoint": "https://mytestendpoint2/" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
...oft.CustomProviders/preview/2018-09-01-preview/examples/listCustomRPsByResourceGroup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "testRG", | ||
"api-version": "2018-09-01-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"value": [ | ||
{ | ||
"name": "newrp1", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp1", | ||
"type": "Microsoft.CustomProviders/resourceProviders", | ||
"location": "East US", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"actions": [ | ||
{ | ||
"name": "TestAction", | ||
"routingType": "Proxy", | ||
"endpoint": "https://mytestendpoint/" | ||
} | ||
], | ||
"resourceTypes": [ | ||
{ | ||
"name": "TestResource", | ||
"routingType": "Proxy,Cache", | ||
"endpoint": "https://mytestendpoint2/" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "newrp2", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp2", | ||
"type": "Microsoft.CustomProviders/resourceProviders", | ||
"location": "East US", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"actions": [ | ||
{ | ||
"name": "TestAction", | ||
"routingType": "Proxy", | ||
"endpoint": "https://mytestendpoint/" | ||
} | ||
], | ||
"resourceTypes": [ | ||
{ | ||
"name": "TestResource", | ||
"routingType": "Proxy,Cache", | ||
"endpoint": "https://mytestendpoint2/" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
61 changes: 61 additions & 0 deletions
61
...soft.CustomProviders/preview/2018-09-01-preview/examples/listCustomRPsBySubscription.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"api-version": "2018-09-01-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"headers": {}, | ||
"body": { | ||
"value": [ | ||
{ | ||
"name": "newrp1", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp1", | ||
"type": "Microsoft.CustomProviders/resourceProviders", | ||
"location": "East US", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"actions": [ | ||
{ | ||
"name": "TestAction", | ||
"routingType": "Proxy", | ||
"endpoint": "https://mytestendpoint/" | ||
} | ||
], | ||
"resourceTypes": [ | ||
{ | ||
"name": "TestResource", | ||
"routingType": "Proxy,Cache", | ||
"endpoint": "https://mytestendpoint2/" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "newrp2", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG2/providers/Microsoft.CustomProviders/resourceProviders/newrp2", | ||
"type": "Microsoft.CustomProviders/resourceProviders", | ||
"location": "East US", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"actions": [ | ||
{ | ||
"name": "TestAction", | ||
"routingType": "Proxy", | ||
"endpoint": "https://mytestendpoint/" | ||
} | ||
], | ||
"resourceTypes": [ | ||
{ | ||
"name": "TestResource", | ||
"routingType": "Proxy,Cache", | ||
"endpoint": "https://mytestendpoint2/" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/operationsList.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2018-09-01-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"name": "Microsoft.CustomProviders/resourceProviders/read", | ||
"display": { | ||
"provider": "Azure Custom Providers", | ||
"resource": "resourceProviders", | ||
"operation": "List Custom Providers", | ||
"description": "List or get the Custom Providers" | ||
} | ||
}, | ||
{ | ||
"name": "Microsoft.CustomProviders/resourceProviders/delete", | ||
"display": { | ||
"provider": "Azure Custom Providers", | ||
"resource": "resourceProviders", | ||
"operation": "List Custom Providers", | ||
"description": "List or get the Custom Providers" | ||
} | ||
}, | ||
{ | ||
"name": "Microsoft.CustomProviders/resourceProviders/wrte", | ||
"display": { | ||
"provider": "Azure Custom Providers", | ||
"resource": "resourceProviders", | ||
"operation": "List Custom Providers", | ||
"description": "List or get the Custom Providers" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
...manager/Microsoft.CustomProviders/preview/2018-09-01-preview/examples/updateCustomRP.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"parameters": { | ||
"resourceProviderName": "newrp", | ||
"resourceGroupName": "testRG", | ||
"api-version": "2018-09-01-preview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"patchableResource": { | ||
"tags": {} | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"name": "newrp", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testRG/providers/Microsoft.CustomProviders/resourceProviders/newrp", | ||
"type": "Microsoft.CustomProviders/resourceProviders", | ||
"location": "East US", | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"actions": [ | ||
{ | ||
"name": "TestAction", | ||
"routingType": "Proxy", | ||
"endpoint": "https://mytestendpoint/" | ||
} | ||
], | ||
"resourceTypes": [ | ||
{ | ||
"name": "TestResource", | ||
"routingType": "Proxy,Cache", | ||
"endpoint": "https://mytestendpoint2/" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
specification/customproviders/resource-manager/readme.csharp.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## C | ||
|
||
These settings apply only when `--csharp` is specified on the command line. | ||
Please also specify `--csharp-sdks-folder=<path to "SDKs" directory of your azure-sdk-for-net clone>`. | ||
|
||
```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.CustomProviders | ||
output-folder: $(csharp-sdks-folder)/customproviders/management/Microsoft.CustomProviders/GeneratedProtocol | ||
``` |
19 changes: 19 additions & 0 deletions
19
specification/customproviders/resource-manager/readme.go.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
namespace: customproviders | ||
clear-output-folder: true | ||
``` | ||
### Tag: package-2018-09-01-preview and go | ||
These settings apply only when `--tag=package-2018-09-01-preview --go` is specified on the command line. | ||
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`. | ||
|
||
```yaml $(tag) == 'package-2018-09-01-preview' && $(go) | ||
output-folder: $(go-sdk-folder)/services/preview/$(namespace)/mgmt/2018-09-01-preview/$(namespace) | ||
``` |
Oops, something went wrong.