Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hub Generated] Review request for Microsoft.IoTCentral to add version stable/2021-06-01 #16139

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"displayName": "My IoT Central App",
"subdomain": "my-iot-central-app",
"template": "iotc-pnp-preview@1.0.0"
},
"identity": {
"type": "SystemAssigned"
}
}
},
Expand All @@ -39,6 +42,11 @@
},
"sku": {
"name": "ST2"
},
"identity": {
"type": "SystemAssigned",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"principalId": "8988ab15-3e7a-4586-8a1c-ed07a73a53e9"
}
}
},
Expand All @@ -65,6 +73,11 @@
},
"sku": {
"name": "ST2"
},
"identity": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there will be three different scenarios for the response

  1. No "identity": {} since it was never set.
  2. Identity with type of SystemAssigned.
  3. Identity with type of None.

We should show that in the example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there precedence or other example showing all different scenarios? I noticed enum for AppState (created/suspended) does not provide all scenarios in the examples (only created in shown in examples).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The response for these 3 examples are vastly different. That is why I think it may be a good idea to include it in our examples. Just something nit. Up to you to decide.

"type": "SystemAssigned",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"principalId": "8988ab15-3e7a-4586-8a1c-ed07a73a53e9"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
},
"sku": {
"name": "F1"
},
"identity": {
"type": "SystemAssigned",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"principalId": "8988ab15-3e7a-4586-8a1c-ed07a73a53e9"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
},
"sku": {
"name": "F1"
},
"identity": {
"type": "SystemAssigned",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"principalId": "8988ab15-3e7a-4586-8a1c-ed07a73a53e9"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
},
"sku": {
"name": "F1"
},
"identity": {
"type": "SystemAssigned",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"principalId": "8988ab15-3e7a-4586-8a1c-ed07a73a53e9"
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"AppPatch": {
"properties": {
"displayName": "My IoT Central App 2"
},
"identity": {
"type": "SystemAssigned"
}
}
},
Expand Down Expand Up @@ -34,6 +37,11 @@
},
"sku": {
"name": "ST2"
},
"identity": {
"type": "SystemAssigned",
"tenantId": "f686d426-8d16-42db-81b7-ab578e110ccd",
"principalId": "8988ab15-3e7a-4586-8a1c-ed07a73a53e9"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,35 @@
},
"readOnly": true
},
"ManagedIdentity": {
"description": "The managed identity for IoT Central application.",
"title": "Managed Identity",
"type": "object",
"properties": {
Copy link
Contributor

@r-delgadillo r-delgadillo Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Lets be a bit more descriptive on these properties. These will help users who are unfamiliar with these terms better identify how to use them

E.g.
principalId The AD principal ID. Also known as the objectId

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, updated!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, ManagementIdentify can also be refer to common definition:


You don't have to define your own one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I've made a note. Will add this in next iteration when we support user-managed identities - we don't support that today and its present in ManagedServiceIdentityType.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


This should be the one you need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated.

"principalId": {
"readOnly": true,
"type": "string",
"description": "The principal ID of resource identity. Also known as the objectId."
},
"tenantId": {
"readOnly": true,
"type": "string",
"description": "The tenant ID of resource."
},
"type": {
"description": "The type of managed identity used for the resource. 'SystemAssigned' refers to an implicitly created identity, while the type 'None' will remove any identities from the service.",
"type": "string",
"enum": [
"SystemAssigned",
"None"
],
"x-ms-enum": {
"name": "ResourceIdentityType",
"modelAsString": true
}
}
}
},
"AppSkuInfo": {
"description": "Information about the SKU of the IoT Central application.",
"type": "object",
Expand Down Expand Up @@ -567,6 +596,10 @@
"sku": {
"description": "A valid instance SKU.",
"$ref": "#/definitions/AppSkuInfo"
},
"identity": {
"description": "The managed identities for the IoT Central application.",
"$ref": "#/definitions/ManagedIdentity"
}
},
"allOf": [
Expand Down Expand Up @@ -597,6 +630,10 @@
"description": "The common properties of an IoT Central application.",
"x-ms-client-flatten": true,
"$ref": "#/definitions/AppProperties"
},
"identity": {
"description": "The managed identities for the IoT Central application.",
"$ref": "#/definitions/ManagedIdentity"
}
}
},
Expand Down