Example #1
0
        public ResponseWithHeaders <AzureSecurityKeyVaultAdministrationFullBackupHeaders> FullBackup(string vaultBaseUrl, SASTokenParameter azureStorageBlobContainerUri = null, CancellationToken cancellationToken = default)
        {
            if (vaultBaseUrl == null)
            {
                throw new ArgumentNullException(nameof(vaultBaseUrl));
            }

            using var message = CreateFullBackupRequest(vaultBaseUrl, azureStorageBlobContainerUri);
            _pipeline.Send(message, cancellationToken);
            var headers = new AzureSecurityKeyVaultAdministrationFullBackupHeaders(message.Response);

            switch (message.Response.Status)
            {
            case 202:
                return(ResponseWithHeaders.FromValue(headers, message.Response));

            default:
                throw _clientDiagnostics.CreateRequestFailedException(message.Response);
            }
        }
 /// <summary>
 /// Extracts the operation JobId from the <see cref="AzureSecurityKeyVaultAdministrationFullBackupHeaders" /> AzureAsyncOperation.
 /// </summary>
 /// <returns>The operation JobId.</returns>
 public static string JobId(this AzureSecurityKeyVaultAdministrationFullBackupHeaders header)
 {
     return(GetJobIdFromAzureAsyncOperation(header.AzureAsyncOperation));
 }