@azure/keyvault-admin 4.2.0-beta.2 → 4.2.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/CHANGELOG.md +7 -1
- package/README.md +3 -0
- package/dist/index.js +218 -209
- package/dist/index.js.map +1 -1
- package/dist-esm/keyvault-admin/src/accessControlClient.js +14 -21
- package/dist-esm/keyvault-admin/src/accessControlClient.js.map +1 -1
- package/dist-esm/keyvault-admin/src/accessControlModels.js +1 -1
- package/dist-esm/keyvault-admin/src/accessControlModels.js.map +1 -1
- package/dist-esm/keyvault-admin/src/backupClient.js +7 -7
- package/dist-esm/keyvault-admin/src/backupClient.js.map +1 -1
- package/dist-esm/keyvault-admin/src/challengeAuthenticationCallbacks.js +5 -5
- package/dist-esm/keyvault-admin/src/challengeAuthenticationCallbacks.js.map +1 -1
- package/dist-esm/keyvault-admin/src/constants.js +2 -2
- package/dist-esm/keyvault-admin/src/constants.js.map +1 -1
- package/dist-esm/keyvault-admin/src/generated/keyVaultClient.js +2 -1
- package/dist-esm/keyvault-admin/src/generated/keyVaultClient.js.map +1 -1
- package/dist-esm/keyvault-admin/src/generated/keyVaultClientContext.js +2 -2
- package/dist-esm/keyvault-admin/src/generated/keyVaultClientContext.js.map +1 -1
- package/dist-esm/keyvault-admin/src/generated/models/index.js +6 -6
- package/dist-esm/keyvault-admin/src/generated/models/index.js.map +1 -1
- package/dist-esm/keyvault-admin/src/generated/operations/roleAssignments.js +1 -1
- package/dist-esm/keyvault-admin/src/generated/operations/roleAssignments.js.map +1 -1
- package/dist-esm/keyvault-admin/src/generated/operations/roleDefinitions.js +1 -1
- package/dist-esm/keyvault-admin/src/generated/operations/roleDefinitions.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/backup/operation.js +4 -4
- package/dist-esm/keyvault-admin/src/lro/backup/operation.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/backup/poller.js +2 -2
- package/dist-esm/keyvault-admin/src/lro/backup/poller.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/keyVaultAdminPoller.js +2 -2
- package/dist-esm/keyvault-admin/src/lro/keyVaultAdminPoller.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/restore/operation.js +5 -5
- package/dist-esm/keyvault-admin/src/lro/restore/operation.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/restore/poller.js +2 -2
- package/dist-esm/keyvault-admin/src/lro/restore/poller.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/operation.js +4 -4
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/operation.js.map +1 -1
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/poller.js +2 -2
- package/dist-esm/keyvault-admin/src/lro/selectiveKeyRestore/poller.js.map +1 -1
- package/dist-esm/keyvault-admin/src/mappings.js +7 -7
- package/dist-esm/keyvault-admin/src/mappings.js.map +1 -1
- package/dist-esm/keyvault-admin/src/tracingHelpers.js +4 -4
- package/dist-esm/keyvault-admin/src/tracingHelpers.js.map +1 -1
- package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js +4 -4
- package/dist-esm/keyvault-common/src/challengeBasedAuthenticationPolicy.js.map +1 -1
- package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js +1 -1
- package/dist-esm/keyvault-common/src/parseKeyvaultIdentifier.js.map +1 -1
- package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js +1 -1
- package/dist-esm/keyvault-common/src/parseWWWAuthenticate.js.map +1 -1
- package/dist-esm/keyvault-common/src/tracingHelpers.js +4 -4
- package/dist-esm/keyvault-common/src/tracingHelpers.js.map +1 -1
- package/package.json +11 -27
- package/types/keyvault-admin.d.ts +36 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmQH,4EAA4E;AAC5E,MAAM,CAAN,IAAY,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,6GAA0F,CAAA;IAC1F,oDAAoD;IACpD,iHAA8F,CAAA;IAC9F,qCAAqC;IACrC,yGAAsF,CAAA;IACtF,iEAAiE;IACjE,2GAAwF,CAAA;IACxF,oDAAoD;IACpD,qHAAkG,CAAA;IAClG,2BAA2B;IAC3B,uFAAoE,CAAA;IACpE,4BAA4B;IAC5B,yFAAsE,CAAA;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","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}\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/** 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 ApiVersion73Preview} that the service accepts. */\nexport enum KnownApiVersion73Preview {\n /** Api Version '7.3-preview' */\n Seven3Preview = \"7.3-preview\"\n}\n\n/**\n * Defines values for ApiVersion73Preview. \\\n * {@link KnownApiVersion73Preview} can be used interchangeably with ApiVersion73Preview,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **7.3-preview**: Api Version '7.3-preview'\n */\nexport type ApiVersion73Preview = 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/** 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 KeyVaultClientFullBackupOptionalParams\n 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 KeyVaultClientFullBackupResponse = KeyVaultClientFullBackupHeaders &\n FullBackupOperation;\n\n/** Optional parameters. */\nexport interface KeyVaultClientFullBackupStatusOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the fullBackupStatus operation. */\nexport type KeyVaultClientFullBackupStatusResponse = FullBackupOperation;\n\n/** Optional parameters. */\nexport interface KeyVaultClientFullRestoreOperationOptionalParams\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 KeyVaultClientFullRestoreOperationResponse = KeyVaultClientFullRestoreOperationHeaders &\n RestoreOperation;\n\n/** Optional parameters. */\nexport interface KeyVaultClientRestoreStatusOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the restoreStatus operation. */\nexport type KeyVaultClientRestoreStatusResponse = RestoreOperation;\n\n/** Optional parameters. */\nexport interface KeyVaultClientSelectiveKeyRestoreOperationOptionalParams\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 KeyVaultClientSelectiveKeyRestoreOperationResponse = KeyVaultClientSelectiveKeyRestoreOperationHeaders &\n SelectiveKeyRestoreOperation;\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;AAmQH,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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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","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}\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/** 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 ApiVersion73} that the service accepts. */\nexport enum KnownApiVersion73 {\n /** Api Version '7.3' */\n Seven3 = \"7.3\"\n}\n\n/**\n * Defines values for ApiVersion73. \\\n * {@link KnownApiVersion73} can be used interchangeably with ApiVersion73,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **7.3**: Api Version '7.3'\n */\nexport type ApiVersion73 = 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/** 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 KeyVaultClientOptionalParams\n extends coreClient.ServiceClientOptions {\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n"]}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import * as coreClient from "@azure/core-client";
|
|
9
9
|
import * as Mappers from "../models/mappers";
|
|
10
10
|
import * as Parameters from "../models/parameters";
|
|
11
|
-
/** Class
|
|
11
|
+
/** Class containing RoleAssignments operations. */
|
|
12
12
|
export class RoleAssignmentsImpl {
|
|
13
13
|
/**
|
|
14
14
|
* Initialize a new instance of the class RoleAssignments class.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roleAssignments.js","sourceRoot":"","sources":["../../../../../src/generated/operations/roleAssignments.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,4CAA4C;AAC5C,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,YAAoB,EACpB,KAAa,EACb,kBAA0B,EAC1B,OAA6C;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,KAAK,EAAE,kBAAkB,E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GAA6B;IAC1D,IAAI,EAAE,4DAA4D;IAClE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,KAAK,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,6BAA6B,GAA6B;IAC9D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","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 { RoleAssignments } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { KeyVaultClientContext } from \"../keyVaultClientContext\";\nimport {\n RoleAssignmentsDeleteOptionalParams,\n RoleAssignmentCreateParameters,\n RoleAssignmentsCreateOptionalParams,\n RoleAssignmentsCreateResponse,\n RoleAssignmentsGetOptionalParams,\n RoleAssignmentsGetResponse,\n RoleAssignmentsListForScopeOptionalParams,\n RoleAssignmentsListForScopeResponse,\n RoleAssignmentsListForScopeNextOptionalParams,\n RoleAssignmentsListForScopeNextResponse\n} from \"../models\";\n\n/** Class representing a RoleAssignments. */\nexport class RoleAssignmentsImpl implements RoleAssignments {\n private readonly client: KeyVaultClientContext;\n\n /**\n * Initialize a new instance of the class RoleAssignments class.\n * @param client Reference to the service client\n */\n constructor(client: KeyVaultClientContext) {\n this.client = client;\n }\n\n /**\n * Deletes a role assignment.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignment to delete.\n * @param roleAssignmentName The name of the role assignment to delete.\n * @param options The options parameters.\n */\n delete(\n vaultBaseUrl: string,\n scope: string,\n roleAssignmentName: string,\n options?: RoleAssignmentsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleAssignmentName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Creates a role assignment.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignment to create.\n * @param roleAssignmentName The name of the role assignment to create. It can be any valid GUID.\n * @param parameters Parameters for the role assignment.\n * @param options The options parameters.\n */\n create(\n vaultBaseUrl: string,\n scope: string,\n roleAssignmentName: string,\n parameters: RoleAssignmentCreateParameters,\n options?: RoleAssignmentsCreateOptionalParams\n ): Promise<RoleAssignmentsCreateResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleAssignmentName, parameters, options },\n createOperationSpec\n );\n }\n\n /**\n * Get the specified role assignment.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignment.\n * @param roleAssignmentName The name of the role assignment to get.\n * @param options The options parameters.\n */\n get(\n vaultBaseUrl: string,\n scope: string,\n roleAssignmentName: string,\n options?: RoleAssignmentsGetOptionalParams\n ): Promise<RoleAssignmentsGetResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleAssignmentName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets role assignments for a scope.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignments.\n * @param options The options parameters.\n */\n listForScope(\n vaultBaseUrl: string,\n scope: string,\n options?: RoleAssignmentsListForScopeOptionalParams\n ): Promise<RoleAssignmentsListForScopeResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, options },\n listForScopeOperationSpec\n );\n }\n\n /**\n * ListForScopeNext\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignments.\n * @param nextLink The nextLink from the previous successful call to the ListForScope method.\n * @param options The options parameters.\n */\n listForScopeNext(\n vaultBaseUrl: string,\n scope: string,\n nextLink: string,\n options?: RoleAssignmentsListForScopeNextOptionalParams\n ): Promise<RoleAssignmentsListForScopeNextResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, nextLink, options },\n listForScopeNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 404: {},\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleAssignmentName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.RoleAssignment\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleAssignmentName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleAssignment\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleAssignmentName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Authorization/roleAssignments\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleAssignmentListResult\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.vaultBaseUrl, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForScopeNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleAssignmentListResult\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"roleAssignments.js","sourceRoot":"","sources":["../../../../../src/generated/operations/roleAssignments.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,C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cesContent":["/*\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 { RoleAssignments } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { KeyVaultClientContext } from \"../keyVaultClientContext\";\nimport {\n RoleAssignmentsDeleteOptionalParams,\n RoleAssignmentCreateParameters,\n RoleAssignmentsCreateOptionalParams,\n RoleAssignmentsCreateResponse,\n RoleAssignmentsGetOptionalParams,\n RoleAssignmentsGetResponse,\n RoleAssignmentsListForScopeOptionalParams,\n RoleAssignmentsListForScopeResponse,\n RoleAssignmentsListForScopeNextOptionalParams,\n RoleAssignmentsListForScopeNextResponse\n} from \"../models\";\n\n/** Class containing RoleAssignments operations. */\nexport class RoleAssignmentsImpl implements RoleAssignments {\n private readonly client: KeyVaultClientContext;\n\n /**\n * Initialize a new instance of the class RoleAssignments class.\n * @param client Reference to the service client\n */\n constructor(client: KeyVaultClientContext) {\n this.client = client;\n }\n\n /**\n * Deletes a role assignment.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignment to delete.\n * @param roleAssignmentName The name of the role assignment to delete.\n * @param options The options parameters.\n */\n delete(\n vaultBaseUrl: string,\n scope: string,\n roleAssignmentName: string,\n options?: RoleAssignmentsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleAssignmentName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Creates a role assignment.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignment to create.\n * @param roleAssignmentName The name of the role assignment to create. It can be any valid GUID.\n * @param parameters Parameters for the role assignment.\n * @param options The options parameters.\n */\n create(\n vaultBaseUrl: string,\n scope: string,\n roleAssignmentName: string,\n parameters: RoleAssignmentCreateParameters,\n options?: RoleAssignmentsCreateOptionalParams\n ): Promise<RoleAssignmentsCreateResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleAssignmentName, parameters, options },\n createOperationSpec\n );\n }\n\n /**\n * Get the specified role assignment.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignment.\n * @param roleAssignmentName The name of the role assignment to get.\n * @param options The options parameters.\n */\n get(\n vaultBaseUrl: string,\n scope: string,\n roleAssignmentName: string,\n options?: RoleAssignmentsGetOptionalParams\n ): Promise<RoleAssignmentsGetResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleAssignmentName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets role assignments for a scope.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignments.\n * @param options The options parameters.\n */\n listForScope(\n vaultBaseUrl: string,\n scope: string,\n options?: RoleAssignmentsListForScopeOptionalParams\n ): Promise<RoleAssignmentsListForScopeResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, options },\n listForScopeOperationSpec\n );\n }\n\n /**\n * ListForScopeNext\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role assignments.\n * @param nextLink The nextLink from the previous successful call to the ListForScope method.\n * @param options The options parameters.\n */\n listForScopeNext(\n vaultBaseUrl: string,\n scope: string,\n nextLink: string,\n options?: RoleAssignmentsListForScopeNextOptionalParams\n ): Promise<RoleAssignmentsListForScopeNextResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, nextLink, options },\n listForScopeNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 404: {},\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleAssignmentName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.RoleAssignment\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n requestBody: Parameters.parameters1,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleAssignmentName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleAssignment\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleAssignmentName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForScopeOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Authorization/roleAssignments\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleAssignmentListResult\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.vaultBaseUrl, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listForScopeNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleAssignmentListResult\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import * as coreClient from "@azure/core-client";
|
|
9
9
|
import * as Mappers from "../models/mappers";
|
|
10
10
|
import * as Parameters from "../models/parameters";
|
|
11
|
-
/** Class
|
|
11
|
+
/** Class containing RoleDefinitions operations. */
|
|
12
12
|
export class RoleDefinitionsImpl {
|
|
13
13
|
/**
|
|
14
14
|
* Initialize a new instance of the class RoleDefinitions class.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roleDefinitions.js","sourceRoot":"","sources":["../../../../../src/generated/operations/roleDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,4CAA4C;AAC5C,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACH,MAAM,CACJ,YAAoB,EACpB,KAAa,EACb,kBAA0B,EAC1B,OAA6C;QAE7C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,EACpD,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACH,cAAc,CACZ,YAAoB,EACpB,KAAa,EACb,kBAA0B,EAC1B,UAA0C,EAC1C,OAAqD;QAErD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,YAAY,EAAE,KAAK,EAAE,kBAA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,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,KAAK,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","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 { RoleDefinitions } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { KeyVaultClientContext } from \"../keyVaultClientContext\";\nimport {\n RoleDefinitionsDeleteOptionalParams,\n RoleDefinitionCreateParameters,\n RoleDefinitionsCreateOrUpdateOptionalParams,\n RoleDefinitionsCreateOrUpdateResponse,\n RoleDefinitionsGetOptionalParams,\n RoleDefinitionsGetResponse,\n RoleDefinitionsListOptionalParams,\n RoleDefinitionsListResponse,\n RoleDefinitionsListNextOptionalParams,\n RoleDefinitionsListNextResponse\n} from \"../models\";\n\n/** Class representing a RoleDefinitions. */\nexport class RoleDefinitionsImpl implements RoleDefinitions {\n private readonly client: KeyVaultClientContext;\n\n /**\n * Initialize a new instance of the class RoleDefinitions class.\n * @param client Reference to the service client\n */\n constructor(client: KeyVaultClientContext) {\n this.client = client;\n }\n\n /**\n * Deletes a custom role definition.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition to delete. Managed HSM only supports '/'.\n * @param roleDefinitionName The name (GUID) of the role definition to delete.\n * @param options The options parameters.\n */\n delete(\n vaultBaseUrl: string,\n scope: string,\n roleDefinitionName: string,\n options?: RoleDefinitionsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleDefinitionName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Creates or updates a custom role definition.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition to create or update. Managed HSM only supports '/'.\n * @param roleDefinitionName The name of the role definition to create or update. It can be any valid\n * GUID.\n * @param parameters Parameters for the role definition.\n * @param options The options parameters.\n */\n createOrUpdate(\n vaultBaseUrl: string,\n scope: string,\n roleDefinitionName: string,\n parameters: RoleDefinitionCreateParameters,\n options?: RoleDefinitionsCreateOrUpdateOptionalParams\n ): Promise<RoleDefinitionsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleDefinitionName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Get the specified role definition.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition to get. Managed HSM only supports '/'.\n * @param roleDefinitionName The name of the role definition to get.\n * @param options The options parameters.\n */\n get(\n vaultBaseUrl: string,\n scope: string,\n roleDefinitionName: string,\n options?: RoleDefinitionsGetOptionalParams\n ): Promise<RoleDefinitionsGetResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleDefinitionName, options },\n getOperationSpec\n );\n }\n\n /**\n * Get all role definitions that are applicable at scope and above.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition.\n * @param options The options parameters.\n */\n list(\n vaultBaseUrl: string,\n scope: string,\n options?: RoleDefinitionsListOptionalParams\n ): Promise<RoleDefinitionsListResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n listNext(\n vaultBaseUrl: string,\n scope: string,\n nextLink: string,\n options?: RoleDefinitionsListNextOptionalParams\n ): Promise<RoleDefinitionsListNextResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 404: {},\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleDefinitionName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleDefinitionName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleDefinitionName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Authorization/roleDefinitions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinitionListResult\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.vaultBaseUrl, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinitionListResult\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"roleDefinitions.js","sourceRoot":"","sources":["../../../../../src/generated/operations/roleDefinitions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,mDAAmD;AACnD,MAAM,OAAO,mBAAmB;IAG9B;;;OAGG;IACH,YAAY,MAA6B;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;O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AC,YAAY;QACvB,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,kBAAkB;KAC9B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,4DAA4D;IAClE,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,UAAU,CAAC,KAAK,CAAC;IAC1D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","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 { RoleDefinitions } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { KeyVaultClientContext } from \"../keyVaultClientContext\";\nimport {\n RoleDefinitionsDeleteOptionalParams,\n RoleDefinitionCreateParameters,\n RoleDefinitionsCreateOrUpdateOptionalParams,\n RoleDefinitionsCreateOrUpdateResponse,\n RoleDefinitionsGetOptionalParams,\n RoleDefinitionsGetResponse,\n RoleDefinitionsListOptionalParams,\n RoleDefinitionsListResponse,\n RoleDefinitionsListNextOptionalParams,\n RoleDefinitionsListNextResponse\n} from \"../models\";\n\n/** Class containing RoleDefinitions operations. */\nexport class RoleDefinitionsImpl implements RoleDefinitions {\n private readonly client: KeyVaultClientContext;\n\n /**\n * Initialize a new instance of the class RoleDefinitions class.\n * @param client Reference to the service client\n */\n constructor(client: KeyVaultClientContext) {\n this.client = client;\n }\n\n /**\n * Deletes a custom role definition.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition to delete. Managed HSM only supports '/'.\n * @param roleDefinitionName The name (GUID) of the role definition to delete.\n * @param options The options parameters.\n */\n delete(\n vaultBaseUrl: string,\n scope: string,\n roleDefinitionName: string,\n options?: RoleDefinitionsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleDefinitionName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Creates or updates a custom role definition.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition to create or update. Managed HSM only supports '/'.\n * @param roleDefinitionName The name of the role definition to create or update. It can be any valid\n * GUID.\n * @param parameters Parameters for the role definition.\n * @param options The options parameters.\n */\n createOrUpdate(\n vaultBaseUrl: string,\n scope: string,\n roleDefinitionName: string,\n parameters: RoleDefinitionCreateParameters,\n options?: RoleDefinitionsCreateOrUpdateOptionalParams\n ): Promise<RoleDefinitionsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleDefinitionName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Get the specified role definition.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition to get. Managed HSM only supports '/'.\n * @param roleDefinitionName The name of the role definition to get.\n * @param options The options parameters.\n */\n get(\n vaultBaseUrl: string,\n scope: string,\n roleDefinitionName: string,\n options?: RoleDefinitionsGetOptionalParams\n ): Promise<RoleDefinitionsGetResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, roleDefinitionName, options },\n getOperationSpec\n );\n }\n\n /**\n * Get all role definitions that are applicable at scope and above.\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition.\n * @param options The options parameters.\n */\n list(\n vaultBaseUrl: string,\n scope: string,\n options?: RoleDefinitionsListOptionalParams\n ): Promise<RoleDefinitionsListResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, options },\n listOperationSpec\n );\n }\n\n /**\n * ListNext\n * @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.\n * @param scope The scope of the role definition.\n * @param nextLink The nextLink from the previous successful call to the List method.\n * @param options The options parameters.\n */\n listNext(\n vaultBaseUrl: string,\n scope: string,\n nextLink: string,\n options?: RoleDefinitionsListNextOptionalParams\n ): Promise<RoleDefinitionsListNextResponse> {\n return this.client.sendOperationRequest(\n { vaultBaseUrl, scope, nextLink, options },\n listNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {},\n 404: {},\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleDefinitionName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n requestBody: Parameters.parameters,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleDefinitionName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/{scope}/providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinition\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.roleDefinitionName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listOperationSpec: coreClient.OperationSpec = {\n path: \"/{scope}/providers/Microsoft.Authorization/roleDefinitions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinitionListResult\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [Parameters.vaultBaseUrl, Parameters.scope],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoleDefinitionListResult\n },\n default: {\n bodyMapper: Mappers.KeyVaultError\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.filter],\n urlParameters: [\n Parameters.vaultBaseUrl,\n Parameters.scope,\n Parameters.nextLink\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
import { KeyVaultAdminPollOperation } from "../keyVaultAdminPoller";
|
|
3
|
+
import { KeyVaultAdminPollOperation, } from "../keyVaultAdminPoller";
|
|
4
4
|
import { createTraceFunction } from "../../tracingHelpers";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
@@ -41,7 +41,7 @@ export class KeyVaultBackupPollOperation extends KeyVaultAdminPollOperation {
|
|
|
41
41
|
if (!state.isStarted) {
|
|
42
42
|
const serviceOperation = await this.fullBackup(Object.assign(Object.assign({}, this.requestOptions), { azureStorageBlobContainerUri: {
|
|
43
43
|
storageResourceUri: blobStorageUri,
|
|
44
|
-
token: sasToken
|
|
44
|
+
token: sasToken,
|
|
45
45
|
} }));
|
|
46
46
|
this.mapState(serviceOperation);
|
|
47
47
|
}
|
|
@@ -56,7 +56,7 @@ export class KeyVaultBackupPollOperation extends KeyVaultAdminPollOperation {
|
|
|
56
56
|
}
|
|
57
57
|
mapState(serviceOperation) {
|
|
58
58
|
const state = this.state;
|
|
59
|
-
const { startTime, jobId, azureStorageBlobContainerUri, endTime, error, status, statusDetails } = serviceOperation;
|
|
59
|
+
const { startTime, jobId, azureStorageBlobContainerUri, endTime, error, status, statusDetails, } = serviceOperation;
|
|
60
60
|
if (!startTime) {
|
|
61
61
|
throw new Error(`Missing "startTime" from the full backup operation. Full backup did not start successfully.`);
|
|
62
62
|
}
|
|
@@ -74,7 +74,7 @@ export class KeyVaultBackupPollOperation extends KeyVaultAdminPollOperation {
|
|
|
74
74
|
state.result = {
|
|
75
75
|
folderUri: azureStorageBlobContainerUri,
|
|
76
76
|
startTime,
|
|
77
|
-
endTime
|
|
77
|
+
endTime,
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../../src/lro/backup/operation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
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,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;GAEG;AACH,MAAM,SAAS,GAAG,mBAAmB,CAAC,2CAA2C,CAAC,CAAC;AAsBnF;;GAEG;AACH,MAAM,OAAO,2BAA4B,SAAQ,0BAGhD;IACC,YACS,KAAuC,EACtC,QAAgB,EAChB,MAAsB,EACtB,iBAA6C,EAAE;QAEvD,KAAK,CAAC,KAAK,EAAE,EAAE,aAAa,EAAE,sDAAsD,EAAE,CAAC,CAAC;QALjF,UAAK,GAAL,KAAK,CAAkC;QACtC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,WAAM,GAAN,MAAM,CAAgB;QACtB,mBAAc,GAAd,cAAc,CAAiC;IAGzD,CAAC;IAED;;OAEG;IACK,UAAU,CAAC,OAAiC;QAClD,OAAO,SAAS,CAAC,YAAY,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,EAAE,CACzD,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,CACtD,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,gBAAgB,CACtB,KAAa,EACb,OAAmC;QAEnC,OAAO,SAAS,CAAC,kBAAkB,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,EAAE,CAC/D,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,cAAc,CAAC,CACnE,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CACV,UAGI,EAAE;QAEN,MAAM,KAAK,GAAG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SAAS,GAAG,SAAS,CAAC;QAC5B,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,KAAK,CAAC,aAAa,GAAG,aAAa,CAAC;QACpC,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,OAAO,CAAC;QAE9B,IAAI,KAAK,CAAC,WAAW,KAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,CAAA,EAAE;YACpC,MAAM,IAAI,KAAK,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,KAAI,aAAa,CAAC,CAAC;SAClD;QAED,IAAI,KAAK,CAAC,WAAW,EAAE;YACrB,KAAK,CAAC,MAAM,GAAG;gBACb,SAAS,EAAE,4BAA4B;gBACvC,SAAS;gBACT,OAAO;aACR,CAAC;SACH;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 { createTraceFunction } from \"../../tracingHelpers\";\n\n/**\n * @internal\n */\nconst withTrace = createTraceFunction(\"Azure.KeyVault.Admin.KeyVaultBackupPoller\");\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 withTrace(\"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 withTrace(\"fullBackupStatus\", options, (updatedOptions) =>\n 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 },\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,13 +1,13 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
import { KeyVaultBackupPollOperation } from "./operation";
|
|
4
3
|
import { KeyVaultAdminPoller } from "../keyVaultAdminPoller";
|
|
4
|
+
import { KeyVaultBackupPollOperation, } from "./operation";
|
|
5
5
|
/**
|
|
6
6
|
* Class that creates a poller that waits until the backup of a Key Vault ends up being generated.
|
|
7
7
|
*/
|
|
8
8
|
export class KeyVaultBackupPoller extends KeyVaultAdminPoller {
|
|
9
9
|
constructor(options) {
|
|
10
|
-
const { client, vaultUrl, blobStorageUri, sasToken, requestOptions, intervalInMs = 2000, resumeFrom } = options;
|
|
10
|
+
const { client, vaultUrl, blobStorageUri, sasToken, requestOptions, intervalInMs = 2000, resumeFrom, } = options;
|
|
11
11
|
let state;
|
|
12
12
|
if (resumeFrom) {
|
|
13
13
|
state = JSON.parse(resumeFrom).state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../../src/lro/backup/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,
|
|
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;YACd,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;SACtC;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"]}
|
|
@@ -15,7 +15,7 @@ export function cleanState(state) {
|
|
|
15
15
|
isCancelled: state.isCancelled,
|
|
16
16
|
isCompleted: state.isCompleted,
|
|
17
17
|
error: state.error,
|
|
18
|
-
result: state.result
|
|
18
|
+
result: state.result,
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -67,7 +67,7 @@ export class KeyVaultAdminPollOperation {
|
|
|
67
67
|
*/
|
|
68
68
|
toString() {
|
|
69
69
|
return JSON.stringify({
|
|
70
|
-
state: cleanState(this.state)
|
|
70
|
+
state: cleanState(this.state),
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyVaultAdminPoller.js","sourceRoot":"","sources":["../../../../src/lro/keyVaultAdminPoller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
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,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,OAAO,EAAE,KAAK,CAAC,OAAO;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;IAGrC,YAAmB,KAAa,EAAE,OAA0C;QAAzD,UAAK,GAAL,KAAK,CAAQ;QAC9B,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<TState, TResult> implements PollOperation<TState, TResult> {\n private cancelMessage: string;\n\n constructor(public state: TState, options: KeyVaultAdminPollOperationOptions) {\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,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
import { KeyVaultAdminPollOperation } from "../keyVaultAdminPoller";
|
|
3
|
+
import { KeyVaultAdminPollOperation, } from "../keyVaultAdminPoller";
|
|
4
4
|
import { createTraceFunction } from "../../tracingHelpers";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
@@ -12,7 +12,7 @@ const withTrace = createTraceFunction("Azure.KeyVault.Admin.KeyVaultRestorePolle
|
|
|
12
12
|
export class KeyVaultRestorePollOperation extends KeyVaultAdminPollOperation {
|
|
13
13
|
constructor(state, vaultUrl, client, requestOptions = {}) {
|
|
14
14
|
super(state, {
|
|
15
|
-
cancelMessage: "Cancelling the restoration full Key Vault backup is not supported."
|
|
15
|
+
cancelMessage: "Cancelling the restoration full Key Vault backup is not supported.",
|
|
16
16
|
});
|
|
17
17
|
this.state = state;
|
|
18
18
|
this.vaultUrl = vaultUrl;
|
|
@@ -45,8 +45,8 @@ export class KeyVaultRestorePollOperation extends KeyVaultAdminPollOperation {
|
|
|
45
45
|
folderToRestore: folderName,
|
|
46
46
|
sasTokenParameters: {
|
|
47
47
|
storageResourceUri: folderUri,
|
|
48
|
-
token: sasToken
|
|
49
|
-
}
|
|
48
|
+
token: sasToken,
|
|
49
|
+
},
|
|
50
50
|
} }));
|
|
51
51
|
this.mapState(serviceOperation);
|
|
52
52
|
}
|
|
@@ -78,7 +78,7 @@ export class KeyVaultRestorePollOperation extends KeyVaultAdminPollOperation {
|
|
|
78
78
|
if (state.isCompleted) {
|
|
79
79
|
state.result = {
|
|
80
80
|
startTime,
|
|
81
|
-
endTime
|
|
81
|
+
endTime,
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation.js","sourceRoot":"","sources":["../../../../../src/lro/restore/operation.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
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,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;GAEG;AACH,MAAM,SAAS,GAAG,mBAAmB,CAAC,4CAA4C,CAAC,CAAC;AA4BpF;;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,SAAS,CAAC,aAAa,EAAE,OAAO,EAAE,CAAC,cAAc,EAAE,EAAE,CAC1D,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC,CAChE,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,aAAa,CACzB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C;QACzB,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAC;QAErF,IAAI,CAAC,SAAS,EAAE;YACd,MAAM,IAAI,KAAK,CACb,0FAA0F,CAC3F,CAAC;SACH;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;YACpC,MAAM,IAAI,KAAK,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,KAAI,aAAa,CAAC,CAAC;SAClD;QAED,IAAI,KAAK,CAAC,WAAW,EAAE;YACrB,KAAK,CAAC,MAAM,GAAG;gBACb,SAAS;gBACT,OAAO;aACR,CAAC;SACH;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 { createTraceFunction } from \"../../tracingHelpers\";\n\n/**\n * @internal\n */\nconst withTrace = createTraceFunction(\"Azure.KeyVault.Admin.KeyVaultRestorePoller\");\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 withTrace(\"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 withTrace(\"restoreStatus\", options, (updatedOptions) =>\n 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 },\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,13 +1,13 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
import { KeyVaultRestorePollOperation } from "./operation";
|
|
4
3
|
import { KeyVaultAdminPoller } from "../keyVaultAdminPoller";
|
|
4
|
+
import { KeyVaultRestorePollOperation, } from "./operation";
|
|
5
5
|
/**
|
|
6
6
|
* Class that creates a poller that waits until a Key Vault ends up being restored.
|
|
7
7
|
*/
|
|
8
8
|
export class KeyVaultRestorePoller extends KeyVaultAdminPoller {
|
|
9
9
|
constructor(options) {
|
|
10
|
-
const { client, vaultUrl, folderUri, sasToken, folderName, requestOptions, intervalInMs = 2000, resumeFrom } = options;
|
|
10
|
+
const { client, vaultUrl, folderUri, sasToken, folderName, requestOptions, intervalInMs = 2000, resumeFrom, } = options;
|
|
11
11
|
let state;
|
|
12
12
|
if (resumeFrom) {
|
|
13
13
|
state = JSON.parse(resumeFrom).state;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poller.js","sourceRoot":"","sources":["../../../../../src/lro/restore/poller.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,
|
|
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;YACd,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC;SACtC;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,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
import { KeyVaultAdminPollOperation } from "../keyVaultAdminPoller";
|
|
3
|
+
import { KeyVaultAdminPollOperation, } from "../keyVaultAdminPoller";
|
|
4
4
|
import { createTraceFunction } from "../../tracingHelpers";
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
@@ -43,8 +43,8 @@ export class KeyVaultSelectiveKeyRestorePollOperation extends KeyVaultAdminPollO
|
|
|
43
43
|
folder: folderName,
|
|
44
44
|
sasTokenParameters: {
|
|
45
45
|
storageResourceUri: folderUri,
|
|
46
|
-
token: sasToken
|
|
47
|
-
}
|
|
46
|
+
token: sasToken,
|
|
47
|
+
},
|
|
48
48
|
} }));
|
|
49
49
|
this.mapState(selectiveRestoreOperation);
|
|
50
50
|
}
|
|
@@ -76,7 +76,7 @@ export class KeyVaultSelectiveKeyRestorePollOperation extends KeyVaultAdminPollO
|
|
|
76
76
|
if (state.isCompleted) {
|
|
77
77
|
state.result = {
|
|
78
78
|
startTime,
|
|
79
|
-
endTime
|
|
79
|
+
endTime,
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
}
|