@azure/keyvault-admin 4.5.0-beta.1 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +18 -108
- package/dist/index.js.map +1 -1
- package/dist-esm/src/accessControlClient.js.map +1 -1
- package/dist-esm/src/backupClient.js +9 -99
- package/dist-esm/src/backupClient.js.map +1 -1
- package/dist-esm/src/constants.js +2 -2
- package/dist-esm/src/constants.js.map +1 -1
- package/dist-esm/src/generated/keyVaultClient.js.map +1 -1
- package/dist-esm/src/generated/keyVaultClientContext.js +1 -1
- package/dist-esm/src/generated/keyVaultClientContext.js.map +1 -1
- package/dist-esm/src/generated/models/index.js +6 -6
- package/dist-esm/src/generated/models/index.js.map +1 -1
- package/dist-esm/src/lro/backup/operation.js.map +1 -1
- package/dist-esm/src/lro/backup/poller.js.map +1 -1
- package/dist-esm/src/lro/keyVaultAdminPoller.js.map +1 -1
- package/dist-esm/src/lro/restore/operation.js.map +1 -1
- package/dist-esm/src/lro/restore/poller.js.map +1 -1
- package/dist-esm/src/lro/selectiveKeyRestore/operation.js.map +1 -1
- package/dist-esm/src/lro/selectiveKeyRestore/poller.js.map +1 -1
- package/dist-esm/src/mappings.js.map +1 -1
- package/dist-esm/src/settingsClient.js.map +1 -1
- package/package.json +6 -8
- package/types/keyvault-admin.d.ts +105 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6RH,6EAA6E;AAC7E,MAAM,CAAN,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACnC,kCAAkC;IAClC,6DAAgC,CAAA;AAClC,CAAC,EAHW,yBAAyB,KAAzB,yBAAyB,QAGpC;AAWD,iEAAiE;AACjE,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,qBAAqB;IACrB,+CAA8B,CAAA;IAC9B,mBAAmB;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AAA;IACtE,iCAAiC;IACjC,6FAA0E,CAAA;IAC1E,kCAAkC;IAClC,+FAA4E,CAAA;IAC5E,+BAA+B;IAC/B,qFAAkE,CAAA;AACpE,CAAC,EArEW,eAAe,KAAf,eAAe,QAqE1B;AA4CD,kEAAkE;AAClE,MAAM,CAAN,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,mBAAmB;IACnB,8BAAY,CAAA;IACZ,iBAAiB;IACjB,gCAAc,CAAA;AAChB,CAAC,EALW,cAAc,KAAd,cAAc,QAKzB;AAYD,2EAA2E;AAC3E,MAAM,CAAN,IAAY,uBAEX;AAFD,WAAY,uBAAuB;IACjC,4GAAiF,CAAA;AACnF,CAAC,EAFW,uBAAuB,KAAvB,uBAAuB,QAElC;AAWD,wEAAwE;AACxE,MAAM,CAAN,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;AACrB,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\n/** The key vault error exception. */\nexport interface KeyVaultError {\n /**\n * The key vault server error.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly error?: ErrorModel;\n}\n\n/** The key vault server error. */\nexport interface ErrorModel {\n /**\n * The error code.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly code?: string;\n /**\n * The error message.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly message?: string;\n /**\n * The key vault server error.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly innerError?: ErrorModel;\n}\n\n/** Role definition create parameters. */\nexport interface RoleDefinitionCreateParameters {\n /** Role definition properties. */\n properties: RoleDefinitionProperties;\n}\n\n/** Role definition properties. */\nexport interface RoleDefinitionProperties {\n /** The role name. */\n roleName?: string;\n /** The role definition description. */\n description?: string;\n /** The role type. */\n roleType?: RoleType;\n /** Role definition permissions. */\n permissions?: Permission[];\n /** Role definition assignable scopes. */\n assignableScopes?: RoleScope[];\n}\n\n/** Role definition permissions. */\nexport interface Permission {\n /** Action permissions that are granted. */\n actions?: string[];\n /** Action permissions that are excluded but not denied. They may be granted by other role definitions assigned to a principal. */\n notActions?: string[];\n /** Data action permissions that are granted. */\n dataActions?: DataAction[];\n /** Data action permissions that are excluded but not denied. They may be granted by other role definitions assigned to a principal. */\n notDataActions?: DataAction[];\n}\n\n/** Role definition. */\nexport interface RoleDefinition {\n /**\n * The role definition ID.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly id?: string;\n /**\n * The role definition name.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly name?: string;\n /**\n * The role definition type.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly type?: RoleDefinitionType;\n /** The role name. */\n roleName?: string;\n /** The role definition description. */\n description?: string;\n /** The role type. */\n roleType?: RoleType;\n /** Role definition permissions. */\n permissions?: Permission[];\n /** Role definition assignable scopes. */\n assignableScopes?: RoleScope[];\n}\n\n/** Role definition list operation result. */\nexport interface RoleDefinitionListResult {\n /** Role definition list. */\n value?: RoleDefinition[];\n /** The URL to use for getting the next set of results. */\n nextLink?: string;\n}\n\n/** Role assignment create parameters. */\nexport interface RoleAssignmentCreateParameters {\n /** Role assignment properties. */\n properties: RoleAssignmentProperties;\n}\n\n/** Role assignment properties. */\nexport interface RoleAssignmentProperties {\n /** The role definition ID used in the role assignment. */\n roleDefinitionId: string;\n /** The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group. */\n principalId: string;\n}\n\n/** Role Assignments */\nexport interface RoleAssignment {\n /**\n * The role assignment ID.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly id?: string;\n /**\n * The role assignment name.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly name?: string;\n /**\n * The role assignment type.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly type?: string;\n /** Role assignment properties. */\n properties?: RoleAssignmentPropertiesWithScope;\n}\n\n/** Role assignment properties with scope. */\nexport interface RoleAssignmentPropertiesWithScope {\n /** The role scope. */\n scope?: RoleScope;\n /** The role definition ID. */\n roleDefinitionId?: string;\n /** The principal ID. */\n principalId?: string;\n}\n\n/** Role assignment list operation result. */\nexport interface RoleAssignmentListResult {\n /** Role assignment list. */\n value?: RoleAssignment[];\n /** The URL to use for getting the next set of results. */\n nextLink?: string;\n}\n\nexport interface SASTokenParameter {\n /** Azure Blob storage container Uri */\n storageResourceUri: string;\n /** The SAS token pointing to an Azure Blob storage container */\n token?: string;\n /** Indicates which authentication method should be used. If set to true, Managed HSM will use the configured user-assigned managed identity to authenticate with Azure Storage. Otherwise, a SAS token has to be specified. */\n useManagedIdentity?: boolean;\n}\n\n/** Full backup operation */\nexport interface FullBackupOperation {\n /** Status of the backup operation. */\n status?: string;\n /** The status details of backup operation. */\n statusDetails?: string;\n /** Error encountered, if any, during the full backup operation. */\n error?: ErrorModel;\n /** The start time of the backup operation in UTC */\n startTime?: Date;\n /** The end time of the backup operation in UTC */\n endTime?: Date;\n /** Identifier for the full backup operation. */\n jobId?: string;\n /** The Azure blob storage container Uri which contains the full backup */\n azureStorageBlobContainerUri?: string;\n}\n\nexport interface RestoreOperationParameters {\n sasTokenParameters: SASTokenParameter;\n /** The Folder name of the blob where the previous successful full backup was stored */\n folderToRestore: string;\n}\n\n/** Restore operation */\nexport interface RestoreOperation {\n /** Status of the restore operation. */\n status?: string;\n /** The status details of restore operation. */\n statusDetails?: string;\n /** Error encountered, if any, during the restore operation. */\n error?: ErrorModel;\n /** Identifier for the restore operation. */\n jobId?: string;\n /** The start time of the restore operation */\n startTime?: Date;\n /** The end time of the restore operation */\n endTime?: Date;\n}\n\nexport interface SelectiveKeyRestoreOperationParameters {\n sasTokenParameters: SASTokenParameter;\n /** The Folder name of the blob where the previous successful full backup was stored */\n folder: string;\n}\n\n/** Selective Key Restore operation */\nexport interface SelectiveKeyRestoreOperation {\n /** Status of the restore operation. */\n status?: string;\n /** The status details of restore operation. */\n statusDetails?: string;\n /** Error encountered, if any, during the selective key restore operation. */\n error?: ErrorModel;\n /** Identifier for the selective key restore operation. */\n jobId?: string;\n /** The start time of the restore operation */\n startTime?: Date;\n /** The end time of the restore operation */\n endTime?: Date;\n}\n\n/** The update settings request object. */\nexport interface UpdateSettingRequest {\n /** The value of the pool setting. */\n value: string;\n}\n\nexport interface Setting {\n /** The account setting to be updated */\n name: string;\n /** The value of the pool setting. */\n value: string;\n /** The type specifier of the value. */\n type?: SettingTypeEnum;\n}\n\n/** The settings list result. */\nexport interface SettingsListResult {\n /**\n * A response message containing a list of account settings with their associated value.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly settings?: Setting[];\n}\n\n/** Role Assignments filter */\nexport interface RoleAssignmentFilter {\n /** Returns role assignment of the specific principal. */\n principalId?: string;\n}\n\n/** Role Definitions filter */\nexport interface RoleDefinitionFilter {\n /** Returns role definition with the specific name. */\n roleName?: string;\n}\n\n/** Defines headers for KeyVaultClient_fullBackup operation. */\nexport interface KeyVaultClientFullBackupHeaders {\n /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */\n retryAfter?: number;\n /** The URI to poll for completion status. */\n azureAsyncOperation?: string;\n}\n\n/** Defines headers for KeyVaultClient_fullRestoreOperation operation. */\nexport interface KeyVaultClientFullRestoreOperationHeaders {\n /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */\n retryAfter?: number;\n /** The URI to poll for completion status. */\n azureAsyncOperation?: string;\n}\n\n/** Defines headers for KeyVaultClient_selectiveKeyRestoreOperation operation. */\nexport interface KeyVaultClientSelectiveKeyRestoreOperationHeaders {\n /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */\n retryAfter?: number;\n /** The URI to poll for completion status. */\n azureAsyncOperation?: string;\n}\n\n/** Known values of {@link ApiVersion75Preview1} that the service accepts. */\nexport enum KnownApiVersion75Preview1 {\n /** Api Version '7.5-preview.1' */\n Seven5Preview1 = \"7.5-preview.1\"\n}\n\n/**\n * Defines values for ApiVersion75Preview1. \\\n * {@link KnownApiVersion75Preview1} can be used interchangeably with ApiVersion75Preview1,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **7.5-preview.1**: Api Version '7.5-preview.1'\n */\nexport type ApiVersion75Preview1 = string;\n\n/** Known values of {@link RoleType} that the service accepts. */\nexport enum KnownRoleType {\n /** Built in role. */\n BuiltInRole = \"AKVBuiltInRole\",\n /** Custom role. */\n CustomRole = \"CustomRole\"\n}\n\n/**\n * Defines values for RoleType. \\\n * {@link KnownRoleType} can be used interchangeably with RoleType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **AKVBuiltInRole**: Built in role. \\\n * **CustomRole**: Custom role.\n */\nexport type RoleType = string;\n\n/** Known values of {@link DataAction} that the service accepts. */\nexport enum KnownDataAction {\n /** Read HSM key metadata. */\n ReadHsmKey = \"Microsoft.KeyVault/managedHsm/keys/read/action\",\n /** Update an HSM key. */\n WriteHsmKey = \"Microsoft.KeyVault/managedHsm/keys/write/action\",\n /** Read deleted HSM key. */\n ReadDeletedHsmKey = \"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\n /** Recover deleted HSM key. */\n RecoverDeletedHsmKey = \"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\n /** Backup HSM keys. */\n BackupHsmKeys = \"Microsoft.KeyVault/managedHsm/keys/backup/action\",\n /** Restore HSM keys. */\n RestoreHsmKeys = \"Microsoft.KeyVault/managedHsm/keys/restore/action\",\n /** Delete role assignment. */\n DeleteRoleAssignment = \"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\",\n /** Get role assignment. */\n GetRoleAssignment = \"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\n /** Create or update role assignment. */\n WriteRoleAssignment = \"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\n /** Get role definition. */\n ReadRoleDefinition = \"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\n /** Create or update role definition. */\n WriteRoleDefinition = \"Microsoft.KeyVault/managedHsm/roleDefinitions/write/action\",\n /** Delete role definition. */\n DeleteRoleDefinition = \"Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action\",\n /** Encrypt using an HSM key. */\n EncryptHsmKey = \"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\n /** Decrypt using an HSM key. */\n DecryptHsmKey = \"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\n /** Wrap using an HSM key. */\n WrapHsmKey = \"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\n /** Unwrap using an HSM key. */\n UnwrapHsmKey = \"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\n /** Sign using an HSM key. */\n SignHsmKey = \"Microsoft.KeyVault/managedHsm/keys/sign/action\",\n /** Verify using an HSM key. */\n VerifyHsmKey = \"Microsoft.KeyVault/managedHsm/keys/verify/action\",\n /** Create an HSM key. */\n CreateHsmKey = \"Microsoft.KeyVault/managedHsm/keys/create\",\n /** Delete an HSM key. */\n DeleteHsmKey = \"Microsoft.KeyVault/managedHsm/keys/delete\",\n /** Export an HSM key. */\n ExportHsmKey = \"Microsoft.KeyVault/managedHsm/keys/export/action\",\n /** Release an HSM key using Secure Key Release. */\n ReleaseKey = \"Microsoft.KeyVault/managedHsm/keys/release/action\",\n /** Import an HSM key. */\n ImportHsmKey = \"Microsoft.KeyVault/managedHsm/keys/import/action\",\n /** Purge a deleted HSM key. */\n PurgeDeletedHsmKey = \"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\",\n /** Download an HSM security domain. */\n DownloadHsmSecurityDomain = \"Microsoft.KeyVault/managedHsm/securitydomain/download/action\",\n /** Check status of HSM security domain download. */\n DownloadHsmSecurityDomainStatus = \"Microsoft.KeyVault/managedHsm/securitydomain/download/read\",\n /** Upload an HSM security domain. */\n UploadHsmSecurityDomain = \"Microsoft.KeyVault/managedHsm/securitydomain/upload/action\",\n /** Check the status of the HSM security domain exchange file. */\n ReadHsmSecurityDomainStatus = \"Microsoft.KeyVault/managedHsm/securitydomain/upload/read\",\n /** Download an HSM security domain transfer key. */\n ReadHsmSecurityDomainTransferKey = \"Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read\",\n /** Start an HSM backup. */\n StartHsmBackup = \"Microsoft.KeyVault/managedHsm/backup/start/action\",\n /** Start an HSM restore. */\n StartHsmRestore = \"Microsoft.KeyVault/managedHsm/restore/start/action\",\n /** Read an HSM backup status. */\n ReadHsmBackupStatus = \"Microsoft.KeyVault/managedHsm/backup/status/action\",\n /** Read an HSM restore status. */\n ReadHsmRestoreStatus = \"Microsoft.KeyVault/managedHsm/restore/status/action\",\n /** Generate random numbers. */\n RandomNumbersGenerate = \"Microsoft.KeyVault/managedHsm/rng/action\"\n}\n\n/**\n * Defines values for DataAction. \\\n * {@link KnownDataAction} can be used interchangeably with DataAction,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/read\\/action**: Read HSM key metadata. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/write\\/action**: Update an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/deletedKeys\\/read\\/action**: Read deleted HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/deletedKeys\\/recover\\/action**: Recover deleted HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/backup\\/action**: Backup HSM keys. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/restore\\/action**: Restore HSM keys. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleAssignments\\/delete\\/action**: Delete role assignment. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleAssignments\\/read\\/action**: Get role assignment. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleAssignments\\/write\\/action**: Create or update role assignment. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleDefinitions\\/read\\/action**: Get role definition. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleDefinitions\\/write\\/action**: Create or update role definition. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleDefinitions\\/delete\\/action**: Delete role definition. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/encrypt\\/action**: Encrypt using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/decrypt\\/action**: Decrypt using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/wrap\\/action**: Wrap using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/unwrap\\/action**: Unwrap using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/sign\\/action**: Sign using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/verify\\/action**: Verify using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/create**: Create an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/delete**: Delete an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/export\\/action**: Export an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/release\\/action**: Release an HSM key using Secure Key Release. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/import\\/action**: Import an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/deletedKeys\\/delete**: Purge a deleted HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/download\\/action**: Download an HSM security domain. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/download\\/read**: Check status of HSM security domain download. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/upload\\/action**: Upload an HSM security domain. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/upload\\/read**: Check the status of the HSM security domain exchange file. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/transferkey\\/read**: Download an HSM security domain transfer key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/backup\\/start\\/action**: Start an HSM backup. \\\n * **Microsoft.KeyVault\\/managedHsm\\/restore\\/start\\/action**: Start an HSM restore. \\\n * **Microsoft.KeyVault\\/managedHsm\\/backup\\/status\\/action**: Read an HSM backup status. \\\n * **Microsoft.KeyVault\\/managedHsm\\/restore\\/status\\/action**: Read an HSM restore status. \\\n * **Microsoft.KeyVault\\/managedHsm\\/rng\\/action**: Generate random numbers.\n */\nexport type DataAction = string;\n\n/** Known values of {@link RoleScope} that the service accepts. */\nexport enum KnownRoleScope {\n /** Global scope */\n Global = \"/\",\n /** Keys scope */\n Keys = \"/keys\"\n}\n\n/**\n * Defines values for RoleScope. \\\n * {@link KnownRoleScope} can be used interchangeably with RoleScope,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **\\/**: Global scope \\\n * **\\/keys**: Keys scope\n */\nexport type RoleScope = string;\n\n/** Known values of {@link RoleDefinitionType} that the service accepts. */\nexport enum KnownRoleDefinitionType {\n MicrosoftAuthorizationRoleDefinitions = \"Microsoft.Authorization/roleDefinitions\"\n}\n\n/**\n * Defines values for RoleDefinitionType. \\\n * {@link KnownRoleDefinitionType} can be used interchangeably with RoleDefinitionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Microsoft.Authorization\\/roleDefinitions**\n */\nexport type RoleDefinitionType = string;\n\n/** Known values of {@link SettingTypeEnum} that the service accepts. */\nexport enum KnownSettingTypeEnum {\n Boolean = \"boolean\"\n}\n\n/**\n * Defines values for SettingTypeEnum. \\\n * {@link KnownSettingTypeEnum} can be used interchangeably with SettingTypeEnum,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **boolean**\n */\nexport type SettingTypeEnum = string;\n\n/** Optional parameters. */\nexport interface RoleDefinitionsDeleteOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Optional parameters. */\nexport interface RoleDefinitionsCreateOrUpdateOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the createOrUpdate operation. */\nexport type RoleDefinitionsCreateOrUpdateResponse = RoleDefinition;\n\n/** Optional parameters. */\nexport interface RoleDefinitionsGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type RoleDefinitionsGetResponse = RoleDefinition;\n\n/** Optional parameters. */\nexport interface RoleDefinitionsListOptionalParams\n extends coreClient.OperationOptions {\n /** The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. */\n filter?: string;\n}\n\n/** Contains response data for the list operation. */\nexport type RoleDefinitionsListResponse = RoleDefinitionListResult;\n\n/** Optional parameters. */\nexport interface RoleDefinitionsListNextOptionalParams\n extends coreClient.OperationOptions {\n /** The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. */\n filter?: string;\n}\n\n/** Contains response data for the listNext operation. */\nexport type RoleDefinitionsListNextResponse = RoleDefinitionListResult;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsDeleteOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Optional parameters. */\nexport interface RoleAssignmentsCreateOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the create operation. */\nexport type RoleAssignmentsCreateResponse = RoleAssignment;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type RoleAssignmentsGetResponse = RoleAssignment;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsListForScopeOptionalParams\n extends coreClient.OperationOptions {\n /** The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. */\n filter?: string;\n}\n\n/** Contains response data for the listForScope operation. */\nexport type RoleAssignmentsListForScopeResponse = RoleAssignmentListResult;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsListForScopeNextOptionalParams\n extends coreClient.OperationOptions {\n /** The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. */\n filter?: string;\n}\n\n/** Contains response data for the listForScopeNext operation. */\nexport type RoleAssignmentsListForScopeNextResponse = RoleAssignmentListResult;\n\n/** Optional parameters. */\nexport interface FullBackupOptionalParams extends coreClient.OperationOptions {\n /** Azure blob shared access signature token pointing to a valid Azure blob container where full backup needs to be stored. This token needs to be valid for at least next 24 hours from the time of making this call */\n azureStorageBlobContainerUri?: SASTokenParameter;\n}\n\n/** Contains response data for the fullBackup operation. */\nexport type FullBackupResponse = KeyVaultClientFullBackupHeaders &\n FullBackupOperation;\n\n/** Optional parameters. */\nexport interface FullBackupStatusOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the fullBackupStatus operation. */\nexport type FullBackupStatusResponse = FullBackupOperation;\n\n/** Optional parameters. */\nexport interface FullRestoreOperationOptionalParams\n extends coreClient.OperationOptions {\n /** The Azure blob SAS token pointing to a folder where the previous successful full backup was stored */\n restoreBlobDetails?: RestoreOperationParameters;\n}\n\n/** Contains response data for the fullRestoreOperation operation. */\nexport type FullRestoreOperationResponse = KeyVaultClientFullRestoreOperationHeaders &\n RestoreOperation;\n\n/** Optional parameters. */\nexport interface RestoreStatusOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the restoreStatus operation. */\nexport type RestoreStatusResponse = RestoreOperation;\n\n/** Optional parameters. */\nexport interface SelectiveKeyRestoreOperationOptionalParams\n extends coreClient.OperationOptions {\n /** The Azure blob SAS token pointing to a folder where the previous successful full backup was stored */\n restoreBlobDetails?: SelectiveKeyRestoreOperationParameters;\n}\n\n/** Contains response data for the selectiveKeyRestoreOperation operation. */\nexport type SelectiveKeyRestoreOperationResponse = KeyVaultClientSelectiveKeyRestoreOperationHeaders &\n SelectiveKeyRestoreOperation;\n\n/** Optional parameters. */\nexport interface UpdateSettingOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the updateSetting operation. */\nexport type UpdateSettingResponse = Setting;\n\n/** Optional parameters. */\nexport interface GetSettingOptionalParams extends coreClient.OperationOptions {}\n\n/** Contains response data for the getSetting operation. */\nexport type GetSettingResponse = Setting;\n\n/** Optional parameters. */\nexport interface GetSettingsOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the getSettings operation. */\nexport type GetSettingsResponse = SettingsListResult;\n\n/** Optional parameters. */\nexport interface KeyVaultClientOptionalParams\n extends coreClient.ServiceClientOptions {\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6RH,qEAAqE;AACrE,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wBAAwB;IACxB,mCAAc,CAAA;AAChB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAWD,iEAAiE;AACjE,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,qBAAqB;IACrB,+CAA8B,CAAA;IAC9B,mBAAmB;IACnB,0CAAyB,CAAA;AAC3B,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAYD,mEAAmE;AACnE,MAAM,CAAN,IAAY,eAqEX;AArED,WAAY,eAAe;IACzB,6BAA6B;IAC7B,gFAA6D,CAAA;IAC7D,yBAAyB;IACzB,kFAA+D,CAAA;IAC/D,4BAA4B;IAC5B,mGAAgF,CAAA;IAChF,+BAA+B;IAC/B,yGAAsF,CAAA;IACtF,uBAAuB;IACvB,qFAAkE,CAAA;IAClE,wBAAwB;IACxB,uFAAoE,CAAA;IACpE,8BAA8B;IAC9B,uGAAoF,CAAA;IACpF,2BAA2B;IAC3B,kGAA+E,CAAA;IAC/E,wCAAwC;IACxC,qGAAkF,CAAA;IAClF,2BAA2B;IAC3B,mGAAgF,CAAA;IAChF,wCAAwC;IACxC,qGAA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AAFD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;AACrB,CAAC,EAFW,oBAAoB,KAApB,oBAAoB,QAE/B","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\n/** The key vault error exception. */\nexport interface KeyVaultError {\n /**\n * The key vault server error.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly error?: ErrorModel;\n}\n\n/** The key vault server error. */\nexport interface ErrorModel {\n /**\n * The error code.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly code?: string;\n /**\n * The error message.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly message?: string;\n /**\n * The key vault server error.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly innerError?: ErrorModel;\n}\n\n/** Role definition create parameters. */\nexport interface RoleDefinitionCreateParameters {\n /** Role definition properties. */\n properties: RoleDefinitionProperties;\n}\n\n/** Role definition properties. */\nexport interface RoleDefinitionProperties {\n /** The role name. */\n roleName?: string;\n /** The role definition description. */\n description?: string;\n /** The role type. */\n roleType?: RoleType;\n /** Role definition permissions. */\n permissions?: Permission[];\n /** Role definition assignable scopes. */\n assignableScopes?: RoleScope[];\n}\n\n/** Role definition permissions. */\nexport interface Permission {\n /** Action permissions that are granted. */\n actions?: string[];\n /** Action permissions that are excluded but not denied. They may be granted by other role definitions assigned to a principal. */\n notActions?: string[];\n /** Data action permissions that are granted. */\n dataActions?: DataAction[];\n /** Data action permissions that are excluded but not denied. They may be granted by other role definitions assigned to a principal. */\n notDataActions?: DataAction[];\n}\n\n/** Role definition. */\nexport interface RoleDefinition {\n /**\n * The role definition ID.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly id?: string;\n /**\n * The role definition name.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly name?: string;\n /**\n * The role definition type.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly type?: RoleDefinitionType;\n /** The role name. */\n roleName?: string;\n /** The role definition description. */\n description?: string;\n /** The role type. */\n roleType?: RoleType;\n /** Role definition permissions. */\n permissions?: Permission[];\n /** Role definition assignable scopes. */\n assignableScopes?: RoleScope[];\n}\n\n/** Role definition list operation result. */\nexport interface RoleDefinitionListResult {\n /** Role definition list. */\n value?: RoleDefinition[];\n /** The URL to use for getting the next set of results. */\n nextLink?: string;\n}\n\n/** Role assignment create parameters. */\nexport interface RoleAssignmentCreateParameters {\n /** Role assignment properties. */\n properties: RoleAssignmentProperties;\n}\n\n/** Role assignment properties. */\nexport interface RoleAssignmentProperties {\n /** The role definition ID used in the role assignment. */\n roleDefinitionId: string;\n /** The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group. */\n principalId: string;\n}\n\n/** Role Assignments */\nexport interface RoleAssignment {\n /**\n * The role assignment ID.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly id?: string;\n /**\n * The role assignment name.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly name?: string;\n /**\n * The role assignment type.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly type?: string;\n /** Role assignment properties. */\n properties?: RoleAssignmentPropertiesWithScope;\n}\n\n/** Role assignment properties with scope. */\nexport interface RoleAssignmentPropertiesWithScope {\n /** The role scope. */\n scope?: RoleScope;\n /** The role definition ID. */\n roleDefinitionId?: string;\n /** The principal ID. */\n principalId?: string;\n}\n\n/** Role assignment list operation result. */\nexport interface RoleAssignmentListResult {\n /** Role assignment list. */\n value?: RoleAssignment[];\n /** The URL to use for getting the next set of results. */\n nextLink?: string;\n}\n\nexport interface SASTokenParameter {\n /** Azure Blob storage container Uri */\n storageResourceUri: string;\n /** The SAS token pointing to an Azure Blob storage container */\n token?: string;\n /** Indicates which authentication method should be used. If set to true, Managed HSM will use the configured user-assigned managed identity to authenticate with Azure Storage. Otherwise, a SAS token has to be specified. */\n useManagedIdentity?: boolean;\n}\n\n/** Full backup operation */\nexport interface FullBackupOperation {\n /** Status of the backup operation. */\n status?: string;\n /** The status details of backup operation. */\n statusDetails?: string;\n /** Error encountered, if any, during the full backup operation. */\n error?: ErrorModel;\n /** The start time of the backup operation in UTC */\n startTime?: Date;\n /** The end time of the backup operation in UTC */\n endTime?: Date;\n /** Identifier for the full backup operation. */\n jobId?: string;\n /** The Azure blob storage container Uri which contains the full backup */\n azureStorageBlobContainerUri?: string;\n}\n\nexport interface RestoreOperationParameters {\n sasTokenParameters: SASTokenParameter;\n /** The Folder name of the blob where the previous successful full backup was stored */\n folderToRestore: string;\n}\n\n/** Restore operation */\nexport interface RestoreOperation {\n /** Status of the restore operation. */\n status?: string;\n /** The status details of restore operation. */\n statusDetails?: string;\n /** Error encountered, if any, during the restore operation. */\n error?: ErrorModel;\n /** Identifier for the restore operation. */\n jobId?: string;\n /** The start time of the restore operation */\n startTime?: Date;\n /** The end time of the restore operation */\n endTime?: Date;\n}\n\nexport interface SelectiveKeyRestoreOperationParameters {\n sasTokenParameters: SASTokenParameter;\n /** The Folder name of the blob where the previous successful full backup was stored */\n folder: string;\n}\n\n/** Selective Key Restore operation */\nexport interface SelectiveKeyRestoreOperation {\n /** Status of the restore operation. */\n status?: string;\n /** The status details of restore operation. */\n statusDetails?: string;\n /** Error encountered, if any, during the selective key restore operation. */\n error?: ErrorModel;\n /** Identifier for the selective key restore operation. */\n jobId?: string;\n /** The start time of the restore operation */\n startTime?: Date;\n /** The end time of the restore operation */\n endTime?: Date;\n}\n\n/** The update settings request object. */\nexport interface UpdateSettingRequest {\n /** The value of the pool setting. */\n value: string;\n}\n\nexport interface Setting {\n /** The account setting to be updated */\n name: string;\n /** The value of the pool setting. */\n value: string;\n /** The type specifier of the value. */\n type?: SettingTypeEnum;\n}\n\n/** The settings list result. */\nexport interface SettingsListResult {\n /**\n * A response message containing a list of account settings with their associated value.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly settings?: Setting[];\n}\n\n/** Role Assignments filter */\nexport interface RoleAssignmentFilter {\n /** Returns role assignment of the specific principal. */\n principalId?: string;\n}\n\n/** Role Definitions filter */\nexport interface RoleDefinitionFilter {\n /** Returns role definition with the specific name. */\n roleName?: string;\n}\n\n/** Defines headers for KeyVaultClient_fullBackup operation. */\nexport interface KeyVaultClientFullBackupHeaders {\n /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */\n retryAfter?: number;\n /** The URI to poll for completion status. */\n azureAsyncOperation?: string;\n}\n\n/** Defines headers for KeyVaultClient_fullRestoreOperation operation. */\nexport interface KeyVaultClientFullRestoreOperationHeaders {\n /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */\n retryAfter?: number;\n /** The URI to poll for completion status. */\n azureAsyncOperation?: string;\n}\n\n/** Defines headers for KeyVaultClient_selectiveKeyRestoreOperation operation. */\nexport interface KeyVaultClientSelectiveKeyRestoreOperationHeaders {\n /** The recommended number of seconds to wait before calling the URI specified in Azure-AsyncOperation. */\n retryAfter?: number;\n /** The URI to poll for completion status. */\n azureAsyncOperation?: string;\n}\n\n/** Known values of {@link ApiVersion75} that the service accepts. */\nexport enum KnownApiVersion75 {\n /** Api Version '7.5' */\n Seven5 = \"7.5\"\n}\n\n/**\n * Defines values for ApiVersion75. \\\n * {@link KnownApiVersion75} can be used interchangeably with ApiVersion75,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **7.5**: Api Version '7.5'\n */\nexport type ApiVersion75 = string;\n\n/** Known values of {@link RoleType} that the service accepts. */\nexport enum KnownRoleType {\n /** Built in role. */\n BuiltInRole = \"AKVBuiltInRole\",\n /** Custom role. */\n CustomRole = \"CustomRole\"\n}\n\n/**\n * Defines values for RoleType. \\\n * {@link KnownRoleType} can be used interchangeably with RoleType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **AKVBuiltInRole**: Built in role. \\\n * **CustomRole**: Custom role.\n */\nexport type RoleType = string;\n\n/** Known values of {@link DataAction} that the service accepts. */\nexport enum KnownDataAction {\n /** Read HSM key metadata. */\n ReadHsmKey = \"Microsoft.KeyVault/managedHsm/keys/read/action\",\n /** Update an HSM key. */\n WriteHsmKey = \"Microsoft.KeyVault/managedHsm/keys/write/action\",\n /** Read deleted HSM key. */\n ReadDeletedHsmKey = \"Microsoft.KeyVault/managedHsm/keys/deletedKeys/read/action\",\n /** Recover deleted HSM key. */\n RecoverDeletedHsmKey = \"Microsoft.KeyVault/managedHsm/keys/deletedKeys/recover/action\",\n /** Backup HSM keys. */\n BackupHsmKeys = \"Microsoft.KeyVault/managedHsm/keys/backup/action\",\n /** Restore HSM keys. */\n RestoreHsmKeys = \"Microsoft.KeyVault/managedHsm/keys/restore/action\",\n /** Delete role assignment. */\n DeleteRoleAssignment = \"Microsoft.KeyVault/managedHsm/roleAssignments/delete/action\",\n /** Get role assignment. */\n GetRoleAssignment = \"Microsoft.KeyVault/managedHsm/roleAssignments/read/action\",\n /** Create or update role assignment. */\n WriteRoleAssignment = \"Microsoft.KeyVault/managedHsm/roleAssignments/write/action\",\n /** Get role definition. */\n ReadRoleDefinition = \"Microsoft.KeyVault/managedHsm/roleDefinitions/read/action\",\n /** Create or update role definition. */\n WriteRoleDefinition = \"Microsoft.KeyVault/managedHsm/roleDefinitions/write/action\",\n /** Delete role definition. */\n DeleteRoleDefinition = \"Microsoft.KeyVault/managedHsm/roleDefinitions/delete/action\",\n /** Encrypt using an HSM key. */\n EncryptHsmKey = \"Microsoft.KeyVault/managedHsm/keys/encrypt/action\",\n /** Decrypt using an HSM key. */\n DecryptHsmKey = \"Microsoft.KeyVault/managedHsm/keys/decrypt/action\",\n /** Wrap using an HSM key. */\n WrapHsmKey = \"Microsoft.KeyVault/managedHsm/keys/wrap/action\",\n /** Unwrap using an HSM key. */\n UnwrapHsmKey = \"Microsoft.KeyVault/managedHsm/keys/unwrap/action\",\n /** Sign using an HSM key. */\n SignHsmKey = \"Microsoft.KeyVault/managedHsm/keys/sign/action\",\n /** Verify using an HSM key. */\n VerifyHsmKey = \"Microsoft.KeyVault/managedHsm/keys/verify/action\",\n /** Create an HSM key. */\n CreateHsmKey = \"Microsoft.KeyVault/managedHsm/keys/create\",\n /** Delete an HSM key. */\n DeleteHsmKey = \"Microsoft.KeyVault/managedHsm/keys/delete\",\n /** Export an HSM key. */\n ExportHsmKey = \"Microsoft.KeyVault/managedHsm/keys/export/action\",\n /** Release an HSM key using Secure Key Release. */\n ReleaseKey = \"Microsoft.KeyVault/managedHsm/keys/release/action\",\n /** Import an HSM key. */\n ImportHsmKey = \"Microsoft.KeyVault/managedHsm/keys/import/action\",\n /** Purge a deleted HSM key. */\n PurgeDeletedHsmKey = \"Microsoft.KeyVault/managedHsm/keys/deletedKeys/delete\",\n /** Download an HSM security domain. */\n DownloadHsmSecurityDomain = \"Microsoft.KeyVault/managedHsm/securitydomain/download/action\",\n /** Check status of HSM security domain download. */\n DownloadHsmSecurityDomainStatus = \"Microsoft.KeyVault/managedHsm/securitydomain/download/read\",\n /** Upload an HSM security domain. */\n UploadHsmSecurityDomain = \"Microsoft.KeyVault/managedHsm/securitydomain/upload/action\",\n /** Check the status of the HSM security domain exchange file. */\n ReadHsmSecurityDomainStatus = \"Microsoft.KeyVault/managedHsm/securitydomain/upload/read\",\n /** Download an HSM security domain transfer key. */\n ReadHsmSecurityDomainTransferKey = \"Microsoft.KeyVault/managedHsm/securitydomain/transferkey/read\",\n /** Start an HSM backup. */\n StartHsmBackup = \"Microsoft.KeyVault/managedHsm/backup/start/action\",\n /** Start an HSM restore. */\n StartHsmRestore = \"Microsoft.KeyVault/managedHsm/restore/start/action\",\n /** Read an HSM backup status. */\n ReadHsmBackupStatus = \"Microsoft.KeyVault/managedHsm/backup/status/action\",\n /** Read an HSM restore status. */\n ReadHsmRestoreStatus = \"Microsoft.KeyVault/managedHsm/restore/status/action\",\n /** Generate random numbers. */\n RandomNumbersGenerate = \"Microsoft.KeyVault/managedHsm/rng/action\"\n}\n\n/**\n * Defines values for DataAction. \\\n * {@link KnownDataAction} can be used interchangeably with DataAction,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/read\\/action**: Read HSM key metadata. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/write\\/action**: Update an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/deletedKeys\\/read\\/action**: Read deleted HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/deletedKeys\\/recover\\/action**: Recover deleted HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/backup\\/action**: Backup HSM keys. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/restore\\/action**: Restore HSM keys. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleAssignments\\/delete\\/action**: Delete role assignment. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleAssignments\\/read\\/action**: Get role assignment. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleAssignments\\/write\\/action**: Create or update role assignment. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleDefinitions\\/read\\/action**: Get role definition. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleDefinitions\\/write\\/action**: Create or update role definition. \\\n * **Microsoft.KeyVault\\/managedHsm\\/roleDefinitions\\/delete\\/action**: Delete role definition. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/encrypt\\/action**: Encrypt using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/decrypt\\/action**: Decrypt using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/wrap\\/action**: Wrap using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/unwrap\\/action**: Unwrap using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/sign\\/action**: Sign using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/verify\\/action**: Verify using an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/create**: Create an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/delete**: Delete an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/export\\/action**: Export an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/release\\/action**: Release an HSM key using Secure Key Release. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/import\\/action**: Import an HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/keys\\/deletedKeys\\/delete**: Purge a deleted HSM key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/download\\/action**: Download an HSM security domain. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/download\\/read**: Check status of HSM security domain download. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/upload\\/action**: Upload an HSM security domain. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/upload\\/read**: Check the status of the HSM security domain exchange file. \\\n * **Microsoft.KeyVault\\/managedHsm\\/securitydomain\\/transferkey\\/read**: Download an HSM security domain transfer key. \\\n * **Microsoft.KeyVault\\/managedHsm\\/backup\\/start\\/action**: Start an HSM backup. \\\n * **Microsoft.KeyVault\\/managedHsm\\/restore\\/start\\/action**: Start an HSM restore. \\\n * **Microsoft.KeyVault\\/managedHsm\\/backup\\/status\\/action**: Read an HSM backup status. \\\n * **Microsoft.KeyVault\\/managedHsm\\/restore\\/status\\/action**: Read an HSM restore status. \\\n * **Microsoft.KeyVault\\/managedHsm\\/rng\\/action**: Generate random numbers.\n */\nexport type DataAction = string;\n\n/** Known values of {@link RoleScope} that the service accepts. */\nexport enum KnownRoleScope {\n /** Global scope */\n Global = \"/\",\n /** Keys scope */\n Keys = \"/keys\"\n}\n\n/**\n * Defines values for RoleScope. \\\n * {@link KnownRoleScope} can be used interchangeably with RoleScope,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **\\/**: Global scope \\\n * **\\/keys**: Keys scope\n */\nexport type RoleScope = string;\n\n/** Known values of {@link RoleDefinitionType} that the service accepts. */\nexport enum KnownRoleDefinitionType {\n MicrosoftAuthorizationRoleDefinitions = \"Microsoft.Authorization/roleDefinitions\"\n}\n\n/**\n * Defines values for RoleDefinitionType. \\\n * {@link KnownRoleDefinitionType} can be used interchangeably with RoleDefinitionType,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **Microsoft.Authorization\\/roleDefinitions**\n */\nexport type RoleDefinitionType = string;\n\n/** Known values of {@link SettingTypeEnum} that the service accepts. */\nexport enum KnownSettingTypeEnum {\n Boolean = \"boolean\"\n}\n\n/**\n * Defines values for SettingTypeEnum. \\\n * {@link KnownSettingTypeEnum} can be used interchangeably with SettingTypeEnum,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **boolean**\n */\nexport type SettingTypeEnum = string;\n\n/** Optional parameters. */\nexport interface RoleDefinitionsDeleteOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Optional parameters. */\nexport interface RoleDefinitionsCreateOrUpdateOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the createOrUpdate operation. */\nexport type RoleDefinitionsCreateOrUpdateResponse = RoleDefinition;\n\n/** Optional parameters. */\nexport interface RoleDefinitionsGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type RoleDefinitionsGetResponse = RoleDefinition;\n\n/** Optional parameters. */\nexport interface RoleDefinitionsListOptionalParams\n extends coreClient.OperationOptions {\n /** The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. */\n filter?: string;\n}\n\n/** Contains response data for the list operation. */\nexport type RoleDefinitionsListResponse = RoleDefinitionListResult;\n\n/** Optional parameters. */\nexport interface RoleDefinitionsListNextOptionalParams\n extends coreClient.OperationOptions {\n /** The filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as well. */\n filter?: string;\n}\n\n/** Contains response data for the listNext operation. */\nexport type RoleDefinitionsListNextResponse = RoleDefinitionListResult;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsDeleteOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Optional parameters. */\nexport interface RoleAssignmentsCreateOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the create operation. */\nexport type RoleAssignmentsCreateResponse = RoleAssignment;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsGetOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the get operation. */\nexport type RoleAssignmentsGetResponse = RoleAssignment;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsListForScopeOptionalParams\n extends coreClient.OperationOptions {\n /** The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. */\n filter?: string;\n}\n\n/** Contains response data for the listForScope operation. */\nexport type RoleAssignmentsListForScopeResponse = RoleAssignmentListResult;\n\n/** Optional parameters. */\nexport interface RoleAssignmentsListForScopeNextOptionalParams\n extends coreClient.OperationOptions {\n /** The filter to apply on the operation. Use $filter=atScope() to return all role assignments at or above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope for the specified principal. */\n filter?: string;\n}\n\n/** Contains response data for the listForScopeNext operation. */\nexport type RoleAssignmentsListForScopeNextResponse = RoleAssignmentListResult;\n\n/** Optional parameters. */\nexport interface FullBackupOptionalParams extends coreClient.OperationOptions {\n /** Azure blob shared access signature token pointing to a valid Azure blob container where full backup needs to be stored. This token needs to be valid for at least next 24 hours from the time of making this call */\n azureStorageBlobContainerUri?: SASTokenParameter;\n}\n\n/** Contains response data for the fullBackup operation. */\nexport type FullBackupResponse = KeyVaultClientFullBackupHeaders &\n FullBackupOperation;\n\n/** Optional parameters. */\nexport interface FullBackupStatusOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the fullBackupStatus operation. */\nexport type FullBackupStatusResponse = FullBackupOperation;\n\n/** Optional parameters. */\nexport interface FullRestoreOperationOptionalParams\n extends coreClient.OperationOptions {\n /** The Azure blob SAS token pointing to a folder where the previous successful full backup was stored */\n restoreBlobDetails?: RestoreOperationParameters;\n}\n\n/** Contains response data for the fullRestoreOperation operation. */\nexport type FullRestoreOperationResponse = KeyVaultClientFullRestoreOperationHeaders &\n RestoreOperation;\n\n/** Optional parameters. */\nexport interface RestoreStatusOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the restoreStatus operation. */\nexport type RestoreStatusResponse = RestoreOperation;\n\n/** Optional parameters. */\nexport interface SelectiveKeyRestoreOperationOptionalParams\n extends coreClient.OperationOptions {\n /** The Azure blob SAS token pointing to a folder where the previous successful full backup was stored */\n restoreBlobDetails?: SelectiveKeyRestoreOperationParameters;\n}\n\n/** Contains response data for the selectiveKeyRestoreOperation operation. */\nexport type SelectiveKeyRestoreOperationResponse = KeyVaultClientSelectiveKeyRestoreOperationHeaders &\n SelectiveKeyRestoreOperation;\n\n/** Optional parameters. */\nexport interface UpdateSettingOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the updateSetting operation. */\nexport type UpdateSettingResponse = Setting;\n\n/** Optional parameters. */\nexport interface GetSettingOptionalParams extends coreClient.OperationOptions {}\n\n/** Contains response data for the getSetting operation. */\nexport type GetSettingResponse = Setting;\n\n/** Optional parameters. */\nexport interface GetSettingsOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the getSettings operation. */\nexport type GetSettingsResponse = SettingsListResult;\n\n/** Optional parameters. */\nexport interface KeyVaultClientOptionalParams\n extends coreClient.ServiceClientOptions {\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/backup/operation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EACL,0BAA0B,GAE3B,MAAM,wBAAwB,CAAC;AAIhC,OAAO,EAAE,aA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I,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,KAAI,aAAa,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,KAAK,CAAC,MAAM,GAAG;gBACb,SAAS,EAAE,4BAA4B;gBACvC,SAAS;gBACT,OAAO;aACR,CAAC;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n FullBackupOperation,\n FullBackupOptionalParams,\n FullBackupResponse,\n FullBackupStatusResponse,\n} from \"../../generated/models\";\nimport {\n KeyVaultAdminPollOperation,\n KeyVaultAdminPollOperationState,\n} from \"../keyVaultAdminPoller\";\nimport { KeyVaultBackupResult, KeyVaultBeginBackupOptions } from \"../../backupClientModels\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { KeyVaultClient } from \"../../generated/keyVaultClient\";\nimport { tracingClient } from \"../../tracing\";\n\n/**\n * An interface representing the publicly available properties of the state of a backup Key Vault's poll operation.\n */\nexport type KeyVaultBackupOperationState = KeyVaultAdminPollOperationState<KeyVaultBackupResult>;\n\n/**\n * An internal interface representing the state of a backup Key Vault's poll operation.\n */\nexport interface KeyVaultBackupPollOperationState\n extends KeyVaultAdminPollOperationState<KeyVaultBackupResult> {\n /**\n * The URI of the blob storage account.\n */\n blobStorageUri: string;\n /**\n * The SAS token.\n */\n sasToken?: string;\n}\n\n/**\n * The backup Key Vault's poll operation.\n */\nexport class KeyVaultBackupPollOperation extends KeyVaultAdminPollOperation<\n KeyVaultBackupPollOperationState,\n string\n> {\n constructor(\n public state: KeyVaultBackupPollOperationState,\n private vaultUrl: string,\n private client: KeyVaultClient,\n private requestOptions: KeyVaultBeginBackupOptions = {},\n ) {\n super(state, { cancelMessage: \"Cancelling a full Key Vault backup is not supported.\" });\n }\n\n /**\n * Tracing the fullBackup operation\n */\n private fullBackup(options: FullBackupOptionalParams): Promise<FullBackupResponse> {\n return tracingClient.withSpan(\"KeyVaultBackupPoller.fullBackup\", options, (updatedOptions) =>\n this.client.fullBackup(this.vaultUrl, updatedOptions),\n );\n }\n\n /**\n * Tracing the fullBackupStatus operation\n */\n private fullBackupStatus(\n jobId: string,\n options: KeyVaultBeginBackupOptions,\n ): Promise<FullBackupStatusResponse> {\n return tracingClient.withSpan(\n \"KeyVaultBackupPoller.fullBackupStatus\",\n options,\n (updatedOptions) => this.client.fullBackupStatus(this.vaultUrl, jobId, updatedOptions),\n );\n }\n\n /**\n * Reaches to the service and updates the backup's poll operation.\n */\n async update(\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: KeyVaultBackupPollOperationState) => void;\n } = {},\n ): Promise<KeyVaultBackupPollOperation> {\n const state = this.state;\n const { blobStorageUri, sasToken } = state;\n\n if (options.abortSignal) {\n this.requestOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n const serviceOperation = await this.fullBackup({\n ...this.requestOptions,\n azureStorageBlobContainerUri: {\n storageResourceUri: blobStorageUri!,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n });\n\n this.mapState(serviceOperation);\n } else if (!state.isCompleted) {\n if (!state.jobId) {\n throw new Error(`Missing \"jobId\" from the full backup operation.`);\n }\n const serviceOperation = await this.fullBackupStatus(state.jobId, this.requestOptions);\n this.mapState(serviceOperation);\n }\n\n return this;\n }\n\n private mapState(serviceOperation: FullBackupOperation): void {\n const state = this.state;\n const {\n startTime,\n jobId,\n azureStorageBlobContainerUri,\n endTime,\n error,\n status,\n statusDetails,\n } = serviceOperation;\n if (!startTime) {\n throw new Error(\n `Missing \"startTime\" from the full backup operation. Full backup did not start successfully.`,\n );\n }\n\n state.isStarted = true;\n state.jobId = jobId;\n state.endTime = endTime;\n state.startTime = startTime;\n state.status = status;\n state.statusDetails = statusDetails;\n state.isCompleted = !!endTime;\n\n if (state.isCompleted && error?.code) {\n throw new Error(error?.message || statusDetails);\n }\n\n if (state.isCompleted) {\n state.result = {\n folderUri: azureStorageBlobContainerUri,\n startTime,\n endTime,\n };\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/backup/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAA8B,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAEL,2BAA2B,GAE5B,MAAM,aAAa,CAAC;AAQrB;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,mBAGzC;IACC,YAAY,OAAoC;QAC9C,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,cAAc,EACd,YAAY,GAAG,IAAI,EACnB,UAAU,GACX,GAAG,OAAO,CAAC;QAEZ,IAAI,KAAmD,CAAC;QAExD,IAAI,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/backup/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAA8B,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAEL,2BAA2B,GAE5B,MAAM,aAAa,CAAC;AAQrB;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,mBAGzC;IACC,YAAY,OAAoC;QAC9C,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,cAAc,EACd,YAAY,GAAG,IAAI,EACnB,UAAU,GACX,GAAG,OAAO,CAAC;QAEZ,IAAI,KAAmD,CAAC;QAExD,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,2BAA2B,iCAE1C,KAAK,KACR,cAAc;YACd,QAAQ,KAEV,QAAQ,EACR,MAAM,EACN,cAAc,CACf,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyVaultAdminPoller, KeyVaultAdminPollerOptions } from \"../keyVaultAdminPoller\";\nimport {\n KeyVaultBackupOperationState,\n KeyVaultBackupPollOperation,\n KeyVaultBackupPollOperationState,\n} from \"./operation\";\nimport { KeyVaultBackupResult } from \"../../backupClientModels\";\n\nexport interface KeyVaultBackupPollerOptions extends KeyVaultAdminPollerOptions {\n blobStorageUri: string;\n sasToken?: string;\n}\n\n/**\n * Class that creates a poller that waits until the backup of a Key Vault ends up being generated.\n */\nexport class KeyVaultBackupPoller extends KeyVaultAdminPoller<\n KeyVaultBackupOperationState,\n KeyVaultBackupResult\n> {\n constructor(options: KeyVaultBackupPollerOptions) {\n const {\n client,\n vaultUrl,\n blobStorageUri,\n sasToken,\n requestOptions,\n intervalInMs = 2000,\n resumeFrom,\n } = options;\n\n let state: KeyVaultBackupPollOperationState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new KeyVaultBackupPollOperation(\n {\n ...state,\n blobStorageUri,\n sasToken,\n },\n vaultUrl,\n client,\n requestOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyVaultAdminPoller.js","sourceRoot":"","sources":["../../../src/lro/keyVaultAdminPoller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAqC,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAyC5E;;GAEG;AACH,MAAM,UAAU,UAAU,CACxB,KAAa;IAEb,OAAO;QACL,KAAK,EAA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AO;QACtB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,OAAgB,mBAGpB,SAAQ,MAAuB;IAHjC;;QAIE;;WAEG;QACI,iBAAY,GAAW,IAAI,CAAC;IAerC,CAAC;IAbC;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED;;OAEG;IACI,iBAAiB;QACtB,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAW,CAAC;IACpD,CAAC;CACF;AASD;;GAEG;AACH,MAAM,OAAO,0BAA0B;IAOrC,YACS,KAAa,EACpB,OAA0C;QADnC,UAAK,GAAL,KAAK,CAAQ;QAGpB,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAC7C,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,MAAM;QACjB,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,QAAQ;QACb,OAAO,IAAI,CAAC,SAAS,CAAC;YACpB,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC;SAC9B,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PollOperation, PollOperationState, Poller } from \"@azure/core-lro\";\nimport { KeyVaultClient } from \"../generated/keyVaultClient\";\nimport { OperationOptions } from \"@azure/core-client\";\n\n/**\n * Common parameters to a Key Vault Admin Poller.\n */\nexport interface KeyVaultAdminPollerOptions {\n vaultUrl: string;\n client: KeyVaultClient;\n requestOptions?: OperationOptions;\n intervalInMs?: number;\n resumeFrom?: string;\n}\n\n/**\n * An interface representing the state of a Key Vault Admin Poller's operation.\n */\nexport interface KeyVaultAdminPollOperationState<TResult> extends PollOperationState<TResult> {\n /**\n * Identifier for the full restore operation.\n */\n jobId?: string;\n /**\n * Status of the restore operation.\n */\n status?: string;\n /**\n * The status details of restore operation.\n */\n statusDetails?: string;\n /**\n * The start time of the restore operation in UTC\n */\n startTime?: Date;\n /**\n * The end time of the restore operation in UTC\n */\n endTime?: Date;\n}\n\n/**\n * Generates a version of the state with only public properties. At least those common for all of the Key Vault Admin pollers.\n */\nexport function cleanState<TState extends KeyVaultAdminPollOperationState<TResult>, TResult>(\n state: TState,\n): KeyVaultAdminPollOperationState<TResult> {\n return {\n jobId: state.jobId,\n status: state.status,\n statusDetails: state.statusDetails,\n startTime: state.startTime,\n endTime: state.endTime,\n isStarted: state.isStarted,\n isCancelled: state.isCancelled,\n isCompleted: state.isCompleted,\n error: state.error,\n result: state.result,\n };\n}\n\n/**\n * Common properties and methods of the Key Vault Admin Pollers.\n */\nexport abstract class KeyVaultAdminPoller<\n TState extends KeyVaultAdminPollOperationState<TResult>,\n TResult,\n> extends Poller<TState, TResult> {\n /**\n * Defines how much time the poller is going to wait before making a new request to the service.\n */\n public intervalInMs: number = 2000;\n\n /**\n * The method used by the poller to wait before attempting to update its operation.\n */\n async delay(): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, this.intervalInMs));\n }\n\n /**\n * Gets the public state of the polling operation\n */\n public getOperationState(): TState {\n return cleanState(this.operation.state) as TState;\n }\n}\n\n/**\n * Optional parameters to the KeyVaultAdminPollOperation\n */\nexport interface KeyVaultAdminPollOperationOptions {\n cancelMessage: string;\n}\n\n/**\n * Common properties and methods of the Key Vault Admin Poller operations.\n */\nexport class KeyVaultAdminPollOperation<\n TState extends KeyVaultAdminPollOperationState<unknown>,\n TResult,\n> implements PollOperation<TState, TResult>\n{\n private cancelMessage: string;\n\n constructor(\n public state: TState,\n options: KeyVaultAdminPollOperationOptions,\n ) {\n this.cancelMessage = options.cancelMessage;\n }\n\n /**\n * Meant to reach to the service and update the Poller operation.\n */\n public async update(): Promise<PollOperation<TState, TResult>> {\n throw new Error(\"Operation not supported.\");\n }\n\n /**\n * Meant to reach to the service and cancel the Poller operation.\n */\n public async cancel(): Promise<PollOperation<TState, TResult>> {\n throw new Error(this.cancelMessage);\n }\n\n /**\n * Serializes the Poller operation.\n */\n public toString(): string {\n return JSON.stringify({\n state: cleanState(this.state),\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/restore/operation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAQlC,OAAO,EACL,0BAA0B,GAE3B,MAAM,wBAAwB,CAAC;AAMhC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AA4B9C;;GAEG;AACH,MAAM,OAAO,4BAA6B,SAAQ,0BAGjD;IACC,YACS,KAAwC,EACvC,QAAgB,EAChB,MAAsB,EACtB,iBAA8C,EAAE;QAExD,KAAK,CAAC,KAAK,EAAE;YACX,aAAa,EAAE,oEAAoE;SACpF,CAAC,CAAC;QAPI,UAAK,GAAL,KAAK,CAAmC;QACvC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAgB;QACtB,mBAAc,GAAd,cAAc,CAAkC;IAK1D,CAAC;IAED;;OAEG;IACK,WAAW,CACjB,OAA2C;QAE3C,OAAO,aAAa,CAAC,QAAQ,CAAC,mCAAmC,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,EAAE,CAC7F,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,I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C,KAAK,CAAC,KAAK,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;YACpF,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;QAClC,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,QAAQ,CAAC,gBAAkC;QACjD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAC;QAErF,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,0FAA0F,CAC3F,CAAC;QACJ,CAAC;QAED,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;QACvB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;QACpB,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;QACxB,KAAK,CAAC,SAAS,GAAG,SAAS,CAAC;QAC5B,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,KAAK,CAAC,aAAa,GAAG,aAAa,CAAC;QAEpC,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC;QAE9B,IAAI,KAAK,CAAC,WAAW,KAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE,CAAC;YACrC,MAAM,IAAI,KAAK,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,KAAI,aAAa,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,KAAK,CAAC,MAAM,GAAG;gBACb,SAAS;gBACT,OAAO;aACR,CAAC;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n FullRestoreOperationOptionalParams,\n FullRestoreOperationResponse,\n RestoreOperation,\n RestoreStatusResponse,\n} from \"../../generated/models\";\nimport {\n KeyVaultAdminPollOperation,\n KeyVaultAdminPollOperationState,\n} from \"../keyVaultAdminPoller\";\nimport { KeyVaultBeginRestoreOptions, KeyVaultRestoreResult } from \"../../backupClientModels\";\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { KeyVaultClient } from \"../../generated/keyVaultClient\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../../tracing\";\n\n/**\n * An interface representing the publicly available properties of the state of a restore Key Vault's poll operation.\n */\nexport interface KeyVaultRestoreOperationState\n extends KeyVaultAdminPollOperationState<KeyVaultRestoreResult> {}\n\n/**\n * An internal interface representing the state of a restore Key Vault's poll operation.\n * @internal\n */\nexport interface KeyVaultRestorePollOperationState\n extends KeyVaultAdminPollOperationState<KeyVaultRestoreResult> {\n /**\n * The URI of the blob storage account.\n */\n folderUri: string;\n /**\n * The SAS token.\n */\n sasToken?: string;\n /**\n * The Folder name of the blob where the previous successful full backup was stored\n */\n folderName: string;\n}\n\n/**\n * An interface representing a restore Key Vault's poll operation.\n */\nexport class KeyVaultRestorePollOperation extends KeyVaultAdminPollOperation<\n KeyVaultRestorePollOperationState,\n KeyVaultRestoreResult\n> {\n constructor(\n public state: KeyVaultRestorePollOperationState,\n private vaultUrl: string,\n private client: KeyVaultClient,\n private requestOptions: KeyVaultBeginRestoreOptions = {},\n ) {\n super(state, {\n cancelMessage: \"Cancelling the restoration full Key Vault backup is not supported.\",\n });\n }\n\n /**\n * Tracing the fullRestore operation\n */\n private fullRestore(\n options: FullRestoreOperationOptionalParams,\n ): Promise<FullRestoreOperationResponse> {\n return tracingClient.withSpan(\"KeyVaultRestorePoller.fullRestore\", options, (updatedOptions) =>\n this.client.fullRestoreOperation(this.vaultUrl, updatedOptions),\n );\n }\n\n /**\n * Tracing the restoreStatus operation.\n */\n private async restoreStatus(\n jobId: string,\n options: OperationOptions,\n ): Promise<RestoreStatusResponse> {\n return tracingClient.withSpan(\n \"KeyVaultRestorePoller.restoreStatus\",\n options,\n (updatedOptions) => this.client.restoreStatus(this.vaultUrl, jobId, updatedOptions),\n );\n }\n\n /**\n * Reaches to the service and updates the restore poll operation.\n */\n async update(\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: KeyVaultRestorePollOperationState) => void;\n } = {},\n ): Promise<KeyVaultRestorePollOperation> {\n const state = this.state;\n const { folderUri, sasToken, folderName } = state;\n\n if (options.abortSignal) {\n this.requestOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n const serviceOperation = await this.fullRestore({\n ...this.requestOptions,\n restoreBlobDetails: {\n folderToRestore: folderName,\n sasTokenParameters: {\n storageResourceUri: folderUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n },\n });\n\n this.mapState(serviceOperation);\n } else if (!state.isCompleted) {\n if (!state.jobId) {\n throw new Error(`Missing \"jobId\" from the full restore operation.`);\n }\n const serviceOperation = await this.restoreStatus(state.jobId, this.requestOptions);\n this.mapState(serviceOperation);\n }\n\n return this;\n }\n\n private mapState(serviceOperation: RestoreOperation): void {\n const state = this.state;\n const { startTime, jobId, endTime, error, status, statusDetails } = serviceOperation;\n\n if (!startTime) {\n throw new Error(\n `Missing \"startTime\" from the full restore operation. Restore did not start successfully.`,\n );\n }\n\n state.isStarted = true;\n state.jobId = jobId;\n state.endTime = endTime;\n state.startTime = startTime;\n state.status = status;\n state.statusDetails = statusDetails;\n\n state.isCompleted = !!endTime;\n\n if (state.isCompleted && error?.code) {\n throw new Error(error?.message || statusDetails);\n }\n\n if (state.isCompleted) {\n state.result = {\n startTime,\n endTime,\n };\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/restore/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAA8B,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAEL,4BAA4B,GAE7B,MAAM,aAAa,CAAC;AASrB;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,mBAG1C;IACC,YAAY,OAAqC;QAC/C,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,cAAc,EACd,YAAY,GAAG,IAAI,EACnB,UAAU,GACX,GAAG,OAAO,CAAC;QAEZ,IAAI,KAAoD,CAAC;QAEzD,IAAI,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/restore/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAA8B,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAEL,4BAA4B,GAE7B,MAAM,aAAa,CAAC;AASrB;;GAEG;AACH,MAAM,OAAO,qBAAsB,SAAQ,mBAG1C;IACC,YAAY,OAAqC;QAC/C,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,cAAc,EACd,YAAY,GAAG,IAAI,EACnB,UAAU,GACX,GAAG,OAAO,CAAC;QAEZ,IAAI,KAAoD,CAAC;QAEzD,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,4BAA4B,iCAE3C,KAAK,KACR,SAAS;YACT,QAAQ;YACR,UAAU,KAEZ,QAAQ,EACR,MAAM,EACN,cAAc,CACf,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyVaultAdminPoller, KeyVaultAdminPollerOptions } from \"../keyVaultAdminPoller\";\nimport {\n KeyVaultRestoreOperationState,\n KeyVaultRestorePollOperation,\n KeyVaultRestorePollOperationState,\n} from \"./operation\";\nimport { KeyVaultRestoreResult } from \"../../backupClientModels\";\n\nexport interface KeyVaultRestorePollerOptions extends KeyVaultAdminPollerOptions {\n folderUri: string;\n sasToken?: string;\n folderName: string;\n}\n\n/**\n * Class that creates a poller that waits until a Key Vault ends up being restored.\n */\nexport class KeyVaultRestorePoller extends KeyVaultAdminPoller<\n KeyVaultRestoreOperationState,\n KeyVaultRestoreResult\n> {\n constructor(options: KeyVaultRestorePollerOptions) {\n const {\n client,\n vaultUrl,\n folderUri,\n sasToken,\n folderName,\n requestOptions,\n intervalInMs = 2000,\n resumeFrom,\n } = options;\n\n let state: KeyVaultRestorePollOperationState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new KeyVaultRestorePollOperation(\n {\n ...state,\n folderUri,\n sasToken,\n folderName,\n },\n vaultUrl,\n client,\n requestOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInMs;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../src/lro/selectiveKeyRestore/operation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,0BAA0B,GAE3B,MAAM,wBAAwB,CAAC;AAchC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AA+B9C;;GAEG;AACH,MAAM,OAAO,wCAAyC,SAAQ,0BAG7D;IACC,YACS,KAAoD,EACnD,QAAgB,EAChB,MAAsB,EACtB,iBAA0D,EAAE;QAEpE,KAAK,CAAC,KAAK,EAAE,EAAE,aAAa,EAAE,4DAA4D,EAAE,CAAC,CAAC;QALvF,UAAK,GAAL,KAAK,CAA+C;QACnD,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAgB;QACtB,mBAAc,GAAd,cAAc,CAA8C;IAGtE,CAAC;IAED;;OAEG;IACK,gBAAgB,CACtB,OAA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AAM,GAAG;gBACb,SAAS;gBACT,OAAO;aACR,CAAC;QACJ,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n KeyVaultAdminPollOperation,\n KeyVaultAdminPollOperationState,\n} from \"../keyVaultAdminPoller\";\nimport {\n KeyVaultBeginSelectiveKeyRestoreOptions,\n KeyVaultSelectiveKeyRestoreResult,\n} from \"../../backupClientModels\";\nimport {\n RestoreOperation,\n RestoreStatusResponse,\n SelectiveKeyRestoreOperationOptionalParams,\n SelectiveKeyRestoreOperationResponse,\n} from \"../../generated/models\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { KeyVaultClient } from \"../../generated/keyVaultClient\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport { tracingClient } from \"../../tracing\";\n\n/**\n * An interface representing the publicly available properties of the state of a restore Key Vault's poll operation.\n */\nexport interface KeyVaultSelectiveKeyRestoreOperationState\n extends KeyVaultAdminPollOperationState<KeyVaultSelectiveKeyRestoreResult> {}\n\n/**\n * An internal interface representing the state of a restore Key Vault's poll operation.\n */\nexport interface KeyVaultSelectiveKeyRestorePollOperationState\n extends KeyVaultAdminPollOperationState<KeyVaultSelectiveKeyRestoreResult> {\n /**\n * The name of a Key Vault Key.\n */\n keyName: string;\n /**\n * The Folder name of the blob where the previous successful full backup was stored\n */\n folderName: string;\n /**\n * The URI of the blob storage account where the previous successful full backup was stored.\n */\n folderUri: string;\n /**\n * The SAS token.\n */\n sasToken?: string;\n}\n\n/**\n * The selective restore Key Vault's poll operation.\n */\nexport class KeyVaultSelectiveKeyRestorePollOperation extends KeyVaultAdminPollOperation<\n KeyVaultSelectiveKeyRestorePollOperationState,\n string\n> {\n constructor(\n public state: KeyVaultSelectiveKeyRestorePollOperationState,\n private vaultUrl: string,\n private client: KeyVaultClient,\n private requestOptions: KeyVaultBeginSelectiveKeyRestoreOptions = {},\n ) {\n super(state, { cancelMessage: \"Cancelling a selective Key Vault restore is not supported.\" });\n }\n\n /**\n * Tracing the selectiveRestore operation\n */\n private selectiveRestore(\n keyName: string,\n options: SelectiveKeyRestoreOperationOptionalParams,\n ): Promise<SelectiveKeyRestoreOperationResponse> {\n return tracingClient.withSpan(\n \"KeyVaultSelectiveKeyRestorePoller.selectiveRestore\",\n options,\n (updatedOptions) =>\n this.client.selectiveKeyRestoreOperation(this.vaultUrl, keyName, updatedOptions),\n );\n }\n\n /**\n * Tracing the restoreStatus operation.\n */\n private restoreStatus(jobId: string, options: OperationOptions): Promise<RestoreStatusResponse> {\n return tracingClient.withSpan(\n \"KeyVaultSelectiveKeyRestorePoller.restoreStatus\",\n options,\n (updatedOptions) => this.client.restoreStatus(this.vaultUrl, jobId, updatedOptions),\n );\n }\n\n /**\n * Reaches to the service and updates the selective restore poll operation.\n */\n async update(\n options: {\n abortSignal?: AbortSignalLike;\n fireProgress?: (state: KeyVaultSelectiveKeyRestorePollOperationState) => void;\n } = {},\n ): Promise<KeyVaultSelectiveKeyRestorePollOperation> {\n const state = this.state;\n const { keyName, folderUri, sasToken, folderName } = state;\n\n if (options.abortSignal) {\n this.requestOptions.abortSignal = options.abortSignal;\n }\n\n if (!state.isStarted) {\n const selectiveRestoreOperation = await this.selectiveRestore(keyName, {\n ...this.requestOptions,\n restoreBlobDetails: {\n folder: folderName,\n sasTokenParameters: {\n storageResourceUri: folderUri,\n token: sasToken,\n useManagedIdentity: sasToken === undefined,\n },\n },\n });\n this.mapState(selectiveRestoreOperation);\n } else if (!state.isCompleted) {\n if (!state.jobId) {\n throw new Error(`Missing \"jobId\" from the full restore operation.`);\n }\n const serviceOperation = await this.restoreStatus(state.jobId, this.requestOptions);\n this.mapState(serviceOperation);\n }\n\n return this;\n }\n\n private mapState(serviceOperation: RestoreOperation): void {\n const state = this.state;\n const { startTime, jobId, endTime, error, status, statusDetails } = serviceOperation;\n\n if (!startTime) {\n throw new Error(`Missing \"startTime\" from the selective restore operation.`);\n }\n\n state.isStarted = true;\n state.jobId = jobId;\n state.endTime = endTime;\n state.startTime = startTime;\n state.status = status;\n state.statusDetails = statusDetails;\n state.isCompleted = !!endTime;\n\n if (state.isCompleted && error?.code) {\n throw new Error(error?.message || statusDetails);\n }\n\n if (state.isCompleted) {\n state.result = {\n startTime,\n endTime,\n };\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/selectiveKeyRestore/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAA8B,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAEL,wCAAwC,GAEzC,MAAM,aAAa,CAAC;AAUrB;;GAEG;AACH,MAAM,OAAO,iCAAkC,SAAQ,mBAGtD;IACC,YAAY,OAAiD;QAC3D,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,EACR,UAAU,EACV,cAAc,EACd,YAAY,GAAG,IAAI,EACnB,UAAU,GACX,GAAG,OAAO,CAAC;QAEZ,IAAI,KAAgE,CAAC;QAErE,IAAI,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../src/lro/selectiveKeyRestore/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAA8B,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAEL,wCAAwC,GAEzC,MAAM,aAAa,CAAC;AAUrB;;GAEG;AACH,MAAM,OAAO,iCAAkC,SAAQ,mBAGtD;IACC,YAAY,OAAiD;QAC3D,MAAM,EACJ,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,EACR,UAAU,EACV,cAAc,EACd,YAAY,GAAG,IAAI,EACnB,UAAU,GACX,GAAG,OAAO,CAAC;QAEZ,IAAI,KAAgE,CAAC;QAErE,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;QACvC,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,wCAAwC,iCAEvD,KAAK,KACR,OAAO,EACP,SAAS,EAAE,SAAS,EACpB,QAAQ;YACR,UAAU,KAEZ,QAAQ,EACR,MAAM,EACN,cAAc,CACf,CAAC;QAEF,KAAK,CAAC,SAAS,CAAC,CAAC;QAEjB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { KeyVaultAdminPoller, KeyVaultAdminPollerOptions } from \"../keyVaultAdminPoller\";\nimport {\n KeyVaultSelectiveKeyRestoreOperationState,\n KeyVaultSelectiveKeyRestorePollOperation,\n KeyVaultSelectiveKeyRestorePollOperationState,\n} from \"./operation\";\nimport { KeyVaultSelectiveKeyRestoreResult } from \"../../backupClientModels\";\n\nexport interface KeyVaultSelectiveKeyRestorePollerOptions extends KeyVaultAdminPollerOptions {\n keyName: string;\n folderUri: string;\n sasToken?: string;\n folderName: string;\n}\n\n/**\n * Class that creates a poller that waits until a key of a Key Vault backup ends up being restored.\n */\nexport class KeyVaultSelectiveKeyRestorePoller extends KeyVaultAdminPoller<\n KeyVaultSelectiveKeyRestoreOperationState,\n KeyVaultSelectiveKeyRestoreResult\n> {\n constructor(options: KeyVaultSelectiveKeyRestorePollerOptions) {\n const {\n client,\n vaultUrl,\n keyName,\n folderUri,\n sasToken,\n folderName,\n requestOptions,\n intervalInMs = 2000,\n resumeFrom,\n } = options;\n\n let state: KeyVaultSelectiveKeyRestorePollOperationState | undefined;\n\n if (resumeFrom) {\n state = JSON.parse(resumeFrom).state;\n }\n\n const operation = new KeyVaultSelectiveKeyRestorePollOperation(\n {\n ...state,\n keyName,\n folderUri: folderUri,\n sasToken,\n folderName,\n },\n vaultUrl,\n client,\n requestOptions,\n );\n\n super(operation);\n\n this.intervalInMs = intervalInM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,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEtC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QAED,OAAO;YACL,UAAU;YACV,SAAS,EAAE,UAAU;SACtB,CAAC;IACJ,CAAC;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n KeyVaultRoleAssignment,\n KeyVaultRoleDefinition,\n KeyVaultRoleScope,\n} from \"./accessControlModels\";\nimport { RoleAssignment, RoleDefinition } from \"./generated/models\";\n\nexport const mappings = {\n roleAssignment: {\n generatedToPublic(roleAssignment: RoleAssignment): KeyVaultRoleAssignment {\n const { id, name, type, properties } = roleAssignment;\n const { scope, roleDefinitionId, principalId } = properties || {};\n return {\n id: id!,\n name: name!,\n kind: type!,\n properties: {\n scope: scope as KeyVaultRoleScope,\n roleDefinitionId: roleDefinitionId!,\n principalId: principalId!,\n },\n };\n },\n },\n roleDefinition: {\n generatedToPublic(roleDefinition: RoleDefinition): KeyVaultRoleDefinition {\n const { id, name, type, roleName, description, roleType, permissions, assignableScopes } =\n roleDefinition;\n return {\n id: id!,\n name: name!,\n kind: type!,\n roleName: roleName!,\n description: description!,\n roleType: roleType!,\n permissions: permissions!,\n assignableScopes: assignableScopes!,\n };\n },\n },\n folderUriParts(folderUri: string): { folderName: string; folderUri: string } {\n const uriParts = folderUri.split(\"/\");\n const folderName = uriParts.pop();\n const storageUri = uriParts.join(\"/\");\n\n if (!folderName) {\n throw new Error(\"The provided folder URI is missing the folder name.\");\n }\n\n return {\n folderName,\n folderUri: storageUri,\n };\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settingsClient.js","sourceRoot":"","sources":["../../src/settingsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2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AC,WAAW,CAAC,UAA+B,EAAE;;QACjD,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC3E,OAAO,EAAE,QAAQ,EAAE,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,GAAG,CAAC,WAAW,CAAC,mCAAI,EAAE,EAAE,CAAC;IACxD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { bearerTokenAuthenticationPolicy } from \"@azure/core-rest-pipeline\";\nimport { createKeyVaultChallengeCallbacks } from \"@azure/keyvault-common\";\nimport { LATEST_API_VERSION } from \"./constants\";\nimport { KeyVaultClient, Setting as GeneratedSetting } from \"./generated\";\nimport { logger } from \"./log\";\nimport {\n UpdateSettingOptions,\n GetSettingOptions,\n ListSettingsOptions,\n ListSettingsResponse,\n KeyVaultSetting,\n SettingsClientOptions,\n BooleanKeyVaultSetting,\n} from \"./settingsClientModels\";\n\nfunction makeSetting(generatedSetting: GeneratedSetting): KeyVaultSetting {\n if (generatedSetting.type === \"boolean\") {\n return {\n kind: \"boolean\",\n name: generatedSetting.name,\n value: generatedSetting.value === \"true\" ? true : false,\n };\n } else {\n return {\n kind: generatedSetting.type,\n name: generatedSetting.name,\n value: generatedSetting.value,\n };\n }\n}\n\n/**\n * Determines whether a given {@link KeyVaultSetting} is a {@link BooleanKeyVaultSetting}, i.e. has a boolean value.\n */\nexport function isBooleanSetting(setting: KeyVaultSetting): setting is BooleanKeyVaultSetting {\n return setting.kind === \"boolean\" && typeof setting.value === \"boolean\";\n}\n\n/**\n * The KeyVaultSettingsClient provides asynchronous methods to create, update, get and list\n * settings for the Azure Key Vault.\n */\nexport class KeyVaultSettingsClient {\n /**\n * The base URL to the vault.\n */\n public readonly vaultUrl: string;\n\n /**\n * A reference to the auto-generated Key Vault HTTP client.\n */\n private readonly client: KeyVaultClient;\n\n /**\n * Creates an instance of the KeyVaultSettingsClient.\n *\n * Example usage:\n * ```ts\n * import { KeyVaultSettingsClient } from \"@azure/keyvault-admin\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * let vaultUrl = `https://<MY KEY VAULT HERE>.vault.azure.net`;\n * let credentials = new DefaultAzureCredential();\n *\n * let client = new KeyVaultSettingsClient(vaultUrl, credentials);\n * ```\n * @param vaultUrl - the URL of the Key Vault. It should have this shape: `https://${your-key-vault-name}.vault.azure.net`. You should validate that this URL references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.\n * @param credential - An object that implements the `TokenCredential` interface used to authenticate requests to the service. Use the \\@azure/identity package to create a credential that suits your needs.\n * @param options - options used to configure Key Vault API requests.\n\n */\n constructor(vaultUrl: string, credential: TokenCredential, options: SettingsClientOptions = {}) {\n this.vaultUrl = vaultUrl;\n\n const apiVersion = options.serviceVersion || LATEST_API_VERSION;\n\n const clientOptions = {\n ...options,\n loggingOptions: {\n logger: logger.info,\n additionalAllowedHeaderNames: [\n \"x-ms-keyvault-region\",\n \"x-ms-keyvault-network-info\",\n \"x-ms-keyvault-service-version\",\n ],\n },\n };\n\n this.client = new KeyVaultClient(apiVersion, clientOptions);\n this.client.pipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: [],\n challengeCallbacks: createKeyVaultChallengeCallbacks(options),\n }),\n );\n }\n\n /**\n * Updates the named account setting.\n *\n * @param setting - the setting to update. The name of the setting must be a valid settings option.\n * @param options - the optional parameters.\n */\n async updateSetting(\n setting: KeyVaultSetting,\n options: UpdateSettingOptions = {},\n ): Promise<KeyVaultSetting> {\n return makeSetting(\n await this.client.updateSetting(this.vaultUrl, setting.name, String(setting.value), options),\n );\n }\n\n /**\n * Get the value of a specific account setting.\n *\n * @param settingName - the name of the setting.\n * @param options - the optional parameters.\n */\n async getSetting(settingName: string, options: GetSettingOptions = {}): Promise<KeyVaultSetting> {\n return makeSetting(await this.client.getSetting(this.vaultUrl, settingName, options));\n }\n\n /**\n * List the account's settings.\n *\n * @param options - the optional parameters.\n */\n async getSettings(options: ListSettingsOptions = {}): Promise<ListSettingsResponse> {\n const { settings } = await this.client.getSettings(this.vaultUrl, options);\n return { settings: settings?.map(makeSetting) ?? [] };\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@azure/keyvault-admin",
|
|
3
3
|
"sdk-type": "client",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
|
-
"version": "4.5.0
|
|
5
|
+
"version": "4.5.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "Isomorphic client library for Azure KeyVault's administrative functions.",
|
|
8
8
|
"homepage": "https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/keyvault/keyvault-admin/README.md",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"build:test": "tsc -p . && npm run bundle",
|
|
50
50
|
"build": "npm run clean && tsc -p . && npm run build:nodebrowser && api-extractor run --local",
|
|
51
51
|
"bundle": "dev-tool run bundle --browser-test=false",
|
|
52
|
-
"check-format": "prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
52
|
+
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
53
53
|
"clean": "rimraf dist dist-* types *.tgz *.log statistics.html coverage && rimraf src/**/*.js && rimraf test/**/*.js",
|
|
54
54
|
"execute:samples": "dev-tool samples run samples-dev",
|
|
55
55
|
"extract-api": "tsc -p . && api-extractor run --local",
|
|
56
|
-
"format": "prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
56
|
+
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
57
57
|
"generate:client": "autorest --typescript swagger/README.md",
|
|
58
58
|
"integration-test:browser": "echo skipped",
|
|
59
59
|
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 180000 --exclude \"dist-esm/**/*.browser.spec.js\" \"dist-esm/**/*.spec.js\"",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"@azure/core-util": "^1.0.0",
|
|
120
120
|
"@azure/dev-tool": "^1.0.0",
|
|
121
121
|
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
|
122
|
-
"@azure/identity": "^
|
|
122
|
+
"@azure/identity": "^4.0.1",
|
|
123
123
|
"@azure/keyvault-keys": "^4.2.1",
|
|
124
124
|
"@azure/test-utils": "^1.0.0",
|
|
125
125
|
"@azure-tools/test-credential": "^1.0.0",
|
|
@@ -127,19 +127,17 @@
|
|
|
127
127
|
"@microsoft/api-extractor": "^7.31.11",
|
|
128
128
|
"@types/mocha": "^10.0.0",
|
|
129
129
|
"@types/node": "^18.0.0",
|
|
130
|
-
"@types/sinon": "^
|
|
130
|
+
"@types/sinon": "^17.0.0",
|
|
131
131
|
"cross-env": "^7.0.2",
|
|
132
132
|
"dotenv": "^16.0.0",
|
|
133
133
|
"eslint": "^8.0.0",
|
|
134
134
|
"esm": "^3.2.18",
|
|
135
135
|
"mocha": "^10.0.0",
|
|
136
|
-
"mocha-junit-reporter": "^2.0.0",
|
|
137
136
|
"c8": "^8.0.0",
|
|
138
|
-
"prettier": "^2.5.1",
|
|
139
137
|
"rimraf": "^3.0.0",
|
|
140
138
|
"sinon": "^17.0.0",
|
|
141
139
|
"source-map-support": "^0.5.9",
|
|
142
|
-
"typescript": "~5.
|
|
140
|
+
"typescript": "~5.3.3",
|
|
143
141
|
"ts-node": "^10.0.0"
|
|
144
142
|
}
|
|
145
143
|
}
|
|
@@ -349,10 +349,42 @@ export declare class KeyVaultBackupClient {
|
|
|
349
349
|
* ```
|
|
350
350
|
* Starts a full backup operation.
|
|
351
351
|
* @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.
|
|
352
|
-
* @param sasToken - The SAS token
|
|
352
|
+
* @param sasToken - The SAS token used to access the blob storage resource.
|
|
353
|
+
* @param options - The optional parameters.
|
|
354
|
+
*/
|
|
355
|
+
beginBackup(blobStorageUri: string, sasToken: string, options?: KeyVaultBeginBackupOptions): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;
|
|
356
|
+
/**
|
|
357
|
+
* Starts generating a backup of an Azure Key Vault on the specified Storage Blob account, using a user-assigned Managed Identity
|
|
358
|
+
* to access the Storage account.
|
|
359
|
+
*
|
|
360
|
+
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault backup is generated.
|
|
361
|
+
*
|
|
362
|
+
* Example usage:
|
|
363
|
+
* ```ts
|
|
364
|
+
* const client = new KeyVaultBackupClient(url, credentials);
|
|
365
|
+
*
|
|
366
|
+
* const blobStorageUri = "<blob-storage-uri>"; // <Blob storage URL>/<folder name>
|
|
367
|
+
* const sasToken = "<sas-token>";
|
|
368
|
+
* const poller = await client.beginBackup(blobStorageUri);
|
|
369
|
+
*
|
|
370
|
+
* // Serializing the poller
|
|
371
|
+
* //
|
|
372
|
+
* // const serialized = poller.toString();
|
|
373
|
+
* //
|
|
374
|
+
* // A new poller can be created with:
|
|
375
|
+
* //
|
|
376
|
+
* // await client.beginBackup(blobStorageUri, { resumeFrom: serialized });
|
|
377
|
+
* //
|
|
378
|
+
*
|
|
379
|
+
* // Waiting until it's done
|
|
380
|
+
* const backupUri = await poller.pollUntilDone();
|
|
381
|
+
* console.log(backupUri);
|
|
382
|
+
* ```
|
|
383
|
+
* Starts a full backup operation.
|
|
384
|
+
* @param blobStorageUri - The URL of the blob storage resource, including the path to the container where the backup will end up being stored.
|
|
353
385
|
* @param options - The optional parameters.
|
|
354
386
|
*/
|
|
355
|
-
beginBackup(blobStorageUri: string,
|
|
387
|
+
beginBackup(blobStorageUri: string, options?: KeyVaultBeginBackupOptions): Promise<PollerLike<KeyVaultBackupOperationState, KeyVaultBackupResult>>;
|
|
356
388
|
/**
|
|
357
389
|
* Starts restoring all key materials using the SAS token pointing to a previously stored Azure Blob storage
|
|
358
390
|
* backup folder.
|
|
@@ -385,7 +417,40 @@ export declare class KeyVaultBackupClient {
|
|
|
385
417
|
* @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
|
|
386
418
|
* @param options - The optional parameters.
|
|
387
419
|
*/
|
|
388
|
-
beginRestore(folderUri: string, sasToken
|
|
420
|
+
beginRestore(folderUri: string, sasToken: string, options?: KeyVaultBeginRestoreOptions): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;
|
|
421
|
+
/**
|
|
422
|
+
* Starts restoring all key materials using the SAS token pointing to a previously stored Azure Blob storage
|
|
423
|
+
* backup folder, using a user-assigned Managed Identity to access the storage account.
|
|
424
|
+
*
|
|
425
|
+
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault restore operation is complete.
|
|
426
|
+
*
|
|
427
|
+
* Example usage:
|
|
428
|
+
* ```ts
|
|
429
|
+
* const client = new KeyVaultBackupClient(url, credentials);
|
|
430
|
+
*
|
|
431
|
+
* const blobStorageUri = "<blob-storage-uri>"; // <Blob storage URL>/<folder name>
|
|
432
|
+
* const sasToken = "<sas-token>";
|
|
433
|
+
* const poller = await client.beginRestore(blobStorageUri);
|
|
434
|
+
*
|
|
435
|
+
* // The poller can be serialized with:
|
|
436
|
+
* //
|
|
437
|
+
* // const serialized = poller.toString();
|
|
438
|
+
* //
|
|
439
|
+
* // A new poller can be created with:
|
|
440
|
+
* //
|
|
441
|
+
* // await client.beginRestore(blobStorageUri, { resumeFrom: serialized });
|
|
442
|
+
* //
|
|
443
|
+
*
|
|
444
|
+
* // Waiting until it's done
|
|
445
|
+
* const backupUri = await poller.pollUntilDone();
|
|
446
|
+
* console.log(backupUri);
|
|
447
|
+
* ```
|
|
448
|
+
* Starts a full restore operation.
|
|
449
|
+
* @param folderUri - The URL of the blob storage resource where the previous successful full backup was stored.
|
|
450
|
+
* @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
|
|
451
|
+
* @param options - The optional parameters.
|
|
452
|
+
*/
|
|
453
|
+
beginRestore(folderUri: string, options?: KeyVaultBeginRestoreOptions): Promise<PollerLike<KeyVaultRestoreOperationState, KeyVaultRestoreResult>>;
|
|
389
454
|
/**
|
|
390
455
|
* Starts restoring all key versions of a given key using user supplied SAS token pointing to a previously
|
|
391
456
|
* stored Azure Blob storage backup folder.
|
|
@@ -419,7 +484,41 @@ export declare class KeyVaultBackupClient {
|
|
|
419
484
|
* @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
|
|
420
485
|
* @param options - The optional parameters.
|
|
421
486
|
*/
|
|
422
|
-
beginSelectiveKeyRestore(keyName: string, folderUri: string, sasToken
|
|
487
|
+
beginSelectiveKeyRestore(keyName: string, folderUri: string, sasToken: string, options?: KeyVaultBeginSelectiveKeyRestoreOptions): Promise<PollerLike<KeyVaultSelectiveKeyRestoreOperationState, KeyVaultSelectiveKeyRestoreResult>>;
|
|
488
|
+
/**
|
|
489
|
+
* Starts restoring all key versions of a given key using to a previously
|
|
490
|
+
* stored Azure Blob storage backup folder. The Blob storage backup folder will be accessed using user-assigned Managed Identity.
|
|
491
|
+
*
|
|
492
|
+
* This function returns a Long Running Operation poller that allows you to wait indefinitely until the Key Vault selective restore is complete.
|
|
493
|
+
*
|
|
494
|
+
* Example usage:
|
|
495
|
+
* ```ts
|
|
496
|
+
* const client = new KeyVaultBackupClient(url, credentials);
|
|
497
|
+
*
|
|
498
|
+
* const blobStorageUri = "<blob-storage-uri>";
|
|
499
|
+
* const sasToken = "<sas-token>";
|
|
500
|
+
* const keyName = "<key-name>";
|
|
501
|
+
* const poller = await client.beginSelectiveKeyRestore(keyName, blobStorageUri, sasToken);
|
|
502
|
+
*
|
|
503
|
+
* // Serializing the poller
|
|
504
|
+
* //
|
|
505
|
+
* // const serialized = poller.toString();
|
|
506
|
+
* //
|
|
507
|
+
* // A new poller can be created with:
|
|
508
|
+
* //
|
|
509
|
+
* // await client.beginSelectiveKeyRestore(keyName, blobStorageUri, sasToken, { resumeFrom: serialized });
|
|
510
|
+
* //
|
|
511
|
+
*
|
|
512
|
+
* // Waiting until it's done
|
|
513
|
+
* await poller.pollUntilDone();
|
|
514
|
+
* ```
|
|
515
|
+
* Creates a new role assignment.
|
|
516
|
+
* @param keyName - The name of the key that wants to be restored.
|
|
517
|
+
* @param folderUri - The URL of the blob storage resource, with the folder name of the blob where the previous successful full backup was stored.
|
|
518
|
+
* @param sasToken - The SAS token. If no SAS token is provided, user-assigned Managed Identity will be used to access the blob storage resource.
|
|
519
|
+
* @param options - The optional parameters.
|
|
520
|
+
*/
|
|
521
|
+
beginSelectiveKeyRestore(keyName: string, folderUri: string, options?: KeyVaultBeginSelectiveKeyRestoreOptions): Promise<PollerLike<KeyVaultSelectiveKeyRestoreOperationState, KeyVaultSelectiveKeyRestoreResult>>;
|
|
423
522
|
}
|
|
424
523
|
|
|
425
524
|
/**
|
|
@@ -843,7 +942,7 @@ export declare enum KnownKeyVaultRoleScope {
|
|
|
843
942
|
/**
|
|
844
943
|
* The latest supported Key Vault service API version.
|
|
845
944
|
*/
|
|
846
|
-
export declare const LATEST_API_VERSION = "7.5
|
|
945
|
+
export declare const LATEST_API_VERSION = "7.5";
|
|
847
946
|
|
|
848
947
|
/**
|
|
849
948
|
* An interface representing optional parameters passed to {@link listRoleAssignments}.
|
|
@@ -944,7 +1043,7 @@ export declare interface SettingsClientOptions extends CommonClientOptions {
|
|
|
944
1043
|
/**
|
|
945
1044
|
* Supported API versions
|
|
946
1045
|
*/
|
|
947
|
-
export declare type SUPPORTED_API_VERSIONS = "7.2" | "7.3" | "7.4" | "7.5
|
|
1046
|
+
export declare type SUPPORTED_API_VERSIONS = "7.2" | "7.3" | "7.4" | "7.5";
|
|
948
1047
|
|
|
949
1048
|
/**
|
|
950
1049
|
* An interface representing the optional parameters that can be passed to {@link KeyVaultSettingsClient.updateSetting}
|