Skip to content

Commit

Permalink
Auth locks examples (#13326)
Browse files Browse the repository at this point in the history
* add examples and default responses in locks

* fix management

* fix management

* remove default error responses per KPI owner guidance
  • Loading branch information
jdhms authored Mar 17, 2021
1 parent 31dac82 commit be1d938
Show file tree
Hide file tree
Showing 18 changed files with 479 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parameters": {
"api-version": "2016-09-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.Authorization/locks/read",
"display": {
"provider": "Microsoft.Authorization",
"resource": "locks",
"operation": "read"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"resourceGroupName": "resourcegroupname",
"lockName": "testlock",
"api-version": "2016-09-01",
"parameters": {
"properties": {
"level": "ReadOnly"
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
},
"200": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"resourceGroupName": "resourcegroupname",
"resourceProviderNamespace": "Microsoft.Storage",
"parentResourcePath": "parentResourcePath",
"resourceType": "storageAccounts",
"resourceName": "teststorageaccount",
"lockName": "testlock",
"api-version": "2016-09-01",
"parameters": {
"properties": {
"level": "ReadOnly"
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
},
"200": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"scope": "subscriptions/subscriptionId",
"lockName": "testlock",
"api-version": "2016-09-01",
"parameters": {
"properties": {
"level": "ReadOnly"
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
},
"200": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"lockName": "testlock",
"api-version": "2016-09-01",
"parameters": {
"properties": {
"level": "ReadOnly"
}
}
},
"responses": {
"201": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
},
"200": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"resourceGroupName": "resourcegroupname",
"lockName": "testlock",
"api-version": "2016-09-01"
},
"responses": {
"204": {},
"200": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"resourceGroupName": "resourcegroupname",
"resourceProviderNamespace": "Microsoft.Storage",
"parentResourcePath": "parentResourcePath",
"resourceType": "storageAccounts",
"resourceName": "teststorageaccount",
"lockName": "testlock",
"api-version": "2016-09-01"
},
"responses": {
"204": {},
"200": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"scope": "subscriptions/subscriptionId",
"lockName": "testlock",
"api-version": "2016-09-01"
},
"responses": {
"204": {},
"200": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"lockName": "testlock",
"api-version": "2016-09-01"
},
"responses": {
"204": {},
"200": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"resourceGroupName": "resourcegroupname",
"lockName": "testlock",
"api-version": "2016-09-01"
},
"responses": {
"200": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"resourceGroupName": "resourcegroupname",
"resourceProviderNamespace": "Microsoft.Storage",
"parentResourcePath": "parentResourcePath",
"resourceType": "storageAccounts",
"resourceName": "teststorageaccount",
"lockName": "testlock",
"api-version": "2016-09-01"
},
"responses": {
"200": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"scope": "subscriptions/subscriptionId",
"lockName": "testlock",
"api-version": "2016-09-01"
},
"responses": {
"200": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"resourceGroupName": "resourcegroupname",
"lockName": "testlock",
"api-version": "2016-09-01"
},
"responses": {
"200": {
"body": {
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"resourceGroupName": "resourcegroupname",
"api-version": "2016-09-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parameters": {
"subscriptionId": "subscriptionId",
"resourceGroupName": "resourcegroupname",
"resourceProviderNamespace": "Microsoft.Storage",
"parentResourcePath": "parentResourcePath",
"resourceType": "storageAccounts",
"resourceName": "teststorageaccount",
"api-version": "2016-09-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"scope": "subscriptions/subscriptionId",
"api-version": "2016-09-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"properties": {
"level": "ReadOnly"
},
"id": "/providers/Microsoft.Authorization/locks/testlock",
"type": "Microsoft.Authorization/locks",
"name": "testlock"
}
]
}
}
}
}
Loading

0 comments on commit be1d938

Please sign in to comment.