Skip to content

Instantly share code, notes, and snippets.

@madhadron
Created February 19, 2021 05:16
Show Gist options
  • Save madhadron/0129b1067713ed929b3ccb55664f10aa to your computer and use it in GitHub Desktop.
Save madhadron/0129b1067713ed929b3ccb55664f10aa to your computer and use it in GitHub Desktop.
type Mutability = Read | Update | Create
type FieldType =
| Bool
| String
| Int32
| Int64
| Float
| Array of FieldType
| Object of List<Property>
| Secret of FieldType
| Enum of List<string>
and Property = {
Name : string
Description: string
Type : FieldType
Mutability : Set<Mutability>
PreviewVersion : string option
GAVersion : string option
}
type TrackedResource = {
Path : string
Properties : List<Property>
PreviewVersion : string option
GAVersion : string option
}
let RW = set [Create; Update; Read]
let Version20210301 = Some "2021-03-01"
let trackedResource =
{ Path = "globalDatabaseAccounts/{accountName}"
PreviewVersion = Version20210301
GAVersion = None
Properties =
[ { Name = "delegatedManagementSubnetId"
Description = "Subnet to attach NICs to"
Type = String
Mutability = set [Create; Update]
PreviewVersion = Version20210301
GAVersion = None }
{ Name = "externalCertificates"
Description = "TLS certificates to authenticate gossip"
Mutability = RW
Type = Array (Object
[ { Name = "pem"
Description = "PEM formatted public key"
Type = String } ] )
PreviewVersion = Version20210301
GAVersion = None }
{ Name = "initialAdminPassword"
Description = "Password to set for initial login",
Type = Secret String
Mutability = set [Create]
PreviewVersion = Version20210301
GAVersion = None } ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment