Skip to content

Commit

Permalink
Update C# SDK to throw Cloud Exception, Update default SKU to be ST2
Browse files Browse the repository at this point in the history
  • Loading branch information
Teng Lu committed Mar 13, 2020
1 parent 816cf63 commit 6726572
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/IotCentral/IotCentral.Test/IotCentral.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.IotCentral" Version="2.1.0" />
<PackageReference Include="Microsoft.Azure.Management.IotCentral" Version="2.2.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@
"application/json; charset=utf-8"
]
},
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437\",\r\n \"name\": \"ps6437\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"fd2965e9-ef5b-444b-adba-23b0f7d27471\",\r\n \"state\": \"created\",\r\n \"displayName\": \"Custom IoT Central App DisplayName\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437subdomain\",\r\n \"createdDate\": \"2020-01-16T04:44:20.737Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"etag\": \"\\\"b6004c84-0000-0100-0000-5e1fea250000\\\"\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437\",\r\n \"name\": \"ps6437\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"fd2965e9-ef5b-444b-adba-23b0f7d27471\",\r\n \"state\": \"created\",\r\n \"displayName\": \"Custom IoT Central App DisplayName\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437subdomain\",\r\n \"createdDate\": \"2020-01-16T04:44:20.737Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"etag\": \"\\\"b6004c84-0000-0100-0000-5e1fea250000\\\"\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
"StatusCode": 200
},
{
Expand Down Expand Up @@ -912,7 +912,7 @@
"application/json; charset=utf-8"
]
},
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437\",\r\n \"name\": \"ps6437\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"tt2\": \"tv2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"fd2965e9-ef5b-444b-adba-23b0f7d27471\",\r\n \"state\": \"created\",\r\n \"displayName\": \"New Custom Display Name.\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437subdomainnew\",\r\n \"createdDate\": \"2020-01-16T04:44:20.737Z\",\r\n \"lastUpdated\": \"2020-01-16T04:45:40.163Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"etag\": \"\\\"b600b487-0000-0100-0000-5e1fea740000\\\"\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437\",\r\n \"name\": \"ps6437\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"tt2\": \"tv2\"\r\n },\r\n \"properties\": {\r\n \"applicationId\": \"fd2965e9-ef5b-444b-adba-23b0f7d27471\",\r\n \"state\": \"created\",\r\n \"displayName\": \"New Custom Display Name.\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437subdomainnew\",\r\n \"createdDate\": \"2020-01-16T04:44:20.737Z\",\r\n \"lastUpdated\": \"2020-01-16T04:45:40.163Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"etag\": \"\\\"b600b487-0000-0100-0000-5e1fea740000\\\"\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
"StatusCode": 200
},
{
Expand Down Expand Up @@ -1000,7 +1000,7 @@
"RequestUri": "/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2?api-version=2018-09-01",
"EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvYmFiM2IxN2UtM2YzYi00MGUwLWFjYzQtZWY4YzliYmRmMzJiL3Jlc291cmNlR3JvdXBzL3BzNjQxL3Byb3ZpZGVycy9NaWNyb3NvZnQuSW9UQ2VudHJhbC9Jb1RBcHBzL3BzNjQzNy0yP2FwaS12ZXJzaW9uPTIwMTgtMDktMDE=",
"RequestMethod": "PUT",
"RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"ps6437-2\",\r\n \"subdomain\": \"ps6437-2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"location\": \"westeurope\"\r\n}",
"RequestBody": "{\r\n \"properties\": {\r\n \"displayName\": \"ps6437-2\",\r\n \"subdomain\": \"ps6437-2\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"location\": \"westeurope\"\r\n}",
"RequestHeaders": {
"x-ms-client-request-id": [
"a2f10178-bc13-4af8-ba26-3818eea0b524"
Expand Down Expand Up @@ -1080,7 +1080,7 @@
"application/json; charset=utf-8"
]
},
"ResponseBody": "{\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n}",
"ResponseBody": "{\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n}",
"StatusCode": 201
},
{
Expand Down Expand Up @@ -1158,7 +1158,7 @@
"application/json; charset=utf-8"
]
},
"ResponseBody": "{\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n}",
"ResponseBody": "{\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n}",
"StatusCode": 200
},
{
Expand Down Expand Up @@ -1242,7 +1242,7 @@
"application/json; charset=utf-8"
]
},
"ResponseBody": "{\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n}",
"ResponseBody": "{\r\n \"id\": \"/subscriptions/bab3b17e-3f3b-40e0-acc4-ef8c9bbdf32b/resourceGroups/ps641/providers/Microsoft.IoTCentral/IoTApps/ps6437-2\",\r\n \"name\": \"ps6437-2\",\r\n \"type\": \"Microsoft.IoTCentral/IoTApps\",\r\n \"location\": \"westeurope\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"applicationId\": \"25db709c-cccf-4eee-b387-ab41c2463459\",\r\n \"state\": \"created\",\r\n \"displayName\": \"ps6437-2\",\r\n \"tenant\": \"7f448912-3312-4b33-838d-76eb99405624\",\r\n \"capabilities\": {},\r\n \"subdomain\": \"ps6437-2\",\r\n \"createdDate\": \"2020-01-16T04:45:00.299Z\",\r\n \"template\": \"iotc-default@1.0.0\"\r\n },\r\n \"sku\": {\r\n \"name\": \"ST2\"\r\n },\r\n \"etag\": \"\\\"b90001f9-0000-0100-0000-5e1fea4c0000\\\"\"\r\n}",
"StatusCode": 200
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/IotCentral/IotCentral/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
-->
## Upcoming Release

* Updated SDK version to throw Cloud Exception with error details. Update default SKU to be ST2.

## Version 0.7.3

* This release adds new skus: ST0, ST1, ST2 for IotCentral.
Expand Down
2 changes: 1 addition & 1 deletion src/IotCentral/IotCentral/IotCentral.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.IotCentral" Version="2.1.0" />
<PackageReference Include="Microsoft.Azure.Management.IotCentral" Version="2.2.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ public class NewAzureRmIotCentralApp : IotCentralBaseCmdlet
[Parameter(
Mandatory = false,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Pricing tier for IoT Central applications. Default value is S1.")]
[PSArgumentCompleter("S1")]
HelpMessage = "Pricing tier for IoT Central applications. Default value is ST2.")]
[PSArgumentCompleter("ST2")]
[ValidateNotNullOrEmpty]
public string Sku { get; set; }

Expand Down Expand Up @@ -112,7 +112,7 @@ private IDictionary<string, string> GetTags()

private string GetAppSkuName()
{
return this.Sku ?? PSIotCentralAppSku.S1.ToString();
return this.Sku ?? PSIotCentralAppSku.ST2.ToString();
}

private string GetDisplayName()
Expand Down
8 changes: 4 additions & 4 deletions src/IotCentral/IotCentral/help/New-AzIotCentralApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ Template : iotc-default@1.0.0
SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
ResourceGroupName : MyResourceGroupName

Create an IoT Central application in the standard pricing tier S1, in the region of the resource group.
Create an IoT Central application in the standard pricing tier ST2, in the region of the resource group.

### Example 2 Create simple IoT Central Application.
```powershell
PS C:\> New-AzIotCentralApp -ResourceGroupName "MyResourceGroupName" -Name "MyAppResourceName" -Subdomain "MyAppSubdomain" -Sku "S1" -DisplayName "My Custom Display Name" -Template "iotc-default" -Location "westus"
PS C:\> New-AzIotCentralApp -ResourceGroupName "MyResourceGroupName" -Name "MyAppResourceName" -Subdomain "MyAppSubdomain" -Sku "ST2" -DisplayName "My Custom Display Name" -Template "iotc-default" -Location "westus"
```

Example Output:
Expand All @@ -67,7 +67,7 @@ Template : iotc-default@1.0.0
SubscriptionId : XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
ResourceGroupName : MyResourceGroupName

Create an IoT Central application with the standard pricing tier S1 in the 'westus' region, with a custom display name, based on the iotc-default template.
Create an IoT Central application with the standard pricing tier ST2 in the 'westus' region, with a custom display name, based on the iotc-default template.

## PARAMETERS

Expand Down Expand Up @@ -165,7 +165,7 @@ Accept wildcard characters: False
### -Sku
Pricing tier for IoT Central applications.
Default value is S1.
Default value is ST2.
```yaml
Type: System.String
Expand Down

0 comments on commit 6726572

Please sign in to comment.