Skip to content

Commit

Permalink
Fixing 2018-09-01 Spec (#20309)
Browse files Browse the repository at this point in the history
* Fixing 2018-09-01 spec

* Fixing styling

* Changing to readOnly

* Applying Baron's comments

* Update readme.python.md

Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
  • Loading branch information
chgennar and msyyc authored Sep 7, 2022
1 parent e4f7afa commit f24de33
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -932,19 +932,22 @@
"x-ms-enum": {
"name": "PublicNetworkAccess",
"modelAsString": true
}
},
"default": "Enabled"
},
"NetworkRuleSets": {
"description": "Network Rule Set Properties of this IoT Central application.",
"type": "object",
"properties": {
"applyToDevices": {
"description": "Whether these rules apply for device connectivity to IoT Hub and Device Provisioning service associated with this application.",
"type": "boolean"
"type": "boolean",
"default": "false"
},
"applyToIoTCentral": {
"description": "Whether these rules apply for connectivity via IoT Central web portal and APIs.",
"type": "boolean"
"type": "boolean",
"default": "false"
},
"defaultAction": {
"description": "The default network action to apply.",
Expand All @@ -960,7 +963,11 @@
"filterName"
]
}
}
},
"x-ms-mutability": [
"update",
"read"
]
},
"NetworkRuleSetIpRule": {
"description": "An object for an IP range that will be allowed access.",
Expand Down Expand Up @@ -998,7 +1005,8 @@
"x-ms-enum": {
"name": "NetworkAction",
"modelAsString": true
}
},
"default": "Allow"
},
"AppState": {
"description": "The current state of the application.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,41 @@
"create",
"read"
]
},
"state": {
"description": "The current state of the application.",
"$ref": "#/definitions/AppState"
},
"geography": {
"description": "The geography the application is in.",
"type": "string",
"readOnly": true
},
"thumbnailUrl": {
"description": "The URI for the thumbnail image used in the application.",
"type": "string",
"readOnly": true
},
"tenant": {
"description": "The tenant ID the application belongs to.",
"type": "string",
"readOnly": true
}
}
},
"AppState": {
"description": "The current state of the application.",
"type": "string",
"enum": [
"created",
"suspended"
],
"x-ms-enum": {
"name": "AppState",
"modelAsString": true
},
"readOnly": true
},
"AppSkuInfo": {
"description": "Information about the SKU of the IoT Central application.",
"type": "object",
Expand Down
11 changes: 11 additions & 0 deletions specification/iotcentral/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,14 @@ clear-output-folder: true
no-namespace-folders: true
output-folder: $(python-sdks-folder)/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral
```
``` yaml $(python)
directive:
- from: iotcentral.json
where: $.definitions.NetworkRuleSets["properties"]["applyToDevices"]
transform: $['default'] = 'False'

- from: iotcentral.json
where: $.definitions.NetworkRuleSets["properties"]["applyToIoTCentral"]
transform: $['default'] = 'False'
```

0 comments on commit f24de33

Please sign in to comment.