diff --git a/sdk/storagecache/arm-storagecache/src/models/ascOperationsMappers.ts b/sdk/storagecache/arm-storagecache/src/models/ascOperationsMappers.ts new file mode 100644 index 000000000000..29fc7ad7d8d7 --- /dev/null +++ b/sdk/storagecache/arm-storagecache/src/models/ascOperationsMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AscOperation, + CloudError, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/storagecache/arm-storagecache/src/models/cachesMappers.ts b/sdk/storagecache/arm-storagecache/src/models/cachesMappers.ts index 1947d5dd68fb..eab67c051d24 100644 --- a/sdk/storagecache/arm-storagecache/src/models/cachesMappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/cachesMappers.ts @@ -7,9 +7,11 @@ */ export { - discriminators, BaseResource, Cache, + CacheActiveDirectorySettings, + CacheActiveDirectorySettingsCredentials, + CacheDirectorySettings, CacheEncryptionSettings, CacheHealth, CacheIdentity, @@ -18,13 +20,18 @@ export { CacheSku, CachesListResult, CacheUpgradeStatus, + CacheUsernameDownloadSettings, + CacheUsernameDownloadSettingsCredentials, ClfsTarget, CloudError, KeyVaultKeyReference, KeyVaultKeyReferenceSourceVault, NamespaceJunction, Nfs3Target, + NfsAccessPolicy, + NfsAccessRule, StorageTarget, StorageTargetResource, + SystemData, UnknownTarget } from "../models/mappers"; diff --git a/sdk/storagecache/arm-storagecache/src/models/index.ts b/sdk/storagecache/arm-storagecache/src/models/index.ts index 8c58bd4783db..0ac251b5c967 100644 --- a/sdk/storagecache/arm-storagecache/src/models/index.ts +++ b/sdk/storagecache/arm-storagecache/src/models/index.ts @@ -67,6 +67,50 @@ export interface CloudErrorBody { target?: string; } +/** + * Describes the format of Error response. + */ +export interface ErrorResponse { + /** + * Error code + */ + code?: string; + /** + * Error message indicating why the operation failed. + */ + message?: string; +} + +/** + * The status of operation. + */ +export interface AscOperation { + /** + * The operation Id. + */ + id?: string; + /** + * The operation name. + */ + name?: string; + /** + * The start time of the operation. + */ + startTime?: string; + /** + * The end time of the operation. + */ + endTime?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The error detail of the operation if any. + */ + error?: ErrorResponse; +} + /** * Cache identity properties. */ @@ -87,6 +131,38 @@ export interface CacheIdentity { type?: CacheIdentityType; } +/** + * Metadata pertaining to creation and last modification of the resource. + */ +export interface SystemData { + /** + * The identity that created the resource. + */ + createdBy?: string; + /** + * The type of identity that created the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + createdByType?: CreatedByType; + /** + * The timestamp of resource creation (UTC). + */ + createdAt?: Date; + /** + * The identity that last modified the resource. + */ + lastModifiedBy?: string; + /** + * The type of identity that last modified the resource. Possible values include: 'User', + * 'Application', 'ManagedIdentity', 'Key' + */ + lastModifiedByType?: CreatedByType; + /** + * The type of identity that last modified the resource. + */ + lastModifiedAt?: Date; +} + /** * An indication of Cache health. Gives more information about health than just that related to * provisioning. @@ -185,14 +261,217 @@ export interface CacheEncryptionSettings { keyEncryptionKey?: KeyVaultKeyReference; } +/** + * Rule to place restrictions on portions of the NFS namespace being presented to clients. + */ +export interface NfsAccessRule { + /** + * Scope applied to this rule. Possible values include: 'default', 'network', 'host' + */ + scope?: NfsAccessRuleScope; + /** + * Filter applied to this rule. The filter's format depends on its scope. 'default' scope is + * reserved for system use. 'network' is in CIDR format (e.g., 10.99.1.0/24) and 'host' is an IP + * address or fully qualified domain name. + */ + filter?: string; + /** + * Access allowed by this rule. Possible values include: 'no', 'ro', 'rw' + */ + access?: NfsAccessRuleAccess; + /** + * Allow SUID semantics. + */ + suid?: boolean; + /** + * Allow mounts below the junction. + */ + submountAccess?: boolean; + /** + * Map root accesses to anonymousUID and anonymousGID. + */ + rootSquash?: boolean; + /** + * UID value that replaces 0 when rootSquash is true. Default value: '-2'. + */ + anonymousUID?: string; + /** + * GID value that replaces 0 when rootSquash is true. Default value: '-2'. + */ + anonymousGID?: string; +} + +/** + * A set of rules describing access policies applied to NFSv3 clients of the cache. + */ +export interface NfsAccessPolicy { + /** + * Name identifying this policy. Access Policy names are not case sensitive. + */ + name?: string; + /** + * The set of rules describing client accesses allowed under this policy. + */ + accessRules?: NfsAccessRule[]; +} + /** * Cache security settings. */ export interface CacheSecuritySettings { /** - * root squash of cache property. + * NFS access policies defined for this cache. */ - rootSquash?: boolean; + accessPolicies?: NfsAccessPolicy[]; +} + +/** + * Active Directory admin or user credentials used to join the HPC Cache to a domain. + */ +export interface CacheActiveDirectorySettingsCredentials { + /** + * User name of the Active Directory domain administrator. This value is stored encrypted and not + * returned on response. + */ + username: string; + /** + * Plain text password of the Active Directory domain administrator. This value is stored + * encrypted and not returned on response. + */ + password: string; +} + +/** + * Active Directory settings used to join a Cache to a Domain. + */ +export interface CacheActiveDirectorySettings { + /** + * Primary DNS IP address used to resolve the Active Directory domain controller's fully + * qualified domain name. + */ + primaryDnsIpAddress: string; + /** + * Secondary DNS IP address used to resolve the Active Directory domain controller's fully + * qualified domain name. + */ + secondaryDnsIpAddress: string; + /** + * The fully qualified domain name of the Active Directory domain controller. + */ + domainName: string; + /** + * The Active Directory domain's NetBIOS name. + */ + domainNetBios?: string; + /** + * The name (NetBIOS) used for the HPC Cache to join the Active Directory Domain. Length must not + * be greater than 15 and chars must be in list of [-0-9a-zA-Z_] char class. + */ + smbServerName: string; + /** + * This field indicates if the HPC Cache is joined to the Active Directory Domain. Possible + * values include: 'Yes', 'No', 'Error' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly domainJoined?: DomainJoinedType; + /** + * Active Directory admin or user credentials used to join the HPC Cache to a domain. + */ + credentials?: CacheActiveDirectorySettingsCredentials; +} + +/** + * When present, these are the credentials for the secure LDAP connection. + */ +export interface CacheUsernameDownloadSettingsCredentials { + /** + * The Bind distinguished name identity to be used in the secure LDAP connection. This value is + * stored encrypted and not returned on response. + */ + bindDn?: string; + /** + * The Bind password to be used in the secure LDAP connection. This value is stored encrypted and + * not returned on response. + */ + bindPassword?: string; +} + +/** + * Settings for username and group download for Extended groups. + */ +export interface CacheUsernameDownloadSettings { + /** + * This indicates if Extended Groups is enabled. + */ + extendedGroupsEnabled?: boolean; + /** + * This setting determines how the system gets username and group names for clients. Possible + * values include: 'AD', 'LDAP', 'File', 'None'. Default value: 'None'. + */ + usernameSource?: UsernameSource; + /** + * The URI of the file containing the group information (in etc/group file format). This field + * must be populated when 'usernameSource' is set to 'File'. + */ + groupFileURI?: string; + /** + * The URI of the file containing the user information (in etc/passwd file format). This field + * must be populated when 'usernameSource' is set to 'File'. + */ + userFileURI?: string; + /** + * The fully qualified domain name or IP address of the LDAP server to use. + */ + ldapServer?: string; + /** + * The base distinguished name for the LDAP domain. + */ + ldapBaseDn?: string; + /** + * This indicates if the LDAP connection should be encrypted. + */ + encryptLdapConnection?: boolean; + /** + * Determines if the certificates should be validated by a certificate authority. When true + * caCertificateURI must be provided. + */ + requireValidCertificate?: boolean; + /** + * Determines if the certificate should be automatically downloaded. This applies to + * 'caCertificateURI' when 'requireValidCertificate' is true, or a self signed certificate + * otherwise. + */ + autoDownloadCertificate?: boolean; + /** + * The URI of the CA certificate to validate the LDAP secure connection. This field must be + * populated when 'requireValidCertificate' is set to true. + */ + caCertificateURI?: string; + /** + * Indicates if the HPC Cache has performed the username download successfully. Possible values + * include: 'Yes', 'No', 'Error' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly usernamePolled?: UsernamePolledType; + /** + * When present, these are the credentials for the secure LDAP connection. + */ + credentials?: CacheUsernameDownloadSettingsCredentials; +} + +/** + * Cache Directory Services settings. + */ +export interface CacheDirectorySettings { + /** + * Specifies the settings for joining the HPC Cache to an Active Directory domain. + */ + activeDirectory?: CacheActiveDirectorySettings; + /** + * Specifies the settings for Extended Groups. Extended Groups allows users to be members of more + * than 16 groups. + */ + usernameDownload?: CacheUsernameDownloadSettings; } /** @@ -237,6 +516,11 @@ export interface Cache extends BaseResource { * The identity of the cache, if configured. */ identity?: CacheIdentity; + /** + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly systemData?: SystemData; /** * The size of this Cache, in GB. */ @@ -278,6 +562,10 @@ export interface Cache extends BaseResource { * Specifies security settings of the cache. */ securitySettings?: CacheSecuritySettings; + /** + * Specifies Directory Services settings of the cache. + */ + directoryServicesSettings?: CacheDirectorySettings; /** * SKU for the Cache. */ @@ -300,10 +588,14 @@ export interface NamespaceJunction { * NFS export where targetPath exists. */ nfsExport?: string; + /** + * Name of the access policy applied to this junction. + */ + nfsAccessPolicy?: string; } /** - * Properties pertained to Nfs3Target + * Properties pertaining to the Nfs3Target */ export interface Nfs3Target { /** @@ -311,14 +603,14 @@ export interface Nfs3Target { */ target?: string; /** - * Identifies the primary usage model to be used for this Storage Target. Get choices from + * Identifies the usage model to be used for this Storage Target. Get choices from * .../usageModels */ usageModel?: string; } /** - * Properties pertained to ClfsTarget + * Properties pertaining to the ClfsTarget */ export interface ClfsTarget { /** @@ -328,7 +620,7 @@ export interface ClfsTarget { } /** - * Properties pertained to UnknownTarget + * Properties pertaining to the UnknownTarget */ export interface UnknownTarget { /** @@ -337,48 +629,6 @@ export interface UnknownTarget { unknownMap?: { [propertyName: string]: string }; } -/** - * Contains the possible cases for StorageTargetProperties. - */ -export type StorageTargetPropertiesUnion = StorageTargetProperties | Nfs3TargetProperties | ClfsTargetProperties | UnknownTargetProperties; - -/** - * Properties of the Storage Target. - */ -export interface StorageTargetProperties { - /** - * Polymorphic Discriminator - */ - targetBaseType: "StorageTargetProperties"; - /** - * List of Cache namespace junctions to target for namespace associations. - */ - junctions?: NamespaceJunction[]; - /** - * Type of the Storage Target. - */ - targetType?: string; - /** - * ARM provisioning state, see - * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. - * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', 'Deleting', - * 'Updating' - */ - provisioningState?: ProvisioningStateType; - /** - * Properties when targetType is nfs3. - */ - nfs3?: Nfs3Target; - /** - * Properties when targetType is clfs. - */ - clfs?: ClfsTarget; - /** - * Properties when targetType is unknown. - */ - unknown?: UnknownTarget; -} - /** * Resource used by a Cache. */ @@ -398,135 +648,30 @@ export interface StorageTargetResource extends BaseResource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; -} - -/** - * Type of the Storage Target. - */ -export interface StorageTarget extends StorageTargetResource { - /** - * List of Cache namespace junctions to target for namespace associations. - */ - junctions?: NamespaceJunction[]; - /** - * Type of the Storage Target. - */ - targetType?: string; - /** - * ARM provisioning state, see - * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. - * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', 'Deleting', - * 'Updating' - */ - provisioningState?: ProvisioningStateType; - /** - * Properties when targetType is nfs3. - */ - nfs3?: Nfs3Target; - /** - * Properties when targetType is clfs. - */ - clfs?: ClfsTarget; - /** - * Properties when targetType is unknown. - */ - unknown?: UnknownTarget; - /** - * Polymorphic Discriminator - */ - targetBaseType: string; -} - -/** - * An NFSv3 mount point for use as a Storage Target. - */ -export interface Nfs3TargetProperties { - /** - * Polymorphic Discriminator - */ - targetBaseType: "nfs3"; - /** - * List of Cache namespace junctions to target for namespace associations. - */ - junctions?: NamespaceJunction[]; - /** - * Type of the Storage Target. - */ - targetType?: string; - /** - * ARM provisioning state, see - * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. - * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', 'Deleting', - * 'Updating' - */ - provisioningState?: ProvisioningStateType; - /** - * Properties when targetType is nfs3. - */ - nfs3?: Nfs3Target; - /** - * Properties when targetType is clfs. - */ - clfs?: ClfsTarget; - /** - * Properties when targetType is unknown. - */ - unknown?: UnknownTarget; -} - -/** - * Storage container for use as a CLFS Storage Target. - */ -export interface ClfsTargetProperties { - /** - * Polymorphic Discriminator - */ - targetBaseType: "clfs"; - /** - * List of Cache namespace junctions to target for namespace associations. - */ - junctions?: NamespaceJunction[]; - /** - * Type of the Storage Target. - */ - targetType?: string; - /** - * ARM provisioning state, see - * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. - * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', 'Deleting', - * 'Updating' - */ - provisioningState?: ProvisioningStateType; - /** - * Properties when targetType is nfs3. - */ - nfs3?: Nfs3Target; /** - * Properties when targetType is clfs. + * Region name string. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - clfs?: ClfsTarget; + readonly location?: string; /** - * Properties when targetType is unknown. + * The system meta data relating to this resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - unknown?: UnknownTarget; + readonly systemData?: SystemData; } /** - * Storage container for use as an Unknown Storage Target. + * Type of the Storage Target. */ -export interface UnknownTargetProperties { - /** - * Polymorphic Discriminator - */ - targetBaseType: "unknown"; +export interface StorageTarget extends StorageTargetResource { /** * List of Cache namespace junctions to target for namespace associations. */ junctions?: NamespaceJunction[]; /** - * Type of the Storage Target. + * Type of the Storage Target. Possible values include: 'nfs3', 'clfs', 'unknown' */ - targetType?: string; + targetType: StorageTargetType; /** * ARM provisioning state, see * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/Addendum.md#provisioningstate-property. @@ -614,13 +759,13 @@ export interface ResourceSku { */ capabilities?: ResourceSkuCapabilities[]; /** - * The set of locations that the SKU is available. This will be supported and registered Azure + * The set of locations where the SKU is available. This is the supported and registered Azure * Geo Regions (e.g., West US, East US, Southeast Asia, etc.). * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly locations?: string[]; /** - * The set of locations that the SKU is available. + * The set of locations where the SKU is available. */ locationInfo?: ResourceSkuLocationInfo[]; /** @@ -777,45 +922,93 @@ export interface CachesListResult extends Array { * A list of Storage Targets. * @extends Array */ -export interface StorageTargetsResult extends Array { - /** - * The URI to fetch the next page of Storage Targets. - */ - nextLink?: string; -} +export interface StorageTargetsResult extends Array { + /** + * The URI to fetch the next page of Storage Targets. + */ + nextLink?: string; +} + +/** + * Defines values for CacheIdentityType. + * Possible values include: 'SystemAssigned', 'None' + * @readonly + * @enum {string} + */ +export type CacheIdentityType = 'SystemAssigned' | 'None'; + +/** + * Defines values for CreatedByType. + * Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + * @readonly + * @enum {string} + */ +export type CreatedByType = 'User' | 'Application' | 'ManagedIdentity' | 'Key'; + +/** + * Defines values for HealthStateType. + * Possible values include: 'Unknown', 'Healthy', 'Degraded', 'Down', 'Transitioning', 'Stopping', + * 'Stopped', 'Upgrading', 'Flushing' + * @readonly + * @enum {string} + */ +export type HealthStateType = 'Unknown' | 'Healthy' | 'Degraded' | 'Down' | 'Transitioning' | 'Stopping' | 'Stopped' | 'Upgrading' | 'Flushing'; + +/** + * Defines values for ProvisioningStateType. + * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', 'Deleting', 'Updating' + * @readonly + * @enum {string} + */ +export type ProvisioningStateType = 'Succeeded' | 'Failed' | 'Cancelled' | 'Creating' | 'Deleting' | 'Updating'; + +/** + * Defines values for FirmwareStatusType. + * Possible values include: 'available', 'unavailable' + * @readonly + * @enum {string} + */ +export type FirmwareStatusType = 'available' | 'unavailable'; + +/** + * Defines values for NfsAccessRuleScope. + * Possible values include: 'default', 'network', 'host' + * @readonly + * @enum {string} + */ +export type NfsAccessRuleScope = 'default' | 'network' | 'host'; /** - * Defines values for CacheIdentityType. - * Possible values include: 'SystemAssigned', 'None' + * Defines values for NfsAccessRuleAccess. + * Possible values include: 'no', 'ro', 'rw' * @readonly * @enum {string} */ -export type CacheIdentityType = 'SystemAssigned' | 'None'; +export type NfsAccessRuleAccess = 'no' | 'ro' | 'rw'; /** - * Defines values for HealthStateType. - * Possible values include: 'Unknown', 'Healthy', 'Degraded', 'Down', 'Transitioning', 'Stopping', - * 'Stopped', 'Upgrading', 'Flushing' + * Defines values for DomainJoinedType. + * Possible values include: 'Yes', 'No', 'Error' * @readonly * @enum {string} */ -export type HealthStateType = 'Unknown' | 'Healthy' | 'Degraded' | 'Down' | 'Transitioning' | 'Stopping' | 'Stopped' | 'Upgrading' | 'Flushing'; +export type DomainJoinedType = 'Yes' | 'No' | 'Error'; /** - * Defines values for ProvisioningStateType. - * Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Creating', 'Deleting', 'Updating' + * Defines values for UsernameSource. + * Possible values include: 'AD', 'LDAP', 'File', 'None' * @readonly * @enum {string} */ -export type ProvisioningStateType = 'Succeeded' | 'Failed' | 'Cancelled' | 'Creating' | 'Deleting' | 'Updating'; +export type UsernameSource = 'AD' | 'LDAP' | 'File' | 'None'; /** - * Defines values for FirmwareStatusType. - * Possible values include: 'available', 'unavailable' + * Defines values for UsernamePolledType. + * Possible values include: 'Yes', 'No', 'Error' * @readonly * @enum {string} */ -export type FirmwareStatusType = 'available' | 'unavailable'; +export type UsernamePolledType = 'Yes' | 'No' | 'Error'; /** * Defines values for StorageTargetType. @@ -954,9 +1147,9 @@ export type UsageModelsListNextResponse = UsageModelsResult & { }; /** - * Contains response data for the list operation. + * Contains response data for the get operation. */ -export type CachesListResponse = CachesListResult & { +export type AscOperationsGetResponse = AscOperation & { /** * The underlying HTTP response. */ @@ -969,14 +1162,14 @@ export type CachesListResponse = CachesListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: CachesListResult; + parsedBody: AscOperation; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the list operation. */ -export type CachesListByResourceGroupResponse = CachesListResult & { +export type CachesListResponse = CachesListResult & { /** * The underlying HTTP response. */ @@ -994,14 +1187,9 @@ export type CachesListByResourceGroupResponse = CachesListResult & { }; /** - * Contains response data for the deleteMethod operation. + * Contains response data for the listByResourceGroup operation. */ -export type CachesDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; - +export type CachesListByResourceGroupResponse = CachesListResult & { /** * The underlying HTTP response. */ @@ -1014,7 +1202,7 @@ export type CachesDeleteMethodResponse = { /** * The response body as parsed JSON or XML */ - parsedBody: any; + parsedBody: CachesListResult; }; }; @@ -1078,131 +1266,6 @@ export type CachesUpdateResponse = Cache & { }; }; -/** - * Contains response data for the flush operation. - */ -export type CachesFlushResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - -/** - * Contains response data for the start operation. - */ -export type CachesStartResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - -/** - * Contains response data for the stop operation. - */ -export type CachesStopResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - -/** - * Contains response data for the upgradeFirmware operation. - */ -export type CachesUpgradeFirmwareResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - -/** - * Contains response data for the beginDeleteMethod operation. - */ -export type CachesBeginDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - /** * Contains response data for the beginCreateOrUpdate operation. */ @@ -1223,106 +1286,6 @@ export type CachesBeginCreateOrUpdateResponse = Cache & { }; }; -/** - * Contains response data for the beginFlush operation. - */ -export type CachesBeginFlushResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - -/** - * Contains response data for the beginStart operation. - */ -export type CachesBeginStartResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - -/** - * Contains response data for the beginStop operation. - */ -export type CachesBeginStopResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - -/** - * Contains response data for the beginUpgradeFirmware operation. - */ -export type CachesBeginUpgradeFirmwareResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - /** * Contains response data for the listNext operation. */ @@ -1383,31 +1346,6 @@ export type StorageTargetsListByCacheResponse = StorageTargetsResult & { }; }; -/** - * Contains response data for the deleteMethod operation. - */ -export type StorageTargetsDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - /** * Contains response data for the get operation. */ @@ -1448,31 +1386,6 @@ export type StorageTargetsCreateOrUpdateResponse = StorageTarget & { }; }; -/** - * Contains response data for the beginDeleteMethod operation. - */ -export type StorageTargetsBeginDeleteMethodResponse = { - /** - * The parsed response body. - */ - body: any; - - /** - * The underlying HTTP response. - */ - _response: msRest.HttpResponse & { - /** - * The response body as text (string format) - */ - bodyAsText: string; - - /** - * The response body as parsed JSON or XML - */ - parsedBody: any; - }; -}; - /** * Contains response data for the beginCreateOrUpdate operation. */ diff --git a/sdk/storagecache/arm-storagecache/src/models/mappers.ts b/sdk/storagecache/arm-storagecache/src/models/mappers.ts index 672eb04f432f..b381d555cf49 100644 --- a/sdk/storagecache/arm-storagecache/src/models/mappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/mappers.ts @@ -103,6 +103,75 @@ export const CloudErrorBody: msRest.CompositeMapper = { } }; +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const AscOperation: msRest.CompositeMapper = { + serializedName: "AscOperation", + type: { + name: "Composite", + className: "AscOperation", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + export const CacheIdentity: msRest.CompositeMapper = { serializedName: "CacheIdentity", type: { @@ -137,6 +206,52 @@ export const CacheIdentity: msRest.CompositeMapper = { } }; +export const SystemData: msRest.CompositeMapper = { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String" + } + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String" + } + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String" + } + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String" + } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + export const CacheHealth: msRest.CompositeMapper = { serializedName: "CacheHealth", type: { @@ -295,17 +410,327 @@ export const CacheEncryptionSettings: msRest.CompositeMapper = { } }; +export const NfsAccessRule: msRest.CompositeMapper = { + serializedName: "NfsAccessRule", + type: { + name: "Composite", + className: "NfsAccessRule", + modelProperties: { + scope: { + serializedName: "scope", + type: { + name: "String" + } + }, + filter: { + serializedName: "filter", + type: { + name: "String" + } + }, + access: { + serializedName: "access", + type: { + name: "String" + } + }, + suid: { + serializedName: "suid", + type: { + name: "Boolean" + } + }, + submountAccess: { + serializedName: "submountAccess", + type: { + name: "Boolean" + } + }, + rootSquash: { + serializedName: "rootSquash", + type: { + name: "Boolean" + } + }, + anonymousUID: { + serializedName: "anonymousUID", + defaultValue: '-2', + type: { + name: "String" + } + }, + anonymousGID: { + serializedName: "anonymousGID", + defaultValue: '-2', + type: { + name: "String" + } + } + } + } +}; + +export const NfsAccessPolicy: msRest.CompositeMapper = { + serializedName: "NfsAccessPolicy", + type: { + name: "Composite", + className: "NfsAccessPolicy", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + accessRules: { + serializedName: "accessRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NfsAccessRule" + } + } + } + } + } + } +}; + export const CacheSecuritySettings: msRest.CompositeMapper = { serializedName: "CacheSecuritySettings", type: { name: "Composite", className: "CacheSecuritySettings", modelProperties: { - rootSquash: { - serializedName: "rootSquash", + accessPolicies: { + serializedName: "accessPolicies", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NfsAccessPolicy" + } + } + } + } + } + } +}; + +export const CacheActiveDirectorySettingsCredentials: msRest.CompositeMapper = { + serializedName: "CacheActiveDirectorySettings_credentials", + type: { + name: "Composite", + className: "CacheActiveDirectorySettingsCredentials", + modelProperties: { + username: { + required: true, + serializedName: "username", + type: { + name: "String" + } + }, + password: { + required: true, + serializedName: "password", + type: { + name: "String" + } + } + } + } +}; + +export const CacheActiveDirectorySettings: msRest.CompositeMapper = { + serializedName: "CacheActiveDirectorySettings", + type: { + name: "Composite", + className: "CacheActiveDirectorySettings", + modelProperties: { + primaryDnsIpAddress: { + required: true, + serializedName: "primaryDnsIpAddress", + type: { + name: "String" + } + }, + secondaryDnsIpAddress: { + required: true, + serializedName: "secondaryDnsIpAddress", + type: { + name: "String" + } + }, + domainName: { + required: true, + serializedName: "domainName", + type: { + name: "String" + } + }, + domainNetBios: { + serializedName: "domainNetBios", + type: { + name: "String" + } + }, + smbServerName: { + required: true, + serializedName: "smbServerName", + constraints: { + Pattern: /^[-0-9a-zA-Z_]{1,15}$/ + }, + type: { + name: "String" + } + }, + domainJoined: { + readOnly: true, + serializedName: "domainJoined", + type: { + name: "String" + } + }, + credentials: { + serializedName: "credentials", + type: { + name: "Composite", + className: "CacheActiveDirectorySettingsCredentials" + } + } + } + } +}; + +export const CacheUsernameDownloadSettingsCredentials: msRest.CompositeMapper = { + serializedName: "CacheUsernameDownloadSettings_credentials", + type: { + name: "Composite", + className: "CacheUsernameDownloadSettingsCredentials", + modelProperties: { + bindDn: { + serializedName: "bindDn", + type: { + name: "String" + } + }, + bindPassword: { + serializedName: "bindPassword", + type: { + name: "String" + } + } + } + } +}; + +export const CacheUsernameDownloadSettings: msRest.CompositeMapper = { + serializedName: "CacheUsernameDownloadSettings", + type: { + name: "Composite", + className: "CacheUsernameDownloadSettings", + modelProperties: { + extendedGroupsEnabled: { + serializedName: "extendedGroupsEnabled", + type: { + name: "Boolean" + } + }, + usernameSource: { + serializedName: "usernameSource", + defaultValue: 'None', + type: { + name: "String" + } + }, + groupFileURI: { + serializedName: "groupFileURI", + type: { + name: "String" + } + }, + userFileURI: { + serializedName: "userFileURI", + type: { + name: "String" + } + }, + ldapServer: { + serializedName: "ldapServer", + type: { + name: "String" + } + }, + ldapBaseDn: { + serializedName: "ldapBaseDn", + type: { + name: "String" + } + }, + encryptLdapConnection: { + serializedName: "encryptLdapConnection", + type: { + name: "Boolean" + } + }, + requireValidCertificate: { + serializedName: "requireValidCertificate", type: { name: "Boolean" } + }, + autoDownloadCertificate: { + serializedName: "autoDownloadCertificate", + type: { + name: "Boolean" + } + }, + caCertificateURI: { + serializedName: "caCertificateURI", + type: { + name: "String" + } + }, + usernamePolled: { + readOnly: true, + serializedName: "usernamePolled", + type: { + name: "String" + } + }, + credentials: { + serializedName: "credentials", + type: { + name: "Composite", + className: "CacheUsernameDownloadSettingsCredentials" + } + } + } + } +}; + +export const CacheDirectorySettings: msRest.CompositeMapper = { + serializedName: "CacheDirectorySettings", + type: { + name: "Composite", + className: "CacheDirectorySettings", + modelProperties: { + activeDirectory: { + serializedName: "activeDirectory", + type: { + name: "Composite", + className: "CacheActiveDirectorySettings" + } + }, + usernameDownload: { + serializedName: "usernameDownload", + type: { + name: "Composite", + className: "CacheUsernameDownloadSettings" + } } } } @@ -373,6 +798,14 @@ export const Cache: msRest.CompositeMapper = { className: "CacheIdentity" } }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, cacheSizeGB: { serializedName: "properties.cacheSizeGB", type: { @@ -439,6 +872,13 @@ export const Cache: msRest.CompositeMapper = { className: "CacheSecuritySettings" } }, + directoryServicesSettings: { + serializedName: "properties.directoryServicesSettings", + type: { + name: "Composite", + className: "CacheDirectorySettings" + } + }, sku: { serializedName: "sku", type: { @@ -473,6 +913,12 @@ export const NamespaceJunction: msRest.CompositeMapper = { type: { name: "String" } + }, + nfsAccessPolicy: { + serializedName: "nfsAccessPolicy", + type: { + name: "String" + } } } } @@ -540,73 +986,6 @@ export const UnknownTarget: msRest.CompositeMapper = { } }; -export const StorageTargetProperties: msRest.CompositeMapper = { - serializedName: "StorageTargetProperties", - type: { - name: "Composite", - polymorphicDiscriminator: { - serializedName: "targetBaseType", - clientName: "targetBaseType" - }, - uberParent: "StorageTargetProperties", - className: "StorageTargetProperties", - modelProperties: { - junctions: { - serializedName: "junctions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NamespaceJunction" - } - } - } - }, - targetType: { - serializedName: "targetType", - type: { - name: "String" - } - }, - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } - }, - nfs3: { - serializedName: "nfs3", - type: { - name: "Composite", - className: "Nfs3Target" - } - }, - clfs: { - serializedName: "clfs", - type: { - name: "Composite", - className: "ClfsTarget" - } - }, - unknown: { - serializedName: "unknown", - type: { - name: "Composite", - className: "UnknownTarget" - } - }, - targetBaseType: { - required: true, - serializedName: "targetBaseType", - type: { - name: "String" - } - } - } - } -}; - export const StorageTargetResource: msRest.CompositeMapper = { serializedName: "StorageTargetResource", type: { @@ -633,6 +1012,21 @@ export const StorageTargetResource: msRest.CompositeMapper = { type: { name: "String" } + }, + location: { + readOnly: true, + serializedName: "location", + type: { + name: "String" + } + }, + systemData: { + readOnly: true, + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } } } } @@ -658,6 +1052,7 @@ export const StorageTarget: msRest.CompositeMapper = { } }, targetType: { + required: true, serializedName: "properties.targetType", type: { name: "String" @@ -689,57 +1084,11 @@ export const StorageTarget: msRest.CompositeMapper = { name: "Composite", className: "UnknownTarget" } - }, - targetBaseType: { - required: true, - serializedName: "properties.targetBaseType", - type: { - name: "String" - } } } } }; -export const Nfs3TargetProperties: msRest.CompositeMapper = { - serializedName: "nfs3", - type: { - name: "Composite", - polymorphicDiscriminator: StorageTargetProperties.type.polymorphicDiscriminator, - uberParent: "StorageTargetProperties", - className: "Nfs3TargetProperties", - modelProperties: { - ...StorageTargetProperties.type.modelProperties - } - } -}; - -export const ClfsTargetProperties: msRest.CompositeMapper = { - serializedName: "clfs", - type: { - name: "Composite", - polymorphicDiscriminator: StorageTargetProperties.type.polymorphicDiscriminator, - uberParent: "StorageTargetProperties", - className: "ClfsTargetProperties", - modelProperties: { - ...StorageTargetProperties.type.modelProperties - } - } -}; - -export const UnknownTargetProperties: msRest.CompositeMapper = { - serializedName: "unknown", - type: { - name: "Composite", - polymorphicDiscriminator: StorageTargetProperties.type.polymorphicDiscriminator, - uberParent: "StorageTargetProperties", - className: "UnknownTargetProperties", - modelProperties: { - ...StorageTargetProperties.type.modelProperties - } - } -}; - export const ResourceSkuCapabilities: msRest.CompositeMapper = { serializedName: "ResourceSkuCapabilities", type: { @@ -1080,11 +1429,3 @@ export const StorageTargetsResult: msRest.CompositeMapper = { } } }; - -export const discriminators = { - 'StorageTargetProperties' : StorageTargetProperties, - 'StorageTargetProperties.nfs3' : Nfs3TargetProperties, - 'StorageTargetProperties.clfs' : ClfsTargetProperties, - 'StorageTargetProperties.unknown' : UnknownTargetProperties - -}; diff --git a/sdk/storagecache/arm-storagecache/src/models/operationsMappers.ts b/sdk/storagecache/arm-storagecache/src/models/operationsMappers.ts index 69e93ca3e812..90e5342ad0b1 100644 --- a/sdk/storagecache/arm-storagecache/src/models/operationsMappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/operationsMappers.ts @@ -7,7 +7,6 @@ */ export { - discriminators, ApiOperation, ApiOperationDisplay, ApiOperationListResult, diff --git a/sdk/storagecache/arm-storagecache/src/models/parameters.ts b/sdk/storagecache/arm-storagecache/src/models/parameters.ts index dd3394f6db81..a3b5da619669 100644 --- a/sdk/storagecache/arm-storagecache/src/models/parameters.ts +++ b/sdk/storagecache/arm-storagecache/src/models/parameters.ts @@ -43,6 +43,16 @@ export const cacheName: msRest.OperationURLParameter = { } } }; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -54,6 +64,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const operationId: msRest.OperationURLParameter = { + parameterPath: "operationId", + mapper: { + required: true, + serializedName: "operationId", + type: { + name: "String" + } + } +}; export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/storagecache/arm-storagecache/src/models/skusMappers.ts b/sdk/storagecache/arm-storagecache/src/models/skusMappers.ts index 25ba85daa733..d32405874d1c 100644 --- a/sdk/storagecache/arm-storagecache/src/models/skusMappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/skusMappers.ts @@ -7,7 +7,6 @@ */ export { - discriminators, CloudError, ResourceSku, ResourceSkuCapabilities, diff --git a/sdk/storagecache/arm-storagecache/src/models/storageTargetsMappers.ts b/sdk/storagecache/arm-storagecache/src/models/storageTargetsMappers.ts index f7f8b3402e86..04c36c491aa8 100644 --- a/sdk/storagecache/arm-storagecache/src/models/storageTargetsMappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/storageTargetsMappers.ts @@ -7,9 +7,11 @@ */ export { - discriminators, BaseResource, Cache, + CacheActiveDirectorySettings, + CacheActiveDirectorySettingsCredentials, + CacheDirectorySettings, CacheEncryptionSettings, CacheHealth, CacheIdentity, @@ -17,14 +19,19 @@ export { CacheSecuritySettings, CacheSku, CacheUpgradeStatus, + CacheUsernameDownloadSettings, + CacheUsernameDownloadSettingsCredentials, ClfsTarget, CloudError, KeyVaultKeyReference, KeyVaultKeyReferenceSourceVault, NamespaceJunction, Nfs3Target, + NfsAccessPolicy, + NfsAccessRule, StorageTarget, StorageTargetResource, StorageTargetsResult, + SystemData, UnknownTarget } from "../models/mappers"; diff --git a/sdk/storagecache/arm-storagecache/src/models/usageModelsMappers.ts b/sdk/storagecache/arm-storagecache/src/models/usageModelsMappers.ts index 5fed08aa0dc5..0fe634495261 100644 --- a/sdk/storagecache/arm-storagecache/src/models/usageModelsMappers.ts +++ b/sdk/storagecache/arm-storagecache/src/models/usageModelsMappers.ts @@ -7,7 +7,6 @@ */ export { - discriminators, CloudError, UsageModel, UsageModelDisplay, diff --git a/sdk/storagecache/arm-storagecache/src/operations/ascOperations.ts b/sdk/storagecache/arm-storagecache/src/operations/ascOperations.ts new file mode 100644 index 000000000000..61eb9e7b0c70 --- /dev/null +++ b/sdk/storagecache/arm-storagecache/src/operations/ascOperations.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/ascOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { StorageCacheManagementClientContext } from "../storageCacheManagementClientContext"; + +/** Class representing a AscOperations. */ +export class AscOperations { + private readonly client: StorageCacheManagementClientContext; + + /** + * Create a AscOperations. + * @param {StorageCacheManagementClientContext} client Reference to the service client. + */ + constructor(client: StorageCacheManagementClientContext) { + this.client = client; + } + + /** + * Gets the status of an asynchronous operation for the Azure HPC Cache + * @param location The name of the region used to look up the operation. + * @param operationId The operation id which uniquely identifies the asynchronous operation. + * @param [options] The optional parameters + * @returns Promise + */ + get(location: string, operationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The name of the region used to look up the operation. + * @param operationId The operation id which uniquely identifies the asynchronous operation. + * @param callback The callback + */ + get(location: string, operationId: string, callback: msRest.ServiceCallback): void; + /** + * @param location The name of the region used to look up the operation. + * @param operationId The operation id which uniquely identifies the asynchronous operation. + * @param options The optional parameters + * @param callback The callback + */ + get(location: string, operationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(location: string, operationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + operationId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.StorageCache/locations/{location}/ascOperations/{operationId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.location, + Parameters.operationId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.AscOperation + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/storagecache/arm-storagecache/src/operations/caches.ts b/sdk/storagecache/arm-storagecache/src/operations/caches.ts index e296ec434609..61797a90820e 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/caches.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/caches.ts @@ -82,20 +82,20 @@ export class Caches { /** * Schedules a Cache for deletion. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + deleteMethod(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginDeleteMethod(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Returns a Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -103,14 +103,14 @@ export class Caches { get(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param callback The callback */ get(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param options The optional parameters * @param callback The callback @@ -130,7 +130,7 @@ export class Caches { /** * Create or update a Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -143,7 +143,7 @@ export class Caches { /** * Update a Cache instance. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -151,14 +151,14 @@ export class Caches { update(resourceGroupName: string, cacheName: string, options?: Models.CachesUpdateOptionalParams): Promise; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param callback The callback */ update(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param options The optional parameters * @param callback The callback @@ -179,60 +179,60 @@ export class Caches { * Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will * see errors returned until the flush is complete. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - flush(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + flush(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginFlush(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Tells a Stopped state Cache to transition to Active state. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - start(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + start(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginStart(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Tells an Active Cache to transition to Stopped state. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - stop(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + stop(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginStop(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no * effect. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - upgradeFirmware(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { + upgradeFirmware(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginUpgradeFirmware(resourceGroupName,cacheName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Schedules a Cache for deletion. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -251,7 +251,7 @@ export class Caches { /** * Create or update a Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -271,7 +271,7 @@ export class Caches { * Tells a Cache to write all dirty data to the Storage Target(s). During the flush, clients will * see errors returned until the flush is complete. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -290,7 +290,7 @@ export class Caches { /** * Tells a Stopped state Cache to transition to Active state. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -309,7 +309,7 @@ export class Caches { /** * Tells an Active Cache to transition to Stopped state. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -329,7 +329,7 @@ export class Caches { * Upgrade a Cache's firmware if a new version is available. Otherwise, this operation has no * effect. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -523,30 +523,9 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -582,6 +561,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.Cache }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -604,30 +584,9 @@ const beginFlushOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -650,30 +609,9 @@ const beginStartOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -696,30 +634,9 @@ const beginStopOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -742,30 +659,9 @@ const beginUpgradeFirmwareOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 201: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/storagecache/arm-storagecache/src/operations/index.ts b/sdk/storagecache/arm-storagecache/src/operations/index.ts index 461ea1b1d1b5..93f5a02cc48c 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/index.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/index.ts @@ -11,5 +11,6 @@ export * from "./operations"; export * from "./skus"; export * from "./usageModels"; +export * from "./ascOperations"; export * from "./caches"; export * from "./storageTargets"; diff --git a/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts b/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts index a29771da8d90..857894a36d7b 100644 --- a/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts +++ b/sdk/storagecache/arm-storagecache/src/operations/storageTargets.ts @@ -30,7 +30,7 @@ export class StorageTargets { /** * Returns a list of Storage Targets for the specified Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -38,14 +38,14 @@ export class StorageTargets { listByCache(resourceGroupName: string, cacheName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param callback The callback */ listByCache(resourceGroupName: string, cacheName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param options The optional parameters * @param callback The callback @@ -68,23 +68,23 @@ export class StorageTargets { * healthy again. Note that if the Cache has data to flush to the Storage Target, the data will be * flushed before the Storage Target will be deleted. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - deleteMethod(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: msRest.RequestOptionsBase): Promise { + deleteMethod(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: msRest.RequestOptionsBase): Promise { return this.beginDeleteMethod(resourceGroupName,cacheName,storageTargetName,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Returns a Storage Target from a Cache. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 * and chars must be in list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -92,18 +92,18 @@ export class StorageTargets { get(resourceGroupName: string, cacheName: string, storageTargetName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 * and chars must be in list of [-0-9a-zA-Z_] char class. * @param callback The callback */ get(resourceGroupName: string, cacheName: string, storageTargetName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 * and chars must be in list of [-0-9a-zA-Z_] char class. * @param options The optional parameters * @param callback The callback @@ -126,9 +126,9 @@ export class StorageTargets { * down or unhealthy, the actual creation/modification of the Storage Target may be delayed until * the Cache is healthy again. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 * and chars must be in list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -144,7 +144,7 @@ export class StorageTargets { * healthy again. Note that if the Cache has data to flush to the Storage Target, the data will be * flushed before the Storage Target will be deleted. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. * @param storageTargetName Name of Storage Target. * @param [options] The optional parameters @@ -167,9 +167,9 @@ export class StorageTargets { * down or unhealthy, the actual creation/modification of the Storage Target may be delayed until * the Cache is healthy again. * @param resourceGroupName Target resource group. - * @param cacheName Name of Cache. Length of name must be not greater than 80 and chars must be in + * @param cacheName Name of Cache. Length of name must not be greater than 80 and chars must be in * list of [-0-9a-zA-Z_] char class. - * @param storageTargetName Name of the Storage Target. Length of name must be not greater than 80 + * @param storageTargetName Name of the Storage Target. Length of name must not be greater than 80 * and chars must be in list of [-0-9a-zA-Z_] char class. * @param [options] The optional parameters * @returns Promise @@ -284,30 +284,9 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 202: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, - 204: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Object" - } - } - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } @@ -344,6 +323,7 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { 201: { bodyMapper: Mappers.StorageTarget }, + 202: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts index 6380df6d5691..5c8331c8f305 100644 --- a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts +++ b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClient.ts @@ -20,6 +20,7 @@ class StorageCacheManagementClient extends StorageCacheManagementClientContext { operations: operations.Operations; skus: operations.Skus; usageModels: operations.UsageModels; + ascOperations: operations.AscOperations; caches: operations.Caches; storageTargets: operations.StorageTargets; @@ -35,6 +36,7 @@ class StorageCacheManagementClient extends StorageCacheManagementClientContext { this.operations = new operations.Operations(this); this.skus = new operations.Skus(this); this.usageModels = new operations.UsageModels(this); + this.ascOperations = new operations.AscOperations(this); this.caches = new operations.Caches(this); this.storageTargets = new operations.StorageTargets(this); } diff --git a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts index 366823e7d24a..401b3b42be9f 100644 --- a/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts +++ b/sdk/storagecache/arm-storagecache/src/storageCacheManagementClientContext.ts @@ -45,7 +45,7 @@ export class StorageCacheManagementClientContext extends msRestAzure.AzureServic super(credentials, options); - this.apiVersion = '2020-03-01'; + this.apiVersion = '2020-10-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/swagger_to_sdk_config.json b/swagger_to_sdk_config.json index 720a73b16905..4579a20351e5 100644 --- a/swagger_to_sdk_config.json +++ b/swagger_to_sdk_config.json @@ -6,7 +6,8 @@ "typescript": "", "license-header": "MICROSOFT_MIT_NO_VERSION", "sdkrel:typescript-sdks-folder": ".", - "use": "@microsoft.azure/autorest.typescript@4.4.1" + "typescript.clear-output-folder": "", + "use": "@microsoft.azure/autorest.typescript@4.2.2" }, "advanced_options": { "clone_dir": "./azure-sdk-for-js",