From c2ab0c0fc84f6473ca68bbaebf551ad72ff9c25b Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 28 Jul 2021 13:32:13 +0000 Subject: [PATCH] CodeGen from PR 14545 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.StorageCache to add version stable/2021-05-01 (#14545) * Adds base for updating Microsoft.StorageCache from version stable/2021-03-01 to version 2021-05-01 * Updates readme * Updates API version in new specs and examples * 2021-05-01 API Changes * prettier fix * Lintdiff fix * Add create only fields * Create only tag for CacheIdentity * Create only tag for CacheIdentity * Remove create only for key rotation * Fix s360 errors * Fix read only * Revert package-lock.json * Revert package-lock.json --- .../2021-05-01/Microsoft.StorageCache.json | 943 ++++++++++++++++++ schemas/common/autogeneratedResources.json | 6 + 2 files changed, 949 insertions(+) create mode 100644 schemas/2021-05-01/Microsoft.StorageCache.json diff --git a/schemas/2021-05-01/Microsoft.StorageCache.json b/schemas/2021-05-01/Microsoft.StorageCache.json new file mode 100644 index 0000000000..f9cd5fe9a9 --- /dev/null +++ b/schemas/2021-05-01/Microsoft.StorageCache.json @@ -0,0 +1,943 @@ +{ + "id": "https://schema.management.azure.com/schemas/2021-05-01/Microsoft.StorageCache.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.StorageCache", + "description": "Microsoft StorageCache Resource Types", + "resourceDefinitions": { + "caches": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01" + ] + }, + "identity": { + "oneOf": [ + { + "$ref": "#/definitions/CacheIdentity" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Cache identity properties." + }, + "location": { + "type": "string", + "description": "Region name string." + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[-0-9a-zA-Z_]{1,80}$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Name of Cache. Length of name must not be greater than 80 and chars must be from the [-0-9a-zA-Z_] char class." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/CacheProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of the Cache." + }, + "resources": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/definitions/caches_storageTargets_childResource" + } + ] + } + }, + "sku": { + "oneOf": [ + { + "$ref": "#/definitions/CacheSku" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "SKU for the Cache." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource tags." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.StorageCache/caches" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.StorageCache/caches" + }, + "caches_storageTargets": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01" + ] + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[-0-9a-zA-Z_]{1,80}$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Name of Storage Target." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/StorageTargetProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of the Storage Target." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.StorageCache/caches/storageTargets" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.StorageCache/caches/storageTargets" + } + }, + "definitions": { + "BlobNfsTarget": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "A fully qualified URL." + }, + "usageModel": { + "type": "string", + "description": "Identifies the StorageCache usage model to be used for this storage target." + } + }, + "description": "Properties pertaining to the BlobNfsTarget." + }, + "CacheActiveDirectorySettings": { + "type": "object", + "properties": { + "cacheNetBiosName": { + "oneOf": [ + { + "type": "string", + "pattern": "^[-0-9a-zA-Z]{1,15}$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The NetBIOS name to assign to the HPC Cache when it joins the Active Directory domain as a server. Length must 1-15 characters from the class [-0-9a-zA-Z]." + }, + "credentials": { + "oneOf": [ + { + "$ref": "#/definitions/CacheActiveDirectorySettingsCredentials" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Active Directory admin credentials used to join the HPC Cache to a domain." + }, + "domainName": { + "type": "string", + "description": "The fully qualified domain name of the Active Directory domain controller." + }, + "domainNetBiosName": { + "type": "string", + "description": "The Active Directory domain's NetBIOS name." + }, + "primaryDnsIpAddress": { + "type": "string", + "description": "Primary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name." + }, + "secondaryDnsIpAddress": { + "type": "string", + "description": "Secondary DNS IP address used to resolve the Active Directory domain controller's fully qualified domain name." + } + }, + "required": [ + "cacheNetBiosName", + "domainName", + "domainNetBiosName", + "primaryDnsIpAddress" + ], + "description": "Active Directory settings used to join a cache to a domain." + }, + "CacheActiveDirectorySettingsCredentials": { + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "Plain text password of the Active Directory domain administrator. This value is stored encrypted and not returned on response." + }, + "username": { + "type": "string", + "description": "Username of the Active Directory domain administrator. This value is stored encrypted and not returned on response." + } + }, + "required": [ + "password", + "username" + ], + "description": "Active Directory admin credentials used to join the HPC Cache to a domain." + }, + "CacheDirectorySettings": { + "type": "object", + "properties": { + "activeDirectory": { + "oneOf": [ + { + "$ref": "#/definitions/CacheActiveDirectorySettings" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Active Directory settings used to join a cache to a domain." + }, + "usernameDownload": { + "oneOf": [ + { + "$ref": "#/definitions/CacheUsernameDownloadSettings" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Settings for Extended Groups username and group download." + } + }, + "description": "Cache Directory Services settings." + }, + "CacheEncryptionSettings": { + "type": "object", + "properties": { + "keyEncryptionKey": { + "oneOf": [ + { + "$ref": "#/definitions/KeyVaultKeyReference" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes a reference to Key Vault Key." + }, + "rotationToLatestKeyVersionEnabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies whether the service will automatically rotate to the newest version of the key in the Key Vault." + } + }, + "description": "Cache encryption settings." + }, + "CacheIdentity": { + "type": "object", + "properties": { + "type": { + "oneOf": [ + { + "type": "string", + "enum": [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned, UserAssigned", + "None" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The type of identity used for the cache." + }, + "userAssignedIdentities": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UserAssignedIdentitiesValue" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "A dictionary where each key is a user assigned identity resource ID, and each key's value is an empty dictionary." + } + }, + "description": "Cache identity properties." + }, + "CacheNetworkSettings": { + "type": "object", + "properties": { + "dnsSearchDomain": { + "type": "string", + "description": "DNS search domain" + }, + "dnsServers": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "DNS servers for the cache to use. It will be set from the network configuration if no value is provided." + }, + "mtu": { + "oneOf": [ + { + "type": "integer", + "minimum": 576, + "maximum": 1500, + "default": "1500" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The IPv4 maximum transmission unit configured for the subnet." + }, + "ntpServer": { + "type": "string", + "default": "time.windows.com", + "description": "NTP server IP Address or FQDN for the cache to use. The default is time.windows.com." + } + }, + "description": "Cache network settings." + }, + "CacheProperties": { + "type": "object", + "properties": { + "cacheSizeGB": { + "oneOf": [ + { + "type": "integer" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The size of this Cache, in GB." + }, + "directoryServicesSettings": { + "oneOf": [ + { + "$ref": "#/definitions/CacheDirectorySettings" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Cache Directory Services settings." + }, + "encryptionSettings": { + "oneOf": [ + { + "$ref": "#/definitions/CacheEncryptionSettings" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Cache encryption settings." + }, + "networkSettings": { + "oneOf": [ + { + "$ref": "#/definitions/CacheNetworkSettings" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Cache network settings." + }, + "securitySettings": { + "oneOf": [ + { + "$ref": "#/definitions/CacheSecuritySettings" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Cache security settings." + }, + "subnet": { + "type": "string", + "description": "A fully qualified URL." + } + }, + "description": "Properties of the Cache." + }, + "CacheSecuritySettings": { + "type": "object", + "properties": { + "accessPolicies": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NfsAccessPolicy" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "NFS access policies defined for this cache." + } + }, + "description": "Cache security settings." + }, + "CacheSku": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "SKU name for this Cache." + } + }, + "description": "SKU for the Cache." + }, + "caches_storageTargets_childResource": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-05-01" + ] + }, + "name": { + "oneOf": [ + { + "type": "string", + "pattern": "^[-0-9a-zA-Z_]{1,80}$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Name of Storage Target." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/StorageTargetProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of the Storage Target." + }, + "type": { + "type": "string", + "enum": [ + "storageTargets" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.StorageCache/caches/storageTargets" + }, + "CacheUsernameDownloadSettings": { + "type": "object", + "properties": { + "autoDownloadCertificate": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Determines if the certificate should be automatically downloaded. This applies to 'caCertificateURI' only if 'requireValidCertificate' is true." + }, + "caCertificateURI": { + "type": "string", + "description": "The URI of the CA certificate to validate the LDAP secure connection. This field must be populated when 'requireValidCertificate' is set to true." + }, + "credentials": { + "oneOf": [ + { + "$ref": "#/definitions/CacheUsernameDownloadSettingsCredentials" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "When present, these are the credentials for the secure LDAP connection." + }, + "encryptLdapConnection": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Whether or not the LDAP connection should be encrypted." + }, + "extendedGroups": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Whether or not Extended Groups is enabled." + }, + "groupFileURI": { + "type": "string", + "description": "The URI of the file containing group information (in /etc/group file format). This field must be populated when 'usernameSource' is set to 'File'." + }, + "ldapBaseDN": { + "type": "string", + "description": "The base distinguished name for the LDAP domain." + }, + "ldapServer": { + "type": "string", + "description": "The fully qualified domain name or IP address of the LDAP server to use." + }, + "requireValidCertificate": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Determines if the certificates must be validated by a certificate authority. When true, caCertificateURI must be provided." + }, + "userFileURI": { + "type": "string", + "description": "The URI of the file containing user information (in /etc/passwd file format). This field must be populated when 'usernameSource' is set to 'File'." + }, + "usernameSource": { + "oneOf": [ + { + "type": "string", + "enum": [ + "AD", + "LDAP", + "File", + "None" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "This setting determines how the cache gets username and group names for clients." + } + }, + "description": "Settings for Extended Groups username and group download." + }, + "CacheUsernameDownloadSettingsCredentials": { + "type": "object", + "properties": { + "bindDn": { + "type": "string", + "description": "The Bind Distinguished Name identity to be used in the secure LDAP connection. This value is stored encrypted and not returned on response." + }, + "bindPassword": { + "type": "string", + "description": "The Bind password to be used in the secure LDAP connection. This value is stored encrypted and not returned on response." + } + }, + "description": "When present, these are the credentials for the secure LDAP connection." + }, + "ClfsTarget": { + "type": "object", + "properties": { + "target": { + "type": "string", + "description": "A fully qualified URL." + } + }, + "description": "Properties pertaining to the ClfsTarget" + }, + "KeyVaultKeyReference": { + "type": "object", + "properties": { + "keyUrl": { + "type": "string", + "description": "The URL referencing a key encryption key in Key Vault." + }, + "sourceVault": { + "oneOf": [ + { + "$ref": "#/definitions/KeyVaultKeyReferenceSourceVault" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes a resource Id to source Key Vault." + } + }, + "required": [ + "keyUrl", + "sourceVault" + ], + "description": "Describes a reference to Key Vault Key." + }, + "KeyVaultKeyReferenceSourceVault": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Resource Id." + } + }, + "description": "Describes a resource Id to source Key Vault." + }, + "NamespaceJunction": { + "type": "object", + "properties": { + "namespacePath": { + "type": "string", + "description": "Namespace path on a Cache for a Storage Target." + }, + "nfsAccessPolicy": { + "type": "string", + "default": "default", + "description": "Name of the access policy applied to this junction." + }, + "nfsExport": { + "type": "string", + "description": "NFS export where targetPath exists." + }, + "targetPath": { + "type": "string", + "description": "Path in Storage Target to which namespacePath points." + } + }, + "description": "A namespace junction." + }, + "Nfs3Target": { + "type": "object", + "properties": { + "target": { + "oneOf": [ + { + "type": "string", + "pattern": "^[-.,0-9a-zA-Z]+$" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "IP address or host name of an NFSv3 host (e.g., 10.0.44.44)." + }, + "usageModel": { + "type": "string", + "description": "Identifies the StorageCache usage model to be used for this storage target." + } + }, + "description": "Properties pertaining to the Nfs3Target" + }, + "NfsAccessPolicy": { + "type": "object", + "properties": { + "accessRules": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NfsAccessRule" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The set of rules describing client accesses allowed under this policy." + }, + "name": { + "type": "string", + "description": "Name identifying this policy. Access Policy names are not case sensitive." + } + }, + "required": [ + "accessRules", + "name" + ], + "description": "A set of rules describing access policies applied to NFSv3 clients of the cache." + }, + "NfsAccessRule": { + "type": "object", + "properties": { + "access": { + "oneOf": [ + { + "type": "string", + "enum": [ + "no", + "ro", + "rw" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Access allowed by this rule." + }, + "anonymousGID": { + "type": "string", + "description": "GID value that replaces 0 when rootSquash is true. This will use the value of anonymousUID if not provided." + }, + "anonymousUID": { + "type": "string", + "description": "UID value that replaces 0 when rootSquash is true. 65534 will be used if not provided." + }, + "filter": { + "type": "string", + "description": "Filter applied to the scope for this rule. The filter's format depends on its scope. 'default' scope matches all clients and has no filter value. 'network' scope takes a filter in CIDR format (for example, 10.99.1.0/24). 'host' takes an IP address or fully qualified domain name as filter. If a client does not match any filter rule and there is no default rule, access is denied." + }, + "rootSquash": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Map root accesses to anonymousUID and anonymousGID." + }, + "scope": { + "oneOf": [ + { + "type": "string", + "enum": [ + "default", + "network", + "host" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Scope for this rule. The scope and filter determine which clients match the rule." + }, + "submountAccess": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "For the default policy, allow access to subdirectories under the root export. If this is set to no, clients can only mount the path '/'. If set to yes, clients can mount a deeper path, like '/a/b'." + }, + "suid": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Allow SUID semantics." + } + }, + "required": [ + "access", + "scope" + ], + "description": "Rule to place restrictions on portions of the cache namespace being presented to clients." + }, + "StorageTargetProperties": { + "type": "object", + "properties": { + "blobNfs": { + "oneOf": [ + { + "$ref": "#/definitions/BlobNfsTarget" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties pertaining to the BlobNfsTarget." + }, + "clfs": { + "oneOf": [ + { + "$ref": "#/definitions/ClfsTarget" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties pertaining to the ClfsTarget" + }, + "junctions": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/NamespaceJunction" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "List of Cache namespace junctions to target for namespace associations." + }, + "nfs3": { + "oneOf": [ + { + "$ref": "#/definitions/Nfs3Target" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties pertaining to the Nfs3Target" + }, + "targetType": { + "oneOf": [ + { + "type": "string", + "enum": [ + "nfs3", + "clfs", + "unknown", + "blobNfs" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Type of the Storage Target." + }, + "unknown": { + "oneOf": [ + { + "$ref": "#/definitions/UnknownTarget" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties pertaining to the UnknownTarget" + } + }, + "required": [ + "targetType" + ], + "description": "Properties of the Storage Target." + }, + "UnknownTarget": { + "type": "object", + "properties": { + "attributes": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Properties of an unknown type of Storage Target." + } + }, + "description": "Properties pertaining to the UnknownTarget" + }, + "UserAssignedIdentitiesValue": { + "type": "object", + "properties": {} + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index 25f6fcdba4..3fa602a964 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -10129,6 +10129,12 @@ { "$ref": "https://schema.management.azure.com/schemas/2021-03-01/Microsoft.StorageCache.json#/resourceDefinitions/caches_storageTargets" }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-05-01/Microsoft.StorageCache.json#/resourceDefinitions/caches" + }, + { + "$ref": "https://schema.management.azure.com/schemas/2021-05-01/Microsoft.StorageCache.json#/resourceDefinitions/caches_storageTargets" + }, { "$ref": "https://schema.management.azure.com/schemas/2020-03-15-preview/Microsoft.StoragePool.json#/resourceDefinitions/diskPools" },