Skip to content

Commit

Permalink
Merge pull request #2939 from Azure/Sedols-patch-11
Browse files Browse the repository at this point in the history
Add Managed Identity support for Microsoft.DeviceUpdate
  • Loading branch information
yungezz authored Feb 10, 2021
2 parents 5274f74 + a4cd271 commit a507804
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
}
},
"patch": {
"description": "Updates account's tags.",
"description": "Updates account's patchable properties",
"operationId": "Accounts_Update",
"parameters": [
{
Expand All @@ -296,12 +296,12 @@
"$ref": "#/parameters/AccountNameParameter"
},
{
"name": "tagUpdatePayload",
"description": "Updated tags.",
"name": "accountUpdatePayload",
"description": "Updated Account.",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/TagUpdate"
"$ref": "#/definitions/AccountUpdate"
}
}
],
Expand Down Expand Up @@ -624,6 +624,10 @@
"readOnly": true
}
}
},
"identity": {
"$ref": "#/definitions/Identity",
"description": "The type of identity used for the resource."
}
}
},
Expand Down Expand Up @@ -711,6 +715,33 @@
}
}
},
"Identity": {
"description": "Identity for the resource.",
"properties": {
"principalId": {
"readOnly": true,
"type": "string",
"description": "The principal ID of resource identity."
},
"tenantId": {
"readOnly": true,
"type": "string",
"description": "The tenant ID of resource."
},
"type": {
"enum": [
"SystemAssigned",
"None"
],
"x-ms-enum": {
"name": "ResourceIdentityType",
"modelAsString": false
},
"type": "string",
"description": "The identity type."
}
}
},
"IotHubSettings": {
"type": "object",
"description": "Device Update account integration with IoT Hub settings.",
Expand Down Expand Up @@ -779,6 +810,24 @@
}
}
},
"AccountUpdate": {
"description": "Request payload used to update and existing Accounts.",
"properties": {
"identity": {
"$ref": "#/definitions/Identity",
"description": "The type of identity used for the resource."
},
"location": {
"type": "string",
"description": "The geo-location where the resource lives"
}
},
"allOf": [
{
"$ref": "#/definitions/TagUpdate"
}
]
},
"TagUpdate": {
"description": "Request payload used to update an existing resource's tags.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"api-version": "2020-03-01-preview",
"Account": {
"location": "West US 2",
"identity": {
"type": "SystemAssigned"
},
"properties": {}
}
},
Expand All @@ -16,7 +19,13 @@
"location": "westus2",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso",
"type": "Microsoft.DeviceUpdate/accounts",
"identity": {
"principalId": "00000000-0000-0000-0000-000000000000",
"tenantId": "00000000-0000-0000-0000-000000000000",
"type": "SystemAssigned"
},
"properties": {
"provisioningState": "Accepted",
"hostName": "contoso.api.adu.microsoft.com"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso",
"type": "Microsoft.DeviceUpdate/accounts",
"properties": {
"provisioningState": "Succeeded",
"hostName": "contoso.api.adu.microsoft.com"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso",
"type": "Microsoft.DeviceUpdate/accounts",
"properties": {
"provisioningState": "Succeeded",
"hostName": "contoso.api.adu.microsoft.com"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"resourceGroupName": "test-rg",
"accountName": "contoso",
"api-version": "2020-03-01-preview",
"tagUpdatePayload": {
"accountUpdatePayload": {
"tags": {
"tagKey": "tagValue"
}
Expand All @@ -18,6 +18,7 @@
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso",
"type": "Microsoft.DeviceUpdate/accounts",
"properties": {
"provisioningState": "Succeeded",
"hostName": "contoso.api.adu.microsoft.com"
},
"tags": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"properties": {
"iotHubs": [
{
"name": "blue-contoso-hub",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub",
"ioTHubConnectionString": "string",
"eventHubConnectionString": "string"
Expand All @@ -27,10 +26,10 @@
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue",
"type": "Microsoft.DeviceUpdate/accounts/instances",
"properties": {
"provisioningState": "Accepted",
"accountName": "contoso",
"iotHubs": [
{
"name": "blue-contoso-hub",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue",
"type": "Microsoft.DeviceUpdate/accounts/instances",
"properties": {
"provisioningState": "Succeeded",
"accountName": "contoso",
"iotHubs": [
{
"name": "blue-contoso-hub",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/blue",
"type": "Microsoft.DeviceUpdate/accounts/instances",
"properties": {
"provisioningState": "Succeeded",
"accountName": "contoso",
"iotHubs": [
{
"name": "blue-contoso-hub",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub"
}
]
Expand All @@ -31,10 +31,10 @@
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DeviceUpdate/accounts/contoso/instances/red",
"type": "Microsoft.DeviceUpdate/accounts/instances",
"properties": {
"provisioningState": "Succeeded",
"accountName": "contoso",
"iotHubs": [
{
"name": "red-contoso-hub",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/red-contoso-hub"
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"accountName": "contoso",
"iotHubs": [
{
"name": "blue-contoso-hub",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Devices/IotHubs/blue-contoso-hub"
}
]
Expand Down
12 changes: 12 additions & 0 deletions specification/deviceupdate/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ input-file:
- Microsoft.DeviceUpdate/preview/2020-03-01-preview/deviceupdate.json
```

## Suppression

``` yaml
directive:
- suppress: ENUM_CASE_MISMATCH
where: $.definitions.Identity.properties.type
from: deviceupdate.json
reason: Managed Identity type can be case in-sensitive
```

---

# Code Generation
Expand All @@ -53,6 +63,8 @@ swagger-to-sdk:
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-go
after_scripts:
- bundle install && rake arm:regen_all_profiles['azure_mgmt_deviceupdate']
```

## CSharp
Expand Down

0 comments on commit a507804

Please sign in to comment.